- Groups:
Add option to rbt patch for automatically creating a Git commit
Review Request #4865 — Created Oct. 30, 2013 and submitted
Add option to rbt patch for automatically creating a Git commit
The option -c, --commit automatically creates a commit in the current local
branch with the summary, description, bugs, testing, and author information
fetched from the review request.
Tested with a new review request using the commands 'rbt patch -c <review_request_id>' and 'rbt patch --commit <review_request_id>'.
Unit tests passed.
Description | From | Last Updated |
---|---|---|
You may want to add a step before 'git add' here that checks that the working directory and index are … |
david | |
Can you do something like the following? If you'll notice, review requests created with rbt post -g will include the … |
david | |
Clients should ideally not print anything to the console. Only commands should be printing anything. At most, a client can … |
chipx86 | |
I'd prefer to see these in the opposite order. It would also be great to list the review request URL, … |
chipx86 | |
No need for that second layer of parens. |
chipx86 | |
It looks like several steps are being done here that can generate separate exceptions. Let's keep the exception-generating calls to … |
chipx86 |
-
-
You may want to add a step before 'git add' here that checks that the working directory and index are clean.
-
Can you do something like the following? If you'll notice, review requests created with rbt post -g will include the summary again as the first line of the description.
info = [] summary = review_request.summary description = review_request.description if not description.startswith(summary): info.append(summary) info.append(description) ...
- Change Summary:
-
Check to see if the working directory/index is clean before continueing with the commit.
Prevent the summary from being duplicated in the commit message if the review request was posted with rbt post -g.
-
This is looking great. A few comments.
Also, food for thought, for everyone involved. I often like to tweak the commit message a bit
(some patches we get have descriptions that could use some work). It'd be nice to perhaps
provide a way to commit and allow editing of the default message.git commit -C
does this,
so something like that option. -
Clients should ideally not print anything to the console. Only commands should be printing anything.
At most, a client can use
logging.*
functions, but that's really more useful for debugging info. -
I'd prefer to see these in the opposite order.
It would also be great to list the review request URL, like:
Reviewed at http://reviews.reviewboard.org/r/4865/
-
-
It looks like several steps are being done here that can generate separate exceptions. Let's keep the exception-generating calls to a minimum, and give them their own try/except blocks where possible.
- Change Summary:
-
Fixed open issues.