We want to split the evolution-related configuration and back-out the renaming
from evolution.* to stabilization.*.
First invert the configuration and aliases, so next changesets will be
cleaner.
( )
indygreg |
hg-reviewers |
We want to split the evolution-related configuration and back-out the renaming
from evolution.* to stabilization.*.
First invert the configuration and aliases, so next changesets will be
cleaner.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/commands.py (2 lines) | |||
M | mercurial/configitems.py (24 lines) | |||
M | mercurial/obsolete.py (4 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan |
# b) introducing a command flag. | # b) introducing a command flag. | ||||
compopts = {} | compopts = {} | ||||
complevel = ui.configint('experimental', 'bundlecomplevel') | complevel = ui.configint('experimental', 'bundlecomplevel') | ||||
if complevel is not None: | if complevel is not None: | ||||
compopts['level'] = complevel | compopts['level'] = complevel | ||||
contentopts = {'cg.version': cgversion} | contentopts = {'cg.version': cgversion} | ||||
if repo.ui.configbool('experimental', 'stabilization.bundle-obsmarker'): | if repo.ui.configbool('experimental', 'evolution.bundle-obsmarker'): | ||||
contentopts['obsolescence'] = True | contentopts['obsolescence'] = True | ||||
if repo.ui.configbool('experimental', 'bundle-phases'): | if repo.ui.configbool('experimental', 'bundle-phases'): | ||||
contentopts['phases'] = True | contentopts['phases'] = True | ||||
bundle2.writenewbundle(ui, repo, 'bundle', fname, bversion, outgoing, | bundle2.writenewbundle(ui, repo, 'bundle', fname, bversion, outgoing, | ||||
contentopts, compression=bcompression, | contentopts, compression=bcompression, | ||||
compopts=compopts) | compopts=compopts) | ||||
@command('cat', | @command('cat', |
default=100, | default=100, | ||||
) | ) | ||||
coreconfigitem('experimental', 'crecordtest', | coreconfigitem('experimental', 'crecordtest', | ||||
default=None, | default=None, | ||||
) | ) | ||||
coreconfigitem('experimental', 'editortmpinhg', | coreconfigitem('experimental', 'editortmpinhg', | ||||
default=False, | default=False, | ||||
) | ) | ||||
coreconfigitem('experimental', 'evolution', | |||||
default=list, | |||||
alias=[('experimental', 'stabilization')], | |||||
) | |||||
coreconfigitem('experimental', 'evolution.bundle-obsmarker', | |||||
default=False, | |||||
alias=[('experimental', 'stabilization.bundle-obsmarker')], | |||||
) | |||||
coreconfigitem('experimental', 'evolution.track-operation', | |||||
default=True, | |||||
alias=[('experimental', 'stabilization.track-operation')] | |||||
) | |||||
coreconfigitem('experimental', 'maxdeltachainspan', | coreconfigitem('experimental', 'maxdeltachainspan', | ||||
default=-1, | default=-1, | ||||
) | ) | ||||
coreconfigitem('experimental', 'mmapindexthreshold', | coreconfigitem('experimental', 'mmapindexthreshold', | ||||
default=None, | default=None, | ||||
) | ) | ||||
coreconfigitem('experimental', 'nonnormalparanoidcheck', | coreconfigitem('experimental', 'nonnormalparanoidcheck', | ||||
default=False, | default=False, | ||||
) | ) | ||||
coreconfigitem('experimental', 'effect-flags', | coreconfigitem('experimental', 'effect-flags', | ||||
default=False, | default=False, | ||||
) | ) | ||||
coreconfigitem('experimental', 'stabilization', | |||||
default=list, | |||||
alias=[('experimental', 'evolution')], | |||||
) | |||||
coreconfigitem('experimental', 'stabilization.bundle-obsmarker', | |||||
default=False, | |||||
alias=[('experimental', 'evolution.bundle-obsmarker')], | |||||
) | |||||
coreconfigitem('experimental', 'stabilization.track-operation', | |||||
default=True, | |||||
alias=[('experimental', 'evolution.track-operation')] | |||||
) | |||||
coreconfigitem('experimental', 'exportableenviron', | coreconfigitem('experimental', 'exportableenviron', | ||||
default=list, | default=list, | ||||
) | ) | ||||
coreconfigitem('experimental', 'extendedheader.index', | coreconfigitem('experimental', 'extendedheader.index', | ||||
default=None, | default=None, | ||||
) | ) | ||||
coreconfigitem('experimental', 'extendedheader.similarity', | coreconfigitem('experimental', 'extendedheader.similarity', | ||||
default=False, | default=False, |
createmarkersopt = 'createmarkers' | createmarkersopt = 'createmarkers' | ||||
allowunstableopt = 'allowunstable' | allowunstableopt = 'allowunstable' | ||||
exchangeopt = 'exchange' | exchangeopt = 'exchange' | ||||
def isenabled(repo, option): | def isenabled(repo, option): | ||||
"""Returns True if the given repository has the given obsolete option | """Returns True if the given repository has the given obsolete option | ||||
enabled. | enabled. | ||||
""" | """ | ||||
result = set(repo.ui.configlist('experimental', 'stabilization')) | result = set(repo.ui.configlist('experimental', 'evolution')) | ||||
if 'all' in result: | if 'all' in result: | ||||
return True | return True | ||||
# For migration purposes, temporarily return true if the config hasn't been | # For migration purposes, temporarily return true if the config hasn't been | ||||
# set but _enabled is true. | # set but _enabled is true. | ||||
if len(result) == 0 and _enabled: | if len(result) == 0 and _enabled: | ||||
return True | return True | ||||
develuser = repo.ui.config('devel', 'user.obsmarker') | develuser = repo.ui.config('devel', 'user.obsmarker') | ||||
if develuser: | if develuser: | ||||
metadata['user'] = develuser | metadata['user'] = develuser | ||||
else: | else: | ||||
metadata['user'] = repo.ui.username() | metadata['user'] = repo.ui.username() | ||||
# Operation metadata handling | # Operation metadata handling | ||||
useoperation = repo.ui.configbool('experimental', | useoperation = repo.ui.configbool('experimental', | ||||
'stabilization.track-operation') | 'evolution.track-operation') | ||||
if useoperation and operation: | if useoperation and operation: | ||||
metadata['operation'] = operation | metadata['operation'] = operation | ||||
# Effect flag metadata handling | # Effect flag metadata handling | ||||
saveeffectflag = repo.ui.configbool('experimental', | saveeffectflag = repo.ui.configbool('experimental', | ||||
'effect-flags') | 'effect-flags') | ||||
tr = repo.transaction('add-obsolescence-marker') | tr = repo.transaction('add-obsolescence-marker') |