comparison mercurial/commands.py @ 33031:e8c8d81eb864

bundle: add config option to include phases This adds an experimental.bundle-phases config option to include phase information in bundles. As with the recently added support for bundling obsmarkers, the support for bundling phases is hidden behind the config option until we decide to make a bundlespec v3 that includes phases (and obsmarkers and ...). We could perhaps use the listkeys format for this, but that's considered obsolete according to Pierre-Yves. Instead, we introduce a new "phase-heads" bundle part. The new part contains the phase heads among the set of bundled revisions. It does not include those in secret phase; any head in the bundle that is not mentioned in the phase-heads part is assumed to be secret. As a special case, an empty phase-heads part thus means that any changesets should be added in secret phase. (If we ever add a fourth phase, we'll include secret in the part and we'll add a version number.) For now, phases are only included by "hg bundle", and not by e.g. strip and rebase.
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 22 Jun 2017 10:10:02 -0700
parents 3e102a8dd52c
children 52c7060b707a
comparison
equal deleted inserted replaced
33030:3e102a8dd52c 33031:e8c8d81eb864
1228 1228
1229 1229
1230 contentopts = {'cg.version': cgversion} 1230 contentopts = {'cg.version': cgversion}
1231 if repo.ui.configbool('experimental', 'evolution.bundle-obsmarker', False): 1231 if repo.ui.configbool('experimental', 'evolution.bundle-obsmarker', False):
1232 contentopts['obsolescence'] = True 1232 contentopts['obsolescence'] = True
1233 if repo.ui.configbool('experimental', 'bundle-phases', False):
1234 contentopts['phases'] = True
1233 bundle2.writenewbundle(ui, repo, 'bundle', fname, bversion, outgoing, 1235 bundle2.writenewbundle(ui, repo, 'bundle', fname, bversion, outgoing,
1234 contentopts, compression=bcompression, 1236 contentopts, compression=bcompression,
1235 compopts=compopts) 1237 compopts=compopts)
1236 1238
1237 @command('cat', 1239 @command('cat',