equal
deleted
inserted
replaced
4 # |
4 # |
5 # This software may be used and distributed according to the terms |
5 # This software may be used and distributed according to the terms |
6 # of the GNU General Public License, incorporated herein by reference. |
6 # of the GNU General Public License, incorporated herein by reference. |
7 |
7 |
8 import sys, struct, os |
8 import sys, struct, os |
|
9 import util |
9 from revlog import * |
10 from revlog import * |
10 from demandload import * |
11 from demandload import * |
11 demandload(globals(), "re lock urllib urllib2 transaction time socket") |
12 demandload(globals(), "re lock urllib urllib2 transaction time socket") |
12 demandload(globals(), "tempfile httprangereader difflib") |
13 demandload(globals(), "tempfile httprangereader difflib") |
13 |
14 |
387 self.ignorelist = [] |
388 self.ignorelist = [] |
388 try: |
389 try: |
389 l = file(self.wjoin(".hgignore")) |
390 l = file(self.wjoin(".hgignore")) |
390 for pat in l: |
391 for pat in l: |
391 if pat != "\n": |
392 if pat != "\n": |
392 self.ignorelist.append(re.compile(pat[:-1])) |
393 self.ignorelist.append(re.compile(util.pconvert(pat[:-1]))) |
393 except IOError: pass |
394 except IOError: pass |
394 for pat in self.ignorelist: |
395 for pat in self.ignorelist: |
395 if pat.search(f): return True |
396 if pat.search(f): return True |
396 return False |
397 return False |
397 |
398 |
637 for dir, subdirs, files in os.walk(path): |
638 for dir, subdirs, files in os.walk(path): |
638 d = dir[len(self.root)+1:] |
639 d = dir[len(self.root)+1:] |
639 if ".hg" in subdirs: subdirs.remove(".hg") |
640 if ".hg" in subdirs: subdirs.remove(".hg") |
640 |
641 |
641 for f in files: |
642 for f in files: |
642 fn = os.path.join(d, f) |
643 fn = util.pconvert(os.path.join(d, f)) |
643 try: s = os.stat(os.path.join(self.root, fn)) |
644 try: s = os.stat(os.path.join(self.root, fn)) |
644 except: continue |
645 except: continue |
645 if fn in dc: |
646 if fn in dc: |
646 c = dc[fn] |
647 c = dc[fn] |
647 del dc[fn] |
648 del dc[fn] |