Hi Yang,

This actually brings up a good point. I don't think there currently is
a 'better' solution. I hope Christian can perhaps chime in on this,
since RB is using git itself. The conventional way to set this up is
to configure the mirror url, but this assumes that the client fetch
from a remote with the exact same path. This doesn't work well for a
number of reasons since it might not even be cloned from the same
server, or it might use implicit vs explicit ssh notation, or use a
non-fqdn, etc.

I think we need to address this somehow. On the post-review side, my
thought was to add an option for .reviewboardrc to specify the
'repository url'. However, there clearly should be some improvement on
the server side as well, as a fixed 'mirror' field just isn't good
enough to comprehensively match a repository. Any thoughts on what we
could do there?

As for your second problem, post-review requires a non-bare repository
as it tries to automatically determine the diff of your current work.
You may want to try the revision-range option to explicitly set the
revision range. I haven't confirmed that this will work in a bare
repository, but it should be easy to make it if it doesn't.


On Aug 6, 5:48 pm, Yang Zhang <yanghates...@gmail.com> wrote:
> I'm trying to automate post-review to run on a git repository --
> ideally on each commit (on the "client" side), but on each push (on
> the central repo) would do too if necessary.
> In both the following I ran "git config reviewboard.urlhttps://dev/review/";.
> First I tried post-review on a client repo (also tried specifying
> --repository-url=/var/git/web.git, which is the local URL that the
> reviewboard web app knows):
> ~~~
> $ post-review --revision-range=9405af7d9a75c17
> 03b88924021fc9f2677c4776b
> ==> HTTP Authentication Required
> Enter username and password for "dev" at dev
> Username: yang
> Password:
> There was an error creating this review request.
> The repository path "ssh://dev/var/git/web.git" is not in the
> list of known repositories on the server.
> Ask the administrator to add this repository to the Review Board server.
> For information on adding repositories, please 
> readhttp://www.reviewboard.org/docs/manual/dev/admin/management/repositor...
> ~~~
> I thought about trying to set up a mirror URL in the reviewboard web
> app, but the URL might look different to each client.
> On the server, the repository is headless, resulting in this error:
> ~~~
> $ post-review
> Failed to execute command: ['git', 'symbolic-ref', '-q', 'HEAD']
> fatal: Not a git repository (or any of the parent directories): .git
> ~~~
> After Googling I 
> foundhttp://gitorious.org/reviewboard/rbtools/blobs/master/scripts/git-pos...
> but it's broken & out of date.
> There are more hacks I can try (e.g. having the post-commit hook
> temporarily munge the remote origin URL, or having the post-receive
> hook clone the git repository so that it has a head, then
> post-review-ing that), but surely there's a better way. Thanks in
> advance for any hints.
> --
> Yang Zhanghttp://yz.mit.edu/

Want to help the Review Board project? Donate today at 
Happy user? Let us know at http://www.reviewboard.org/users/
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to