Mercurial > public > mercurial-scm > hg
diff mercurial/bundle2.py @ 49336:290c29df1915
bundlespec: check the `obsolescence` value before adding the caps
This does not really matters as the logic to decide wether or not adding the
part is correct and elsewhere. However this seems like a good idea to align
this logic witht he semantic of the option.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 18 May 2022 10:39:45 +0100 |
parents | bde2e4ef968a |
children | 9be765b82a90 |
line wrap: on
line diff
--- a/mercurial/bundle2.py Wed May 25 11:53:34 2022 +0200 +++ b/mercurial/bundle2.py Wed May 18 10:39:45 2022 +0100 @@ -1692,7 +1692,7 @@ raise error.ProgrammingError(b'unknown bundle type: %s' % bundletype) caps = {} - if b'obsolescence' in opts: + if opts.get(b'obsolescence', False): caps[b'obsmarkers'] = (b'V1',) bundle = bundle20(ui, caps) bundle.setcompression(compression, compopts)