Show More
@@ -1,40 +1,71 b'' | |||||
1 | #!/bin/sh |
|
1 | Preparing the subrepository 'sub' | |
2 |
|
2 | |||
3 | echo % Preparing the subrepository 'sub' |
|
3 | $ hg init sub | |
4 | hg init sub |
|
4 | $ echo sub > sub/sub | |
5 | echo sub > sub/sub |
|
5 | $ hg add -R sub | |
6 | hg add -R sub |
|
6 | adding sub/sub | |
7 | hg commit -R sub -m "sub import" |
|
7 | $ hg commit -R sub -m "sub import" | |
|
8 | ||||
|
9 | Preparing the 'main' repo which depends on the subrepo 'sub' | |||
8 |
|
10 | |||
9 | echo % Preparing the 'main' repo which depends on the subrepo 'sub' |
|
11 | $ hg init main | |
10 | hg init main |
|
12 | $ echo main > main/main | |
11 | echo main > main/main |
|
13 | $ echo "sub = ../sub" > main/.hgsub | |
12 | echo "sub = ../sub" > main/.hgsub |
|
14 | $ hg clone sub main/sub | |
13 | hg clone sub main/sub | sed 's/ .*sub/ ...sub/g' |
|
15 | updating to branch default | |
14 | hg add -R main |
|
16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
15 | hg commit -R main -m "main import" |
|
17 | $ hg add -R main | |
|
18 | adding main/.hgsub | |||
|
19 | adding main/main | |||
|
20 | $ hg commit -R main -m "main import" | |||
|
21 | committing subrepository sub | |||
|
22 | ||||
|
23 | Cleaning both repositories, just as a clone -U | |||
|
24 | ||||
|
25 | $ hg up -C -R sub null | |||
|
26 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
27 | $ hg up -C -R main null | |||
|
28 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |||
|
29 | $ rm -rf main/sub | |||
|
30 | ||||
|
31 | Serving them both using hgweb | |||
16 |
|
32 | |||
17 | echo % Cleaning both repositories, just as a clone -U |
|
33 | $ printf '[paths]\n/main = main\nsub = sub\n' > webdir.conf | |
18 | hg up -C -R sub null |
|
34 | $ hg serve --webdir-conf webdir.conf -a localhost -p $HGPORT \ | |
19 | hg up -C -R main null |
|
35 | > -A /dev/null -E /dev/null --pid-file hg.pid -d | |
20 | rm -rf main/sub |
|
36 | $ cat hg.pid >> $DAEMON_PIDS | |
21 |
|
37 | |||
22 | echo % Serving them both using hgweb |
|
38 | Clone main from 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 |
|
39 | |||
28 | echo % Clone main from hgweb |
|
40 | $ hg clone "http://localhost:$HGPORT/main" cloned | |
29 | hg clone "http://localhost:$HGPORT/main" cloned | sed 's/ .*sub/ ...sub/g' |
|
41 | requesting all changes | |
30 |
|
42 | adding changesets | ||
31 | echo % Checking cloned repo ids |
|
43 | adding manifests | |
32 | hg id -R cloned |
|
44 | adding file changes | |
33 | hg id -R cloned/sub |
|
45 | added 1 changesets with 3 changes to 3 files | |
|
46 | updating to branch default | |||
|
47 | pulling subrepo sub from http://localhost:[0-9]+/sub | |||
|
48 | requesting all changes | |||
|
49 | adding changesets | |||
|
50 | adding manifests | |||
|
51 | adding file changes | |||
|
52 | added 1 changesets with 1 changes to 1 files | |||
|
53 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
34 |
|
54 | |||
35 | echo % subrepo debug for 'main' clone |
|
55 | Checking cloned repo ids | |
36 | hg debugsub -R cloned |
|
56 | ||
|
57 | $ hg id -R cloned | |||
|
58 | fdfeeb3e979e tip | |||
|
59 | $ hg id -R cloned/sub | |||
|
60 | 863c1745b441 tip | |||
|
61 | ||||
|
62 | subrepo debug for 'main' clone | |||
37 |
|
63 | |||
38 | "$TESTDIR/killdaemons.py" |
|
64 | $ hg debugsub -R cloned | |
|
65 | path sub | |||
|
66 | source ../sub | |||
|
67 | revision 863c1745b441bd97a8c4a096e87793073f4fb215 | |||
39 |
|
68 | |||
40 | exit 0 |
|
69 | $ "$TESTDIR/killdaemons.py" | |
|
70 | ||||
|
71 | $ exit 0 |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now