Patchwork [2,of,3,V2] dirstate._walkexplicit: drop normpath calls

login
register
mail settings
Submitter Siddharth Agarwal
Date March 30, 2015, 6:36 a.m.
Message ID <a05be84438fb2a502590.1427697372@devbig136.prn2.facebook.com>
Download mbox | patch
Permalink /patch/8370/
State Accepted
Headers show

Comments

Siddharth Agarwal - March 30, 2015, 6:36 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1427696910 25200
#      Sun Mar 29 23:28:30 2015 -0700
# Node ID a05be84438fb2a502590b7ae7d5001308b558c03
# Parent  6cd9f346c8c947a0aad24d1742a91683a939bfec
dirstate._walkexplicit: drop normpath calls

The paths the matcher returns are normalized already.

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -599,7 +599,6 @@ 
         matchedir = match.explicitdir
         badfn = match.bad
         dmap = self._map
-        normpath = util.normpath
         lstat = os.lstat
         getkind = stat.S_IFMT
         dirkind = stat.S_IFDIR
@@ -636,9 +635,9 @@ 
         alldirs = None
         for ff in files:
             if normalize:
-                nf = normalize(normpath(ff), False, True)
+                nf = normalize(ff, False, True)
             else:
-                nf = normpath(ff)
+                nf = ff
             if nf in results:
                 continue