author | Thomas Arendsen Hein <thomas@intevation.de> |
Mon, 26 Feb 2007 21:57:33 +0100 | |
changeset 4117 | eb0967c6e77b |
parent 4042 | f6f65a8d8ed3 |
child 4287 | ce71da8ab4f5 |
permissions | -rwxr-xr-x |
2274
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
1 |
#!/bin/sh |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
2 |
|
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
3 |
hg init test |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
4 |
cd test |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
5 |
echo 0 > afile |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
6 |
hg add afile |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
7 |
hg commit -m "0.0" -d "1000000 0" |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
8 |
echo 1 >> afile |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
9 |
hg commit -m "0.1" -d "1000000 0" |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
10 |
echo 2 >> afile |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
11 |
hg commit -m "0.2" -d "1000000 0" |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
12 |
echo 3 >> afile |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
13 |
hg commit -m "0.3" -d "1000000 0" |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
14 |
hg update -C 0 |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
15 |
echo 1 >> afile |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
16 |
hg commit -m "1.1" -d "1000000 0" |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
17 |
echo 2 >> afile |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
18 |
hg commit -m "1.2" -d "1000000 0" |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
19 |
echo "a line" > fred |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
20 |
echo 3 >> afile |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
21 |
hg add fred |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
22 |
hg commit -m "1.3" -d "1000000 0" |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
23 |
hg mv afile adifferentfile |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
24 |
hg commit -m "1.3m" -d "1000000 0" |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
25 |
hg update -C 3 |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
26 |
hg mv afile anotherfile |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
27 |
hg commit -m "0.3m" -d "1000000 0" |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
28 |
hg verify |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
29 |
cd .. |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
30 |
hg init empty |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
31 |
hg -R test bundle full.hg empty |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
32 |
hg -R test unbundle full.hg |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
33 |
hg -R empty heads |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
34 |
hg -R empty verify |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
35 |
|
2738
400a4a502001
pull: allow to pull from bundle file without need for bundle: syntax
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2673
diff
changeset
|
36 |
hg --cwd test pull ../full.hg |
400a4a502001
pull: allow to pull from bundle file without need for bundle: syntax
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2673
diff
changeset
|
37 |
hg --cwd empty pull ../full.hg |
400a4a502001
pull: allow to pull from bundle file without need for bundle: syntax
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2673
diff
changeset
|
38 |
hg -R empty rollback |
400a4a502001
pull: allow to pull from bundle file without need for bundle: syntax
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2673
diff
changeset
|
39 |
hg --cwd empty pull ../full.hg |
400a4a502001
pull: allow to pull from bundle file without need for bundle: syntax
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2673
diff
changeset
|
40 |
|
3988
9dcf9d45cab8
Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3429
diff
changeset
|
41 |
rm -r empty |
2274
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
42 |
hg init empty |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
43 |
cd empty |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
44 |
hg -R bundle://../full.hg log |
2673
109a22f5434a
hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2274
diff
changeset
|
45 |
echo '[hooks]' >> .hg/hgrc |
109a22f5434a
hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2274
diff
changeset
|
46 |
echo 'changegroup = echo changegroup: u=$HG_URL' >> .hg/hgrc |
2274
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
47 |
#doesn't work (yet ?) |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
48 |
#hg -R bundle://../full.hg verify |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
49 |
hg pull bundle://../full.hg |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
50 |
cd .. |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
51 |
|
3988
9dcf9d45cab8
Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3429
diff
changeset
|
52 |
rm -r empty |
2274
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
53 |
hg init empty |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
54 |
hg clone -r 3 test partial |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
55 |
hg clone partial partial2 |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
56 |
cd partial |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
57 |
hg -R bundle://../full.hg log |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
58 |
hg incoming bundle://../full.hg |
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
59 |
hg -R bundle://../full.hg outgoing ../partial2 |
3429
b19360aa21e9
bundlerepo: avoid exception in __del__ when the bundle doesn't exist
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
2738
diff
changeset
|
60 |
hg -R bundle://../does-not-exist.hg outgoing ../partial2 |
2274
89b15372df18
tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
61 |
cd .. |
4042
f6f65a8d8ed3
add test for 540d1059c802
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
62 |
|
f6f65a8d8ed3
add test for 540d1059c802
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
63 |
# test for 540d1059c802 |
f6f65a8d8ed3
add test for 540d1059c802
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
64 |
hg init orig |
f6f65a8d8ed3
add test for 540d1059c802
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
65 |
cd orig |
f6f65a8d8ed3
add test for 540d1059c802
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
66 |
echo foo > foo |
f6f65a8d8ed3
add test for 540d1059c802
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
67 |
hg add foo |
f6f65a8d8ed3
add test for 540d1059c802
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
68 |
hg ci -m 'add foo' -d '0 0' |
f6f65a8d8ed3
add test for 540d1059c802
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
69 |
|
f6f65a8d8ed3
add test for 540d1059c802
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
70 |
hg clone . ../copy |
f6f65a8d8ed3
add test for 540d1059c802
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
71 |
hg tag -d '0 0' foo |
f6f65a8d8ed3
add test for 540d1059c802
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
72 |
|
f6f65a8d8ed3
add test for 540d1059c802
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
73 |
cd ../copy |
f6f65a8d8ed3
add test for 540d1059c802
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
74 |
echo >> foo |
f6f65a8d8ed3
add test for 540d1059c802
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
75 |
hg ci -m 'change foo' -d '0 0' |
f6f65a8d8ed3
add test for 540d1059c802
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
76 |
hg bundle ../bundle.hg ../orig |
f6f65a8d8ed3
add test for 540d1059c802
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
77 |
|
f6f65a8d8ed3
add test for 540d1059c802
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
78 |
cd ../orig |
f6f65a8d8ed3
add test for 540d1059c802
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
79 |
hg incoming ../bundle.hg |
f6f65a8d8ed3
add test for 540d1059c802
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
80 |
cd .. |