Patchwork D2070: py3: use pycompat.ziplist instead of zip

login
register
mail settings
Submitter phabricator
Date Feb. 7, 2018, 9 a.m.
Message ID <differential-rev-PHID-DREV-6neaax7djm4ypqrdo33d-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27404/
State Superseded
Headers show

Comments

phabricator - Feb. 7, 2018, 9 a.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  zip returns a zip object instead of a list on Python 3.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2070

AFFECTED FILES
  mercurial/dispatch.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -477,7 +477,8 @@ 
         if earlyopts:
             self.badalias = (_("error in definition for alias '%s': %s may "
                                "only be given on the command line")
-                             % (self.name, '/'.join(zip(*earlyopts)[0])))
+                             % (self.name, '/'.join(pycompat.ziplist(*earlyopts)
+                                                    [0])))
             return
         self.cmdname = cmd = args.pop(0)
         self.givenargs = args