changeset 32528:9f56d462634c

cmdutil: use sorted(dict) instead of x = dict.keys(); x.sort() The former both does less work and has the virtue of working on Python 3.
author Augie Fackler <raf@durin42.com>
date Sun, 28 May 2017 14:02:14 -0400
parents 47ce079b1afa
children 0ec17613582c
files mercurial/cmdutil.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Sun May 28 16:17:43 2017 -0400
+++ b/mercurial/cmdutil.py	Sun May 28 14:02:14 2017 -0400
@@ -449,8 +449,7 @@
         return choice[cmd]
 
     if len(choice) > 1:
-        clist = choice.keys()
-        clist.sort()
+        clist = sorted(choice)
         raise error.AmbiguousCommand(cmd, clist)
 
     if choice: