Fix --repository-url handling for git.

Review Request #2647 — Created Oct. 8, 2011 and submitted — Latest diff uploaded

Information

RBTools

Reviewers

[ This fixes some problems with http://reviews.reviewboard.org/r/2376/ This is of particular interest to me, because in my setup there's an upstream SVN repository that I need to access directly with git-svn to commit to it, but we also use a git mirror to share work between those developers who use git. post-review would always try to use the SVN repo directly, but it's better to base the reviews on the github mirror because we can use parent diffs with it. I considered adding a dedicated reviewboard.nosvn setting, but then decided that --repository-url is probably sufficient. ]

Fix --repository-url handling for git.

There were several problems:

(1) If --repository-url was used, post-review failed with
      UnboundLocalError: local variable 'origin_url' reference before
      assignment

    Fixed by using this code only in the autodetection case.

(2) self.upstream branch wasn't always set, thus failing later.

(3) The parameter was ignored completely when using git-svn.
I am now able to submit patches with --repository-url.
    Loading...