##// END OF EJS Templates
configitems: register the 'mq.secret' config
Boris Feld -
r34185:b5bbfe17 default
parent child Browse files
Show More
@@ -121,6 +121,9 b" configitem('mq', 'keepchanges',"
121 configitem('mq', 'plain',
121 configitem('mq', 'plain',
122 default=False,
122 default=False,
123 )
123 )
124 configitem('mq', 'secret',
125 default=False,
126 )
124
127
125 # force load strip extension formerly included in mq and import some utility
128 # force load strip extension formerly included in mq and import some utility
126 try:
129 try:
@@ -419,7 +422,7 b' def newcommit(repo, phase, *args, **kwar'
419 """
422 """
420 repo = repo.unfiltered()
423 repo = repo.unfiltered()
421 if phase is None:
424 if phase is None:
422 if repo.ui.configbool('mq', 'secret', False):
425 if repo.ui.configbool('mq', 'secret'):
423 phase = phases.secret
426 phase = phases.secret
424 overrides = {('ui', 'allowemptycommit'): True}
427 overrides = {('ui', 'allowemptycommit'): True}
425 if phase is not None:
428 if phase is not None:
@@ -1059,7 +1062,7 b' class queue(object):'
1059 repo._phasecache
1062 repo._phasecache
1060 patches = self._revpatches(repo, sorted(revs))
1063 patches = self._revpatches(repo, sorted(revs))
1061 qfinished = self._cleanup(patches, len(patches))
1064 qfinished = self._cleanup(patches, len(patches))
1062 if qfinished and repo.ui.configbool('mq', 'secret', False):
1065 if qfinished and repo.ui.configbool('mq', 'secret'):
1063 # only use this logic when the secret option is added
1066 # only use this logic when the secret option is added
1064 oldqbase = repo[qfinished[0]]
1067 oldqbase = repo[qfinished[0]]
1065 tphase = repo.ui.config('phases', 'new-commit', phases.draft)
1068 tphase = repo.ui.config('phases', 'new-commit', phases.draft)
@@ -2164,7 +2167,7 b' class queue(object):'
2164 self.added.append(patchname)
2167 self.added.append(patchname)
2165 imported.append(patchname)
2168 imported.append(patchname)
2166 patchname = None
2169 patchname = None
2167 if rev and repo.ui.configbool('mq', 'secret', False):
2170 if rev and repo.ui.configbool('mq', 'secret'):
2168 # if we added anything with --rev, move the secret root
2171 # if we added anything with --rev, move the secret root
2169 phases.retractboundary(repo, tr, phases.secret, [n])
2172 phases.retractboundary(repo, tr, phases.secret, [n])
2170 self.parseseries()
2173 self.parseseries()
@@ -3423,7 +3426,7 b' def qqueue(ui, repo, name=None, **opts):'
3423 def mqphasedefaults(repo, roots):
3426 def mqphasedefaults(repo, roots):
3424 """callback used to set mq changeset as secret when no phase data exists"""
3427 """callback used to set mq changeset as secret when no phase data exists"""
3425 if repo.mq.applied:
3428 if repo.mq.applied:
3426 if repo.ui.configbool('mq', 'secret', False):
3429 if repo.ui.configbool('mq', 'secret'):
3427 mqphase = phases.secret
3430 mqphase = phases.secret
3428 else:
3431 else:
3429 mqphase = phases.draft
3432 mqphase = phases.draft
General Comments 0
You need to be logged in to leave comments. Login now