obsolete: stop using rev as it rebuild the cache every time there is a fault
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Sun, 08 Jan 2012 18:43:49 +0100
changeset 126 c083fb43daee
parent 125 4d6eef4947b3
child 127 7e113963f2c8
obsolete: stop using rev as it rebuild the cache every time there is a fault We now use nodemap directly
hgext/obsolete.py
--- a/hgext/obsolete.py	Sun Jan 08 18:41:49 2012 +0100
+++ b/hgext/obsolete.py	Sun Jan 08 18:43:49 2012 +0100
@@ -315,11 +315,11 @@
         @util.propertycache
         def _obsoleteset(self):
             obs = set()
+            nm = self.changelog.nodemap
             for obj in self._obsobjrels:
-                try:
-                    obs.add(self.changelog.rev(obj))
-                except error.LookupError:
-                    pass
+                rev = nm.get(obj, None)
+                if rev is not None:
+                    obs.add(rev)
             return obs
 
         def addobsolete(self, sub, obj):