--- a/hgext/obsolete.py Thu Sep 08 17:32:51 2011 +0200
+++ b/hgext/obsolete.py Thu Sep 08 17:46:54 2011 +0200
@@ -126,6 +126,24 @@
class obsoletingrepo(repo.__class__):
+ ### Public method
+ def obsoletedby(self, node):
+ """return the set of node that make <node> obsolete (obj)"""
+ return self._obsobjrels.get(node, set())
+
+ def obsolete(self, node):
+ """return the set of node that <node> make obsolete (sub)"""
+ return self._obssubrels.get(node, set())
+
+ def addobsolete(self, sub, obj):
+ """Add a relation marking that node <sub> is a new version of <obj>"""
+ self._obssubrels.setdefault(sub, set()).add(obj)
+ self._obsobjrels.setdefault(obj, set()).add(sub)
+ try:
+ self.changelog.hiddenrevs.add(repo[obj].rev())
+ except error.RepoLookupError:
+ pass #unknow revision (but keep propagating the data
+ self._writeobsrels()
### Hidden revision support
@util.propertycache
@@ -207,24 +225,6 @@
return result
- ### Public method
- def obsoletedby(self, node):
- """return the set of node that make <node> obsolete (obj)"""
- return self._obsobjrels.get(node, set())
-
- def obsolete(self, node):
- """return the set of node that <node> make obsolete (sub)"""
- return self._obssubrels.get(node, set())
-
- def addobsolete(self, sub, obj):
- """Add a relation marking that node <sub> is a new version of <obj>"""
- self._obssubrels.setdefault(sub, set()).add(obj)
- self._obsobjrels.setdefault(obj, set()).add(sub)
- try:
- self.changelog.hiddenrevs.add(repo[obj].rev())
- except error.RepoLookupError:
- pass #unknow revision (but keep propagating the data
- self._writeobsrels()
### rollback support