Adding pre-post hook to .reviewboardrc
Review Request #7066 — Created March 16, 2015 and discarded
This feature is to add pre-post hook to run before posting the request. This patch demonstrate how we can do format checking before posting the review so that we can make edit locally to fix formatting issues locally. The user can use --no-pre-post-hook to turn off the hook if neccessary.
Test with "pyflakes . && nosetests" command specified in rbtools/.reviewboardrc and check if the command is run.
Check if the pre-post-hook is turned off if the --no-pre-post-hook flag is on.
Description | From | Last Updated |
---|---|---|
PEP8? I'm not sure if we want to set thi in the global .reviewboardrc. |
brennie | |
We use single quotes. |
brennie | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot | |
Using the shell would save a lot of headaches and make the pre-post hooks more effective and powerful in my … |
brennie | |
Blank line between these. |
brennie | |
Blank line between these. |
brennie | |
Blank line between these. |
brennie | |
This will not work in the case of quoted substrings. |
brennie | |
You can use rbtools.utils.console.confirm instead of rolling your own confirmation logic. |
brennie | |
Col: 80 E501 line too long (83 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (84 > 79 characters) |
reviewbot | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
Col: 9 E122 continuation line missing indentation or outdented |
reviewbot | |
I don't think shell=True is a good idea. These explain it well https://docs.python.org/2/library/subprocess.html#frequently-used-arguments http://stackoverflow.com/questions/3172470/actual-meaning-of-shell-true-in-subprocess |
TI tienv | |
Use single quotes instead of double quotes. And shouldn't is_continue be continue? |
VT VTL-Developer | |
you can probably just do: if not confirm() |
TI tienv | |
I don't know if we want to force this on our users. |
brennie | |
Missing trailing comma. |
brennie | |
Missing trailing comma. |
brennie | |
This should be formatted as: if ('PRE_POST_HOOK' in self.config and not self.options.no_pre_post_hook): # ... |
brennie | |
Should the result of the influence being able to post ? |
brennie | |
Single quotes. |
brennie | |
Col: 48 E502 the backslash is redundant between brackets |
reviewbot | |
You removed the newline from the end of this line. Can you revert this change please? |
brennie | |
Can we just import subprocess and use subprocess.Popen and subprocess.PIPE ? |
brennie | |
This can be simplified to use an and. See previous comment re status codes vs output. |
brennie | |
Col: 23 E128 continuation line under-indented for visual indent |
reviewbot | |
Add added_in field to indicate the version of RBTools where this option was introduced. |
gmyers | |
I don't think this change was intended? |
gmyers | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot | |
should we use stdout and stderror here so the user can see messages? |
brennie | |
su before sy |
david | |
This looks like debug output? |
david | |
Can we print out a message saying "X command returned an error" before asking for confirmation? |
david | |
Col: 80 E501 line too long (88 > 79 characters) |
reviewbot | |
Col: 31 W503 line break before binary operator |
reviewbot | |
Col: 61 W291 trailing whitespace |
reviewbot | |
Needs a trailing comma? |
SU Sunxperous | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot |
-
Tool: PEP8 Style Checker Processed Files: rbtools/commands/post.py Ignored Files: .reviewboardrc Tool: Pyflakes Processed Files: rbtools/commands/post.py Ignored Files: .reviewboardrc
-
Tool: Pyflakes Processed Files: rbtools/commands/post.py Ignored Files: .reviewboardrc Tool: PEP8 Style Checker Processed Files: rbtools/commands/post.py Ignored Files: .reviewboardrc
-
Tool: Pyflakes Processed Files: rbtools/commands/post.py Ignored Files: .reviewboardrc Tool: PEP8 Style Checker Processed Files: rbtools/commands/post.py Ignored Files: .reviewboardrc
- Commit:
-
4efcd1baf872905e582e4a785a96d28a77f7c835a128d7bf2f25dcbb5f4ee79d74a90bb80dbc120d
- Diff:
-
Revision 6 (+14 -1)
- Commit:
-
a128d7bf2f25dcbb5f4ee79d74a90bb80dbc120d4ec8d57e066202419febc07f16dc889c3afa5cc3
- Diff:
-
Revision 7 (+14 -1)
-
Tool: Pyflakes Processed Files: rbtools/commands/post.py Ignored Files: .reviewboardrc Tool: PEP8 Style Checker Processed Files: rbtools/commands/post.py Ignored Files: .reviewboardrc
- Commit:
-
4ec8d57e066202419febc07f16dc889c3afa5cc34d51d07f37a445f683535753f5dc7740f7ac5e1e
- Diff:
-
Revision 8 (+17 -1)
-
Tool: PEP8 Style Checker Processed Files: rbtools/commands/post.py Ignored Files: .reviewboardrc Tool: Pyflakes Processed Files: rbtools/commands/post.py Ignored Files: .reviewboardrc
- Commit:
-
4d51d07f37a445f683535753f5dc7740f7ac5e1e49677cc711b043c73a623c7399338c3068d8c42e
- Diff:
-
Revision 9 (+17 -1)
- Commit:
-
49677cc711b043c73a623c7399338c3068d8c42e4e88a7933836f9af88982e04f2f9239403f0de37
- Diff:
-
Revision 10 (+17 -1)
- Commit:
-
4e88a7933836f9af88982e04f2f9239403f0de37df5dc5c0209ae7836754cecf721a004041908ef6
- Diff:
-
Revision 11 (+19)
-
Tool: Pyflakes Processed Files: rbtools/commands/post.py Tool: PEP8 Style Checker Processed Files: rbtools/commands/post.py
- Commit:
-
df5dc5c0209ae7836754cecf721a004041908ef6cb2420e540a1b2c4beb15f412d8ebfb8d5e0782d
- Diff:
-
Revision 12 (+20)
- Commit:
-
cb2420e540a1b2c4beb15f412d8ebfb8d5e0782db7f56bc464af4cebebd8945cd813c44a9565195f
- Diff:
-
Revision 13 (+21)
- Commit:
-
b7f56bc464af4cebebd8945cd813c44a9565195fd751548f19df8cb000c2f4c83ed9f4ef234c0ca9
- Diff:
-
Revision 14 (+21)
- Commit:
-
d751548f19df8cb000c2f4c83ed9f4ef234c0ca9af427ad88f80f46dc144b60ddb128a9277d9ce92
- Diff:
-
Revision 15 (+21)
-
Tool: Pyflakes Processed Files: rbtools/commands/post.py Tool: PEP8 Style Checker Processed Files: rbtools/commands/post.py
- Commit:
-
af427ad88f80f46dc144b60ddb128a9277d9ce92d434591a2dac694e483f99de5a6a5542b9042a55
- Diff:
-
Revision 16 (+21)
- Commit:
-
d434591a2dac694e483f99de5a6a5542b9042a55b29a119900d98517f2c055f190ece9a96f545d56
- Diff:
-
Revision 18 (+21)