site

(Pierre-Yves David)
2012-01-08: obsolete: stop using rev as it rebuild the cache every time there is

obsolete: stop using rev as it rebuild the cache every time there is a fault We now use nodemap directly

diff --git a/hgext/obsolete.py b/hgext/obsolete.py
--- a/hgext/obsolete.py
+++ b/hgext/obsolete.py
@@ -315,11 +315,11 @@ def reposetup(ui, repo):
         @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):