mercurial/rcutil.py
changeset 31699 10d88dc7c010
parent 31698 67f0377bd24b
child 31954 e518192d6bac
--- a/mercurial/rcutil.py	Tue Mar 28 07:55:32 2017 -0700
+++ b/mercurial/rcutil.py	Tue Mar 28 07:57:56 2017 -0700
@@ -85,9 +85,8 @@
                 continue
             _rccomponents.extend(('path', p) for p in _expandrcpath(p))
     else:
-        paths = defaultrcpath() + systemrcpath()
-        _rccomponents = [('path', os.path.normpath(p)) for p in paths]
+        normpaths = lambda paths: [('path', os.path.normpath(p)) for p in paths]
+        _rccomponents = normpaths(defaultrcpath() + systemrcpath())
         _rccomponents.append(envrc)
-        paths = userrcpath()
-        _rccomponents.extend(('path', os.path.normpath(p)) for p in paths)
+        _rccomponents.extend(normpaths(userrcpath()))
     return _rccomponents