178 $ hg init sub |
178 $ hg init sub |
179 $ echo a > sub/suba |
179 $ echo a > sub/suba |
180 $ hg -R sub add sub/suba |
180 $ hg -R sub add sub/suba |
181 $ hg -R sub ci -m sub |
181 $ hg -R sub ci -m sub |
182 $ echo 'sub = sub' > .hgsub |
182 $ echo 'sub = sub' > .hgsub |
|
183 $ hg init sub2 |
|
184 $ echo b > sub2/b |
|
185 $ hg -R sub2 ci -Am sub2 |
|
186 adding b |
|
187 $ echo 'sub2 = sub2' >> .hgsub |
183 $ fileset 'subrepo()' |
188 $ fileset 'subrepo()' |
184 $ hg add .hgsub |
189 $ hg add .hgsub |
185 $ fileset 'subrepo()' |
190 $ fileset 'subrepo()' |
186 sub |
191 sub |
|
192 sub2 |
187 $ fileset 'subrepo("sub")' |
193 $ fileset 'subrepo("sub")' |
188 sub |
194 sub |
189 $ fileset 'subrepo("glob:*")' |
195 $ fileset 'subrepo("glob:*")' |
190 sub |
196 sub |
|
197 sub2 |
191 $ hg ci -m subrepo |
198 $ hg ci -m subrepo |
|
199 |
|
200 Test that .hgsubstate is updated as appropriate during a conversion. The |
|
201 saverev property is enough to alter the hashes of the subrepo. |
|
202 |
|
203 $ hg init ../converted |
|
204 $ hg --config extensions.convert= convert --config convert.hg.saverev=True \ |
|
205 > sub ../converted/sub |
|
206 initializing destination ../converted/sub repository |
|
207 scanning source... |
|
208 sorting... |
|
209 converting... |
|
210 0 sub |
|
211 $ hg clone -U sub2 ../converted/sub2 |
|
212 $ hg --config extensions.convert= convert --config convert.hg.saverev=True \ |
|
213 > . ../converted |
|
214 scanning source... |
|
215 sorting... |
|
216 converting... |
|
217 4 addfiles |
|
218 3 manychanges |
|
219 2 diverging |
|
220 1 merge |
|
221 0 subrepo |
|
222 no ".hgsubstate" updates will be made for "sub2" |
|
223 $ hg up -q -R ../converted -r tip |
|
224 $ hg --cwd ../converted cat sub/suba sub2/b -r tip |
|
225 a |
|
226 b |
|
227 $ oldnode=`hg log -r tip -T "{node}\n"` |
|
228 $ newnode=`hg log -R ../converted -r tip -T "{node}\n"` |
|
229 $ [[ "$oldnode" != "$newnode" ]] || echo "nothing changed" |
192 |
230 |
193 Test with a revision |
231 Test with a revision |
194 |
232 |
195 $ hg log -G --template '{rev} {desc}\n' |
233 $ hg log -G --template '{rev} {desc}\n' |
196 @ 4 subrepo |
234 @ 4 subrepo |