hgext/obsolete.py
changeset 215 0eceb5a48485
parent 214 a140d1857931
child 217 786eb34d93ea
--- a/hgext/obsolete.py	Wed Apr 25 18:15:56 2012 +0200
+++ b/hgext/obsolete.py	Wed Apr 25 18:11:52 2012 +0200
@@ -620,25 +620,31 @@
 
         @storecache('00changelog.i')
         def changelog(self):
-            changelog = getattr(super(obsoletingrepo, self), 'changelog')
-            old = changelog.__dict__.pop('hiddenrevs', ())
+            # << copy pasted from mercurila 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(changelog, value):
+            def _sethidden(c, value):
                 assert not value
 
 
-            class hchangelog(changelog.__class__):
+            class hchangelog(c.__class__):
                 @util.propertycache
-                def hiddenrevs(changelog):
+                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
-            changelog.__class__ = hchangelog
-            return changelog
+            c.__class__ = hchangelog
+            return c