obsolete: fix context.obsolete() method
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Wed, 04 Jul 2012 17:26:51 +0200
changeset 17118 b3c20b0f5f5a
parent 17117 217bfb10e6db
child 17119 2e13c1bd34dc
obsolete: fix context.obsolete() method - obsstore attribut name changed. - public changeset can't be obsolete
mercurial/context.py
--- a/mercurial/context.py	Wed Jul 04 16:37:00 2012 +0200
+++ b/mercurial/context.py	Wed Jul 04 17:26:51 2012 +0200
@@ -232,7 +232,8 @@
 
     def obsolete(self):
         """True if the changeset is obsolete"""
-        return self.node() in self._repo.obsstore.obsoleted
+        return (self.node() in self._repo.obsstore.precursors
+                and self.phase() > phases.public)
 
     def _fileinfo(self, path):
         if '_manifest' in self.__dict__: