Mercurial > hg
annotate tests/test-subrepo @ 11632:f418d2570920
log: document the different phases in walkchangerevs
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Tue, 20 Jul 2010 14:32:33 +0900 |
parents | b602a95c21ec |
children |
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 | |
11485
b602a95c21ec
subrepo: refuse to commit subrepos if .hgsub is excluded (issue2232)
Matt Mackall <mpm@selenic.com>
parents:
11470
diff
changeset
|
18 |
b602a95c21ec
subrepo: refuse to commit subrepos if .hgsub is excluded (issue2232)
Matt Mackall <mpm@selenic.com>
parents:
11470
diff
changeset
|
19 # issue2232 - committing a subrepo without .hgsub |
b602a95c21ec
subrepo: refuse to commit subrepos if .hgsub is excluded (issue2232)
Matt Mackall <mpm@selenic.com>
parents:
11470
diff
changeset
|
20 hg ci -mbad s |
b602a95c21ec
subrepo: refuse to commit subrepos if .hgsub is excluded (issue2232)
Matt Mackall <mpm@selenic.com>
parents:
11470
diff
changeset
|
21 |
8816 | 22 hg -R s ci -Ams0 |
11088
c4347e48b0d0
summary: add subrepo status
Matt Mackall <mpm@selenic.com>
parents:
11086
diff
changeset
|
23 hg sum |
8816 | 24 hg ci -m1 |
25 | |
11470
34e33d50c26b
subrepo: correctly handle update -C with modified subrepos (issue2022)
Matt Mackall <mpm@selenic.com>
parents:
11088
diff
changeset
|
26 # issue 2022 - update -C |
34e33d50c26b
subrepo: correctly handle update -C with modified subrepos (issue2022)
Matt Mackall <mpm@selenic.com>
parents:
11088
diff
changeset
|
27 echo b > s/a |
34e33d50c26b
subrepo: correctly handle update -C with modified subrepos (issue2022)
Matt Mackall <mpm@selenic.com>
parents:
11088
diff
changeset
|
28 hg sum |
34e33d50c26b
subrepo: correctly handle update -C with modified subrepos (issue2022)
Matt Mackall <mpm@selenic.com>
parents:
11088
diff
changeset
|
29 hg co -C 1 |
34e33d50c26b
subrepo: correctly handle update -C with modified subrepos (issue2022)
Matt Mackall <mpm@selenic.com>
parents:
11088
diff
changeset
|
30 hg sum |
34e33d50c26b
subrepo: correctly handle update -C with modified subrepos (issue2022)
Matt Mackall <mpm@selenic.com>
parents:
11088
diff
changeset
|
31 |
8816 | 32 echo % add sub sub |
33 echo ss = ss > s/.hgsub | |
34 hg init s/ss | |
35 echo a > s/ss/a | |
36 hg -R s add s/.hgsub | |
37 hg -R s/ss add s/ss/a | |
11088
c4347e48b0d0
summary: add subrepo status
Matt Mackall <mpm@selenic.com>
parents:
11086
diff
changeset
|
38 hg sum |
8816 | 39 hg ci -m2 |
11088
c4347e48b0d0
summary: add subrepo status
Matt Mackall <mpm@selenic.com>
parents:
11086
diff
changeset
|
40 hg sum |
8816 | 41 |
42 echo % bump sub rev | |
43 echo b > s/a | |
44 hg -R s ci -ms1 | |
45 hg ci -m3 | |
46 | |
47 echo % leave sub dirty | |
48 echo c > s/a | |
49 hg ci -m4 | |
50 hg tip -R s | |
51 | |
52 echo % check caching | |
53 hg co 0 | |
54 hg debugsub | |
55 echo % restore | |
56 hg co | |
57 hg debugsub | |
58 | |
59 echo % new branch for merge tests | |
60 hg co 1 | |
61 echo t = t >> .hgsub | |
62 hg init t | |
63 echo t > t/t | |
64 hg -R t add t | |
65 echo % 5 | |
66 hg ci -m5 # add sub | |
67 echo t2 > t/t | |
68 echo % 6 | |
69 hg st -R s | |
70 hg ci -m6 # change sub | |
71 hg debugsub | |
72 echo t3 > t/t | |
73 echo % 7 | |
74 hg ci -m7 # change sub again for conflict test | |
75 hg rm .hgsub | |
76 echo % 8 | |
77 hg ci -m8 # remove sub | |
78 | |
79 echo % merge tests | |
80 hg co -C 3 | |
81 hg merge 5 # test adding | |
82 hg debugsub | |
83 hg ci -m9 | |
84 hg merge 6 --debug # test change | |
85 hg debugsub | |
86 echo conflict > t/t | |
87 hg ci -m10 | |
88 HGMERGE=internal:merge hg merge --debug 7 # test conflict | |
89 echo % should conflict | |
90 cat t/t | |
91 | |
92 echo % clone | |
93 cd .. | |
10668
05856e682521
subrepo: print subrepo pulling URL
Edouard Gomez <ed.gomez@free.fr>
parents:
10522
diff
changeset
|
94 hg clone t tc | sed 's|from .*/sub|from .../sub|g' |
8816 | 95 cd tc |
96 hg debugsub | |
97 | |
98 echo % push | |
99 echo bah > t/t | |
100 hg ci -m11 | |
101 hg push | sed 's/ .*sub/ ...sub/g' | |
102 | |
103 echo % push -f | |
104 echo bah > s/a | |
105 hg ci -m12 | |
106 hg push | sed 's/ .*sub/ ...sub/g' | |
107 hg push -f | sed 's/ .*sub/ ...sub/g' | |
108 | |
109 echo % update | |
110 cd ../t | |
111 hg up -C # discard our earlier merge | |
112 echo blah > t/t | |
113 hg ci -m13 | |
114 | |
115 echo % pull | |
116 cd ../tc | |
117 hg pull | sed 's/ .*sub/ ...sub/g' | |
10668
05856e682521
subrepo: print subrepo pulling URL
Edouard Gomez <ed.gomez@free.fr>
parents:
10522
diff
changeset
|
118 # should pull t |
05856e682521
subrepo: print subrepo pulling URL
Edouard Gomez <ed.gomez@free.fr>
parents:
10522
diff
changeset
|
119 hg up | sed 's|from .*/sub|from .../sub|g' |
8816 | 120 cat t/t |
10251
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
121 |
10177
5ca0d220ae21
subrepo: add table-based dispatch for subrepo types
Augie Fackler <durin42@gmail.com>
parents:
8816
diff
changeset
|
122 echo % bogus subrepo path aborts |
5ca0d220ae21
subrepo: add table-based dispatch for subrepo types
Augie Fackler <durin42@gmail.com>
parents:
8816
diff
changeset
|
123 echo 'bogus=[boguspath' >> .hgsub |
5ca0d220ae21
subrepo: add table-based dispatch for subrepo types
Augie Fackler <durin42@gmail.com>
parents:
8816
diff
changeset
|
124 hg ci -m 'bogus subrepo path' |
5ca0d220ae21
subrepo: add table-based dispatch for subrepo types
Augie Fackler <durin42@gmail.com>
parents:
8816
diff
changeset
|
125 |
10251
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
126 echo % issue 1986 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
127 cd .. |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
128 rm -rf sub |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
129 hg init main |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
130 cd main |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
131 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
132 hg init s # subrepo layout |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
133 cd s # |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
134 echo a > a # o 5 br |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
135 hg ci -Am1 # /| |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
136 hg branch br # o | 4 default |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
137 echo a >> a # | | |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
138 hg ci -m1 # | o 3 br |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
139 hg up default # |/| |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
140 echo b > b # o | 2 default |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
141 hg ci -Am1 # | | |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
142 hg up br # | o 1 br |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
143 hg merge tip # |/ |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
144 hg ci -m1 # o 0 default |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
145 hg up 2 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
146 echo c > c |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
147 hg ci -Am1 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
148 hg up 3 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
149 hg merge 4 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
150 hg ci -m1 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
151 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
152 cd .. # main repo layout: |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
153 echo 's = s' > .hgsub # |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
154 hg -R s up 2 # * <-- try to merge default into br again |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
155 hg ci -Am1 # .`| |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
156 hg branch br # . o 5 br --> substate = 5 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
157 echo b > b # . | |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
158 hg -R s up 3 # o | 4 default --> substate = 4 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
159 hg ci -Am1 # | | |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
160 hg up default # | o 3 br --> substate = 2 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
161 echo c > c # |/| |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
162 hg ci -Am1 # o | 2 default --> substate = 2 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
163 hg up 1 # | | |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
164 hg merge 2 # | o 1 br --> substate = 3 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
165 hg ci -m1 # |/ |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
166 hg up 2 # o 0 default --> substate = 2 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
167 hg -R s up 4 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
168 echo d > d |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
169 hg ci -Am1 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
170 hg up 3 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
171 hg -R s up 5 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
172 echo e > e |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
173 hg ci -Am1 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
174 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
175 hg up 5 |
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
176 hg merge 4 # try to merge default into br again |
10378
e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents:
10252
diff
changeset
|
177 cd .. |
e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents:
10252
diff
changeset
|
178 |
10522
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
179 echo % test subrepo delete from .hgsubstate |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
180 hg init testdelete |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
181 mkdir testdelete/nested testdelete/nested2 |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
182 hg init testdelete/nested |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
183 hg init testdelete/nested2 |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
184 echo test > testdelete/nested/foo |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
185 echo test > testdelete/nested2/foo |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
186 hg -R testdelete/nested add |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
187 hg -R testdelete/nested2 add |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
188 hg -R testdelete/nested ci -m test |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
189 hg -R testdelete/nested2 ci -m test |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
190 echo nested = nested > testdelete/.hgsub |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
191 echo nested2 = nested2 >> testdelete/.hgsub |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
192 hg -R testdelete add |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
193 hg -R testdelete ci -m "nested 1 & 2 added" |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
194 echo nested = nested > testdelete/.hgsub |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
195 hg -R testdelete ci -m "nested 2 deleted" |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
196 cat testdelete/.hgsubstate | sed "s:.* ::" |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
197 hg -R testdelete remove testdelete/.hgsub |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
198 hg -R testdelete ci -m ".hgsub deleted" |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
199 cat testdelete/.hgsubstate |
b07d487009b2
subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents:
10468
diff
changeset
|
200 |
10378
e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents:
10252
diff
changeset
|
201 echo % test repository cloning |
e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents:
10252
diff
changeset
|
202 mkdir mercurial mercurial2 |
e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents:
10252
diff
changeset
|
203 hg init nested_absolute |
e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents:
10252
diff
changeset
|
204 echo test > nested_absolute/foo |
e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents:
10252
diff
changeset
|
205 hg -R nested_absolute add |
e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents:
10252
diff
changeset
|
206 hg -R nested_absolute ci -mtest |
e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents:
10252
diff
changeset
|
207 cd mercurial |
e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents:
10252
diff
changeset
|
208 hg init nested_relative |
e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents:
10252
diff
changeset
|
209 echo test2 > nested_relative/foo2 |
e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents:
10252
diff
changeset
|
210 hg -R nested_relative add |
e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents:
10252
diff
changeset
|
211 hg -R nested_relative ci -mtest2 |
e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents:
10252
diff
changeset
|
212 hg init main |
10775
c52057614c72
Tests with spaces in paths
Mads Kiilerich <mads@kiilerich.com>
parents:
10522
diff
changeset
|
213 echo "nested_relative = ../nested_relative" > main/.hgsub |
c52057614c72
Tests with spaces in paths
Mads Kiilerich <mads@kiilerich.com>
parents:
10522
diff
changeset
|
214 echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub |
10378
e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents:
10252
diff
changeset
|
215 hg -R main add |
e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents:
10252
diff
changeset
|
216 hg -R main ci -m "add subrepos" |
e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents:
10252
diff
changeset
|
217 cd .. |
e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents:
10252
diff
changeset
|
218 hg clone mercurial/main mercurial2/main |
10468
2250fc372d34
Fix test-share and test-subrepo under Windows
Patrick Mezard <pmezard@gmail.com>
parents:
10413
diff
changeset
|
219 cat mercurial2/main/nested_absolute/.hg/hgrc \ |
2250fc372d34
Fix test-share and test-subrepo under Windows
Patrick Mezard <pmezard@gmail.com>
parents:
10413
diff
changeset
|
220 mercurial2/main/nested_relative/.hg/hgrc \ |
2250fc372d34
Fix test-share and test-subrepo under Windows
Patrick Mezard <pmezard@gmail.com>
parents:
10413
diff
changeset
|
221 | "$TESTDIR/filtertmp.py" |
10378
e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents:
10252
diff
changeset
|
222 rm -rf mercurial mercurial2 |
10251
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
223 |
11069
12f04d18143e
subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10775
diff
changeset
|
224 echo % issue 1977 |
12f04d18143e
subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10775
diff
changeset
|
225 hg init repo |
12f04d18143e
subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10775
diff
changeset
|
226 hg init repo/s |
12f04d18143e
subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10775
diff
changeset
|
227 echo a > repo/s/a |
12f04d18143e
subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10775
diff
changeset
|
228 hg -R repo/s ci -Am0 |
12f04d18143e
subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10775
diff
changeset
|
229 echo s = s > repo/.hgsub |
12f04d18143e
subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10775
diff
changeset
|
230 hg -R repo ci -Am1 |
11086
c2601c216333
Adjusted output of test-subrepo for issue1977 to 05856e682521
Thomas Arendsen Hein <thomas@intevation.de>
parents:
11078
diff
changeset
|
231 hg clone repo repo2 | sed 's|from .*/sub|from .../sub|g' |
11069
12f04d18143e
subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10775
diff
changeset
|
232 hg -q -R repo2 pull -u |
12f04d18143e
subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10775
diff
changeset
|
233 echo 1 > repo2/s/a |
12f04d18143e
subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10775
diff
changeset
|
234 hg -R repo2/s ci -m2 |
12f04d18143e
subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10775
diff
changeset
|
235 hg -q -R repo2/s push |
12f04d18143e
subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10775
diff
changeset
|
236 hg -R repo2/s up -C 0 |
12f04d18143e
subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10775
diff
changeset
|
237 echo 2 > repo2/s/a |
12f04d18143e
subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10775
diff
changeset
|
238 hg -R repo2/s ci -m3 |
12f04d18143e
subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10775
diff
changeset
|
239 hg -R repo2 ci -m3 |
12f04d18143e
subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10775
diff
changeset
|
240 hg -q -R repo2 push |
12f04d18143e
subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10775
diff
changeset
|
241 hg -R repo update |
12f04d18143e
subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10775
diff
changeset
|
242 rm -rf repo2 repo |
12f04d18143e
subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
10775
diff
changeset
|
243 |
10251
a19d2993385d
subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8816
diff
changeset
|
244 exit 0 |