Mercurial > hg
annotate tests/test-subrepo @ 10190:9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Fri, 01 Jan 2010 21:21:34 +0100 |
parents | 5ca0d220ae21 |
children | 0bc93fa2cf2b |
rev | line source |
---|---|
8816 | 1 #!/bin/sh |
2 | |
3 rm -rf sub | |
4 mkdir sub | |
5 cd sub | |
6 hg init t | |
7 cd t | |
8 | |
9 echo % first revision, no sub | |
10 echo a > a | |
11 hg ci -Am0 | |
12 | |
13 echo % add first sub | |
14 echo s = s > .hgsub | |
15 hg add .hgsub | |
16 hg init s | |
17 echo a > s/a | |
18 hg -R s ci -Ams0 | |
19 hg ci -m1 | |
20 | |
21 echo % add sub sub | |
22 echo ss = ss > s/.hgsub | |
23 hg init s/ss | |
24 echo a > s/ss/a | |
25 hg -R s add s/.hgsub | |
26 hg -R s/ss add s/ss/a | |
27 hg ci -m2 | |
28 | |
29 echo % bump sub rev | |
30 echo b > s/a | |
31 hg -R s ci -ms1 | |
32 hg ci -m3 | |
33 | |
34 echo % leave sub dirty | |
35 echo c > s/a | |
36 hg ci -m4 | |
37 hg tip -R s | |
38 | |
39 echo % check caching | |
40 hg co 0 | |
41 hg debugsub | |
42 echo % restore | |
43 hg co | |
44 hg debugsub | |
45 | |
46 echo % new branch for merge tests | |
47 hg co 1 | |
48 echo t = t >> .hgsub | |
49 hg init t | |
50 echo t > t/t | |
51 hg -R t add t | |
52 echo % 5 | |
53 hg ci -m5 # add sub | |
54 echo t2 > t/t | |
55 echo % 6 | |
56 hg st -R s | |
57 hg ci -m6 # change sub | |
58 hg debugsub | |
59 echo t3 > t/t | |
60 echo % 7 | |
61 hg ci -m7 # change sub again for conflict test | |
62 hg rm .hgsub | |
63 echo % 8 | |
64 hg ci -m8 # remove sub | |
65 | |
66 echo % merge tests | |
67 hg co -C 3 | |
68 hg merge 5 # test adding | |
69 hg debugsub | |
70 hg ci -m9 | |
71 hg merge 6 --debug # test change | |
72 hg debugsub | |
73 echo conflict > t/t | |
74 hg ci -m10 | |
75 HGMERGE=internal:merge hg merge --debug 7 # test conflict | |
76 echo % should conflict | |
77 cat t/t | |
78 | |
79 echo % clone | |
80 cd .. | |
81 hg clone t tc | |
82 cd tc | |
83 hg debugsub | |
84 | |
85 echo % push | |
86 echo bah > t/t | |
87 hg ci -m11 | |
88 hg push | sed 's/ .*sub/ ...sub/g' | |
89 | |
90 echo % push -f | |
91 echo bah > s/a | |
92 hg ci -m12 | |
93 hg push | sed 's/ .*sub/ ...sub/g' | |
94 hg push -f | sed 's/ .*sub/ ...sub/g' | |
95 | |
96 echo % update | |
97 cd ../t | |
98 hg up -C # discard our earlier merge | |
99 echo blah > t/t | |
100 hg ci -m13 | |
101 | |
102 echo % pull | |
103 cd ../tc | |
104 hg pull | sed 's/ .*sub/ ...sub/g' | |
105 hg up # should pull t | |
106 cat t/t | |
10177
5ca0d220ae21
subrepo: add table-based dispatch for subrepo types
Augie Fackler <durin42@gmail.com>
parents:
8816
diff
changeset
|
107 |
5ca0d220ae21
subrepo: add table-based dispatch for subrepo types
Augie Fackler <durin42@gmail.com>
parents:
8816
diff
changeset
|
108 echo % bogus subrepo path aborts |
5ca0d220ae21
subrepo: add table-based dispatch for subrepo types
Augie Fackler <durin42@gmail.com>
parents:
8816
diff
changeset
|
109 echo 'bogus=[boguspath' >> .hgsub |
5ca0d220ae21
subrepo: add table-based dispatch for subrepo types
Augie Fackler <durin42@gmail.com>
parents:
8816
diff
changeset
|
110 hg ci -m 'bogus subrepo path' |
5ca0d220ae21
subrepo: add table-based dispatch for subrepo types
Augie Fackler <durin42@gmail.com>
parents:
8816
diff
changeset
|
111 |
5ca0d220ae21
subrepo: add table-based dispatch for subrepo types
Augie Fackler <durin42@gmail.com>
parents:
8816
diff
changeset
|
112 exit 0 |