comparison mercurial/commands.py @ 6133:779f2309d67a

Add hg grep -d/--date to list the commit date of matched revisions. Suggested by Greg Lindahl
author Thomas Arendsen Hein <thomas@intevation.de>
date Sat, 16 Feb 2008 13:01:27 +0100
parents 242595e612ed
children 7b937b26adf7
comparison
equal deleted inserted replaced
6129:3d666e8e6398 6133:779f2309d67a
1041 cols.append(str(l.linenum)) 1041 cols.append(str(l.linenum))
1042 if opts['all']: 1042 if opts['all']:
1043 cols.append(change) 1043 cols.append(change)
1044 if opts['user']: 1044 if opts['user']:
1045 cols.append(ui.shortuser(get(r)[1])) 1045 cols.append(ui.shortuser(get(r)[1]))
1046 if opts.get('date'):
1047 cols.append(util.datestr(get(r)[2]))
1046 if opts['files_with_matches']: 1048 if opts['files_with_matches']:
1047 c = (fn, r) 1049 c = (fn, r)
1048 if c in filerevmatches: 1050 if c in filerevmatches:
1049 continue 1051 continue
1050 filerevmatches[c] = 1 1052 filerevmatches[c] = 1
2893 ('l', 'files-with-matches', None, 2895 ('l', 'files-with-matches', None,
2894 _('print only filenames and revs that match')), 2896 _('print only filenames and revs that match')),
2895 ('n', 'line-number', None, _('print matching line numbers')), 2897 ('n', 'line-number', None, _('print matching line numbers')),
2896 ('r', 'rev', [], _('search in given revision range')), 2898 ('r', 'rev', [], _('search in given revision range')),
2897 ('u', 'user', None, _('print user who committed change')), 2899 ('u', 'user', None, _('print user who committed change')),
2900 ('d', 'date', None, _('list the date')),
2898 ] + walkopts, 2901 ] + walkopts,
2899 _('hg grep [OPTION]... PATTERN [FILE]...')), 2902 _('hg grep [OPTION]... PATTERN [FILE]...')),
2900 "heads": 2903 "heads":
2901 (heads, 2904 (heads,
2902 [('', 'style', '', _('display using template map file')), 2905 [('', 'style', '', _('display using template map file')),