Mercurial > hg
changeset 1378:a0fcfbbf52bb
make diff dates be epoch for add/remove
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 04 Oct 2005 11:21:48 -0700 |
parents | 854775b27d1a |
children | 8ee7ce877be2 |
files | mercurial/mdiff.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/mdiff.py Mon Oct 03 16:07:54 2005 -0700 +++ b/mercurial/mdiff.py Tue Oct 04 11:21:48 2005 -0700 @@ -12,19 +12,20 @@ def unidiff(a, ad, b, bd, fn, r=None, text=False): if not a and not b: return "" + epoch = datestr((0,0)) if not text and (binary(a) or binary(b)): l = ['Binary file %s has changed\n' % fn] elif a == None: b = b.splitlines(1) - l1 = "--- %s\t%s\n" % ("/dev/null", ad) + l1 = "--- %s\t%s\n" % ("/dev/null", epoch) l2 = "+++ %s\t%s\n" % ("b/" + fn, bd) l3 = "@@ -0,0 +1,%d @@\n" % len(b) l = [l1, l2, l3] + ["+" + e for e in b] elif b == None: a = a.splitlines(1) l1 = "--- %s\t%s\n" % ("a/" + fn, ad) - l2 = "+++ %s\t%s\n" % ("/dev/null", bd) + l2 = "+++ %s\t%s\n" % ("/dev/null", epoch) l3 = "@@ -1,%d +0,0 @@\n" % len(a) l = [l1, l2, l3] + ["-" + e for e in a] else: