From: Felipe Contreras Date: Sat, 25 May 2013 02:29:18 +0000 (-0500) Subject: remote-hg: trivial reorganization X-Git-Tag: v1.8.4-rc0~191^2~46 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/294ff7b233c3066041320b339f515af8ad58854f?hp=cf08a7e15fd473bc9853227f537f6fe5c6512370 remote-hg: trivial reorganization We only need to get the remote dict once. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- 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