Repository URL option causes UnboundLocalError for git repository
Repository URL option causes UnboundLocalError for git repository

Looks like a bug to me. The origin_url.rstrip is already present in the else
statement above it. In the if statement the origin_url is not instantiated and
error comes up. There is also a possibility of getting empty upstream_branch
(i.e. == '') but I am not sure how to fix it properly. The fix comes from my
problems with posting git review when my origin url differs from the one
present on the RB server. The following error comes up without this fix:

File "/data/Work/Development/rbtools/rbtools/clients/git.py", line 153, in get_repository_info
        url = origin_url.rstrip('/')
        UnboundLocalError: local variable 'origin_url' referenced before assignment

Fixes bug 2410

haosdent/rbtools,Khan/rbtools,reviewboard/rbtools,davidt/rbtools,haosdent/rbtools,clach04/rbtools_0.4.1,beol/rbtools,halvorlu/rbtools,datjwu/rbtools,beol/rbtools,datjwu/rbtools,davidt/rbtools,Khan/rbtools,reviewboard/rbtools,davidt/rbtools,clach04/rbtools,reviewboard/rbtools,beol/rbtools,halvorlu/rbtools,datjwu/rbtools,halvorlu/rbtools,bcelary/rbtools,1tush/rbtools,haosdent/rbtools