equal
deleted
inserted
replaced
444 for f in util.unique(files): |
444 for f in util.unique(files): |
445 f = os.path.join(self.root, f) |
445 f = os.path.join(self.root, f) |
446 if os.path.isdir(f): |
446 if os.path.isdir(f): |
447 for dir, subdirs, fl in os.walk(f): |
447 for dir, subdirs, fl in os.walk(f): |
448 d = dir[len(self.root) + 1:] |
448 d = dir[len(self.root) + 1:] |
449 if d == '.hg': |
449 nd = os.path.normpath(d) |
|
450 if nd == '.hg': |
450 subdirs[:] = [] |
451 subdirs[:] = [] |
451 continue |
452 continue |
452 for sd in subdirs: |
453 for sd in subdirs: |
453 ds = os.path.join(d, sd +'/') |
454 ds = os.path.join(nd, sd +'/') |
454 if self.ignore(ds) or not match(ds): |
455 if self.ignore(ds) or not match(ds): |
455 subdirs.remove(sd) |
456 subdirs.remove(sd) |
456 for fn in fl: |
457 for fn in fl: |
457 fn = util.pconvert(os.path.join(d, fn)) |
458 fn = util.pconvert(os.path.join(d, fn)) |
458 yield 'f', fn |
459 yield 'f', fn |
464 |
465 |
465 # yield only files that match: all in dirstate, others only if |
466 # yield only files that match: all in dirstate, others only if |
466 # not in .hgignore |
467 # not in .hgignore |
467 |
468 |
468 for src, fn in util.unique(traverse()): |
469 for src, fn in util.unique(traverse()): |
|
470 fn = os.path.normpath(fn) |
469 if fn in dc: |
471 if fn in dc: |
470 del dc[fn] |
472 del dc[fn] |
471 elif self.ignore(fn): |
473 elif self.ignore(fn): |
472 continue |
474 continue |
473 if match(fn): |
475 if match(fn): |
866 return 1 |
868 return 1 |
867 |
869 |
868 def walk(self, node = None, files = [], match = util.always): |
870 def walk(self, node = None, files = [], match = util.always): |
869 if node: |
871 if node: |
870 for fn in self.manifest.read(self.changelog.read(node)[0]): |
872 for fn in self.manifest.read(self.changelog.read(node)[0]): |
871 yield 'm', fn |
873 if match(fn): yield 'm', fn |
872 else: |
874 else: |
873 for src, fn in self.dirstate.walk(files, match): |
875 for src, fn in self.dirstate.walk(files, match): |
874 yield src, fn |
876 yield src, fn |
875 |
877 |
876 def changes(self, node1 = None, node2 = None, files = [], |
878 def changes(self, node1 = None, node2 = None, files = [], |