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>
This commit is contained in:
Felipe Contreras 2013-05-24 21:29:18 -05:00 committed by Junio C Hamano
parent cf08a7e15f
commit 294ff7b233

View File

@ -857,6 +857,7 @@ def do_export(parser):
if peer: if peer:
parser.repo.push(peer, force=force_push, newbranch=True) parser.repo.push(peer, force=force_push, newbranch=True)
remote_bmarks = peer.listkeys('bookmarks')
# handle bookmarks # handle bookmarks
for bmark, node in p_bmarks: for bmark, node in p_bmarks:
@ -883,8 +884,7 @@ def do_export(parser):
continue continue
if peer: if peer:
rb = peer.listkeys('bookmarks') old = remote_bmarks.get(bmark, '')
old = rb.get(bmark, '')
if not peer.pushkey('bookmarks', bmark, old, new): if not peer.pushkey('bookmarks', bmark, old, new):
print "error %s" % ref print "error %s" % ref
continue continue