##// END OF EJS Templates
tests: test subrepos with ssh urls
Mads Kiilerich -
r14187:9bbaafdd default
parent child Browse files
Show More
@@ -1,69 +1,103
1 1 Preparing the subrepository 'sub'
2 2
3 3 $ hg init sub
4 4 $ echo sub > sub/sub
5 5 $ hg add -R sub
6 6 adding sub/sub
7 7 $ hg commit -R sub -m "sub import"
8 8
9 9 Preparing the 'main' repo which depends on the subrepo 'sub'
10 10
11 11 $ hg init main
12 12 $ echo main > main/main
13 13 $ echo "sub = ../sub" > main/.hgsub
14 14 $ hg clone sub main/sub
15 15 updating to branch default
16 16 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
17 17 $ hg add -R main
18 18 adding main/.hgsub
19 19 adding main/main
20 20 $ hg commit -R main -m "main import"
21 21 committing subrepository sub
22 22
23 23 Cleaning both repositories, just as a clone -U
24 24
25 25 $ hg up -C -R sub null
26 26 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
27 27 $ hg up -C -R main null
28 28 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
29 29 $ rm -rf main/sub
30 30
31 31 Serving them both using hgweb
32 32
33 33 $ printf '[paths]\n/main = main\nsub = sub\n' > webdir.conf
34 34 $ hg serve --webdir-conf webdir.conf -a localhost -p $HGPORT \
35 35 > -A /dev/null -E /dev/null --pid-file hg.pid -d
36 36 $ cat hg.pid >> $DAEMON_PIDS
37 37
38 38 Clone main from hgweb
39 39
40 40 $ hg clone "http://localhost:$HGPORT/main" cloned
41 41 requesting all changes
42 42 adding changesets
43 43 adding manifests
44 44 adding file changes
45 45 added 1 changesets with 3 changes to 3 files
46 46 updating to branch default
47 47 pulling subrepo sub from http://localhost:$HGPORT/sub
48 48 requesting all changes
49 49 adding changesets
50 50 adding manifests
51 51 adding file changes
52 52 added 1 changesets with 1 changes to 1 files
53 53 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
54 54
55 55 Checking cloned repo ids
56 56
57 57 $ hg id -R cloned
58 58 fdfeeb3e979e tip
59 59 $ hg id -R cloned/sub
60 60 863c1745b441 tip
61 61
62 62 subrepo debug for 'main' clone
63 63
64 64 $ hg debugsub -R cloned
65 65 path sub
66 66 source ../sub
67 67 revision 863c1745b441bd97a8c4a096e87793073f4fb215
68 68
69 69 $ "$TESTDIR/killdaemons.py"
70
71 subrepo paths with ssh urls
72
73 $ cp $TESTDIR/dummyssh $BINDIR/ssh
74
75 $ hg clone ssh://user@dummy/cloned sshclone
76 requesting all changes
77 adding changesets
78 adding manifests
79 adding file changes
80 added 1 changesets with 3 changes to 3 files
81 updating to branch default
82 pulling subrepo sub from ssh://user@dummy/sub
83 requesting all changes
84 adding changesets
85 adding manifests
86 adding file changes
87 added 1 changesets with 1 changes to 1 files
88 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
89
90 $ hg -R sshclone push ssh://user@dummy/$TESTTMP/cloned
91 pushing to ssh://user@dummy/$TESTTMP/cloned
92 pushing subrepo sub to ssh://user@dummy/$TESTTMP/sub
93 searching for changes
94 no changes found
95 searching for changes
96 no changes found
97
98 $ cat dummylog
99 Got arguments 1:user@dummy 2:hg -R cloned serve --stdio
100 Got arguments 1:user@dummy 2:hg -R sub serve --stdio
101 Got arguments 1:user@dummy 2:hg -R $TESTTMP/cloned serve --stdio
102 Got arguments 1:user@dummy 2:hg -R $TESTTMP/sub serve --stdio
103 $ rm $BINDIR/ssh
General Comments 0
You need to be logged in to leave comments. Login now