diff mercurial/dirstate.py @ 24542:9fbda55c68d7

merge with stable
author Matt Mackall <mpm@selenic.com>
date Tue, 31 Mar 2015 16:14:14 -0500
parents e235b5dc5cf9 2bb13f2b778c
children afc29e29d569
line wrap: on
line diff
--- a/mercurial/dirstate.py	Sun Mar 29 19:47:16 2015 -0700
+++ b/mercurial/dirstate.py	Tue Mar 31 16:14:14 2015 -0500
@@ -677,7 +677,7 @@
                         results[nf] = None
                     if matchedir:
                         matchedir(nf)
-                    foundadd(nf)
+                    foundadd((nf, ff))
                 elif kind == regkind or kind == lnkkind:
                     results[nf] = st
                 else:
@@ -753,15 +753,16 @@
         results, work, dirsnotfound = self._walkexplicit(match, subrepos)
 
         skipstep3 = skipstep3 and not (work or dirsnotfound)
-        work = [d for d in work if not dirignore(d)]
+        work = [d for d in work if not dirignore(d[0])]
         wadd = work.append
 
         # step 2: visit subdirectories
         while work:
-            nd = work.pop()
+            nd, d = work.pop()
             skip = None
             if nd == '.':
                 nd = ''
+                d = ''
             else:
                 skip = '.hg'
             try:
@@ -776,22 +777,24 @@
                     # even though f might be a directory, we're only interested
                     # in comparing it to files currently in the dmap --
                     # therefore normalizefile is enough
+                    f = d and (d + "/" + f) or f
                     nf = normalizefile(nd and (nd + "/" + f) or f, True, True)
                 else:
                     nf = nd and (nd + "/" + f) or f
+                    f = nf
                 if nf not in results:
                     if kind == dirkind:
                         if not ignore(nf):
                             if matchtdir:
                                 matchtdir(nf)
-                            wadd(nf)
+                            wadd((nf, f))
                         if nf in dmap and (matchalways or matchfn(nf)):
                             results[nf] = None
                     elif kind == regkind or kind == lnkkind:
                         if nf in dmap:
                             if matchalways or matchfn(nf):
                                 results[nf] = st
-                        elif (matchalways or matchfn(nf)) and not ignore(nf):
+                        elif (matchalways or matchfn(f)) and not ignore(nf):
                             results[nf] = st
                     elif nf in dmap and (matchalways or matchfn(nf)):
                         results[nf] = None