Add hg grep -d/--date to list the commit date of matched revisions.
authorThomas Arendsen Hein <thomas@intevation.de>
Sat, 16 Feb 2008 13:01:27 +0100
changeset 6133 779f2309d67a
parent 6129 3d666e8e6398
child 6134 7b937b26adf7
Add hg grep -d/--date to list the commit date of matched revisions. Suggested by Greg Lindahl
mercurial/commands.py
--- a/mercurial/commands.py	Sun Feb 10 08:53:39 2008 +0100
+++ b/mercurial/commands.py	Sat Feb 16 13:01:27 2008 +0100
@@ -1043,6 +1043,8 @@
                 cols.append(change)
             if opts['user']:
                 cols.append(ui.shortuser(get(r)[1]))
+            if opts.get('date'):
+                cols.append(util.datestr(get(r)[2]))
             if opts['files_with_matches']:
                 c = (fn, r)
                 if c in filerevmatches:
@@ -2895,6 +2897,7 @@
           ('n', 'line-number', None, _('print matching line numbers')),
           ('r', 'rev', [], _('search in given revision range')),
           ('u', 'user', None, _('print user who committed change')),
+          ('d', 'date', None, _('list the date')),
          ] + walkopts,
          _('hg grep [OPTION]... PATTERN [FILE]...')),
     "heads":