##// END OF EJS Templates
dirstate.walk: change names for dc and known...
Matt Mackall -
r6821:d8367107 default
parent child Browse files
Show More
@@ -444,10 +444,10 b' class dirstate(object):'
444 444 files = util.unique(match.files())
445 445 if not files or '.' in files:
446 446 files = ['']
447 dc = self._map
447 dmap = self._map
448 448
449 449 def imatch(file_):
450 if file_ not in dc and self._ignore(file_):
450 if file_ not in dmap and self._ignore(file_):
451 451 return False
452 452 return match(file_)
453 453
@@ -479,21 +479,21 b' class dirstate(object):'
479 479 found = []
480 480 add = found.append
481 481
482 known = {'.hg': 1}
482 seen = {'.hg': 1}
483 483
484 484 # step one, find all files that match our criteria
485 485 for ff in util.sort(files):
486 486 nf = normpath(ff)
487 487 nn = self.normalize(nf)
488 488 f = _join(ff)
489 if nn in known:
489 if nn in seen:
490 490 continue
491 491
492 492 try:
493 493 st = lstat(f)
494 494 except OSError, inst:
495 495 keep = False
496 for fn in dc:
496 for fn in dmap:
497 497 if nf == fn or (fn.startswith(nf) and fn[len(nf)] == '/'):
498 498 keep = True
499 499 break
@@ -505,10 +505,10 b' class dirstate(object):'
505 505 continue
506 506
507 507 if not s_isdir(st.st_mode):
508 known[nn] = 1
508 seen[nn] = 1
509 509 if supported(ff, st.st_mode, verbose=True):
510 510 yield self.normalize(nf), st
511 elif ff in dc:
511 elif ff in dmap:
512 512 yield nf, None
513 513 continue
514 514
@@ -537,9 +537,9 b' class dirstate(object):'
537 537 for f, kind, st in entries:
538 538 np = pconvert(join(nd, f))
539 539 nn = self.normalize(np)
540 if np in known:
540 if np in seen:
541 541 continue
542 known[nn] = 1
542 seen[nn] = 1
543 543 p = join(top, f)
544 544 # don't trip over symlinks
545 545 if kind == stat.S_IFDIR:
@@ -547,22 +547,22 b' class dirstate(object):'
547 547 wadd(p)
548 548 if hasattr(match, 'dir'):
549 549 match.dir(np)
550 if np in dc and match(np):
550 if np in dmap and match(np):
551 551 add((nn, None))
552 552 elif imatch(np):
553 553 if supported(np, st.st_mode):
554 554 add((nn, st))
555 elif np in dc:
555 elif np in dmap:
556 556 add((nn, None))
557 557 for e in util.sort(found):
558 558 yield e
559 559
560 # step two run through anything left in the dc hash and yield
560 # step two run through anything left in the dmap hash and yield
561 561 # if we haven't already seen it
562 for f in util.sort(dc):
563 if f in known or not match(f):
562 for f in util.sort(dmap):
563 if f in seen or not match(f):
564 564 continue
565 known[f] = 1
565 seen[f] = 1
566 566 try:
567 567 st = lstat(_join(f))
568 568 if supported(f, st.st_mode):
General Comments 0
You need to be logged in to leave comments. Login now