Mercurial > evolve
changeset 124:c6af5921bb74
obsolete: clever obsolete not in secret detection to avoid locking the repo without a reason.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Sat, 07 Jan 2012 15:45:40 +0100 |
parents | 36b27bd12aef |
children | 4d6eef4947b3 |
files | hgext/obsolete.py |
diffstat | 1 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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()