obsolete: clever obsolete not in secret detection to avoid locking the repo without a reason.
--- a/hgext/obsolete.py Sat Jan 07 11:40:45 2012 +0100
+++ b/hgext/obsolete.py Sat Jan 07 15:45:40 2012 +0100
@@ -497,11 +497,12 @@
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()