Fix issue in git hook script in rbtools
Review Request #7129 — Created March 27, 2015 and submitted
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 repoI 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? |
brennie |
- Groups:
- Groups:
- Commit:
-
929bbf99fc233fa057b044ddc93f0e7186830ae0b4112143a33862aab37b942188584818543b259e
- Diff:
-
Revision 2 (+3 -2)
-
Tool: Pyflakes Processed Files: rbtools/hooks/git.py Tool: PEP8 Style Checker Processed Files: rbtools/hooks/git.py
- Commit:
-
b4112143a33862aab37b942188584818543b259e8590ddd8393bf2c6ea2139ce29dad5203a5f4d8b
- Diff:
-
Revision 3 (+3 -1)
-
Tool: Pyflakes Processed Files: rbtools/hooks/git.py Tool: PEP8 Style Checker Processed Files: rbtools/hooks/git.py
-
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.
- Bugs:
-
https://code.google.com/p/reviewboard/issues/detail?id=3824
- Commit:
-
8590ddd8393bf2c6ea2139ce29dad5203a5f4d8b2952470fd3e7436002d5dccd2d468bb10a010181
- Diff:
-
Revision 4 (+3 -2)
-
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
- Commit:
-
2952470fd3e7436002d5dccd2d468bb10a01018153cdae203310f9c5566afa064aa8d0d46834a7f8
- Diff:
-
Revision 5 (+1 -2)
-
Tool: Pyflakes Processed Files: rbtools/hooks/git.py Tool: PEP8 Style Checker Processed Files: rbtools/hooks/git.py
- Commit:
-
53cdae203310f9c5566afa064aa8d0d46834a7f8a7443106db7a1eaf4c3a0161173488645cf4c4d8
- Diff:
-
Revision 6 (+1 -1)
-
Tool: Pyflakes Processed Files: rbtools/hooks/git.py Tool: PEP8 Style Checker Processed Files: rbtools/hooks/git.py
- Description:
-
~ There was an incorrect function call. Changing it to return a list fixes the problem
~ 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
- Testing Done:
-
+ 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.