We are about to add more cases, in that context, it is simpler to avoid double
negative.
En addition, We document the situation for the next soul.
| indygreg |
| hg-reviewers |
We are about to add more cases, in that context, it is simpler to avoid double
negative.
En addition, We document the situation for the next soul.
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/changegroup.py (16 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| 065f81f23f4b | fe0ca9ae6c7a | Pierre-Yves David | Sep 30 2019, 2:21 PM |
| # cg2 adds support for exchanging generaldelta | # cg2 adds support for exchanging generaldelta | ||||
| '02': (_makecg2packer, cg2unpacker), | '02': (_makecg2packer, cg2unpacker), | ||||
| # cg3 adds support for exchanging revlog flags and treemanifests | # cg3 adds support for exchanging revlog flags and treemanifests | ||||
| '03': (_makecg3packer, cg3unpacker), | '03': (_makecg3packer, cg3unpacker), | ||||
| } | } | ||||
| def allsupportedversions(repo): | def allsupportedversions(repo): | ||||
| versions = set(_packermap.keys()) | versions = set(_packermap.keys()) | ||||
| if not (repo.ui.configbool('experimental', 'changegroup3') or | needv03 = False | ||||
| if (repo.ui.configbool('experimental', 'changegroup3') or | |||||
| repo.ui.configbool('experimental', 'treemanifest') or | repo.ui.configbool('experimental', 'treemanifest') or | ||||
| 'treemanifest' in repo.requirements): | 'treemanifest' in repo.requirements): | ||||
| # we keep version 03 because we need to to exchange treemanifest data | |||||
| # | |||||
| # we also keep vresion 01 and 02, because it is possible for repo to | |||||
| # contains both normal and tree manifest at the same time. so using | |||||
| # older version to pull data is viable | |||||
| # | |||||
| # (or even to push subset of history) | |||||
| needv03 = True | |||||
| if not needv03: | |||||
| versions.discard('03') | versions.discard('03') | ||||
| return versions | return versions | ||||
| # Changegroup versions that can be applied to the repo | # Changegroup versions that can be applied to the repo | ||||
| def supportedincomingversions(repo): | def supportedincomingversions(repo): | ||||
| return allsupportedversions(repo) | return allsupportedversions(repo) | ||||
| # Changegroup versions that can be created from the repo | # Changegroup versions that can be created from the repo | ||||