py3: explicitly convert dict.values() to a list on py3
authorPulkit Goyal <7895pulkit@gmail.com>
Fri, 16 Jun 2017 01:28:23 +0530
changeset 32862 e4a43b810528
parent 32861 20d70df64e93
child 32863 9e3733d93f64
py3: explicitly convert dict.values() to a list on py3 dict.values() returns a dict_values() object, so we need to pass it into list() explicitly to get one.
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Fri Jun 16 01:24:31 2017 +0530
+++ b/mercurial/cmdutil.py	Fri Jun 16 01:28:23 2017 +0530
@@ -452,7 +452,7 @@
         raise error.AmbiguousCommand(cmd, clist)
 
     if choice:
-        return choice.values()[0]
+        return list(choice.values())[0]
 
     raise error.UnknownCommand(cmd, allcmds)