# HG changeset patch # User Augie Fackler # Date 1495994534 14400 # Node ID 9f56d462634cdee54abb93783505325600d3a60d # Parent 47ce079b1afa026b36478c98166608f5070cf354 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. diff -r 47ce079b1afa -r 9f56d462634c mercurial/cmdutil.py --- 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: