Mercurial > hg > gitweb
comparison hg @ 130:e6678a1beb6a
Make hg diff handle files that have been added but not yet committed.
author | mpm@selenic.com |
---|---|
date | Sat, 21 May 2005 17:26:44 -0800 |
parents | 1db9207def07 |
children | 529bf610092e |
comparison
equal
deleted
inserted
replaced
129:1db9207def07 | 130:e6678a1beb6a |
---|---|
74 | 74 |
75 if files: | 75 if files: |
76 c, a, d = map(lambda x: filterfiles(x, files), (c, a, d)) | 76 c, a, d = map(lambda x: filterfiles(x, files), (c, a, d)) |
77 | 77 |
78 for f in c: | 78 for f in c: |
79 to = repo.file(f).read(mmap[f]) | 79 to = "" |
80 if mmap.has_key(f): | |
81 to = repo.file(f).read(mmap[f]) | |
80 tn = read(f) | 82 tn = read(f) |
81 sys.stdout.write(mdiff.unidiff(to, date1, tn, date2, f)) | 83 sys.stdout.write(mdiff.unidiff(to, date1, tn, date2, f)) |
82 for f in a: | 84 for f in a: |
83 to = "" | 85 to = "" |
84 tn = read(f) | 86 tn = read(f) |