From: Felipe Contreras Date: Mon, 22 Apr 2013 21:55:10 +0000 (-0500) Subject: remote-hg: safer bookmark pushing X-Git-Tag: v1.8.3-rc0~14^2~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e5ea5e7547fbb042b6d2ed04b73ff92d7543f672;p=git 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 Signed-off-by: Junio C Hamano --- diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 2cd1996626..dcf6c989a7 100755 --- a/contrib/remote-helpers/git-remote-hg +++ b/contrib/remote-helpers/git-remote-hg @@ -782,6 +782,8 @@ def do_export(parser): continue if peer: + rb = peer.listkeys('bookmarks') + old = rb.get(bmark, '') if not peer.pushkey('bookmarks', bmark, old, new): print "error %s" % ref continue