summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Felipe Contreras <felipe.contreras@gmail.com>2013-05-24 21:29:18 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-05-28 07:59:18 -0700
commit294ff7b233c3066041320b339f515af8ad58854f (patch)
tree57b0d8ea9c0dfffbcd21f30df4dfda180458321c
parentremote-hg: test: be a little more quiet (diff)
downloadtgif-294ff7b233c3066041320b339f515af8ad58854f.tar.xz
remote-hg: trivial reorganization
We only need to get the remote dict once. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xcontrib/remote-helpers/git-remote-hg4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index 1dd3d7030e..426c1fc54a 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -857,6 +857,7 @@ def do_export(parser):
if peer:
parser.repo.push(peer, force=force_push, newbranch=True)
+ remote_bmarks = peer.listkeys('bookmarks')
# handle bookmarks
for bmark, node in p_bmarks:
@@ -883,8 +884,7 @@ def do_export(parser):
continue
if peer:
- rb = peer.listkeys('bookmarks')
- old = rb.get(bmark, '')
+ old = remote_bmarks.get(bmark, '')
if not peer.pushkey('bookmarks', bmark, old, new):
print "error %s" % ref
continue