Mercurial > hg
changeset 30627:7ace5304fec5
changegroup: pass 'repo' to allsupportedversions
In the next changesets, we will introduce more logic directly related to the
repository to decide what version have to be supported. So we now directly pass
the repo object instead of just ui.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Mon, 19 Dec 2016 04:29:33 +0100 |
parents | 438532c99b54 |
children | a001cd7296a5 |
files | mercurial/changegroup.py |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/changegroup.py Mon Dec 19 04:31:13 2016 +0100 +++ b/mercurial/changegroup.py Mon Dec 19 04:29:33 2016 +0100 @@ -874,23 +874,23 @@ '03': (cg3packer, cg3unpacker), } -def allsupportedversions(ui): +def allsupportedversions(repo): versions = set(_packermap.keys()) - if not (ui.configbool('experimental', 'changegroup3') or - ui.configbool('experimental', 'treemanifest')): + if not (repo.ui.configbool('experimental', 'changegroup3') or + repo.ui.configbool('experimental', 'treemanifest')): versions.discard('03') return versions # Changegroup versions that can be applied to the repo def supportedincomingversions(repo): - versions = allsupportedversions(repo.ui) + versions = allsupportedversions(repo) if 'treemanifest' in repo.requirements: versions.add('03') return versions # Changegroup versions that can be created from the repo def supportedoutgoingversions(repo): - versions = allsupportedversions(repo.ui) + versions = allsupportedversions(repo) if 'treemanifest' in repo.requirements: # Versions 01 and 02 support only flat manifests and it's just too # expensive to convert between the flat manifest and tree manifest on