1. Benoit Boissinot
  2. mercurial/crew/tonfa/http


Joel Rosdahl  committed df800e0

bookmarks: Avoid unconditional forwarding of bookmarks for the null revision

This patch fixes the following minor problem:

% hg bookmark -r null test
% hg bookmarks
test -1:000000000000
% hg commit
% hg bookmarks
* test 17:861ce7a241f9

That is: Bookmarks referring to the null revision are always forwarded
to the current revision.

  • Participants
  • Parent commits 69e431e
  • Branches default

Comments (0)

Files changed (1)

File hgext/bookmarks.py

View file
 from mercurial.commands import templateopts, hex, short
 from mercurial.i18n import _
 from mercurial import cmdutil, util, commands, changelog
-from mercurial.node import nullrev
+from mercurial.node import nullid, nullrev
 from mercurial.repo import RepoError
 import mercurial, mercurial.localrepo, mercurial.repair, os
             move the bookmark"""
             node  = super(bookmark_repo, self).commit(*k, **kw)
             parents = repo.changelog.parents(node)
+            if parents[1] == nullid:
+                parents = (parents[0],)
             marks = parse(repo)
             update = False
             for mark, n in marks.items():