Commits

Pierre-Yves David committed c6af592

obsolete: clever obsolete not in secret detection to avoid locking the repo without a reason.

Comments (0)

Files changed (1)

hgext/obsolete.py

 
     repo.__class__ = obsoletingrepo
     if repo.ui.configbool('obsolete', 'secret-unstable', True):
-        obsoletes = [c.node() for c in repo.set('obsolete()')]
-        lock = repo.lock()
-        try:
-            phases.retractboundary(repo, 2, obsoletes)
-        finally:
-            lock.release()
+        expobs = [c.node() for c in repo.set('obsolete() - secret()')]
+        if expobs: # do not lock in nothing move. locking for peanut make hgview reload on any command
+            lock = repo.lock()
+            try:
+                phases.retractboundary(repo, 2, expobs)
+            finally:
+                lock.release()