changeset 17916:ed225834b372

bookmark: simplify mutability check in `validdest` There is no need to check phase by hand. We already have a ctx method for that.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Wed, 24 Oct 2012 17:26:40 +0200
parents fb14a5dcdc62
children 12178f07de97
files mercurial/bookmarks.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bookmarks.py	Wed Nov 07 09:59:46 2012 -0800
+++ b/mercurial/bookmarks.py	Wed Oct 24 17:26:40 2012 +0200
@@ -7,7 +7,7 @@
 
 from mercurial.i18n import _
 from mercurial.node import hex
-from mercurial import encoding, error, util, obsolete, phases
+from mercurial import encoding, error, util, obsolete
 import errno, os
 
 def read(repo):
@@ -264,7 +264,7 @@
             plen = len(validdests)
             succs = set(c.node() for c in validdests)
             for c in validdests:
-                if c.phase() > phases.public:
+                if c.mutable():
                     # obsolescence marker does not apply to public changeset
                     succs.update(obsolete.allsuccessors(repo.obsstore,
                                                         [c.node()]))