equal
deleted
inserted
replaced
|
1 #!/bin/sh |
|
2 |
|
3 echo % Preparing the subrepository 'sub' |
|
4 hg init sub |
|
5 echo sub > sub/sub |
|
6 hg add -R sub |
|
7 hg commit -R sub -m "sub import" |
|
8 |
|
9 echo % Preparing the 'main' repo which depends on the subrepo 'sub' |
|
10 hg init main |
|
11 echo main > main/main |
|
12 echo "sub = ../sub" > main/.hgsub |
|
13 hg clone sub main/sub | sed 's/ .*sub/ ...sub/g' |
|
14 hg add -R main |
|
15 hg commit -R main -m "main import" |
|
16 |
|
17 echo % Cleaning both repositories, just as a clone -U |
|
18 hg up -C -R sub null |
|
19 hg up -C -R main null |
|
20 rm -rf main/sub |
|
21 |
|
22 echo % Serving them both using hgweb |
|
23 printf '[paths]\n/main = main\nsub = sub\n' > webdir.conf |
|
24 hg serve --webdir-conf webdir.conf -a localhost -p $HGPORT \ |
|
25 -A /dev/null -E /dev/null --pid-file hg.pid -d |
|
26 cat hg.pid >> $DAEMON_PIDS |
|
27 |
|
28 echo % Clone main from hgweb |
|
29 hg clone "http://localhost:$HGPORT/main" cloned | sed 's/ .*sub/ ...sub/g' |
|
30 |
|
31 echo % Checking cloned repo ids |
|
32 hg id -R cloned |
|
33 hg id -R cloned/sub |
|
34 |
|
35 echo % subrepo debug for 'main' clone |
|
36 hg debugsub -R cloned |
|
37 |
|
38 "$TESTDIR/killdaemons.py" |
|
39 |
|
40 exit 0 |