Mercurial > hg
changeset 34184:b5bbfe176004
configitems: register the 'mq.secret' config
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 30 Jun 2017 03:43:17 +0200 |
parents | 5c150b70d004 |
children | f84358f75978 |
files | hgext/mq.py |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Fri Jun 30 03:43:16 2017 +0200 +++ b/hgext/mq.py Fri Jun 30 03:43:17 2017 +0200 @@ -121,6 +121,9 @@ configitem('mq', 'plain', default=False, ) +configitem('mq', 'secret', + default=False, +) # force load strip extension formerly included in mq and import some utility try: @@ -419,7 +422,7 @@ """ repo = repo.unfiltered() if phase is None: - if repo.ui.configbool('mq', 'secret', False): + if repo.ui.configbool('mq', 'secret'): phase = phases.secret overrides = {('ui', 'allowemptycommit'): True} if phase is not None: @@ -1059,7 +1062,7 @@ repo._phasecache patches = self._revpatches(repo, sorted(revs)) qfinished = self._cleanup(patches, len(patches)) - if qfinished and repo.ui.configbool('mq', 'secret', False): + if qfinished and repo.ui.configbool('mq', 'secret'): # only use this logic when the secret option is added oldqbase = repo[qfinished[0]] tphase = repo.ui.config('phases', 'new-commit', phases.draft) @@ -2164,7 +2167,7 @@ self.added.append(patchname) imported.append(patchname) patchname = None - if rev and repo.ui.configbool('mq', 'secret', False): + if rev and repo.ui.configbool('mq', 'secret'): # if we added anything with --rev, move the secret root phases.retractboundary(repo, tr, phases.secret, [n]) self.parseseries() @@ -3423,7 +3426,7 @@ def mqphasedefaults(repo, roots): """callback used to set mq changeset as secret when no phase data exists""" if repo.mq.applied: - if repo.ui.configbool('mq', 'secret', False): + if repo.ui.configbool('mq', 'secret'): mqphase = phases.secret else: mqphase = phases.draft