diff mercurial/discovery.py @ 26819:ba7eeeac9603 stable

bookmarks: don't allow pushing new head for existing mark with -B (issue4400)
author Matt Mackall <mpm@selenic.com>
date Wed, 21 Oct 2015 16:21:27 -0500
parents 517ffec37dee
children 894f54d84d4a
line wrap: on
line diff
--- a/mercurial/discovery.py	Tue Oct 20 18:46:00 2015 -0400
+++ b/mercurial/discovery.py	Wed Oct 21 16:21:27 2015 -0500
@@ -279,7 +279,7 @@
             if bookmarks.validdest(repo, rctx, lctx):
                 bookmarkedheads.add(lctx.node())
         else:
-            if bm in newbookmarks:
+            if bm in newbookmarks and bm not in remotebookmarks:
                 bookmarkedheads.add(repo[bm].node())
 
     # 3. Check for new heads.