# HG changeset patch # User Pierre-Yves David # Date 1325947540 -3600 # Node ID c6af5921bb746608242fda660dc2373d2b4b049d # Parent 36b27bd12aef5e8cd8c96fcb927821e4587782f5 obsolete: clever obsolete not in secret detection to avoid locking the repo without a reason. diff -r 36b27bd12aef -r c6af5921bb74 hgext/obsolete.py --- 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()