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>
Felipe Contreras committed
May 24, 2013 at 21:29 UTC
294ff7b233c3066041320b339f515af8ad58854f
1 file changed
+2
-2
contrib/remote-helpers/git-remote-hg
+2
-2
@@ -857,6 +857,7 @@ def do_export(parser):
857
858
if peer:
859
parser.repo.push(peer, force=force_push, newbranch=True)
860
+ remote_bmarks = peer.listkeys('bookmarks')
861
862
# handle bookmarks
863
for bmark, node in p_bmarks:
@@ -883,8 +884,7 @@ def do_export(parser):
884
continue
885
886
if peer:
886
- rb = peer.listkeys('bookmarks')
887
- old = rb.get(bmark, '')
887
+ old = remote_bmarks.get(bmark, '')
888
if not peer.pushkey('bookmarks', bmark, old, new):
889
print "error %s" % ref
890
continue