[PATCH 1 of 2] bookmarks: When merging, don't advance bookmark for the other revision
David Shilvock
davels at telus.net
Sat Nov 8 00:31:31 CST 2008
# HG changeset patch
# User David Shilvock <davels at telus.net>
# Date 1226046586 28800
# Node ID 8920535663e440f478dadd5b29a754966844786d
# Parent eae1767cc6a8002a1d75b3af40e11782efc288ba
bookmarks: When merging, don't advance bookmark for the other revision
When merging, a bookmark on the current head should be advanced to the merge
commit. A bookmark on the 'other' revision should be left alone so further
commits can be made to that branch.
diff --git a/hgext/bookmarks.py b/hgext/bookmarks.py
--- a/hgext/bookmarks.py
+++ b/hgext/bookmarks.py
@@ -186,13 +186,11 @@ def reposetup(ui, repo):
node = super(bookmark_repo, self).commit(*k, **kw)
if node == None:
return None
- parents = repo.changelog.parents(node)
- if parents[1] == nullid:
- parents = (parents[0],)
+ parent = repo.changelog.parents(node)[0]
marks = parse(repo)
update = False
for mark, n in marks.items():
- if n in parents:
+ if n == parent:
marks[mark] = node
update = True
if update:
More information about the Mercurial-devel
mailing list