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