[asterisk-dev] submitting a review from git

Tzafrir Cohen tzafrir.cohen at xorcom.com
Wed Jun 6 08:47:32 CDT 2012


As shown in the review below (following a query from someone on IRC),
you can submit reviews from a git mirror of the SVN repository.

Basic instructions:

1. Install rbtools / python-rbtools for the tool 'post-review'
2. Get the following script:

  https://gitorious.org/asterisk-tools/asterisk-tools/blobs/master/git-post-review
  now included in the asterisk-tools repository.

This is a wrapper to post-review that posts the current git diff.


Technical notes:

The basic issue is to convert the git diff to one provided by SVN.
I originally used the script 'git-svn-diff' posted on
http://www.mail-archive.com/dev@trafficserver.apache.org/msg00864.html

Changes:
* Used the revision from the 'git-svn-id' rather than 'git svn'
  information.
* post-review needs the full branch name: the patch is relative to the
  top level of the subversion repository (e.g: begins with '/trunk'.
* ReviewBoard does not seem to have an issue with the extra information
  of 'diff -p'.

For some reason post-review could not figure out the server URL from the
--repository-url option I used (http://svn.asterisk.org/svn/asterisk or
anything below). It seems that the property reviewboard:url should be
set on the top-level of the repository as well. Workaround: explicitly
set --server=https://reviewboard.asterisk.org/

See the man page of post-review (or post-review --help) for more
information. You can generally set other fields from the command line as
well. Be sure to use '-r NUM' if you want to edit an existing review and
not post a new one.

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-dev mailing list