mercurial/mdiff.py
changeset 3199 096f1c73cdc3
parent 3026 d838bfac668d
child 3877 abaee83ce0a6
child 4103 544838cc1158
--- a/mercurial/mdiff.py	Fri Sep 29 23:14:22 2006 +0200
+++ b/mercurial/mdiff.py	Tue Sep 26 00:05:24 2006 +0100
@@ -24,6 +24,7 @@
     text treats all files as text
     showfunc enables diff -p output
     git enables the git extended patch format
+    nodates removes dates from diff headers
     ignorews ignores all whitespace changes in the diff
     ignorewsamount ignores changes in the amount of whitespace
     ignoreblanklines ignores changes whose lines are all blank'''
@@ -33,6 +34,7 @@
         'text': False,
         'showfunc': True,
         'git': False,
+        'nodates': False,
         'ignorews': False,
         'ignorewsamount': False,
         'ignoreblanklines': False,
@@ -51,7 +53,7 @@
 
 def unidiff(a, ad, b, bd, fn, r=None, opts=defaultopts):
     def datetag(date):
-        return opts.git and '\n' or '\t%s\n' % date
+        return (opts.git or opts.nodates) and '\n' or '\t%s\n' % date
 
     if not a and not b: return ""
     epoch = util.datestr((0, 0))