changeset 31422:2e38a88bbc6c

dirstate: use list comprehension to get a list of keys We have used dict.keys() which returns a dict_keys() object instead of list on Python 3. So this patch replaces that with list comprehension which works both on Python 2 and 3.
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 16 Mar 2017 09:00:27 +0530
parents 5c9cda37d7f6
children 568d80b24b3a
files mercurial/dirstate.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Thu Mar 16 08:03:51 2017 +0530
+++ b/mercurial/dirstate.py	Thu Mar 16 09:00:27 2017 +0530
@@ -1079,7 +1079,7 @@
             # a) not matching matchfn b) ignored, c) missing, or d) under a
             # symlink directory.
             if not results and matchalways:
-                visit = dmap.keys()
+                visit = [f for f in dmap]
             else:
                 visit = [f for f in dmap if f not in results and matchfn(f)]
             visit.sort()