# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2017-03-16 03:30:27 # Node ID 2e38a88bbc6c0f29dbbaf5a922995331b977a9a1 # Parent 5c9cda37d7f6b181ab604c8d5a7592b5553f886b 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. diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -1079,7 +1079,7 @@ class dirstate(object): # 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()