Add hooks module, containing utility functions common to hook scripts.
Review Request #5543 — Created Feb. 24, 2014 and submitted
This is a new 'hooks' module in RBTools. rbtools/hooks/common.py contains functions common to all hook scripts, and rbtools/hooks/git.py contains functions for Git hook scripts.
- Tested the functions individually, and got the expected results.
- More testing was done in https://reviews.reviewboard.org/r/5403/ for the Git post-receive and pre-receive hook scripts that use this new module.
Description | From | Last Updated |
---|---|---|
There should be two blank lines between items at the lowest indentation level. Here and below. |
david | |
This should probably propagate up the message in the exception. |
david | |
This should probably check that the command was sucessful. |
david | |
Should it be up to the caller to pass in a compiled regex with the options that they care to … |
david | |
This can just return directly instead of assigning to a variable and returning that. |
david | |
Two blank lines between top-level blocks. Here and below. |
david | |
It might be nice to pass in arguments as a list instead of relying on shell=True to split it. |
david | |
Relying on the pipe here makes it so this only works on unix-type systems (and even then relies a lot … |
david | |
You could use '0' * 40 here. |
david | |
No need for this line. |
david | |
No need for this line. |
david | |
"URL" |
chipx86 | |
So I believe that Christian's comment about _make_api_client was that it's only used in this one place, so instead of … |
david |
- Change Summary:
-
Fixed some style issues, and modified execute statements so we no longer rely on shell=True.
- Commit:
-
8ba9719ac1ea10d602df56eac278c29c19a52e4884097a2a25dadee9bd8542ba0b95c7feeddb3d95
- Change Summary:
-
Fixed capitalization of 'URL'.
- Commit:
-
84097a2a25dadee9bd8542ba0b95c7feeddb3d95642042a16f918fe310c6710be8266a745b4c2a41
- Change Summary:
-
Fixed a docstring.
- Commit:
-
642042a16f918fe310c6710be8266a745b4c2a4139f6b85e99c0a0a02a00e566b0209219a5f4a3aa
- Change Summary:
-
Changed all review request ID variables to ints, and added a log formatter.
- Commit:
-
aa00a988cde63eda40a6ae7e810bbc82dc078f3b55d245cb8bdc52272b26a2dfeda1d1d9650c4d91
- Change Summary:
-
Fixed a bug that caused the pre-receive hook to crash for a push with a newly created branch. (We need to run git rev-list using new_rev, not ref_name. The branch ref_name will not yet exist before the push, which is when the pre-receive hook is executed.)
- Commit:
-
55d245cb8bdc52272b26a2dfeda1d1d9650c4d910c6bd5cc8c66b1fde9861a457968ce9167039f5a