make diff dates be epoch for add/remove
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Tue, 04 Oct 2005 11:21:48 -0700
changeset 1378 a0fcfbbf52bb
parent 1377 854775b27d1a
child 1379 8ee7ce877be2
make diff dates be epoch for add/remove
mercurial/mdiff.py
--- 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: