mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2025-11-11 21:55:40 +01:00
remote-hg: safer bookmark pushing
It is possible that the remote has changed the bookmarks, so let's fetch them before we make any assumptions, just the way mercurial does. Probably doesn't make a difference, but better be safe than sorry. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@@ -782,6 +782,8 @@ def do_export(parser):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if peer:
|
if peer:
|
||||||
|
rb = peer.listkeys('bookmarks')
|
||||||
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user