cmd_export: fix a variable name clash
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Mon, 10 Dec 2012 18:45:37 +0000 (20:45 +0200)
committerZhang Qiang <qiang.z.zhang@intel.com>
Tue, 11 Dec 2012 00:04:58 +0000 (08:04 +0800)
Which causes the wrong upstream branch name to be used.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gitbuildsys/cmd_export.py

index d9ab94c..0dfaac2 100644 (file)
@@ -130,9 +130,9 @@ def create_gbp_export_args(repo, commit, export_dir, tmp_dir, spec, args,
         remotename = 'origin' if 'origin' in remotes else remotes.keys()[0]
         # Take the remote repo of current branch, if available
         try:
-            upstream_branch = repo.get_upstream_branch(repo.branch)
-            if upstream_branch:
-                remotename = upstream_branch.split("/")[0]
+            remote_branch = repo.get_upstream_branch(repo.branch)
+            if remote_branch:
+                remotename = remote_branch.split("/")[0]
         except GitRepositoryError:
             pass
         reponame = urlparse(remotes[remotename][0]).path[1:]