On 12/02/2010 02:59 AM, Andrew Kennedy wrote:
Hi All,

I haven't tried this new review service yet, so I have some questions:

* How well does it work in general?

Works pretty well, I've used it on both sides. It lets you see the full context of the patch you're reviewing.

* Do you have to upload a patch or will it allow review of an already committed
change?

So far I've only tried pre-commit reviews. Check the docs, they do talk about post-commit reviews.

* How useful has it been for those of you who have used it so far?

Its been useful, but if you're using git-svn you need to hack things a bit (I would guess things work better if you just use SVN)

Attached is a script for generating a reviewboard-compatible svn-like patch from a git branch which you can cut/paste into the RB page.

Probably a better way is to use post-review, from Andrew Stitcher:

post-review in RBTools will also do this for you (and it will also push
the review up to ReviewBoard too). However I had to patch it to get it
to work with our repo:

(I'll see if I can get the patch upstream)

--- /usr/lib/python2.7/site-packages/rbtools/postreview.py.0    2010-11-30
15:26:42.820050686 -0500
+++ /usr/lib/python2.7/site-packages/rbtools/postreview.py      2010-11-30
15:26:48.977039236 -0500
@@ -229,7 +229,7 @@

         # If one of the directories doesn't match, then path is not
relative
         # to root.
-        if rootdirs != pathdirs:
+        if rootdirs != pathdirs[:len(rootdirs)]:
             return None

         # All the directories matched, so the relative path is whatever


#!/bin/bash
#
# git-svn-diff originally by 
(http://mojodna.net/2009/02/24/my-work-git-workflow.html)
# modified by [email protected]
# modified by [email protected] - handle diffs that introduce new files
#
# Generate an SVN-compatible diff against the tip of the tracking branch

# Get the tracking branch (if we're on a branch)
TRACKING_BRANCH=`git svn info | grep URL | sed -e 's/.*\/branches\///'`

# If the tracking branch has 'URL' at the beginning, then the sed wasn't 
successful and
# we'll fall back to the svn-remote config option
if [[ "$TRACKING_BRANCH" =~ URL.* ]]
then
        TRACKING_BRANCH=`git config --get svn-remote.svn.fetch | sed -e 
's/.*:refs\/remotes\///'`
fi

# Get the highest revision number
REV=`git svn find-rev $(git rev-list --date-order --max-count=1 
$TRACKING_BRANCH)`

# Then do the diff from the highest revision on the current branch
# and masssage into SVN format
git diff --no-prefix $(git rev-list --date-order --max-count=1 
$TRACKING_BRANCH) $* |
sed -e "/--- \/dev\/null/{ N; s|^--- /dev/null\n+++ \(.*\)|\1   (revision 
0)\n\1        (revision 0)|}" \
    -e "s/^--- .*/&     (revision $REV)/" \
    -e "s/^+++ .*/&     (working copy)/" \
    -e "s/^diff --git [^[:space:]]*/Index:/" \
    -e 
"s/^index.*/===================================================================/"

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to