From patchwork Fri Aug 5 17:23:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [7, of, 9, v2] bundlerepo: use supportedincomingversions instead of allsupportedversions From: Augie Fackler X-Patchwork-Id: 16126 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Fri, 05 Aug 2016 13:23:45 -0400 # HG changeset patch # User Augie Fackler # Date 1470334415 14400 # Thu Aug 04 14:13:35 2016 -0400 # Node ID cb4b54c546d76d5ac0ccfe32ac02265d9ae8d336 # Parent 7e585d431acf066bf97ac7ccf8d16044206d5931 bundlerepo: use supportedincomingversions instead of allsupportedversions Since bundlerepo is really a pull-like operation, this is the correct method to use here. diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py +++ b/mercurial/bundlerepo.py @@ -284,7 +284,8 @@ class bundlerepository(localrepo.localre "multiple changegroups") cgstream = part version = part.params.get('version', '01') - if version not in changegroup.allsupportedversions(ui): + legalcgvers = changegroup.supportedincomingversions(self) + if version not in legalcgvers: msg = _('Unsupported changegroup version: %s') raise error.Abort(msg % version) if self.bundle.compressed():