diff mercurial/discovery.py @ 29229:89bba2beb03e stable

bookmarks: allow pushing active bookmark on new remote head (issue5236) Before 'hg push -B .' on new remote head complained with: abort: push creates new remote head ... It was because _nowarnheads was not expanding active bookmark name, so it didn't add active bookmark "proper" name to no warn heads list.
author liscju <piotr.listkiewicz@gmail.com>
date Tue, 24 May 2016 23:36:27 +0200
parents d47ac02fcefa
children 5684bc429e6a
line wrap: on
line diff
--- a/mercurial/discovery.py	Thu May 12 06:13:59 2016 -0700
+++ b/mercurial/discovery.py	Tue May 24 23:36:27 2016 +0200
@@ -240,15 +240,16 @@
 
 def _nowarnheads(pushop):
     # Compute newly pushed bookmarks. We don't warn about bookmarked heads.
-
-    # internal config: bookmarks.pushing
-    newbookmarks = pushop.ui.configlist('bookmarks', 'pushing')
-
     repo = pushop.repo.unfiltered()
     remote = pushop.remote
     localbookmarks = repo._bookmarks
     remotebookmarks = remote.listkeys('bookmarks')
     bookmarkedheads = set()
+
+    # internal config: bookmarks.pushing
+    newbookmarks = [localbookmarks.expandname(b)
+                    for b in pushop.ui.configlist('bookmarks', 'pushing')]
+
     for bm in localbookmarks:
         rnode = remotebookmarks.get(bm)
         if rnode and rnode in repo: