Mercurial > hg
comparison contrib/churn.py @ 5482:e5eedd74e70f
Use both the from and to name in mdiff.unidiff.
This fixes a compatibility issue with git diffs.
* * *
author | Dustin Sallings <dustin@spy.net> |
---|---|
date | Thu, 01 Nov 2007 12:17:59 -0700 |
parents | 041bd297f01e |
children | 083b6e3142a2 |
comparison
equal
deleted
inserted
replaced
5481:003d1f174fe1 | 5482:e5eedd74e70f |
---|---|
41 lines = 0 | 41 lines = 0 |
42 | 42 |
43 to = mmap1 and repo.file(f).read(mmap1[f]) or None | 43 to = mmap1 and repo.file(f).read(mmap1[f]) or None |
44 tn = mmap2 and repo.file(f).read(mmap2[f]) or None | 44 tn = mmap2 and repo.file(f).read(mmap2[f]) or None |
45 | 45 |
46 diff = mdiff.unidiff(to, "", tn, "", f).split("\n") | 46 diff = mdiff.unidiff(to, "", tn, "", f, f).split("\n") |
47 | 47 |
48 for line in diff: | 48 for line in diff: |
49 if not line: | 49 if not line: |
50 continue # skip EOF | 50 continue # skip EOF |
51 if line.startswith(" "): | 51 if line.startswith(" "): |