diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py --- a/mercurial/changegroup.py +++ b/mercurial/changegroup.py @@ -876,10 +876,9 @@ class cg3packer(cg2packer): def allsupportedversions(ui): versions = set(_packermap.keys()) - versions.discard('03') - if (ui.configbool('experimental', 'changegroup3') or - ui.configbool('experimental', 'treemanifest')): - versions.add('03') + if not (ui.configbool('experimental', 'changegroup3') or + ui.configbool('experimental', 'treemanifest')): + versions.discard('03') return versions # Changegroup versions that can be applied to the repo