# HG changeset patch # User Martin von Zweigbergk # Date 2019-04-24 16:32:29 # Node ID 7ada598941d2f879bc33226e7f736228f610b3d0 # Parent c0e1ea0c4cee62f79855dce4075dc499dea00693 dirstate: move special handling of files==['.'] together I think it makes it a little clearer to have the two conditions for files==['.'] near each other. Differential Revision: https://phab.mercurial-scm.org/D6400 diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -759,13 +759,14 @@ class dirstate(object): if not files or '.' in files: files = ['.'] + # constructing the foldmap is expensive, so don't do it for the + # common case where files is ['.'] + normalize = None results = dict.fromkeys(subrepos) results['.hg'] = None for ff in files: - # constructing the foldmap is expensive, so don't do it for the - # common case where files is ['.'] - if normalize and ff != '.': + if normalize: nf = normalize(ff, False, True) else: nf = ff