Mercurial > hg > gitweb
comparison mercurial/hg.py @ 64:b3e2ddff0159
Diff in subdirectories from Jake Edge
Dates in diff
Fix O(n^2) behaviour of manifest diff
Add a/ and b/ to work with patch -p1
author | mpm@selenic.com |
---|---|
date | Thu, 12 May 2005 17:54:55 -0800 |
parents | e32fdbd97839 |
children | d40cc5aacc31 |
comparison
equal
deleted
inserted
replaced
63:1c590d34bf61 | 64:b3e2ddff0159 |
---|---|
497 dc = self.dircache.copy() | 497 dc = self.dircache.copy() |
498 else: | 498 else: |
499 dc = dict.fromkeys(mf) | 499 dc = dict.fromkeys(mf) |
500 | 500 |
501 def fcmp(fn): | 501 def fcmp(fn): |
502 t1 = file(fn).read() | 502 t1 = file(os.path.join(self.root, fn)).read() |
503 t2 = self.file(fn).revision(mf[fn]) | 503 t2 = self.file(fn).revision(mf[fn]) |
504 return cmp(t1, t2) | 504 return cmp(t1, t2) |
505 | 505 |
506 for dir, subdirs, files in os.walk(self.root): | 506 for dir, subdirs, files in os.walk(self.root): |
507 d = dir[len(self.root)+1:] | 507 d = dir[len(self.root)+1:] |
508 if ".hg" in subdirs: subdirs.remove(".hg") | 508 if ".hg" in subdirs: subdirs.remove(".hg") |
509 | 509 |
510 for f in files: | 510 for f in files: |
511 fn = os.path.join(d, f) | 511 fn = os.path.join(d, f) |
512 try: s = os.stat(fn) | 512 try: s = os.stat(os.path.join(self.root, fn)) |
513 except: continue | 513 except: continue |
514 if fn in dc: | 514 if fn in dc: |
515 c = dc[fn] | 515 c = dc[fn] |
516 del dc[fn] | 516 del dc[fn] |
517 if not c: | 517 if not c: |