Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(239)

Issue 101056: upload.py: improve git support; add revision range support.

Can't Edit
Can't Publish+Mail
Start Review
Created:
16 years, 5 months ago by C. Scott Ananian
Modified:
15 years, 10 months ago
Base URL:
http://rietveld.googlecode.com/svn/trunk/
Visibility:
Public.

Description

This commit improves upload.py by: a) automatically creating a subject line and description from the git commit message when --rev <git commit hash> is used on the command line. b) allowing specification of commit ranges (ie --rev origin..HEAD) and automatically titling the patches in the standard format ([PATCH 1/4], etc). c) using the .git/description file to add an extra prefix (if set), to ease the use of a single reviews instance for code from multiple git repositories. By filling in implementations of the new abstract methods added to VersionControlSystem, these features can be added for other version control systems as well. Documentation: * To upload a specific git commit for review, use the --rev option, for example: $ upload.py --rev 960831af2317f0b0b52ee4d13f980d2a56e91cd5 This will make the subject line default to the git log subject (first line of the commit message) and the description default to the git log body (all but first line of the commit message) with a terse git commitid. If you set .git/description in your checkout, it will add this to the subject line, which helps distinguish patches to different components. For example, I've set mini/.git/description to "mini", so my patch subject lines for commits to mini start "[PATCH] mini: ". * You can use ranges in your --rev specification; this will create multiple issues for review, one per commit in the range. For example: $ upload.py --rev master...my-branch or $ upload.py --rev origin..HEAD The subject lines for each commit begin "[PATCH 1/4]", "[PATCH 2/4]", etc.

Patch Set 1 #

Total comments: 3

Patch Set 2 : upload.py: improve git support; add revision range support [updated] #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -5 lines) Patch
M static/upload.py View 1 7 chunks +90 lines, -5 lines 4 comments Download

Messages

Total messages: 8
C. Scott Ananian
This patch is for http://code.google.com/p/rietveld/issues/detail?id=140
16 years, 5 months ago (2009-08-05 18:33:50 UTC) #1
GvR
I'm afraid Andi will have to review this; I don't even have git installed so ...
16 years, 5 months ago (2009-08-05 20:13:03 UTC) #2
Andi Albrecht
This is not a full review. I'm adding Evan as this patch would change upload.py's ...
16 years, 4 months ago (2009-08-17 21:40:17 UTC) #3
C. Scott Ananian
Updated patch to handle move-of-an-unmodified file better (but see issue 115). On 2009/08/17 21:40:17, Andi ...
16 years, 4 months ago (2009-08-19 23:08:48 UTC) #4
Evan Martin
I'm not opposed to this in principle, as git-cl doesn't use the --rev flag. I ...
16 years, 4 months ago (2009-08-21 16:10:21 UTC) #5
Evan Martin
On 2009/08/21 16:10:21, Evan Martin wrote: > I'm not opposed to this in principle, as ...
16 years, 4 months ago (2009-08-21 16:10:42 UTC) #6
Evan Martin
http://codereview.appspot.com/101056/diff/4001/4002 File static/upload.py (right): http://codereview.appspot.com/101056/diff/4001/4002#newcode1049 Line 1049: (["git", "log", "--pretty=format:%H", range_spec]) why not rev-list? http://codereview.appspot.com/101056/diff/4001/4002#newcode1064 ...
16 years, 4 months ago (2009-08-21 16:13:12 UTC) #7
Tommi Komulainen
15 years, 10 months ago (2010-03-05 12:27:36 UTC) #8
When uploading multiple patches you get the

The following files are not added to version control:
[...]
Are you sure to continue?(y/N)

confirmation for every patch, which is pretty pointless. Once per upload should
be sufficient.


I think there should also be a confirmation such as:
About to send 3 patches for review:
add foo
fix bar
remove bug
Are you sure to continue?(y/N)

to be confident you got the patch range / branch / whatever right.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b