Fix issue in git hook script in rbtools

Review Request #7129 — Created March 27, 2015 and submitted

Information

RBTools
master
a744310...

Reviewers

When pushing with git with the two server-side git hook scripts in rbtools/contrib/tools, a Python TypeError is raised. This is due to an incorrect function call in the get_commit_hashes function in rbtools/hooks/git.py. Changing this call to return a list fixes the issue

I tested on my computer, by creating two local repositories, one pointing to the other one with the following configurations:
- git remote add <path_to_other_local_git_repo> to the pushing repo
- git config receive.denyCurrentBranch ignore to the receiving repo

I also installed the 2 server side hooks in contrib/tools on the pushing side.

The scripts work as intended after the fix.

Description From Last Updated

I'm confused. The old behaviour should be returning a list of lines. What makes the old behaviour fail?

brenniebrennie
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        rbtools/hooks/git.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        rbtools/hooks/git.py
    
    
  2. 
      
TI
TI
TI
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbtools/hooks/git.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbtools/hooks/git.py
    
    
  2. 
      
TI
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbtools/hooks/git.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbtools/hooks/git.py
    
    
  2. 
      
david
  1. Please update the summary and description to be compliant with our guidelines. Also, please put only the bug number in the bugs field, and not the full URL.

  2. 
      
TI
TI
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbtools/hooks/git.py
        rbtools/clients/git.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbtools/hooks/git.py
        rbtools/clients/git.py
    
    
  2. 
      
TI
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbtools/hooks/git.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbtools/hooks/git.py
    
    
  2. 
      
TI
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbtools/hooks/git.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbtools/hooks/git.py
    
    
  2. 
      
TI
TI
brennie
  1. 
      
  2. rbtools/hooks/git.py (Diff revision 6)
     
     
    Show all issues

    I'm confused. The old behaviour should be returning a list of lines. What makes the old behaviour fail?

    1. the execute() function takes no second parameter. somebody must have remembered wrong function definitions

    2. Ah! Indeed, there is an execute function in ReviewBoard that takes such a parameter. I got them mixed up myself!

  3. 
      
brennie
  1. Ship It!
  2. 
      
david
  1. Ship It!
  2. 
      
TI
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.7.x (b349fb7)
Loading...