obsolete: rely on core to hide extinct changeset
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Wed, 25 Jul 2012 19:26:01 +0200
changeset 386 a3797de26544
parent 385 cdcdedc532b7
child 387 0e87a890d84b
obsolete: rely on core to hide extinct changeset
hgext/obsolete.py
--- a/hgext/obsolete.py	Wed Jul 25 19:23:43 2012 +0200
+++ b/hgext/obsolete.py	Wed Jul 25 19:26:01 2012 +0200
@@ -857,34 +857,6 @@
                 self.__dict__.pop('obsstore', None)
             return ret
 
-        @storecache('00changelog.i')
-        def changelog(self):
-            # << copy pasted from mercurial source
-            c = changelog.changelog(self.sopener)
-            if 'HG_PENDING' in os.environ:
-                p = os.environ['HG_PENDING']
-                if p.startswith(self.root):
-                    c.readpending('00changelog.i.a')
-            # >> end of the copy paste
-            old = c.__dict__.pop('hiddenrevs', ())
-            if old:
-                ui.warn("old wasn't empty ? %r" % old)
-            def _sethidden(c, value):
-                assert not value
-
-
-            class hchangelog(c.__class__):
-                @util.propertycache
-                def hiddenrevs(c):
-                    shown = ['not obsolete()', '.', 'bookmark()', 'tagged()',
-                             'public()']
-                    basicquery = 'obsolete() - (::(%s))' % (' or '.join(shown))
-                    # !!! self is repo not changelog
-                    result = set(scmutil.revrange(self, [basicquery]))
-                    return result
-            c.__class__ = hchangelog
-            return c
-
     repo.__class__ = obsoletingrepo
     for arg in sys.argv:
         if 'debugc' in arg: