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:
parent
cf08a7e15f
commit
294ff7b233
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user