Mercurial > hg > mercurial-crew-with-dirclash
comparison doc/hg.1.txt @ 1146:9061f79c6c6f
grep: extend functionality, add man page entry, add unit test.
walkchangerevs now returns a two-tuple. Its behaviour is also
extensively commented.
The annotate command's getname function has been factored out to a new
function, trimname, so it can be shared between annotate and grep.
The behaviour of grep has been beefed up, so that it now performs a
number of useful functions.
author | bos@serpentine.internal.keyresearch.com |
---|---|
date | Mon, 29 Aug 2005 10:05:49 -0700 |
parents | 6130de75bb2a |
children | 120aa5fc7ced |
comparison
equal
deleted
inserted
replaced
1145:bd917e1a26dd | 1146:9061f79c6c6f |
---|---|
205 | 205 |
206 options: | 206 options: |
207 -I, --include <pat> include names matching the given patterns | 207 -I, --include <pat> include names matching the given patterns |
208 -X, --exclude <pat> exclude names matching the given patterns | 208 -X, --exclude <pat> exclude names matching the given patterns |
209 | 209 |
210 grep [options] pattern [files]:: | |
211 Search revisions of files for a regular expression. | |
212 | |
213 This command behaves differently than Unix grep. It only accepts | |
214 Python/Perl regexps. It searches repository history, not the | |
215 working directory. It always prints the revision number in which | |
216 a match appears. | |
217 | |
218 By default, grep only prints output for the first revision of a | |
219 file in which it finds a match. To get it to print every revision | |
220 that contains a change in match status ("-" for a match that | |
221 becomes a non-match, or "+" for a non-match that becomes a match), | |
222 use the --every-match flag. | |
223 | |
224 options: | |
225 -0, --print0 end fields with NUL | |
226 -I, --include <pat> include names matching the given patterns | |
227 -X, --exclude <pat> exclude names matching the given patterns | |
228 -e, --every-match print every revision that matches | |
229 -i, --ignore-case ignore case when matching | |
230 -l, --files-with-matches print only file names and revs that match | |
231 -n, --line-number print matching line numbers | |
232 -r <rev>, --rev <rev> search in given revision range | |
233 -u, --user print user who committed change | |
234 | |
210 heads:: | 235 heads:: |
211 Show all repository head changesets. | 236 Show all repository head changesets. |
212 | 237 |
213 Repository "heads" are changesets that don't have children | 238 Repository "heads" are changesets that don't have children |
214 changesets. They are where development generally takes place and | 239 changesets. They are where development generally takes place and |