comparison tests/test-subrepo-relative-path.t @ 11915:d521e72314f9

tests: unify test-subrepo-relative-path
author Martin Geisler <mg@lazybytes.net>
date Tue, 17 Aug 2010 16:52:47 +0200
parents tests/test-subrepo-relative-path@a2bc2f2d77a9
children 92e30e135581
comparison
equal deleted inserted replaced
11914:e31e5eb8736c 11915:d521e72314f9
1 Preparing the subrepository 'sub'
2
3 $ hg init sub
4 $ echo sub > sub/sub
5 $ hg add -R sub
6 adding sub/sub
7 $ hg commit -R sub -m "sub import"
8
9 Preparing the 'main' repo which depends on the subrepo 'sub'
10
11 $ hg init main
12 $ echo main > main/main
13 $ echo "sub = ../sub" > main/.hgsub
14 $ hg clone sub main/sub
15 updating to branch default
16 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
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
32
33 $ printf '[paths]\n/main = main\nsub = sub\n' > webdir.conf
34 $ hg serve --webdir-conf webdir.conf -a localhost -p $HGPORT \
35 > -A /dev/null -E /dev/null --pid-file hg.pid -d
36 $ cat hg.pid >> $DAEMON_PIDS
37
38 Clone main from hgweb
39
40 $ hg clone "http://localhost:$HGPORT/main" cloned
41 requesting all changes
42 adding changesets
43 adding manifests
44 adding file changes
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
54
55 Checking cloned repo ids
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
63
64 $ hg debugsub -R cloned
65 path sub
66 source ../sub
67 revision 863c1745b441bd97a8c4a096e87793073f4fb215
68
69 $ "$TESTDIR/killdaemons.py"
70
71 $ exit 0