--- 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: