Mercurial > hg
comparison tests/test-bundle @ 6042:2da5b19a6460
Merge with crew
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Wed, 06 Feb 2008 19:57:52 -0800 |
parents | da72b4d24797 |
children | b3286a92f4bc |
comparison
equal
deleted
inserted
replaced
6041:dd714452c26e | 6042:2da5b19a6460 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 cp "$TESTDIR"/printenv.py . | 3 cp "$TESTDIR"/printenv.py . |
4 | 4 |
5 echo "====== Setting up test" | |
5 hg init test | 6 hg init test |
6 cd test | 7 cd test |
7 echo 0 > afile | 8 echo 0 > afile |
8 hg add afile | 9 hg add afile |
9 hg commit -m "0.0" -d "1000000 0" | 10 hg commit -m "0.0" -d "1000000 0" |
28 hg mv afile anotherfile | 29 hg mv afile anotherfile |
29 hg commit -m "0.3m" -d "1000000 0" | 30 hg commit -m "0.3m" -d "1000000 0" |
30 hg verify | 31 hg verify |
31 cd .. | 32 cd .. |
32 hg init empty | 33 hg init empty |
34 | |
35 echo "====== Bundle test to full.hg" | |
33 hg -R test bundle full.hg empty | 36 hg -R test bundle full.hg empty |
37 echo "====== Unbundle full.hg in test" | |
34 hg -R test unbundle full.hg | 38 hg -R test unbundle full.hg |
39 echo "====== Verify empty" | |
35 hg -R empty heads | 40 hg -R empty heads |
36 hg -R empty verify | 41 hg -R empty verify |
37 | 42 |
43 echo "====== Pull full.hg into test (using --cwd)" | |
38 hg --cwd test pull ../full.hg | 44 hg --cwd test pull ../full.hg |
45 echo "====== Pull full.hg into empty (using --cwd)" | |
39 hg --cwd empty pull ../full.hg | 46 hg --cwd empty pull ../full.hg |
47 echo "====== Rollback empty" | |
40 hg -R empty rollback | 48 hg -R empty rollback |
49 echo "====== Pull full.hg into empty again (using --cwd)" | |
41 hg --cwd empty pull ../full.hg | 50 hg --cwd empty pull ../full.hg |
42 | 51 |
52 echo "====== Pull full.hg into test (using -R)" | |
53 hg -R test pull full.hg | |
54 echo "====== Pull full.hg into empty (using -R)" | |
55 hg -R empty pull full.hg | |
56 echo "====== Rollback empty" | |
57 hg -R empty rollback | |
58 echo "====== Pull full.hg into empty again (using -R)" | |
59 hg -R empty pull full.hg | |
60 | |
61 echo "====== Log -R full.hg in fresh empty" | |
43 rm -r empty | 62 rm -r empty |
44 hg init empty | 63 hg init empty |
45 cd empty | 64 cd empty |
46 hg -R bundle://../full.hg log | 65 hg -R bundle://../full.hg log |
66 | |
67 echo "====== Pull ../full.hg into empty (with hook)" | |
47 echo '[hooks]' >> .hg/hgrc | 68 echo '[hooks]' >> .hg/hgrc |
48 echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc | 69 echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc |
49 #doesn't work (yet ?) | 70 #doesn't work (yet ?) |
50 #hg -R bundle://../full.hg verify | 71 #hg -R bundle://../full.hg verify |
51 hg pull bundle://../full.hg | 72 hg pull bundle://../full.hg |
52 cd .. | 73 cd .. |
53 | 74 |
75 echo "====== Create partial clones" | |
54 rm -r empty | 76 rm -r empty |
55 hg init empty | 77 hg init empty |
56 hg clone -r 3 test partial | 78 hg clone -r 3 test partial |
57 hg clone partial partial2 | 79 hg clone partial partial2 |
58 cd partial | 80 cd partial |
81 echo "====== Log -R full.hg in partial" | |
59 hg -R bundle://../full.hg log | 82 hg -R bundle://../full.hg log |
83 echo "====== Incoming full.hg in partial" | |
60 hg incoming bundle://../full.hg | 84 hg incoming bundle://../full.hg |
85 echo "====== Outgoing -R full.hg vs partial2 in partial" | |
61 hg -R bundle://../full.hg outgoing ../partial2 | 86 hg -R bundle://../full.hg outgoing ../partial2 |
87 echo "====== Outgoing -R does-not-exist.hg vs partial2 in partial" | |
62 hg -R bundle://../does-not-exist.hg outgoing ../partial2 | 88 hg -R bundle://../does-not-exist.hg outgoing ../partial2 |
63 cd .. | 89 cd .. |
64 | 90 |
65 # test for http://www.selenic.com/mercurial/bts/issue216 | 91 # test for http://www.selenic.com/mercurial/bts/issue216 |
92 echo "====== Unbundle incremental bundles into fresh empty in one go" | |
66 rm -r empty | 93 rm -r empty |
67 hg init empty | 94 hg init empty |
68 hg -R test bundle --base null -r 0 ../0.hg | 95 hg -R test bundle --base null -r 0 ../0.hg |
69 hg -R test bundle --base 0 -r 1 ../1.hg | 96 hg -R test bundle --base 0 -r 1 ../1.hg |
70 hg -R empty unbundle -u ../0.hg ../1.hg | 97 hg -R empty unbundle -u ../0.hg ../1.hg |
71 | 98 |
72 # test for 540d1059c802 | 99 # test for 540d1059c802 |
100 echo "====== test for 540d1059c802" | |
73 hg init orig | 101 hg init orig |
74 cd orig | 102 cd orig |
75 echo foo > foo | 103 echo foo > foo |
76 hg add foo | 104 hg add foo |
77 hg ci -m 'add foo' -d '0 0' | 105 hg ci -m 'add foo' -d '0 0' |