Skip to content

Commit

Permalink
remote-hg: trivial reorganization
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Contreras authored and Junio C Hamano committed May 28, 2013
1 parent cf08a7e commit 294ff7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/remote-helpers/git-remote-hg
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 294ff7b

Please sign in to comment.