Mercurial > hg > mercurial-crew-with-dirclash
comparison tests/test-grep @ 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 | |
children | 8787d2d5fc7d |
comparison
equal
deleted
inserted
replaced
1145:bd917e1a26dd | 1146:9061f79c6c6f |
---|---|
1 #!/bin/sh | |
2 | |
3 mkdir t | |
4 cd t | |
5 hg init | |
6 echo import > port | |
7 hg add port | |
8 hg commit -m 0 -u spam -d '0 0' | |
9 echo export >> port | |
10 hg commit -m 1 -u eggs -d '1 0' | |
11 echo export > port | |
12 echo vaportight >> port | |
13 echo 'import/export' >> port | |
14 hg commit -m 2 -u spam -d '2 0' | |
15 echo 'import/export' >> port | |
16 hg commit -m 3 -u eggs -d '3 0' | |
17 head -3 port > port1 | |
18 mv port1 port | |
19 hg commit -m 4 -u spam -d '4 0' | |
20 hg grep port port | |
21 hg grep -enu port port | |
22 hg grep import port |