Mercurial > hg
annotate tests/test-log @ 3851:8f18e31c4441
add "requires" file to the repo, specifying the requirements
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sun, 10 Dec 2006 00:06:59 +0100 |
parents | 7db88b094b14 |
children | 7df171ea50cd |
rev | line source |
---|---|
2741
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
1 #!/bin/sh |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
2 |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
3 hg init a |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
4 |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
5 cd a |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
6 echo a > a |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
7 hg ci -Ama -d '1 0' |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
8 |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
9 hg cp a b |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
10 hg ci -mb -d '2 0' |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
11 |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
12 mkdir dir |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
13 hg mv b dir |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
14 hg ci -mc -d '3 0' |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
15 |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
16 hg mv a b |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
17 hg ci -md -d '4 0' |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
18 |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
19 hg mv dir/b e |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
20 hg ci -me -d '5 0' |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
21 |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
22 hg log a |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
23 echo % -f, directory |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
24 hg log -f dir |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
25 echo % -f, but no args |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
26 hg log -f |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
27 echo % one rename |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
28 hg log -vf a |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
29 echo % many renames |
ae5ce3454ef5
log: add -f/--follow option, to follow rename/copy
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
30 hg log -vf e |
2785
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
31 |
3197 | 32 echo % log copies |
33 hg log -vC --template '{rev} {file_copies%filecopy}\n' | |
34 | |
3383
c7c6f1a45348
Test case for log --copies on non-linear manifests (issue391)
Brendan Cully <brendan@kublai.com>
parents:
3197
diff
changeset
|
35 echo % log copies, non-linear manifest |
c7c6f1a45348
Test case for log --copies on non-linear manifests (issue391)
Brendan Cully <brendan@kublai.com>
parents:
3197
diff
changeset
|
36 hg up -C 3 |
c7c6f1a45348
Test case for log --copies on non-linear manifests (issue391)
Brendan Cully <brendan@kublai.com>
parents:
3197
diff
changeset
|
37 hg mv dir/b e |
c7c6f1a45348
Test case for log --copies on non-linear manifests (issue391)
Brendan Cully <brendan@kublai.com>
parents:
3197
diff
changeset
|
38 echo foo > foo |
c7c6f1a45348
Test case for log --copies on non-linear manifests (issue391)
Brendan Cully <brendan@kublai.com>
parents:
3197
diff
changeset
|
39 hg ci -Ame2 -d '6 0' |
c7c6f1a45348
Test case for log --copies on non-linear manifests (issue391)
Brendan Cully <brendan@kublai.com>
parents:
3197
diff
changeset
|
40 hg log -vC --template '{rev} {file_copies%filecopy}\n' -r 5 |
c7c6f1a45348
Test case for log --copies on non-linear manifests (issue391)
Brendan Cully <brendan@kublai.com>
parents:
3197
diff
changeset
|
41 |
2785
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
42 # log --follow tests |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
43 hg init ../follow |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
44 cd ../follow |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
45 echo base > base |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
46 hg ci -Ambase -d '1 0' |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
47 |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
48 echo r1 >> base |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
49 hg ci -Amr1 -d '1 0' |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
50 echo r2 >> base |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
51 hg ci -Amr2 -d '1 0' |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
52 |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
53 hg up -C 1 |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
54 echo b1 > b1 |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
55 hg ci -Amb1 -d '1 0' |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
56 |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
57 echo % log -f |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
58 hg log -f |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
59 |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
60 hg up -C 0 |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
61 echo b2 > b2 |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
62 hg ci -Amb2 -d '1 0' |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
63 |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
64 echo % log -f -r 1:tip |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
65 hg log -f -r 1:tip |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
66 |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
67 hg up -C 3 |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
68 hg merge tip |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
69 hg ci -mm12 -d '1 0' |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
70 |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
71 echo postm >> b1 |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
72 hg ci -Amb1.1 -d'1 0' |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
73 |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
74 echo % log --follow-first |
e7f70588af30
Test suite for log --follow and --follow-first.
Brendan Cully <brendan@kublai.com>
parents:
2741
diff
changeset
|
75 hg log --follow-first |
2901 | 76 |
77 echo % log -P 2 | |
78 hg log -P 2 | |
3718
7db88b094b14
fix hg log -r ''
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3383
diff
changeset
|
79 |
7db88b094b14
fix hg log -r ''
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3383
diff
changeset
|
80 echo '% log -r ""' |
7db88b094b14
fix hg log -r ''
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3383
diff
changeset
|
81 hg log -r '' |
7db88b094b14
fix hg log -r ''
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3383
diff
changeset
|
82 |
7db88b094b14
fix hg log -r ''
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3383
diff
changeset
|
83 exit 0 |