Mercurial > public > mercurial-scm > hg
comparison mercurial/bundle2.py @ 33408:e3867c712d51
bundle2: automatically add 'targetphase' parameter in writenewbundle
If we are bundling secret changeset and the bundle will contain phase, we
request the changegroup to be applied as secret.
It will be useful for next patch as we are now sure that secrets changesets
are applied as secret and not applied as draft then forced to secret.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Tue, 11 Jul 2017 05:12:03 +0200 |
parents | 39d4e5a66f5a |
children | 57a017f79e96 |
comparison
equal
deleted
inserted
replaced
33407:39d4e5a66f5a | 33408:e3867c712d51 |
---|---|
1399 part = bundler.newpart('changegroup', data=cg.getchunks()) | 1399 part = bundler.newpart('changegroup', data=cg.getchunks()) |
1400 part.addparam('version', cg.version) | 1400 part.addparam('version', cg.version) |
1401 if 'clcount' in cg.extras: | 1401 if 'clcount' in cg.extras: |
1402 part.addparam('nbchanges', str(cg.extras['clcount']), | 1402 part.addparam('nbchanges', str(cg.extras['clcount']), |
1403 mandatory=False) | 1403 mandatory=False) |
1404 if opts.get('phases') and repo.revs('%ln and secret()', | |
1405 outgoing.missingheads): | |
1406 part.addparam('targetphase', '%d' % phases.secret, mandatory=False) | |
1404 | 1407 |
1405 addparttagsfnodescache(repo, bundler, outgoing) | 1408 addparttagsfnodescache(repo, bundler, outgoing) |
1406 | 1409 |
1407 if opts.get('obsolescence', False): | 1410 if opts.get('obsolescence', False): |
1408 obsmarkers = repo.obsstore.relevantmarkers(outgoing.missing) | 1411 obsmarkers = repo.obsstore.relevantmarkers(outgoing.missing) |