Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 32862:e4a43b810528
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.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 16 Jun 2017 01:28:23 +0530 |
parents | 97a4d09f5140 |
children | 2ecce24dfcd3 |
comparison
equal
deleted
inserted
replaced
32861:20d70df64e93 | 32862:e4a43b810528 |
---|---|
450 if len(choice) > 1: | 450 if len(choice) > 1: |
451 clist = sorted(choice) | 451 clist = sorted(choice) |
452 raise error.AmbiguousCommand(cmd, clist) | 452 raise error.AmbiguousCommand(cmd, clist) |
453 | 453 |
454 if choice: | 454 if choice: |
455 return choice.values()[0] | 455 return list(choice.values())[0] |
456 | 456 |
457 raise error.UnknownCommand(cmd, allcmds) | 457 raise error.UnknownCommand(cmd, allcmds) |
458 | 458 |
459 def findrepo(p): | 459 def findrepo(p): |
460 while not os.path.isdir(os.path.join(p, ".hg")): | 460 while not os.path.isdir(os.path.join(p, ".hg")): |