a8805edec646 — Durham Goode 8 years ago
pushrebase: fix changegroup format picking to account for new upstream api

Summary:
Upstream has changed _packermap to be hidden behind supportedversions(). We need
to use that, otherwise we'll potentially reply with the wrong changegroup type.

Test Plan: Ran the tests

Reviewers: mitrandir

Differential Revision: https://phabricator.fb.com/D2903217
1 files changed, 1 insertions(+), 1 deletions(-)

M pushrebase.py
M pushrebase.py +1 -1
@@ 417,7 417,7 @@ def _addpushbackchangegroup(repo, reply,
     cgversions = set(reply.capabilities.get('changegroup'))
     if not cgversions:
         cgversions.add('01')
-    version = max(cgversions & set(changegroup._packermap.keys()))
+    version = max(cgversions & set(changegroup.supportedversions(repo)))
 
     cg = changegroup.getlocalchangegroupraw(repo,
                                             'rebase:reply',