bundlerepo: use supportedincomingversions instead of allsupportedversions
authorAugie Fackler <augie@google.com>
Thu, 04 Aug 2016 14:13:35 -0400
changeset 29713 43924f3a55fa
parent 29712 9e88077f972c
child 29714 69109052d9ac
bundlerepo: use supportedincomingversions instead of allsupportedversions Since bundlerepo is really a pull-like operation, this is the correct method to use here.
mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py	Fri Aug 05 13:07:58 2016 -0400
+++ b/mercurial/bundlerepo.py	Thu Aug 04 14:13:35 2016 -0400
@@ -290,7 +290,8 @@
                                                   "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():