sajingeo / rietveld

Automatically exported from code.google.com/p/rietveld
Apache License 2.0
0 stars 0 forks source link

Improve git revision range support / Extract issue title from log message #140

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The attached patches improve git support for upload.py:

a) they automatically create a subject line and description from the git
commit message when --rev <git commit hash> is used on the command line.

b) They allow specification of commit ranges (ie --rev origin..HEAD) and
automatically title the patches in the standard format ([PATCH 1/4], etc).

c) They use 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.

Our documentation for these features:
-----
*  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

Original issue reported on code.google.com by canan...@gmail.com on 5 Aug 2009 at 3:40

Attachments:

GoogleCodeExporter commented 9 years ago
Mind uploading that to codereview.appspot.com? :-)

Original comment by gvanrossum@gmail.com on 5 Aug 2009 at 4:49

GoogleCodeExporter commented 9 years ago
Done: http://codereview.appspot.com/101056/show

It's not easy: I had to use the manual patch-upload form, and there are no less 
than
8 different "SVN base" entries for Rietveld on the form. =(

Original comment by canan...@gmail.com on 5 Aug 2009 at 6:37

GoogleCodeExporter commented 9 years ago
Why can't you use upload.py itself?  That's what it's *for*!

Original comment by gvanrossum@gmail.com on 5 Aug 2009 at 8:08

GoogleCodeExporter commented 9 years ago
Sorry, brain fart -- I'm used to *committing* my patches, and *then* uploading 
them
for review, and I got stuck on the "can't commit to SVN" part.  I've got to 
retrain
my brain back to SVN/CVS from the Brave New World Of Distributed VC.

Original comment by canan...@gmail.com on 5 Aug 2009 at 8:32

GoogleCodeExporter commented 9 years ago
Good feature. The issue title can be extracted from log message to be present 
to user for confirmation (as well as description). I'd split this issue in two, 
because batch creating of issues is not something of great priority (it can be 
easily done with external script that expands revision numbers and calls 
upload.py for every one).

Original comment by techtonik@gmail.com on 27 Sep 2010 at 9:07

GoogleCodeExporter commented 9 years ago

Original comment by albrecht.andi on 6 Apr 2012 at 7:19