Mercurial > evolve
changeset 115:d60eddda9546
add an option to ensure unstable are secret
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Thu, 22 Dec 2011 15:26:42 +0100 |
parents | 1a64195e2b09 |
children | 64ca29eef349 |
files | hgext/obsolete.py |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/obsolete.py Mon Dec 19 16:27:00 2011 +0100 +++ b/hgext/obsolete.py Thu Dec 22 15:26:42 2011 +0100 @@ -92,6 +92,7 @@ from mercurial import error from mercurial import commands from mercurial import changelog +from mercurial import phases from mercurial.node import hex, bin, short, nullid from mercurial.lock import release @@ -495,4 +496,12 @@ repo.__class__ = obsoletingrepo + obsoletes = [c.node() for c in repo.set('obsolete() - public()')] + lock = repo.lock() + if repo.ui.configbool('obsolete', 'secret-unstable', True): + try: + phases.retractboundary(repo, 2, obsoletes) + finally: + lock.release() +