##// END OF EJS Templates
tests: quote $PYTHON for Windows...
Matt Harbison -
r33335:72f051f9 default
parent child Browse files
Show More
@@ -1,1136 +1,1136
1 Test exchange of common information using bundle2
1 Test exchange of common information using bundle2
2
2
3
3
4 $ getmainid() {
4 $ getmainid() {
5 > hg -R main log --template '{node}\n' --rev "$1"
5 > hg -R main log --template '{node}\n' --rev "$1"
6 > }
6 > }
7
7
8 enable obsolescence
8 enable obsolescence
9
9
10 $ cp $HGRCPATH $TESTTMP/hgrc.orig
10 $ cp $HGRCPATH $TESTTMP/hgrc.orig
11 $ cat > $TESTTMP/bundle2-pushkey-hook.sh << EOF
11 $ cat > $TESTTMP/bundle2-pushkey-hook.sh << EOF
12 > echo pushkey: lock state after \"\$HG_NAMESPACE\"
12 > echo pushkey: lock state after \"\$HG_NAMESPACE\"
13 > hg debuglock
13 > hg debuglock
14 > EOF
14 > EOF
15
15
16 $ cat >> $HGRCPATH << EOF
16 $ cat >> $HGRCPATH << EOF
17 > [experimental]
17 > [experimental]
18 > evolution=createmarkers,exchange
18 > evolution=createmarkers,exchange
19 > bundle2-output-capture=True
19 > bundle2-output-capture=True
20 > [ui]
20 > [ui]
21 > ssh=$PYTHON "$TESTDIR/dummyssh"
21 > ssh="$PYTHON" "$TESTDIR/dummyssh"
22 > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline}
22 > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline}
23 > [web]
23 > [web]
24 > push_ssl = false
24 > push_ssl = false
25 > allow_push = *
25 > allow_push = *
26 > [phases]
26 > [phases]
27 > publish=False
27 > publish=False
28 > [hooks]
28 > [hooks]
29 > pretxnclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n"
29 > pretxnclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n"
30 > txnclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n"
30 > txnclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n"
31 > txnclose.env = sh -c "HG_LOCAL= printenv.py txnclose"
31 > txnclose.env = sh -c "HG_LOCAL= printenv.py txnclose"
32 > pushkey= sh "$TESTTMP/bundle2-pushkey-hook.sh"
32 > pushkey= sh "$TESTTMP/bundle2-pushkey-hook.sh"
33 > EOF
33 > EOF
34
34
35 The extension requires a repo (currently unused)
35 The extension requires a repo (currently unused)
36
36
37 $ hg init main
37 $ hg init main
38 $ cd main
38 $ cd main
39 $ touch a
39 $ touch a
40 $ hg add a
40 $ hg add a
41 $ hg commit -m 'a'
41 $ hg commit -m 'a'
42 pre-close-tip:3903775176ed draft
42 pre-close-tip:3903775176ed draft
43 postclose-tip:3903775176ed draft
43 postclose-tip:3903775176ed draft
44 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
44 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
45
45
46 $ hg unbundle $TESTDIR/bundles/rebase.hg
46 $ hg unbundle $TESTDIR/bundles/rebase.hg
47 adding changesets
47 adding changesets
48 adding manifests
48 adding manifests
49 adding file changes
49 adding file changes
50 added 8 changesets with 7 changes to 7 files (+3 heads)
50 added 8 changesets with 7 changes to 7 files (+3 heads)
51 pre-close-tip:02de42196ebe draft
51 pre-close-tip:02de42196ebe draft
52 postclose-tip:02de42196ebe draft
52 postclose-tip:02de42196ebe draft
53 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=unbundle HG_TXNID=TXN:$ID$ HG_TXNNAME=unbundle
53 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=unbundle HG_TXNID=TXN:$ID$ HG_TXNNAME=unbundle
54 bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob)
54 bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob)
55 (run 'hg heads' to see heads, 'hg merge' to merge)
55 (run 'hg heads' to see heads, 'hg merge' to merge)
56
56
57 $ cd ..
57 $ cd ..
58
58
59 Real world exchange
59 Real world exchange
60 =====================
60 =====================
61
61
62 Add more obsolescence information
62 Add more obsolescence information
63
63
64 $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc`
64 $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc`
65 pre-close-tip:02de42196ebe draft
65 pre-close-tip:02de42196ebe draft
66 postclose-tip:02de42196ebe draft
66 postclose-tip:02de42196ebe draft
67 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
67 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
68 $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c`
68 $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c`
69 pre-close-tip:02de42196ebe draft
69 pre-close-tip:02de42196ebe draft
70 postclose-tip:02de42196ebe draft
70 postclose-tip:02de42196ebe draft
71 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
71 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
72
72
73 clone --pull
73 clone --pull
74
74
75 $ hg -R main phase --public cd010b8cd998
75 $ hg -R main phase --public cd010b8cd998
76 pre-close-tip:02de42196ebe draft
76 pre-close-tip:02de42196ebe draft
77 postclose-tip:02de42196ebe draft
77 postclose-tip:02de42196ebe draft
78 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
78 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
79 $ hg clone main other --pull --rev 9520eea781bc
79 $ hg clone main other --pull --rev 9520eea781bc
80 adding changesets
80 adding changesets
81 adding manifests
81 adding manifests
82 adding file changes
82 adding file changes
83 added 2 changesets with 2 changes to 2 files
83 added 2 changesets with 2 changes to 2 files
84 1 new obsolescence markers
84 1 new obsolescence markers
85 pre-close-tip:9520eea781bc draft
85 pre-close-tip:9520eea781bc draft
86 postclose-tip:9520eea781bc draft
86 postclose-tip:9520eea781bc draft
87 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=9520eea781bcca16c1e15acc0ba14335a0e8e5ba HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
87 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=9520eea781bcca16c1e15acc0ba14335a0e8e5ba HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
88 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
88 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
89 updating to branch default
89 updating to branch default
90 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
91 $ hg -R other log -G
91 $ hg -R other log -G
92 @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
92 @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
93 |
93 |
94 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
94 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
95
95
96 $ hg -R other debugobsolete
96 $ hg -R other debugobsolete
97 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
97 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
98
98
99 pull
99 pull
100
100
101 $ hg -R main phase --public 9520eea781bc
101 $ hg -R main phase --public 9520eea781bc
102 pre-close-tip:02de42196ebe draft
102 pre-close-tip:02de42196ebe draft
103 postclose-tip:02de42196ebe draft
103 postclose-tip:02de42196ebe draft
104 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
104 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
105 $ hg -R other pull -r 24b6387c8c8c
105 $ hg -R other pull -r 24b6387c8c8c
106 pulling from $TESTTMP/main (glob)
106 pulling from $TESTTMP/main (glob)
107 searching for changes
107 searching for changes
108 adding changesets
108 adding changesets
109 adding manifests
109 adding manifests
110 adding file changes
110 adding file changes
111 added 1 changesets with 1 changes to 1 files (+1 heads)
111 added 1 changesets with 1 changes to 1 files (+1 heads)
112 1 new obsolescence markers
112 1 new obsolescence markers
113 pre-close-tip:24b6387c8c8c draft
113 pre-close-tip:24b6387c8c8c draft
114 postclose-tip:24b6387c8c8c draft
114 postclose-tip:24b6387c8c8c draft
115 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_NODE_LAST=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
115 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_NODE_LAST=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
116 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
116 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
117 (run 'hg heads' to see heads, 'hg merge' to merge)
117 (run 'hg heads' to see heads, 'hg merge' to merge)
118 $ hg -R other log -G
118 $ hg -R other log -G
119 o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F
119 o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F
120 |
120 |
121 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
121 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
122 |/
122 |/
123 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
123 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
124
124
125 $ hg -R other debugobsolete
125 $ hg -R other debugobsolete
126 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
126 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
127 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
127 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
128
128
129 pull empty (with phase movement)
129 pull empty (with phase movement)
130
130
131 $ hg -R main phase --public 24b6387c8c8c
131 $ hg -R main phase --public 24b6387c8c8c
132 pre-close-tip:02de42196ebe draft
132 pre-close-tip:02de42196ebe draft
133 postclose-tip:02de42196ebe draft
133 postclose-tip:02de42196ebe draft
134 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
134 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
135 $ hg -R other pull -r 24b6387c8c8c
135 $ hg -R other pull -r 24b6387c8c8c
136 pulling from $TESTTMP/main (glob)
136 pulling from $TESTTMP/main (glob)
137 no changes found
137 no changes found
138 pre-close-tip:24b6387c8c8c public
138 pre-close-tip:24b6387c8c8c public
139 postclose-tip:24b6387c8c8c public
139 postclose-tip:24b6387c8c8c public
140 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
140 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
141 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
141 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
142 $ hg -R other log -G
142 $ hg -R other log -G
143 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
143 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
144 |
144 |
145 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
145 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
146 |/
146 |/
147 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
147 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
148
148
149 $ hg -R other debugobsolete
149 $ hg -R other debugobsolete
150 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
150 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
151 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
151 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
152
152
153 pull empty
153 pull empty
154
154
155 $ hg -R other pull -r 24b6387c8c8c
155 $ hg -R other pull -r 24b6387c8c8c
156 pulling from $TESTTMP/main (glob)
156 pulling from $TESTTMP/main (glob)
157 no changes found
157 no changes found
158 pre-close-tip:24b6387c8c8c public
158 pre-close-tip:24b6387c8c8c public
159 postclose-tip:24b6387c8c8c public
159 postclose-tip:24b6387c8c8c public
160 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
160 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
161 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
161 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
162 $ hg -R other log -G
162 $ hg -R other log -G
163 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
163 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
164 |
164 |
165 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
165 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
166 |/
166 |/
167 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
167 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
168
168
169 $ hg -R other debugobsolete
169 $ hg -R other debugobsolete
170 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
170 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
171 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
171 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
172
172
173 add extra data to test their exchange during push
173 add extra data to test their exchange during push
174
174
175 $ hg -R main bookmark --rev eea13746799a book_eea1
175 $ hg -R main bookmark --rev eea13746799a book_eea1
176 pre-close-tip:02de42196ebe draft
176 pre-close-tip:02de42196ebe draft
177 postclose-tip:02de42196ebe draft
177 postclose-tip:02de42196ebe draft
178 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
178 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
179 $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a`
179 $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a`
180 pre-close-tip:02de42196ebe draft
180 pre-close-tip:02de42196ebe draft
181 postclose-tip:02de42196ebe draft
181 postclose-tip:02de42196ebe draft
182 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
182 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
183 $ hg -R main bookmark --rev 02de42196ebe book_02de
183 $ hg -R main bookmark --rev 02de42196ebe book_02de
184 pre-close-tip:02de42196ebe draft book_02de
184 pre-close-tip:02de42196ebe draft book_02de
185 postclose-tip:02de42196ebe draft book_02de
185 postclose-tip:02de42196ebe draft book_02de
186 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
186 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
187 $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe`
187 $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe`
188 pre-close-tip:02de42196ebe draft book_02de
188 pre-close-tip:02de42196ebe draft book_02de
189 postclose-tip:02de42196ebe draft book_02de
189 postclose-tip:02de42196ebe draft book_02de
190 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
190 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
191 $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc
191 $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc
192 pre-close-tip:02de42196ebe draft book_02de
192 pre-close-tip:02de42196ebe draft book_02de
193 postclose-tip:02de42196ebe draft book_02de
193 postclose-tip:02de42196ebe draft book_02de
194 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
194 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
195 $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16`
195 $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16`
196 pre-close-tip:02de42196ebe draft book_02de
196 pre-close-tip:02de42196ebe draft book_02de
197 postclose-tip:02de42196ebe draft book_02de
197 postclose-tip:02de42196ebe draft book_02de
198 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
198 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
199 $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd
199 $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd
200 pre-close-tip:02de42196ebe draft book_02de
200 pre-close-tip:02de42196ebe draft book_02de
201 postclose-tip:02de42196ebe draft book_02de
201 postclose-tip:02de42196ebe draft book_02de
202 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
202 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
203 $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8`
203 $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8`
204 pre-close-tip:02de42196ebe draft book_02de
204 pre-close-tip:02de42196ebe draft book_02de
205 postclose-tip:02de42196ebe draft book_02de
205 postclose-tip:02de42196ebe draft book_02de
206 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
206 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
207 $ hg -R main bookmark --rev 32af7686d403 book_32af
207 $ hg -R main bookmark --rev 32af7686d403 book_32af
208 pre-close-tip:02de42196ebe draft book_02de
208 pre-close-tip:02de42196ebe draft book_02de
209 postclose-tip:02de42196ebe draft book_02de
209 postclose-tip:02de42196ebe draft book_02de
210 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
210 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
211 $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403`
211 $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403`
212 pre-close-tip:02de42196ebe draft book_02de
212 pre-close-tip:02de42196ebe draft book_02de
213 postclose-tip:02de42196ebe draft book_02de
213 postclose-tip:02de42196ebe draft book_02de
214 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
214 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
215
215
216 $ hg -R other bookmark --rev cd010b8cd998 book_eea1
216 $ hg -R other bookmark --rev cd010b8cd998 book_eea1
217 pre-close-tip:24b6387c8c8c public
217 pre-close-tip:24b6387c8c8c public
218 postclose-tip:24b6387c8c8c public
218 postclose-tip:24b6387c8c8c public
219 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
219 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
220 $ hg -R other bookmark --rev cd010b8cd998 book_02de
220 $ hg -R other bookmark --rev cd010b8cd998 book_02de
221 pre-close-tip:24b6387c8c8c public
221 pre-close-tip:24b6387c8c8c public
222 postclose-tip:24b6387c8c8c public
222 postclose-tip:24b6387c8c8c public
223 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
223 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
224 $ hg -R other bookmark --rev cd010b8cd998 book_42cc
224 $ hg -R other bookmark --rev cd010b8cd998 book_42cc
225 pre-close-tip:24b6387c8c8c public
225 pre-close-tip:24b6387c8c8c public
226 postclose-tip:24b6387c8c8c public
226 postclose-tip:24b6387c8c8c public
227 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
227 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
228 $ hg -R other bookmark --rev cd010b8cd998 book_5fdd
228 $ hg -R other bookmark --rev cd010b8cd998 book_5fdd
229 pre-close-tip:24b6387c8c8c public
229 pre-close-tip:24b6387c8c8c public
230 postclose-tip:24b6387c8c8c public
230 postclose-tip:24b6387c8c8c public
231 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
231 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
232 $ hg -R other bookmark --rev cd010b8cd998 book_32af
232 $ hg -R other bookmark --rev cd010b8cd998 book_32af
233 pre-close-tip:24b6387c8c8c public
233 pre-close-tip:24b6387c8c8c public
234 postclose-tip:24b6387c8c8c public
234 postclose-tip:24b6387c8c8c public
235 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
235 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
236
236
237 $ hg -R main phase --public eea13746799a
237 $ hg -R main phase --public eea13746799a
238 pre-close-tip:02de42196ebe draft book_02de
238 pre-close-tip:02de42196ebe draft book_02de
239 postclose-tip:02de42196ebe draft book_02de
239 postclose-tip:02de42196ebe draft book_02de
240 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
240 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
241
241
242 push
242 push
243 $ hg -R main push other --rev eea13746799a --bookmark book_eea1
243 $ hg -R main push other --rev eea13746799a --bookmark book_eea1
244 pushing to other
244 pushing to other
245 searching for changes
245 searching for changes
246 remote: adding changesets
246 remote: adding changesets
247 remote: adding manifests
247 remote: adding manifests
248 remote: adding file changes
248 remote: adding file changes
249 remote: added 1 changesets with 0 changes to 0 files (-1 heads)
249 remote: added 1 changesets with 0 changes to 0 files (-1 heads)
250 remote: 1 new obsolescence markers
250 remote: 1 new obsolescence markers
251 remote: pre-close-tip:eea13746799a public book_eea1
251 remote: pre-close-tip:eea13746799a public book_eea1
252 remote: pushkey: lock state after "phases"
252 remote: pushkey: lock state after "phases"
253 remote: lock: free
253 remote: lock: free
254 remote: wlock: free
254 remote: wlock: free
255 remote: pushkey: lock state after "bookmarks"
255 remote: pushkey: lock state after "bookmarks"
256 remote: lock: free
256 remote: lock: free
257 remote: wlock: free
257 remote: wlock: free
258 remote: postclose-tip:eea13746799a public book_eea1
258 remote: postclose-tip:eea13746799a public book_eea1
259 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_NODE_LAST=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_PHASES_MOVED=1 HG_SOURCE=push HG_TXNID=TXN:$ID$ HG_TXNNAME=push HG_URL=file:$TESTTMP/other
259 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_NODE_LAST=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_PHASES_MOVED=1 HG_SOURCE=push HG_TXNID=TXN:$ID$ HG_TXNNAME=push HG_URL=file:$TESTTMP/other
260 updating bookmark book_eea1
260 updating bookmark book_eea1
261 pre-close-tip:02de42196ebe draft book_02de
261 pre-close-tip:02de42196ebe draft book_02de
262 postclose-tip:02de42196ebe draft book_02de
262 postclose-tip:02de42196ebe draft book_02de
263 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response
263 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response
264 file:/*/$TESTTMP/other HG_URL=file:$TESTTMP/other (glob)
264 file:/*/$TESTTMP/other HG_URL=file:$TESTTMP/other (glob)
265 $ hg -R other log -G
265 $ hg -R other log -G
266 o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
266 o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
267 |\
267 |\
268 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
268 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
269 | |
269 | |
270 @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
270 @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
271 |/
271 |/
272 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A
272 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A
273
273
274 $ hg -R other debugobsolete
274 $ hg -R other debugobsolete
275 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
275 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
276 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
276 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
277 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
277 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
278
278
279 pull over ssh
279 pull over ssh
280
280
281 $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de
281 $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de
282 pulling from ssh://user@dummy/main
282 pulling from ssh://user@dummy/main
283 searching for changes
283 searching for changes
284 adding changesets
284 adding changesets
285 adding manifests
285 adding manifests
286 adding file changes
286 adding file changes
287 added 1 changesets with 1 changes to 1 files (+1 heads)
287 added 1 changesets with 1 changes to 1 files (+1 heads)
288 1 new obsolescence markers
288 1 new obsolescence markers
289 updating bookmark book_02de
289 updating bookmark book_02de
290 pre-close-tip:02de42196ebe draft book_02de
290 pre-close-tip:02de42196ebe draft book_02de
291 postclose-tip:02de42196ebe draft book_02de
291 postclose-tip:02de42196ebe draft book_02de
292 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
292 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
293 ssh://user@dummy/main HG_URL=ssh://user@dummy/main
293 ssh://user@dummy/main HG_URL=ssh://user@dummy/main
294 (run 'hg heads' to see heads, 'hg merge' to merge)
294 (run 'hg heads' to see heads, 'hg merge' to merge)
295 $ hg -R other debugobsolete
295 $ hg -R other debugobsolete
296 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
296 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
297 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
297 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
298 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
298 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
299 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
299 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
300
300
301 pull over http
301 pull over http
302
302
303 $ hg serve -R main -p $HGPORT -d --pid-file=main.pid -E main-error.log
303 $ hg serve -R main -p $HGPORT -d --pid-file=main.pid -E main-error.log
304 $ cat main.pid >> $DAEMON_PIDS
304 $ cat main.pid >> $DAEMON_PIDS
305
305
306 $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc
306 $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc
307 pulling from http://localhost:$HGPORT/
307 pulling from http://localhost:$HGPORT/
308 searching for changes
308 searching for changes
309 adding changesets
309 adding changesets
310 adding manifests
310 adding manifests
311 adding file changes
311 adding file changes
312 added 1 changesets with 1 changes to 1 files (+1 heads)
312 added 1 changesets with 1 changes to 1 files (+1 heads)
313 1 new obsolescence markers
313 1 new obsolescence markers
314 updating bookmark book_42cc
314 updating bookmark book_42cc
315 pre-close-tip:42ccdea3bb16 draft book_42cc
315 pre-close-tip:42ccdea3bb16 draft book_42cc
316 postclose-tip:42ccdea3bb16 draft book_42cc
316 postclose-tip:42ccdea3bb16 draft book_42cc
317 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_NODE_LAST=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
317 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_NODE_LAST=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
318 http://localhost:$HGPORT/ HG_URL=http://localhost:$HGPORT/
318 http://localhost:$HGPORT/ HG_URL=http://localhost:$HGPORT/
319 (run 'hg heads .' to see heads, 'hg merge' to merge)
319 (run 'hg heads .' to see heads, 'hg merge' to merge)
320 $ cat main-error.log
320 $ cat main-error.log
321 $ hg -R other debugobsolete
321 $ hg -R other debugobsolete
322 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
322 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
323 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
323 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
324 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
324 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
325 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
325 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
326 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
326 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
327
327
328 push over ssh
328 push over ssh
329
329
330 $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd
330 $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd
331 pushing to ssh://user@dummy/other
331 pushing to ssh://user@dummy/other
332 searching for changes
332 searching for changes
333 remote: adding changesets
333 remote: adding changesets
334 remote: adding manifests
334 remote: adding manifests
335 remote: adding file changes
335 remote: adding file changes
336 remote: added 1 changesets with 1 changes to 1 files
336 remote: added 1 changesets with 1 changes to 1 files
337 remote: 1 new obsolescence markers
337 remote: 1 new obsolescence markers
338 remote: pre-close-tip:5fddd98957c8 draft book_5fdd
338 remote: pre-close-tip:5fddd98957c8 draft book_5fdd
339 remote: pushkey: lock state after "bookmarks"
339 remote: pushkey: lock state after "bookmarks"
340 remote: lock: free
340 remote: lock: free
341 remote: wlock: free
341 remote: wlock: free
342 remote: postclose-tip:5fddd98957c8 draft book_5fdd
342 remote: postclose-tip:5fddd98957c8 draft book_5fdd
343 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_NODE_LAST=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_TXNNAME=serve HG_URL=remote:ssh:$LOCALIP
343 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_NODE_LAST=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_TXNNAME=serve HG_URL=remote:ssh:$LOCALIP
344 updating bookmark book_5fdd
344 updating bookmark book_5fdd
345 pre-close-tip:02de42196ebe draft book_02de
345 pre-close-tip:02de42196ebe draft book_02de
346 postclose-tip:02de42196ebe draft book_02de
346 postclose-tip:02de42196ebe draft book_02de
347 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response
347 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response
348 ssh://user@dummy/other HG_URL=ssh://user@dummy/other
348 ssh://user@dummy/other HG_URL=ssh://user@dummy/other
349 $ hg -R other log -G
349 $ hg -R other log -G
350 o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
350 o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
351 |
351 |
352 o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
352 o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
353 |
353 |
354 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H
354 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H
355 | |
355 | |
356 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
356 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
357 | |/|
357 | |/|
358 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
358 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
359 |/ /
359 |/ /
360 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
360 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
361 |/
361 |/
362 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A
362 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A
363
363
364 $ hg -R other debugobsolete
364 $ hg -R other debugobsolete
365 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
365 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
366 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
366 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
367 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
367 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
368 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
368 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
369 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
369 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
370 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
370 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
371
371
372 push over http
372 push over http
373
373
374 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
374 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
375 $ cat other.pid >> $DAEMON_PIDS
375 $ cat other.pid >> $DAEMON_PIDS
376
376
377 $ hg -R main phase --public 32af7686d403
377 $ hg -R main phase --public 32af7686d403
378 pre-close-tip:02de42196ebe draft book_02de
378 pre-close-tip:02de42196ebe draft book_02de
379 postclose-tip:02de42196ebe draft book_02de
379 postclose-tip:02de42196ebe draft book_02de
380 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
380 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
381 $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af
381 $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af
382 pushing to http://localhost:$HGPORT2/
382 pushing to http://localhost:$HGPORT2/
383 searching for changes
383 searching for changes
384 remote: adding changesets
384 remote: adding changesets
385 remote: adding manifests
385 remote: adding manifests
386 remote: adding file changes
386 remote: adding file changes
387 remote: added 1 changesets with 1 changes to 1 files
387 remote: added 1 changesets with 1 changes to 1 files
388 remote: 1 new obsolescence markers
388 remote: 1 new obsolescence markers
389 remote: pre-close-tip:32af7686d403 public book_32af
389 remote: pre-close-tip:32af7686d403 public book_32af
390 remote: pushkey: lock state after "phases"
390 remote: pushkey: lock state after "phases"
391 remote: lock: free
391 remote: lock: free
392 remote: wlock: free
392 remote: wlock: free
393 remote: pushkey: lock state after "bookmarks"
393 remote: pushkey: lock state after "bookmarks"
394 remote: lock: free
394 remote: lock: free
395 remote: wlock: free
395 remote: wlock: free
396 remote: postclose-tip:32af7686d403 public book_32af
396 remote: postclose-tip:32af7686d403 public book_32af
397 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=32af7686d403cf45b5d95f2d70cebea587ac806a HG_NODE_LAST=32af7686d403cf45b5d95f2d70cebea587ac806a HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_TXNNAME=serve HG_URL=remote:http:$LOCALIP: (glob)
397 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=32af7686d403cf45b5d95f2d70cebea587ac806a HG_NODE_LAST=32af7686d403cf45b5d95f2d70cebea587ac806a HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_TXNNAME=serve HG_URL=remote:http:$LOCALIP: (glob)
398 updating bookmark book_32af
398 updating bookmark book_32af
399 pre-close-tip:02de42196ebe draft book_02de
399 pre-close-tip:02de42196ebe draft book_02de
400 postclose-tip:02de42196ebe draft book_02de
400 postclose-tip:02de42196ebe draft book_02de
401 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response
401 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response
402 http://localhost:$HGPORT2/ HG_URL=http://localhost:$HGPORT2/
402 http://localhost:$HGPORT2/ HG_URL=http://localhost:$HGPORT2/
403 $ cat other-error.log
403 $ cat other-error.log
404
404
405 Check final content.
405 Check final content.
406
406
407 $ hg -R other log -G
407 $ hg -R other log -G
408 o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D
408 o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D
409 |
409 |
410 o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
410 o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
411 |
411 |
412 o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
412 o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
413 |
413 |
414 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H
414 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H
415 | |
415 | |
416 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
416 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
417 | |/|
417 | |/|
418 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
418 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
419 |/ /
419 |/ /
420 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
420 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
421 |/
421 |/
422 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
422 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
423
423
424 $ hg -R other debugobsolete
424 $ hg -R other debugobsolete
425 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
425 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
426 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
426 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
427 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
427 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
428 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
428 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
429 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
429 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
430 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
430 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
431 7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
431 7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
432
432
433 (check that no 'pending' files remain)
433 (check that no 'pending' files remain)
434
434
435 $ ls -1 other/.hg/bookmarks*
435 $ ls -1 other/.hg/bookmarks*
436 other/.hg/bookmarks
436 other/.hg/bookmarks
437 $ ls -1 other/.hg/store/phaseroots*
437 $ ls -1 other/.hg/store/phaseroots*
438 other/.hg/store/phaseroots
438 other/.hg/store/phaseroots
439 $ ls -1 other/.hg/store/00changelog.i*
439 $ ls -1 other/.hg/store/00changelog.i*
440 other/.hg/store/00changelog.i
440 other/.hg/store/00changelog.i
441
441
442 Error Handling
442 Error Handling
443 ==============
443 ==============
444
444
445 Check that errors are properly returned to the client during push.
445 Check that errors are properly returned to the client during push.
446
446
447 Setting up
447 Setting up
448
448
449 $ cat > failpush.py << EOF
449 $ cat > failpush.py << EOF
450 > """A small extension that makes push fails when using bundle2
450 > """A small extension that makes push fails when using bundle2
451 >
451 >
452 > used to test error handling in bundle2
452 > used to test error handling in bundle2
453 > """
453 > """
454 >
454 >
455 > from mercurial import error
455 > from mercurial import error
456 > from mercurial import bundle2
456 > from mercurial import bundle2
457 > from mercurial import exchange
457 > from mercurial import exchange
458 > from mercurial import extensions
458 > from mercurial import extensions
459 >
459 >
460 > def _pushbundle2failpart(pushop, bundler):
460 > def _pushbundle2failpart(pushop, bundler):
461 > reason = pushop.ui.config('failpush', 'reason', None)
461 > reason = pushop.ui.config('failpush', 'reason', None)
462 > part = None
462 > part = None
463 > if reason == 'abort':
463 > if reason == 'abort':
464 > bundler.newpart('test:abort')
464 > bundler.newpart('test:abort')
465 > if reason == 'unknown':
465 > if reason == 'unknown':
466 > bundler.newpart('test:unknown')
466 > bundler.newpart('test:unknown')
467 > if reason == 'race':
467 > if reason == 'race':
468 > # 20 Bytes of crap
468 > # 20 Bytes of crap
469 > bundler.newpart('check:heads', data='01234567890123456789')
469 > bundler.newpart('check:heads', data='01234567890123456789')
470 >
470 >
471 > @bundle2.parthandler("test:abort")
471 > @bundle2.parthandler("test:abort")
472 > def handleabort(op, part):
472 > def handleabort(op, part):
473 > raise error.Abort('Abandon ship!', hint="don't panic")
473 > raise error.Abort('Abandon ship!', hint="don't panic")
474 >
474 >
475 > def uisetup(ui):
475 > def uisetup(ui):
476 > exchange.b2partsgenmapping['failpart'] = _pushbundle2failpart
476 > exchange.b2partsgenmapping['failpart'] = _pushbundle2failpart
477 > exchange.b2partsgenorder.insert(0, 'failpart')
477 > exchange.b2partsgenorder.insert(0, 'failpart')
478 >
478 >
479 > EOF
479 > EOF
480
480
481 $ cd main
481 $ cd main
482 $ hg up tip
482 $ hg up tip
483 3 files updated, 0 files merged, 1 files removed, 0 files unresolved
483 3 files updated, 0 files merged, 1 files removed, 0 files unresolved
484 $ echo 'I' > I
484 $ echo 'I' > I
485 $ hg add I
485 $ hg add I
486 $ hg ci -m 'I'
486 $ hg ci -m 'I'
487 pre-close-tip:e7ec4e813ba6 draft
487 pre-close-tip:e7ec4e813ba6 draft
488 postclose-tip:e7ec4e813ba6 draft
488 postclose-tip:e7ec4e813ba6 draft
489 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
489 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
490 $ hg id
490 $ hg id
491 e7ec4e813ba6 tip
491 e7ec4e813ba6 tip
492 $ cd ..
492 $ cd ..
493
493
494 $ cat << EOF >> $HGRCPATH
494 $ cat << EOF >> $HGRCPATH
495 > [extensions]
495 > [extensions]
496 > failpush=$TESTTMP/failpush.py
496 > failpush=$TESTTMP/failpush.py
497 > EOF
497 > EOF
498
498
499 $ killdaemons.py
499 $ killdaemons.py
500 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
500 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
501 $ cat other.pid >> $DAEMON_PIDS
501 $ cat other.pid >> $DAEMON_PIDS
502
502
503 Doing the actual push: Abort error
503 Doing the actual push: Abort error
504
504
505 $ cat << EOF >> $HGRCPATH
505 $ cat << EOF >> $HGRCPATH
506 > [failpush]
506 > [failpush]
507 > reason = abort
507 > reason = abort
508 > EOF
508 > EOF
509
509
510 $ hg -R main push other -r e7ec4e813ba6
510 $ hg -R main push other -r e7ec4e813ba6
511 pushing to other
511 pushing to other
512 searching for changes
512 searching for changes
513 abort: Abandon ship!
513 abort: Abandon ship!
514 (don't panic)
514 (don't panic)
515 [255]
515 [255]
516
516
517 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
517 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
518 pushing to ssh://user@dummy/other
518 pushing to ssh://user@dummy/other
519 searching for changes
519 searching for changes
520 remote: Abandon ship!
520 remote: Abandon ship!
521 remote: (don't panic)
521 remote: (don't panic)
522 abort: push failed on remote
522 abort: push failed on remote
523 [255]
523 [255]
524
524
525 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
525 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
526 pushing to http://localhost:$HGPORT2/
526 pushing to http://localhost:$HGPORT2/
527 searching for changes
527 searching for changes
528 remote: Abandon ship!
528 remote: Abandon ship!
529 remote: (don't panic)
529 remote: (don't panic)
530 abort: push failed on remote
530 abort: push failed on remote
531 [255]
531 [255]
532
532
533
533
534 Doing the actual push: unknown mandatory parts
534 Doing the actual push: unknown mandatory parts
535
535
536 $ cat << EOF >> $HGRCPATH
536 $ cat << EOF >> $HGRCPATH
537 > [failpush]
537 > [failpush]
538 > reason = unknown
538 > reason = unknown
539 > EOF
539 > EOF
540
540
541 $ hg -R main push other -r e7ec4e813ba6
541 $ hg -R main push other -r e7ec4e813ba6
542 pushing to other
542 pushing to other
543 searching for changes
543 searching for changes
544 abort: missing support for test:unknown
544 abort: missing support for test:unknown
545 [255]
545 [255]
546
546
547 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
547 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
548 pushing to ssh://user@dummy/other
548 pushing to ssh://user@dummy/other
549 searching for changes
549 searching for changes
550 abort: missing support for test:unknown
550 abort: missing support for test:unknown
551 [255]
551 [255]
552
552
553 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
553 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
554 pushing to http://localhost:$HGPORT2/
554 pushing to http://localhost:$HGPORT2/
555 searching for changes
555 searching for changes
556 abort: missing support for test:unknown
556 abort: missing support for test:unknown
557 [255]
557 [255]
558
558
559 Doing the actual push: race
559 Doing the actual push: race
560
560
561 $ cat << EOF >> $HGRCPATH
561 $ cat << EOF >> $HGRCPATH
562 > [failpush]
562 > [failpush]
563 > reason = race
563 > reason = race
564 > EOF
564 > EOF
565
565
566 $ hg -R main push other -r e7ec4e813ba6
566 $ hg -R main push other -r e7ec4e813ba6
567 pushing to other
567 pushing to other
568 searching for changes
568 searching for changes
569 abort: push failed:
569 abort: push failed:
570 'repository changed while pushing - please try again'
570 'repository changed while pushing - please try again'
571 [255]
571 [255]
572
572
573 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
573 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
574 pushing to ssh://user@dummy/other
574 pushing to ssh://user@dummy/other
575 searching for changes
575 searching for changes
576 abort: push failed:
576 abort: push failed:
577 'repository changed while pushing - please try again'
577 'repository changed while pushing - please try again'
578 [255]
578 [255]
579
579
580 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
580 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
581 pushing to http://localhost:$HGPORT2/
581 pushing to http://localhost:$HGPORT2/
582 searching for changes
582 searching for changes
583 abort: push failed:
583 abort: push failed:
584 'repository changed while pushing - please try again'
584 'repository changed while pushing - please try again'
585 [255]
585 [255]
586
586
587 Doing the actual push: hook abort
587 Doing the actual push: hook abort
588
588
589 $ cat << EOF >> $HGRCPATH
589 $ cat << EOF >> $HGRCPATH
590 > [failpush]
590 > [failpush]
591 > reason =
591 > reason =
592 > [hooks]
592 > [hooks]
593 > pretxnclose.failpush = sh -c "echo 'You shall not pass!'; false"
593 > pretxnclose.failpush = sh -c "echo 'You shall not pass!'; false"
594 > txnabort.failpush = sh -c "echo 'Cleaning up the mess...'"
594 > txnabort.failpush = sh -c "echo 'Cleaning up the mess...'"
595 > EOF
595 > EOF
596
596
597 $ killdaemons.py
597 $ killdaemons.py
598 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
598 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
599 $ cat other.pid >> $DAEMON_PIDS
599 $ cat other.pid >> $DAEMON_PIDS
600
600
601 $ hg -R main push other -r e7ec4e813ba6
601 $ hg -R main push other -r e7ec4e813ba6
602 pushing to other
602 pushing to other
603 searching for changes
603 searching for changes
604 remote: adding changesets
604 remote: adding changesets
605 remote: adding manifests
605 remote: adding manifests
606 remote: adding file changes
606 remote: adding file changes
607 remote: added 1 changesets with 1 changes to 1 files
607 remote: added 1 changesets with 1 changes to 1 files
608 remote: pre-close-tip:e7ec4e813ba6 draft
608 remote: pre-close-tip:e7ec4e813ba6 draft
609 remote: You shall not pass!
609 remote: You shall not pass!
610 remote: transaction abort!
610 remote: transaction abort!
611 remote: Cleaning up the mess...
611 remote: Cleaning up the mess...
612 remote: rollback completed
612 remote: rollback completed
613 abort: pretxnclose.failpush hook exited with status 1
613 abort: pretxnclose.failpush hook exited with status 1
614 [255]
614 [255]
615
615
616 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
616 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
617 pushing to ssh://user@dummy/other
617 pushing to ssh://user@dummy/other
618 searching for changes
618 searching for changes
619 remote: adding changesets
619 remote: adding changesets
620 remote: adding manifests
620 remote: adding manifests
621 remote: adding file changes
621 remote: adding file changes
622 remote: added 1 changesets with 1 changes to 1 files
622 remote: added 1 changesets with 1 changes to 1 files
623 remote: pre-close-tip:e7ec4e813ba6 draft
623 remote: pre-close-tip:e7ec4e813ba6 draft
624 remote: You shall not pass!
624 remote: You shall not pass!
625 remote: transaction abort!
625 remote: transaction abort!
626 remote: Cleaning up the mess...
626 remote: Cleaning up the mess...
627 remote: rollback completed
627 remote: rollback completed
628 remote: pretxnclose.failpush hook exited with status 1
628 remote: pretxnclose.failpush hook exited with status 1
629 abort: push failed on remote
629 abort: push failed on remote
630 [255]
630 [255]
631
631
632 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
632 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
633 pushing to http://localhost:$HGPORT2/
633 pushing to http://localhost:$HGPORT2/
634 searching for changes
634 searching for changes
635 remote: adding changesets
635 remote: adding changesets
636 remote: adding manifests
636 remote: adding manifests
637 remote: adding file changes
637 remote: adding file changes
638 remote: added 1 changesets with 1 changes to 1 files
638 remote: added 1 changesets with 1 changes to 1 files
639 remote: pre-close-tip:e7ec4e813ba6 draft
639 remote: pre-close-tip:e7ec4e813ba6 draft
640 remote: You shall not pass!
640 remote: You shall not pass!
641 remote: transaction abort!
641 remote: transaction abort!
642 remote: Cleaning up the mess...
642 remote: Cleaning up the mess...
643 remote: rollback completed
643 remote: rollback completed
644 remote: pretxnclose.failpush hook exited with status 1
644 remote: pretxnclose.failpush hook exited with status 1
645 abort: push failed on remote
645 abort: push failed on remote
646 [255]
646 [255]
647
647
648 (check that no 'pending' files remain)
648 (check that no 'pending' files remain)
649
649
650 $ ls -1 other/.hg/bookmarks*
650 $ ls -1 other/.hg/bookmarks*
651 other/.hg/bookmarks
651 other/.hg/bookmarks
652 $ ls -1 other/.hg/store/phaseroots*
652 $ ls -1 other/.hg/store/phaseroots*
653 other/.hg/store/phaseroots
653 other/.hg/store/phaseroots
654 $ ls -1 other/.hg/store/00changelog.i*
654 $ ls -1 other/.hg/store/00changelog.i*
655 other/.hg/store/00changelog.i
655 other/.hg/store/00changelog.i
656
656
657 Check error from hook during the unbundling process itself
657 Check error from hook during the unbundling process itself
658
658
659 $ cat << EOF >> $HGRCPATH
659 $ cat << EOF >> $HGRCPATH
660 > pretxnchangegroup = sh -c "echo 'Fail early!'; false"
660 > pretxnchangegroup = sh -c "echo 'Fail early!'; false"
661 > EOF
661 > EOF
662 $ killdaemons.py # reload http config
662 $ killdaemons.py # reload http config
663 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
663 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
664 $ cat other.pid >> $DAEMON_PIDS
664 $ cat other.pid >> $DAEMON_PIDS
665
665
666 $ hg -R main push other -r e7ec4e813ba6
666 $ hg -R main push other -r e7ec4e813ba6
667 pushing to other
667 pushing to other
668 searching for changes
668 searching for changes
669 remote: adding changesets
669 remote: adding changesets
670 remote: adding manifests
670 remote: adding manifests
671 remote: adding file changes
671 remote: adding file changes
672 remote: added 1 changesets with 1 changes to 1 files
672 remote: added 1 changesets with 1 changes to 1 files
673 remote: Fail early!
673 remote: Fail early!
674 remote: transaction abort!
674 remote: transaction abort!
675 remote: Cleaning up the mess...
675 remote: Cleaning up the mess...
676 remote: rollback completed
676 remote: rollback completed
677 abort: pretxnchangegroup hook exited with status 1
677 abort: pretxnchangegroup hook exited with status 1
678 [255]
678 [255]
679 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
679 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
680 pushing to ssh://user@dummy/other
680 pushing to ssh://user@dummy/other
681 searching for changes
681 searching for changes
682 remote: adding changesets
682 remote: adding changesets
683 remote: adding manifests
683 remote: adding manifests
684 remote: adding file changes
684 remote: adding file changes
685 remote: added 1 changesets with 1 changes to 1 files
685 remote: added 1 changesets with 1 changes to 1 files
686 remote: Fail early!
686 remote: Fail early!
687 remote: transaction abort!
687 remote: transaction abort!
688 remote: Cleaning up the mess...
688 remote: Cleaning up the mess...
689 remote: rollback completed
689 remote: rollback completed
690 remote: pretxnchangegroup hook exited with status 1
690 remote: pretxnchangegroup hook exited with status 1
691 abort: push failed on remote
691 abort: push failed on remote
692 [255]
692 [255]
693 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
693 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
694 pushing to http://localhost:$HGPORT2/
694 pushing to http://localhost:$HGPORT2/
695 searching for changes
695 searching for changes
696 remote: adding changesets
696 remote: adding changesets
697 remote: adding manifests
697 remote: adding manifests
698 remote: adding file changes
698 remote: adding file changes
699 remote: added 1 changesets with 1 changes to 1 files
699 remote: added 1 changesets with 1 changes to 1 files
700 remote: Fail early!
700 remote: Fail early!
701 remote: transaction abort!
701 remote: transaction abort!
702 remote: Cleaning up the mess...
702 remote: Cleaning up the mess...
703 remote: rollback completed
703 remote: rollback completed
704 remote: pretxnchangegroup hook exited with status 1
704 remote: pretxnchangegroup hook exited with status 1
705 abort: push failed on remote
705 abort: push failed on remote
706 [255]
706 [255]
707
707
708 Check output capture control.
708 Check output capture control.
709
709
710 (should be still forced for http, disabled for local and ssh)
710 (should be still forced for http, disabled for local and ssh)
711
711
712 $ cat >> $HGRCPATH << EOF
712 $ cat >> $HGRCPATH << EOF
713 > [experimental]
713 > [experimental]
714 > bundle2-output-capture=False
714 > bundle2-output-capture=False
715 > EOF
715 > EOF
716
716
717 $ hg -R main push other -r e7ec4e813ba6
717 $ hg -R main push other -r e7ec4e813ba6
718 pushing to other
718 pushing to other
719 searching for changes
719 searching for changes
720 adding changesets
720 adding changesets
721 adding manifests
721 adding manifests
722 adding file changes
722 adding file changes
723 added 1 changesets with 1 changes to 1 files
723 added 1 changesets with 1 changes to 1 files
724 Fail early!
724 Fail early!
725 transaction abort!
725 transaction abort!
726 Cleaning up the mess...
726 Cleaning up the mess...
727 rollback completed
727 rollback completed
728 abort: pretxnchangegroup hook exited with status 1
728 abort: pretxnchangegroup hook exited with status 1
729 [255]
729 [255]
730 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
730 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
731 pushing to ssh://user@dummy/other
731 pushing to ssh://user@dummy/other
732 searching for changes
732 searching for changes
733 remote: adding changesets
733 remote: adding changesets
734 remote: adding manifests
734 remote: adding manifests
735 remote: adding file changes
735 remote: adding file changes
736 remote: added 1 changesets with 1 changes to 1 files
736 remote: added 1 changesets with 1 changes to 1 files
737 remote: Fail early!
737 remote: Fail early!
738 remote: transaction abort!
738 remote: transaction abort!
739 remote: Cleaning up the mess...
739 remote: Cleaning up the mess...
740 remote: rollback completed
740 remote: rollback completed
741 remote: pretxnchangegroup hook exited with status 1
741 remote: pretxnchangegroup hook exited with status 1
742 abort: push failed on remote
742 abort: push failed on remote
743 [255]
743 [255]
744 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
744 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
745 pushing to http://localhost:$HGPORT2/
745 pushing to http://localhost:$HGPORT2/
746 searching for changes
746 searching for changes
747 remote: adding changesets
747 remote: adding changesets
748 remote: adding manifests
748 remote: adding manifests
749 remote: adding file changes
749 remote: adding file changes
750 remote: added 1 changesets with 1 changes to 1 files
750 remote: added 1 changesets with 1 changes to 1 files
751 remote: Fail early!
751 remote: Fail early!
752 remote: transaction abort!
752 remote: transaction abort!
753 remote: Cleaning up the mess...
753 remote: Cleaning up the mess...
754 remote: rollback completed
754 remote: rollback completed
755 remote: pretxnchangegroup hook exited with status 1
755 remote: pretxnchangegroup hook exited with status 1
756 abort: push failed on remote
756 abort: push failed on remote
757 [255]
757 [255]
758
758
759 Check abort from mandatory pushkey
759 Check abort from mandatory pushkey
760
760
761 $ cat > mandatorypart.py << EOF
761 $ cat > mandatorypart.py << EOF
762 > from mercurial import exchange
762 > from mercurial import exchange
763 > from mercurial import pushkey
763 > from mercurial import pushkey
764 > from mercurial import node
764 > from mercurial import node
765 > from mercurial import error
765 > from mercurial import error
766 > @exchange.b2partsgenerator('failingpuskey')
766 > @exchange.b2partsgenerator('failingpuskey')
767 > def addfailingpushey(pushop, bundler):
767 > def addfailingpushey(pushop, bundler):
768 > enc = pushkey.encode
768 > enc = pushkey.encode
769 > part = bundler.newpart('pushkey')
769 > part = bundler.newpart('pushkey')
770 > part.addparam('namespace', enc('phases'))
770 > part.addparam('namespace', enc('phases'))
771 > part.addparam('key', enc(pushop.repo['cd010b8cd998'].hex()))
771 > part.addparam('key', enc(pushop.repo['cd010b8cd998'].hex()))
772 > part.addparam('old', enc(str(0))) # successful update
772 > part.addparam('old', enc(str(0))) # successful update
773 > part.addparam('new', enc(str(0)))
773 > part.addparam('new', enc(str(0)))
774 > def fail(pushop, exc):
774 > def fail(pushop, exc):
775 > raise error.Abort('Correct phase push failed (because hooks)')
775 > raise error.Abort('Correct phase push failed (because hooks)')
776 > pushop.pkfailcb[part.id] = fail
776 > pushop.pkfailcb[part.id] = fail
777 > EOF
777 > EOF
778 $ cat >> $HGRCPATH << EOF
778 $ cat >> $HGRCPATH << EOF
779 > [hooks]
779 > [hooks]
780 > pretxnchangegroup=
780 > pretxnchangegroup=
781 > pretxnclose.failpush=
781 > pretxnclose.failpush=
782 > prepushkey.failpush = sh -c "echo 'do not push the key !'; false"
782 > prepushkey.failpush = sh -c "echo 'do not push the key !'; false"
783 > [extensions]
783 > [extensions]
784 > mandatorypart=$TESTTMP/mandatorypart.py
784 > mandatorypart=$TESTTMP/mandatorypart.py
785 > EOF
785 > EOF
786 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config
786 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config
787 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
787 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
788 $ cat other.pid >> $DAEMON_PIDS
788 $ cat other.pid >> $DAEMON_PIDS
789
789
790 (Failure from a hook)
790 (Failure from a hook)
791
791
792 $ hg -R main push other -r e7ec4e813ba6
792 $ hg -R main push other -r e7ec4e813ba6
793 pushing to other
793 pushing to other
794 searching for changes
794 searching for changes
795 adding changesets
795 adding changesets
796 adding manifests
796 adding manifests
797 adding file changes
797 adding file changes
798 added 1 changesets with 1 changes to 1 files
798 added 1 changesets with 1 changes to 1 files
799 do not push the key !
799 do not push the key !
800 pushkey-abort: prepushkey.failpush hook exited with status 1
800 pushkey-abort: prepushkey.failpush hook exited with status 1
801 transaction abort!
801 transaction abort!
802 Cleaning up the mess...
802 Cleaning up the mess...
803 rollback completed
803 rollback completed
804 abort: Correct phase push failed (because hooks)
804 abort: Correct phase push failed (because hooks)
805 [255]
805 [255]
806 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
806 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
807 pushing to ssh://user@dummy/other
807 pushing to ssh://user@dummy/other
808 searching for changes
808 searching for changes
809 remote: adding changesets
809 remote: adding changesets
810 remote: adding manifests
810 remote: adding manifests
811 remote: adding file changes
811 remote: adding file changes
812 remote: added 1 changesets with 1 changes to 1 files
812 remote: added 1 changesets with 1 changes to 1 files
813 remote: do not push the key !
813 remote: do not push the key !
814 remote: pushkey-abort: prepushkey.failpush hook exited with status 1
814 remote: pushkey-abort: prepushkey.failpush hook exited with status 1
815 remote: transaction abort!
815 remote: transaction abort!
816 remote: Cleaning up the mess...
816 remote: Cleaning up the mess...
817 remote: rollback completed
817 remote: rollback completed
818 abort: Correct phase push failed (because hooks)
818 abort: Correct phase push failed (because hooks)
819 [255]
819 [255]
820 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
820 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
821 pushing to http://localhost:$HGPORT2/
821 pushing to http://localhost:$HGPORT2/
822 searching for changes
822 searching for changes
823 remote: adding changesets
823 remote: adding changesets
824 remote: adding manifests
824 remote: adding manifests
825 remote: adding file changes
825 remote: adding file changes
826 remote: added 1 changesets with 1 changes to 1 files
826 remote: added 1 changesets with 1 changes to 1 files
827 remote: do not push the key !
827 remote: do not push the key !
828 remote: pushkey-abort: prepushkey.failpush hook exited with status 1
828 remote: pushkey-abort: prepushkey.failpush hook exited with status 1
829 remote: transaction abort!
829 remote: transaction abort!
830 remote: Cleaning up the mess...
830 remote: Cleaning up the mess...
831 remote: rollback completed
831 remote: rollback completed
832 abort: Correct phase push failed (because hooks)
832 abort: Correct phase push failed (because hooks)
833 [255]
833 [255]
834
834
835 (Failure from a the pushkey)
835 (Failure from a the pushkey)
836
836
837 $ cat > mandatorypart.py << EOF
837 $ cat > mandatorypart.py << EOF
838 > from mercurial import exchange
838 > from mercurial import exchange
839 > from mercurial import pushkey
839 > from mercurial import pushkey
840 > from mercurial import node
840 > from mercurial import node
841 > from mercurial import error
841 > from mercurial import error
842 > @exchange.b2partsgenerator('failingpuskey')
842 > @exchange.b2partsgenerator('failingpuskey')
843 > def addfailingpushey(pushop, bundler):
843 > def addfailingpushey(pushop, bundler):
844 > enc = pushkey.encode
844 > enc = pushkey.encode
845 > part = bundler.newpart('pushkey')
845 > part = bundler.newpart('pushkey')
846 > part.addparam('namespace', enc('phases'))
846 > part.addparam('namespace', enc('phases'))
847 > part.addparam('key', enc(pushop.repo['cd010b8cd998'].hex()))
847 > part.addparam('key', enc(pushop.repo['cd010b8cd998'].hex()))
848 > part.addparam('old', enc(str(4))) # will fail
848 > part.addparam('old', enc(str(4))) # will fail
849 > part.addparam('new', enc(str(3)))
849 > part.addparam('new', enc(str(3)))
850 > def fail(pushop, exc):
850 > def fail(pushop, exc):
851 > raise error.Abort('Clown phase push failed')
851 > raise error.Abort('Clown phase push failed')
852 > pushop.pkfailcb[part.id] = fail
852 > pushop.pkfailcb[part.id] = fail
853 > EOF
853 > EOF
854 $ cat >> $HGRCPATH << EOF
854 $ cat >> $HGRCPATH << EOF
855 > [hooks]
855 > [hooks]
856 > prepushkey.failpush =
856 > prepushkey.failpush =
857 > EOF
857 > EOF
858 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config
858 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config
859 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
859 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
860 $ cat other.pid >> $DAEMON_PIDS
860 $ cat other.pid >> $DAEMON_PIDS
861
861
862 $ hg -R main push other -r e7ec4e813ba6
862 $ hg -R main push other -r e7ec4e813ba6
863 pushing to other
863 pushing to other
864 searching for changes
864 searching for changes
865 adding changesets
865 adding changesets
866 adding manifests
866 adding manifests
867 adding file changes
867 adding file changes
868 added 1 changesets with 1 changes to 1 files
868 added 1 changesets with 1 changes to 1 files
869 transaction abort!
869 transaction abort!
870 Cleaning up the mess...
870 Cleaning up the mess...
871 rollback completed
871 rollback completed
872 pushkey: lock state after "phases"
872 pushkey: lock state after "phases"
873 lock: free
873 lock: free
874 wlock: free
874 wlock: free
875 abort: Clown phase push failed
875 abort: Clown phase push failed
876 [255]
876 [255]
877 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
877 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
878 pushing to ssh://user@dummy/other
878 pushing to ssh://user@dummy/other
879 searching for changes
879 searching for changes
880 remote: adding changesets
880 remote: adding changesets
881 remote: adding manifests
881 remote: adding manifests
882 remote: adding file changes
882 remote: adding file changes
883 remote: added 1 changesets with 1 changes to 1 files
883 remote: added 1 changesets with 1 changes to 1 files
884 remote: transaction abort!
884 remote: transaction abort!
885 remote: Cleaning up the mess...
885 remote: Cleaning up the mess...
886 remote: rollback completed
886 remote: rollback completed
887 remote: pushkey: lock state after "phases"
887 remote: pushkey: lock state after "phases"
888 remote: lock: free
888 remote: lock: free
889 remote: wlock: free
889 remote: wlock: free
890 abort: Clown phase push failed
890 abort: Clown phase push failed
891 [255]
891 [255]
892 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
892 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
893 pushing to http://localhost:$HGPORT2/
893 pushing to http://localhost:$HGPORT2/
894 searching for changes
894 searching for changes
895 remote: adding changesets
895 remote: adding changesets
896 remote: adding manifests
896 remote: adding manifests
897 remote: adding file changes
897 remote: adding file changes
898 remote: added 1 changesets with 1 changes to 1 files
898 remote: added 1 changesets with 1 changes to 1 files
899 remote: transaction abort!
899 remote: transaction abort!
900 remote: Cleaning up the mess...
900 remote: Cleaning up the mess...
901 remote: rollback completed
901 remote: rollback completed
902 remote: pushkey: lock state after "phases"
902 remote: pushkey: lock state after "phases"
903 remote: lock: free
903 remote: lock: free
904 remote: wlock: free
904 remote: wlock: free
905 abort: Clown phase push failed
905 abort: Clown phase push failed
906 [255]
906 [255]
907
907
908 Test lazily acquiring the lock during unbundle
908 Test lazily acquiring the lock during unbundle
909 $ cp $TESTTMP/hgrc.orig $HGRCPATH
909 $ cp $TESTTMP/hgrc.orig $HGRCPATH
910 $ cat >> $HGRCPATH <<EOF
910 $ cat >> $HGRCPATH <<EOF
911 > [ui]
911 > [ui]
912 > ssh=$PYTHON "$TESTDIR/dummyssh"
912 > ssh="$PYTHON" "$TESTDIR/dummyssh"
913 > EOF
913 > EOF
914
914
915 $ cat >> $TESTTMP/locktester.py <<EOF
915 $ cat >> $TESTTMP/locktester.py <<EOF
916 > import os
916 > import os
917 > from mercurial import extensions, bundle2, util
917 > from mercurial import extensions, bundle2, util
918 > def checklock(orig, repo, *args, **kwargs):
918 > def checklock(orig, repo, *args, **kwargs):
919 > if repo.svfs.lexists("lock"):
919 > if repo.svfs.lexists("lock"):
920 > raise util.Abort("Lock should not be taken")
920 > raise util.Abort("Lock should not be taken")
921 > return orig(repo, *args, **kwargs)
921 > return orig(repo, *args, **kwargs)
922 > def extsetup(ui):
922 > def extsetup(ui):
923 > extensions.wrapfunction(bundle2, 'processbundle', checklock)
923 > extensions.wrapfunction(bundle2, 'processbundle', checklock)
924 > EOF
924 > EOF
925
925
926 $ hg init lazylock
926 $ hg init lazylock
927 $ cat >> lazylock/.hg/hgrc <<EOF
927 $ cat >> lazylock/.hg/hgrc <<EOF
928 > [extensions]
928 > [extensions]
929 > locktester=$TESTTMP/locktester.py
929 > locktester=$TESTTMP/locktester.py
930 > EOF
930 > EOF
931
931
932 $ hg clone -q ssh://user@dummy/lazylock lazylockclient
932 $ hg clone -q ssh://user@dummy/lazylock lazylockclient
933 $ cd lazylockclient
933 $ cd lazylockclient
934 $ touch a && hg ci -Aqm a
934 $ touch a && hg ci -Aqm a
935 $ hg push
935 $ hg push
936 pushing to ssh://user@dummy/lazylock
936 pushing to ssh://user@dummy/lazylock
937 searching for changes
937 searching for changes
938 remote: Lock should not be taken
938 remote: Lock should not be taken
939 abort: push failed on remote
939 abort: push failed on remote
940 [255]
940 [255]
941
941
942 $ cat >> ../lazylock/.hg/hgrc <<EOF
942 $ cat >> ../lazylock/.hg/hgrc <<EOF
943 > [experimental]
943 > [experimental]
944 > bundle2lazylocking=True
944 > bundle2lazylocking=True
945 > EOF
945 > EOF
946 $ hg push
946 $ hg push
947 pushing to ssh://user@dummy/lazylock
947 pushing to ssh://user@dummy/lazylock
948 searching for changes
948 searching for changes
949 remote: adding changesets
949 remote: adding changesets
950 remote: adding manifests
950 remote: adding manifests
951 remote: adding file changes
951 remote: adding file changes
952 remote: added 1 changesets with 1 changes to 1 files
952 remote: added 1 changesets with 1 changes to 1 files
953
953
954 $ cd ..
954 $ cd ..
955
955
956 Servers can disable bundle1 for clone/pull operations
956 Servers can disable bundle1 for clone/pull operations
957
957
958 $ killdaemons.py
958 $ killdaemons.py
959 $ hg init bundle2onlyserver
959 $ hg init bundle2onlyserver
960 $ cd bundle2onlyserver
960 $ cd bundle2onlyserver
961 $ cat > .hg/hgrc << EOF
961 $ cat > .hg/hgrc << EOF
962 > [server]
962 > [server]
963 > bundle1.pull = false
963 > bundle1.pull = false
964 > EOF
964 > EOF
965
965
966 $ touch foo
966 $ touch foo
967 $ hg -q commit -A -m initial
967 $ hg -q commit -A -m initial
968
968
969 $ hg serve -p $HGPORT -d --pid-file=hg.pid
969 $ hg serve -p $HGPORT -d --pid-file=hg.pid
970 $ cat hg.pid >> $DAEMON_PIDS
970 $ cat hg.pid >> $DAEMON_PIDS
971
971
972 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
972 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
973 requesting all changes
973 requesting all changes
974 abort: remote error:
974 abort: remote error:
975 incompatible Mercurial client; bundle2 required
975 incompatible Mercurial client; bundle2 required
976 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
976 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
977 [255]
977 [255]
978 $ killdaemons.py
978 $ killdaemons.py
979 $ cd ..
979 $ cd ..
980
980
981 bundle1 can still pull non-generaldelta repos when generaldelta bundle1 disabled
981 bundle1 can still pull non-generaldelta repos when generaldelta bundle1 disabled
982
982
983 $ hg --config format.usegeneraldelta=false init notgdserver
983 $ hg --config format.usegeneraldelta=false init notgdserver
984 $ cd notgdserver
984 $ cd notgdserver
985 $ cat > .hg/hgrc << EOF
985 $ cat > .hg/hgrc << EOF
986 > [server]
986 > [server]
987 > bundle1gd.pull = false
987 > bundle1gd.pull = false
988 > EOF
988 > EOF
989
989
990 $ touch foo
990 $ touch foo
991 $ hg -q commit -A -m initial
991 $ hg -q commit -A -m initial
992 $ hg serve -p $HGPORT -d --pid-file=hg.pid
992 $ hg serve -p $HGPORT -d --pid-file=hg.pid
993 $ cat hg.pid >> $DAEMON_PIDS
993 $ cat hg.pid >> $DAEMON_PIDS
994
994
995 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-1
995 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-1
996 requesting all changes
996 requesting all changes
997 adding changesets
997 adding changesets
998 adding manifests
998 adding manifests
999 adding file changes
999 adding file changes
1000 added 1 changesets with 1 changes to 1 files
1000 added 1 changesets with 1 changes to 1 files
1001 updating to branch default
1001 updating to branch default
1002 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1002 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1003
1003
1004 $ killdaemons.py
1004 $ killdaemons.py
1005 $ cd ../bundle2onlyserver
1005 $ cd ../bundle2onlyserver
1006
1006
1007 bundle1 pull can be disabled for generaldelta repos only
1007 bundle1 pull can be disabled for generaldelta repos only
1008
1008
1009 $ cat > .hg/hgrc << EOF
1009 $ cat > .hg/hgrc << EOF
1010 > [server]
1010 > [server]
1011 > bundle1gd.pull = false
1011 > bundle1gd.pull = false
1012 > EOF
1012 > EOF
1013
1013
1014 $ hg serve -p $HGPORT -d --pid-file=hg.pid
1014 $ hg serve -p $HGPORT -d --pid-file=hg.pid
1015 $ cat hg.pid >> $DAEMON_PIDS
1015 $ cat hg.pid >> $DAEMON_PIDS
1016 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
1016 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
1017 requesting all changes
1017 requesting all changes
1018 abort: remote error:
1018 abort: remote error:
1019 incompatible Mercurial client; bundle2 required
1019 incompatible Mercurial client; bundle2 required
1020 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1020 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1021 [255]
1021 [255]
1022
1022
1023 $ killdaemons.py
1023 $ killdaemons.py
1024
1024
1025 Verify the global server.bundle1 option works
1025 Verify the global server.bundle1 option works
1026
1026
1027 $ cd ..
1027 $ cd ..
1028 $ cat > bundle2onlyserver/.hg/hgrc << EOF
1028 $ cat > bundle2onlyserver/.hg/hgrc << EOF
1029 > [server]
1029 > [server]
1030 > bundle1 = false
1030 > bundle1 = false
1031 > EOF
1031 > EOF
1032 $ hg -R bundle2onlyserver serve -p $HGPORT -d --pid-file=hg.pid
1032 $ hg -R bundle2onlyserver serve -p $HGPORT -d --pid-file=hg.pid
1033 $ cat hg.pid >> $DAEMON_PIDS
1033 $ cat hg.pid >> $DAEMON_PIDS
1034 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT not-bundle2
1034 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT not-bundle2
1035 requesting all changes
1035 requesting all changes
1036 abort: remote error:
1036 abort: remote error:
1037 incompatible Mercurial client; bundle2 required
1037 incompatible Mercurial client; bundle2 required
1038 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1038 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1039 [255]
1039 [255]
1040 $ killdaemons.py
1040 $ killdaemons.py
1041
1041
1042 $ hg --config devel.legacy.exchange=bundle1 clone ssh://user@dummy/bundle2onlyserver not-bundle2-ssh
1042 $ hg --config devel.legacy.exchange=bundle1 clone ssh://user@dummy/bundle2onlyserver not-bundle2-ssh
1043 requesting all changes
1043 requesting all changes
1044 adding changesets
1044 adding changesets
1045 remote: abort: incompatible Mercurial client; bundle2 required
1045 remote: abort: incompatible Mercurial client; bundle2 required
1046 remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1046 remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1047 transaction abort!
1047 transaction abort!
1048 rollback completed
1048 rollback completed
1049 abort: stream ended unexpectedly (got 0 bytes, expected 4)
1049 abort: stream ended unexpectedly (got 0 bytes, expected 4)
1050 [255]
1050 [255]
1051
1051
1052 $ cat > bundle2onlyserver/.hg/hgrc << EOF
1052 $ cat > bundle2onlyserver/.hg/hgrc << EOF
1053 > [server]
1053 > [server]
1054 > bundle1gd = false
1054 > bundle1gd = false
1055 > EOF
1055 > EOF
1056 $ hg -R bundle2onlyserver serve -p $HGPORT -d --pid-file=hg.pid
1056 $ hg -R bundle2onlyserver serve -p $HGPORT -d --pid-file=hg.pid
1057 $ cat hg.pid >> $DAEMON_PIDS
1057 $ cat hg.pid >> $DAEMON_PIDS
1058
1058
1059 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
1059 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
1060 requesting all changes
1060 requesting all changes
1061 abort: remote error:
1061 abort: remote error:
1062 incompatible Mercurial client; bundle2 required
1062 incompatible Mercurial client; bundle2 required
1063 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1063 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1064 [255]
1064 [255]
1065
1065
1066 $ killdaemons.py
1066 $ killdaemons.py
1067
1067
1068 $ cd notgdserver
1068 $ cd notgdserver
1069 $ cat > .hg/hgrc << EOF
1069 $ cat > .hg/hgrc << EOF
1070 > [server]
1070 > [server]
1071 > bundle1gd = false
1071 > bundle1gd = false
1072 > EOF
1072 > EOF
1073 $ hg serve -p $HGPORT -d --pid-file=hg.pid
1073 $ hg serve -p $HGPORT -d --pid-file=hg.pid
1074 $ cat hg.pid >> $DAEMON_PIDS
1074 $ cat hg.pid >> $DAEMON_PIDS
1075
1075
1076 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-2
1076 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-2
1077 requesting all changes
1077 requesting all changes
1078 adding changesets
1078 adding changesets
1079 adding manifests
1079 adding manifests
1080 adding file changes
1080 adding file changes
1081 added 1 changesets with 1 changes to 1 files
1081 added 1 changesets with 1 changes to 1 files
1082 updating to branch default
1082 updating to branch default
1083 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1083 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1084
1084
1085 $ killdaemons.py
1085 $ killdaemons.py
1086 $ cd ../bundle2onlyserver
1086 $ cd ../bundle2onlyserver
1087
1087
1088 Verify bundle1 pushes can be disabled
1088 Verify bundle1 pushes can be disabled
1089
1089
1090 $ cat > .hg/hgrc << EOF
1090 $ cat > .hg/hgrc << EOF
1091 > [server]
1091 > [server]
1092 > bundle1.push = false
1092 > bundle1.push = false
1093 > [web]
1093 > [web]
1094 > allow_push = *
1094 > allow_push = *
1095 > push_ssl = false
1095 > push_ssl = false
1096 > EOF
1096 > EOF
1097
1097
1098 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E error.log
1098 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E error.log
1099 $ cat hg.pid >> $DAEMON_PIDS
1099 $ cat hg.pid >> $DAEMON_PIDS
1100 $ cd ..
1100 $ cd ..
1101
1101
1102 $ hg clone http://localhost:$HGPORT bundle2-only
1102 $ hg clone http://localhost:$HGPORT bundle2-only
1103 requesting all changes
1103 requesting all changes
1104 adding changesets
1104 adding changesets
1105 adding manifests
1105 adding manifests
1106 adding file changes
1106 adding file changes
1107 added 1 changesets with 1 changes to 1 files
1107 added 1 changesets with 1 changes to 1 files
1108 updating to branch default
1108 updating to branch default
1109 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1109 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1110 $ cd bundle2-only
1110 $ cd bundle2-only
1111 $ echo commit > foo
1111 $ echo commit > foo
1112 $ hg commit -m commit
1112 $ hg commit -m commit
1113 $ hg --config devel.legacy.exchange=bundle1 push
1113 $ hg --config devel.legacy.exchange=bundle1 push
1114 pushing to http://localhost:$HGPORT/
1114 pushing to http://localhost:$HGPORT/
1115 searching for changes
1115 searching for changes
1116 abort: remote error:
1116 abort: remote error:
1117 incompatible Mercurial client; bundle2 required
1117 incompatible Mercurial client; bundle2 required
1118 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1118 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1119 [255]
1119 [255]
1120
1120
1121 (also check with ssh)
1121 (also check with ssh)
1122
1122
1123 $ hg --config devel.legacy.exchange=bundle1 push ssh://user@dummy/bundle2onlyserver
1123 $ hg --config devel.legacy.exchange=bundle1 push ssh://user@dummy/bundle2onlyserver
1124 pushing to ssh://user@dummy/bundle2onlyserver
1124 pushing to ssh://user@dummy/bundle2onlyserver
1125 searching for changes
1125 searching for changes
1126 remote: abort: incompatible Mercurial client; bundle2 required
1126 remote: abort: incompatible Mercurial client; bundle2 required
1127 remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1127 remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1128 [1]
1128 [1]
1129
1129
1130 $ hg push
1130 $ hg push
1131 pushing to http://localhost:$HGPORT/
1131 pushing to http://localhost:$HGPORT/
1132 searching for changes
1132 searching for changes
1133 remote: adding changesets
1133 remote: adding changesets
1134 remote: adding manifests
1134 remote: adding manifests
1135 remote: adding file changes
1135 remote: adding file changes
1136 remote: added 1 changesets with 1 changes to 1 files
1136 remote: added 1 changesets with 1 changes to 1 files
@@ -1,1098 +1,1098
1 Prepare repo a:
1 Prepare repo a:
2
2
3 $ hg init a
3 $ hg init a
4 $ cd a
4 $ cd a
5 $ echo a > a
5 $ echo a > a
6 $ hg add a
6 $ hg add a
7 $ hg commit -m test
7 $ hg commit -m test
8 $ echo first line > b
8 $ echo first line > b
9 $ hg add b
9 $ hg add b
10
10
11 Create a non-inlined filelog:
11 Create a non-inlined filelog:
12
12
13 $ $PYTHON -c 'file("data1", "wb").write("".join("%s\n" % x for x in range(10000)))'
13 $ $PYTHON -c 'file("data1", "wb").write("".join("%s\n" % x for x in range(10000)))'
14 $ for j in 0 1 2 3 4 5 6 7 8 9; do
14 $ for j in 0 1 2 3 4 5 6 7 8 9; do
15 > cat data1 >> b
15 > cat data1 >> b
16 > hg commit -m test
16 > hg commit -m test
17 > done
17 > done
18
18
19 List files in store/data (should show a 'b.d'):
19 List files in store/data (should show a 'b.d'):
20
20
21 $ for i in .hg/store/data/*; do
21 $ for i in .hg/store/data/*; do
22 > echo $i
22 > echo $i
23 > done
23 > done
24 .hg/store/data/a.i
24 .hg/store/data/a.i
25 .hg/store/data/b.d
25 .hg/store/data/b.d
26 .hg/store/data/b.i
26 .hg/store/data/b.i
27
27
28 Trigger branchcache creation:
28 Trigger branchcache creation:
29
29
30 $ hg branches
30 $ hg branches
31 default 10:a7949464abda
31 default 10:a7949464abda
32 $ ls .hg/cache
32 $ ls .hg/cache
33 branch2-served
33 branch2-served
34 checkisexec (execbit !)
34 checkisexec (execbit !)
35 checklink (symlink !)
35 checklink (symlink !)
36 checklink-target (symlink !)
36 checklink-target (symlink !)
37 checknoexec (execbit !)
37 checknoexec (execbit !)
38 rbc-names-v1
38 rbc-names-v1
39 rbc-revs-v1
39 rbc-revs-v1
40
40
41 Default operation:
41 Default operation:
42
42
43 $ hg clone . ../b
43 $ hg clone . ../b
44 updating to branch default
44 updating to branch default
45 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
46 $ cd ../b
46 $ cd ../b
47
47
48 Ensure branchcache got copied over:
48 Ensure branchcache got copied over:
49
49
50 $ ls .hg/cache
50 $ ls .hg/cache
51 branch2-served
51 branch2-served
52 checkisexec (execbit !)
52 checkisexec (execbit !)
53 checklink (symlink !)
53 checklink (symlink !)
54 checklink-target (symlink !)
54 checklink-target (symlink !)
55 rbc-names-v1
55 rbc-names-v1
56 rbc-revs-v1
56 rbc-revs-v1
57
57
58 $ cat a
58 $ cat a
59 a
59 a
60 $ hg verify
60 $ hg verify
61 checking changesets
61 checking changesets
62 checking manifests
62 checking manifests
63 crosschecking files in changesets and manifests
63 crosschecking files in changesets and manifests
64 checking files
64 checking files
65 2 files, 11 changesets, 11 total revisions
65 2 files, 11 changesets, 11 total revisions
66
66
67 Invalid dest '' must abort:
67 Invalid dest '' must abort:
68
68
69 $ hg clone . ''
69 $ hg clone . ''
70 abort: empty destination path is not valid
70 abort: empty destination path is not valid
71 [255]
71 [255]
72
72
73 No update, with debug option:
73 No update, with debug option:
74
74
75 #if hardlink
75 #if hardlink
76 $ hg --debug clone -U . ../c --config progress.debug=true
76 $ hg --debug clone -U . ../c --config progress.debug=true
77 linking: 1
77 linking: 1
78 linking: 2
78 linking: 2
79 linking: 3
79 linking: 3
80 linking: 4
80 linking: 4
81 linking: 5
81 linking: 5
82 linking: 6
82 linking: 6
83 linking: 7
83 linking: 7
84 linking: 8
84 linking: 8
85 linked 8 files
85 linked 8 files
86 #else
86 #else
87 $ hg --debug clone -U . ../c --config progress.debug=true
87 $ hg --debug clone -U . ../c --config progress.debug=true
88 linking: 1
88 linking: 1
89 copying: 2
89 copying: 2
90 copying: 3
90 copying: 3
91 copying: 4
91 copying: 4
92 copying: 5
92 copying: 5
93 copying: 6
93 copying: 6
94 copying: 7
94 copying: 7
95 copying: 8
95 copying: 8
96 copied 8 files
96 copied 8 files
97 #endif
97 #endif
98 $ cd ../c
98 $ cd ../c
99
99
100 Ensure branchcache got copied over:
100 Ensure branchcache got copied over:
101
101
102 $ ls .hg/cache
102 $ ls .hg/cache
103 branch2-served
103 branch2-served
104 rbc-names-v1
104 rbc-names-v1
105 rbc-revs-v1
105 rbc-revs-v1
106
106
107 $ cat a 2>/dev/null || echo "a not present"
107 $ cat a 2>/dev/null || echo "a not present"
108 a not present
108 a not present
109 $ hg verify
109 $ hg verify
110 checking changesets
110 checking changesets
111 checking manifests
111 checking manifests
112 crosschecking files in changesets and manifests
112 crosschecking files in changesets and manifests
113 checking files
113 checking files
114 2 files, 11 changesets, 11 total revisions
114 2 files, 11 changesets, 11 total revisions
115
115
116 Default destination:
116 Default destination:
117
117
118 $ mkdir ../d
118 $ mkdir ../d
119 $ cd ../d
119 $ cd ../d
120 $ hg clone ../a
120 $ hg clone ../a
121 destination directory: a
121 destination directory: a
122 updating to branch default
122 updating to branch default
123 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
123 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
124 $ cd a
124 $ cd a
125 $ hg cat a
125 $ hg cat a
126 a
126 a
127 $ cd ../..
127 $ cd ../..
128
128
129 Check that we drop the 'file:' from the path before writing the .hgrc:
129 Check that we drop the 'file:' from the path before writing the .hgrc:
130
130
131 $ hg clone file:a e
131 $ hg clone file:a e
132 updating to branch default
132 updating to branch default
133 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
133 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
134 $ grep 'file:' e/.hg/hgrc
134 $ grep 'file:' e/.hg/hgrc
135 [1]
135 [1]
136
136
137 Check that path aliases are expanded:
137 Check that path aliases are expanded:
138
138
139 $ hg clone -q -U --config 'paths.foobar=a#0' foobar f
139 $ hg clone -q -U --config 'paths.foobar=a#0' foobar f
140 $ hg -R f showconfig paths.default
140 $ hg -R f showconfig paths.default
141 $TESTTMP/a#0 (glob)
141 $TESTTMP/a#0 (glob)
142
142
143 Use --pull:
143 Use --pull:
144
144
145 $ hg clone --pull a g
145 $ hg clone --pull a g
146 requesting all changes
146 requesting all changes
147 adding changesets
147 adding changesets
148 adding manifests
148 adding manifests
149 adding file changes
149 adding file changes
150 added 11 changesets with 11 changes to 2 files
150 added 11 changesets with 11 changes to 2 files
151 updating to branch default
151 updating to branch default
152 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
152 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
153 $ hg -R g verify
153 $ hg -R g verify
154 checking changesets
154 checking changesets
155 checking manifests
155 checking manifests
156 crosschecking files in changesets and manifests
156 crosschecking files in changesets and manifests
157 checking files
157 checking files
158 2 files, 11 changesets, 11 total revisions
158 2 files, 11 changesets, 11 total revisions
159
159
160 Invalid dest '' with --pull must abort (issue2528):
160 Invalid dest '' with --pull must abort (issue2528):
161
161
162 $ hg clone --pull a ''
162 $ hg clone --pull a ''
163 abort: empty destination path is not valid
163 abort: empty destination path is not valid
164 [255]
164 [255]
165
165
166 Clone to '.':
166 Clone to '.':
167
167
168 $ mkdir h
168 $ mkdir h
169 $ cd h
169 $ cd h
170 $ hg clone ../a .
170 $ hg clone ../a .
171 updating to branch default
171 updating to branch default
172 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
172 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
173 $ cd ..
173 $ cd ..
174
174
175
175
176 *** Tests for option -u ***
176 *** Tests for option -u ***
177
177
178 Adding some more history to repo a:
178 Adding some more history to repo a:
179
179
180 $ cd a
180 $ cd a
181 $ hg tag ref1
181 $ hg tag ref1
182 $ echo the quick brown fox >a
182 $ echo the quick brown fox >a
183 $ hg ci -m "hacked default"
183 $ hg ci -m "hacked default"
184 $ hg up ref1
184 $ hg up ref1
185 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
185 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
186 $ hg branch stable
186 $ hg branch stable
187 marked working directory as branch stable
187 marked working directory as branch stable
188 (branches are permanent and global, did you want a bookmark?)
188 (branches are permanent and global, did you want a bookmark?)
189 $ echo some text >a
189 $ echo some text >a
190 $ hg ci -m "starting branch stable"
190 $ hg ci -m "starting branch stable"
191 $ hg tag ref2
191 $ hg tag ref2
192 $ echo some more text >a
192 $ echo some more text >a
193 $ hg ci -m "another change for branch stable"
193 $ hg ci -m "another change for branch stable"
194 $ hg up ref2
194 $ hg up ref2
195 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
195 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
196 $ hg parents
196 $ hg parents
197 changeset: 13:e8ece76546a6
197 changeset: 13:e8ece76546a6
198 branch: stable
198 branch: stable
199 tag: ref2
199 tag: ref2
200 parent: 10:a7949464abda
200 parent: 10:a7949464abda
201 user: test
201 user: test
202 date: Thu Jan 01 00:00:00 1970 +0000
202 date: Thu Jan 01 00:00:00 1970 +0000
203 summary: starting branch stable
203 summary: starting branch stable
204
204
205
205
206 Repo a has two heads:
206 Repo a has two heads:
207
207
208 $ hg heads
208 $ hg heads
209 changeset: 15:0aae7cf88f0d
209 changeset: 15:0aae7cf88f0d
210 branch: stable
210 branch: stable
211 tag: tip
211 tag: tip
212 user: test
212 user: test
213 date: Thu Jan 01 00:00:00 1970 +0000
213 date: Thu Jan 01 00:00:00 1970 +0000
214 summary: another change for branch stable
214 summary: another change for branch stable
215
215
216 changeset: 12:f21241060d6a
216 changeset: 12:f21241060d6a
217 user: test
217 user: test
218 date: Thu Jan 01 00:00:00 1970 +0000
218 date: Thu Jan 01 00:00:00 1970 +0000
219 summary: hacked default
219 summary: hacked default
220
220
221
221
222 $ cd ..
222 $ cd ..
223
223
224
224
225 Testing --noupdate with --updaterev (must abort):
225 Testing --noupdate with --updaterev (must abort):
226
226
227 $ hg clone --noupdate --updaterev 1 a ua
227 $ hg clone --noupdate --updaterev 1 a ua
228 abort: cannot specify both --noupdate and --updaterev
228 abort: cannot specify both --noupdate and --updaterev
229 [255]
229 [255]
230
230
231
231
232 Testing clone -u:
232 Testing clone -u:
233
233
234 $ hg clone -u . a ua
234 $ hg clone -u . a ua
235 updating to branch stable
235 updating to branch stable
236 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
236 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
237
237
238 Repo ua has both heads:
238 Repo ua has both heads:
239
239
240 $ hg -R ua heads
240 $ hg -R ua heads
241 changeset: 15:0aae7cf88f0d
241 changeset: 15:0aae7cf88f0d
242 branch: stable
242 branch: stable
243 tag: tip
243 tag: tip
244 user: test
244 user: test
245 date: Thu Jan 01 00:00:00 1970 +0000
245 date: Thu Jan 01 00:00:00 1970 +0000
246 summary: another change for branch stable
246 summary: another change for branch stable
247
247
248 changeset: 12:f21241060d6a
248 changeset: 12:f21241060d6a
249 user: test
249 user: test
250 date: Thu Jan 01 00:00:00 1970 +0000
250 date: Thu Jan 01 00:00:00 1970 +0000
251 summary: hacked default
251 summary: hacked default
252
252
253
253
254 Same revision checked out in repo a and ua:
254 Same revision checked out in repo a and ua:
255
255
256 $ hg -R a parents --template "{node|short}\n"
256 $ hg -R a parents --template "{node|short}\n"
257 e8ece76546a6
257 e8ece76546a6
258 $ hg -R ua parents --template "{node|short}\n"
258 $ hg -R ua parents --template "{node|short}\n"
259 e8ece76546a6
259 e8ece76546a6
260
260
261 $ rm -r ua
261 $ rm -r ua
262
262
263
263
264 Testing clone --pull -u:
264 Testing clone --pull -u:
265
265
266 $ hg clone --pull -u . a ua
266 $ hg clone --pull -u . a ua
267 requesting all changes
267 requesting all changes
268 adding changesets
268 adding changesets
269 adding manifests
269 adding manifests
270 adding file changes
270 adding file changes
271 added 16 changesets with 16 changes to 3 files (+1 heads)
271 added 16 changesets with 16 changes to 3 files (+1 heads)
272 updating to branch stable
272 updating to branch stable
273 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
273 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
274
274
275 Repo ua has both heads:
275 Repo ua has both heads:
276
276
277 $ hg -R ua heads
277 $ hg -R ua heads
278 changeset: 15:0aae7cf88f0d
278 changeset: 15:0aae7cf88f0d
279 branch: stable
279 branch: stable
280 tag: tip
280 tag: tip
281 user: test
281 user: test
282 date: Thu Jan 01 00:00:00 1970 +0000
282 date: Thu Jan 01 00:00:00 1970 +0000
283 summary: another change for branch stable
283 summary: another change for branch stable
284
284
285 changeset: 12:f21241060d6a
285 changeset: 12:f21241060d6a
286 user: test
286 user: test
287 date: Thu Jan 01 00:00:00 1970 +0000
287 date: Thu Jan 01 00:00:00 1970 +0000
288 summary: hacked default
288 summary: hacked default
289
289
290
290
291 Same revision checked out in repo a and ua:
291 Same revision checked out in repo a and ua:
292
292
293 $ hg -R a parents --template "{node|short}\n"
293 $ hg -R a parents --template "{node|short}\n"
294 e8ece76546a6
294 e8ece76546a6
295 $ hg -R ua parents --template "{node|short}\n"
295 $ hg -R ua parents --template "{node|short}\n"
296 e8ece76546a6
296 e8ece76546a6
297
297
298 $ rm -r ua
298 $ rm -r ua
299
299
300
300
301 Testing clone -u <branch>:
301 Testing clone -u <branch>:
302
302
303 $ hg clone -u stable a ua
303 $ hg clone -u stable a ua
304 updating to branch stable
304 updating to branch stable
305 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
305 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
306
306
307 Repo ua has both heads:
307 Repo ua has both heads:
308
308
309 $ hg -R ua heads
309 $ hg -R ua heads
310 changeset: 15:0aae7cf88f0d
310 changeset: 15:0aae7cf88f0d
311 branch: stable
311 branch: stable
312 tag: tip
312 tag: tip
313 user: test
313 user: test
314 date: Thu Jan 01 00:00:00 1970 +0000
314 date: Thu Jan 01 00:00:00 1970 +0000
315 summary: another change for branch stable
315 summary: another change for branch stable
316
316
317 changeset: 12:f21241060d6a
317 changeset: 12:f21241060d6a
318 user: test
318 user: test
319 date: Thu Jan 01 00:00:00 1970 +0000
319 date: Thu Jan 01 00:00:00 1970 +0000
320 summary: hacked default
320 summary: hacked default
321
321
322
322
323 Branch 'stable' is checked out:
323 Branch 'stable' is checked out:
324
324
325 $ hg -R ua parents
325 $ hg -R ua parents
326 changeset: 15:0aae7cf88f0d
326 changeset: 15:0aae7cf88f0d
327 branch: stable
327 branch: stable
328 tag: tip
328 tag: tip
329 user: test
329 user: test
330 date: Thu Jan 01 00:00:00 1970 +0000
330 date: Thu Jan 01 00:00:00 1970 +0000
331 summary: another change for branch stable
331 summary: another change for branch stable
332
332
333
333
334 $ rm -r ua
334 $ rm -r ua
335
335
336
336
337 Testing default checkout:
337 Testing default checkout:
338
338
339 $ hg clone a ua
339 $ hg clone a ua
340 updating to branch default
340 updating to branch default
341 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
341 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
342
342
343 Repo ua has both heads:
343 Repo ua has both heads:
344
344
345 $ hg -R ua heads
345 $ hg -R ua heads
346 changeset: 15:0aae7cf88f0d
346 changeset: 15:0aae7cf88f0d
347 branch: stable
347 branch: stable
348 tag: tip
348 tag: tip
349 user: test
349 user: test
350 date: Thu Jan 01 00:00:00 1970 +0000
350 date: Thu Jan 01 00:00:00 1970 +0000
351 summary: another change for branch stable
351 summary: another change for branch stable
352
352
353 changeset: 12:f21241060d6a
353 changeset: 12:f21241060d6a
354 user: test
354 user: test
355 date: Thu Jan 01 00:00:00 1970 +0000
355 date: Thu Jan 01 00:00:00 1970 +0000
356 summary: hacked default
356 summary: hacked default
357
357
358
358
359 Branch 'default' is checked out:
359 Branch 'default' is checked out:
360
360
361 $ hg -R ua parents
361 $ hg -R ua parents
362 changeset: 12:f21241060d6a
362 changeset: 12:f21241060d6a
363 user: test
363 user: test
364 date: Thu Jan 01 00:00:00 1970 +0000
364 date: Thu Jan 01 00:00:00 1970 +0000
365 summary: hacked default
365 summary: hacked default
366
366
367 Test clone with a branch named "@" (issue3677)
367 Test clone with a branch named "@" (issue3677)
368
368
369 $ hg -R ua branch @
369 $ hg -R ua branch @
370 marked working directory as branch @
370 marked working directory as branch @
371 $ hg -R ua commit -m 'created branch @'
371 $ hg -R ua commit -m 'created branch @'
372 $ hg clone ua atbranch
372 $ hg clone ua atbranch
373 updating to branch default
373 updating to branch default
374 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
374 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
375 $ hg -R atbranch heads
375 $ hg -R atbranch heads
376 changeset: 16:798b6d97153e
376 changeset: 16:798b6d97153e
377 branch: @
377 branch: @
378 tag: tip
378 tag: tip
379 parent: 12:f21241060d6a
379 parent: 12:f21241060d6a
380 user: test
380 user: test
381 date: Thu Jan 01 00:00:00 1970 +0000
381 date: Thu Jan 01 00:00:00 1970 +0000
382 summary: created branch @
382 summary: created branch @
383
383
384 changeset: 15:0aae7cf88f0d
384 changeset: 15:0aae7cf88f0d
385 branch: stable
385 branch: stable
386 user: test
386 user: test
387 date: Thu Jan 01 00:00:00 1970 +0000
387 date: Thu Jan 01 00:00:00 1970 +0000
388 summary: another change for branch stable
388 summary: another change for branch stable
389
389
390 changeset: 12:f21241060d6a
390 changeset: 12:f21241060d6a
391 user: test
391 user: test
392 date: Thu Jan 01 00:00:00 1970 +0000
392 date: Thu Jan 01 00:00:00 1970 +0000
393 summary: hacked default
393 summary: hacked default
394
394
395 $ hg -R atbranch parents
395 $ hg -R atbranch parents
396 changeset: 12:f21241060d6a
396 changeset: 12:f21241060d6a
397 user: test
397 user: test
398 date: Thu Jan 01 00:00:00 1970 +0000
398 date: Thu Jan 01 00:00:00 1970 +0000
399 summary: hacked default
399 summary: hacked default
400
400
401
401
402 $ rm -r ua atbranch
402 $ rm -r ua atbranch
403
403
404
404
405 Testing #<branch>:
405 Testing #<branch>:
406
406
407 $ hg clone -u . a#stable ua
407 $ hg clone -u . a#stable ua
408 adding changesets
408 adding changesets
409 adding manifests
409 adding manifests
410 adding file changes
410 adding file changes
411 added 14 changesets with 14 changes to 3 files
411 added 14 changesets with 14 changes to 3 files
412 updating to branch stable
412 updating to branch stable
413 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
413 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
414
414
415 Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6):
415 Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6):
416
416
417 $ hg -R ua heads
417 $ hg -R ua heads
418 changeset: 13:0aae7cf88f0d
418 changeset: 13:0aae7cf88f0d
419 branch: stable
419 branch: stable
420 tag: tip
420 tag: tip
421 user: test
421 user: test
422 date: Thu Jan 01 00:00:00 1970 +0000
422 date: Thu Jan 01 00:00:00 1970 +0000
423 summary: another change for branch stable
423 summary: another change for branch stable
424
424
425 changeset: 10:a7949464abda
425 changeset: 10:a7949464abda
426 user: test
426 user: test
427 date: Thu Jan 01 00:00:00 1970 +0000
427 date: Thu Jan 01 00:00:00 1970 +0000
428 summary: test
428 summary: test
429
429
430
430
431 Same revision checked out in repo a and ua:
431 Same revision checked out in repo a and ua:
432
432
433 $ hg -R a parents --template "{node|short}\n"
433 $ hg -R a parents --template "{node|short}\n"
434 e8ece76546a6
434 e8ece76546a6
435 $ hg -R ua parents --template "{node|short}\n"
435 $ hg -R ua parents --template "{node|short}\n"
436 e8ece76546a6
436 e8ece76546a6
437
437
438 $ rm -r ua
438 $ rm -r ua
439
439
440
440
441 Testing -u -r <branch>:
441 Testing -u -r <branch>:
442
442
443 $ hg clone -u . -r stable a ua
443 $ hg clone -u . -r stable a ua
444 adding changesets
444 adding changesets
445 adding manifests
445 adding manifests
446 adding file changes
446 adding file changes
447 added 14 changesets with 14 changes to 3 files
447 added 14 changesets with 14 changes to 3 files
448 updating to branch stable
448 updating to branch stable
449 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
449 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
450
450
451 Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6):
451 Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6):
452
452
453 $ hg -R ua heads
453 $ hg -R ua heads
454 changeset: 13:0aae7cf88f0d
454 changeset: 13:0aae7cf88f0d
455 branch: stable
455 branch: stable
456 tag: tip
456 tag: tip
457 user: test
457 user: test
458 date: Thu Jan 01 00:00:00 1970 +0000
458 date: Thu Jan 01 00:00:00 1970 +0000
459 summary: another change for branch stable
459 summary: another change for branch stable
460
460
461 changeset: 10:a7949464abda
461 changeset: 10:a7949464abda
462 user: test
462 user: test
463 date: Thu Jan 01 00:00:00 1970 +0000
463 date: Thu Jan 01 00:00:00 1970 +0000
464 summary: test
464 summary: test
465
465
466
466
467 Same revision checked out in repo a and ua:
467 Same revision checked out in repo a and ua:
468
468
469 $ hg -R a parents --template "{node|short}\n"
469 $ hg -R a parents --template "{node|short}\n"
470 e8ece76546a6
470 e8ece76546a6
471 $ hg -R ua parents --template "{node|short}\n"
471 $ hg -R ua parents --template "{node|short}\n"
472 e8ece76546a6
472 e8ece76546a6
473
473
474 $ rm -r ua
474 $ rm -r ua
475
475
476
476
477 Testing -r <branch>:
477 Testing -r <branch>:
478
478
479 $ hg clone -r stable a ua
479 $ hg clone -r stable a ua
480 adding changesets
480 adding changesets
481 adding manifests
481 adding manifests
482 adding file changes
482 adding file changes
483 added 14 changesets with 14 changes to 3 files
483 added 14 changesets with 14 changes to 3 files
484 updating to branch stable
484 updating to branch stable
485 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
485 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
486
486
487 Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6):
487 Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6):
488
488
489 $ hg -R ua heads
489 $ hg -R ua heads
490 changeset: 13:0aae7cf88f0d
490 changeset: 13:0aae7cf88f0d
491 branch: stable
491 branch: stable
492 tag: tip
492 tag: tip
493 user: test
493 user: test
494 date: Thu Jan 01 00:00:00 1970 +0000
494 date: Thu Jan 01 00:00:00 1970 +0000
495 summary: another change for branch stable
495 summary: another change for branch stable
496
496
497 changeset: 10:a7949464abda
497 changeset: 10:a7949464abda
498 user: test
498 user: test
499 date: Thu Jan 01 00:00:00 1970 +0000
499 date: Thu Jan 01 00:00:00 1970 +0000
500 summary: test
500 summary: test
501
501
502
502
503 Branch 'stable' is checked out:
503 Branch 'stable' is checked out:
504
504
505 $ hg -R ua parents
505 $ hg -R ua parents
506 changeset: 13:0aae7cf88f0d
506 changeset: 13:0aae7cf88f0d
507 branch: stable
507 branch: stable
508 tag: tip
508 tag: tip
509 user: test
509 user: test
510 date: Thu Jan 01 00:00:00 1970 +0000
510 date: Thu Jan 01 00:00:00 1970 +0000
511 summary: another change for branch stable
511 summary: another change for branch stable
512
512
513
513
514 $ rm -r ua
514 $ rm -r ua
515
515
516
516
517 Issue2267: Error in 1.6 hg.py: TypeError: 'NoneType' object is not
517 Issue2267: Error in 1.6 hg.py: TypeError: 'NoneType' object is not
518 iterable in addbranchrevs()
518 iterable in addbranchrevs()
519
519
520 $ cat <<EOF > simpleclone.py
520 $ cat <<EOF > simpleclone.py
521 > from mercurial import ui, hg
521 > from mercurial import ui, hg
522 > myui = ui.ui.load()
522 > myui = ui.ui.load()
523 > repo = hg.repository(myui, 'a')
523 > repo = hg.repository(myui, 'a')
524 > hg.clone(myui, {}, repo, dest="ua")
524 > hg.clone(myui, {}, repo, dest="ua")
525 > EOF
525 > EOF
526
526
527 $ $PYTHON simpleclone.py
527 $ $PYTHON simpleclone.py
528 updating to branch default
528 updating to branch default
529 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
529 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
530
530
531 $ rm -r ua
531 $ rm -r ua
532
532
533 $ cat <<EOF > branchclone.py
533 $ cat <<EOF > branchclone.py
534 > from mercurial import ui, hg, extensions
534 > from mercurial import ui, hg, extensions
535 > myui = ui.ui.load()
535 > myui = ui.ui.load()
536 > extensions.loadall(myui)
536 > extensions.loadall(myui)
537 > repo = hg.repository(myui, 'a')
537 > repo = hg.repository(myui, 'a')
538 > hg.clone(myui, {}, repo, dest="ua", branch=["stable",])
538 > hg.clone(myui, {}, repo, dest="ua", branch=["stable",])
539 > EOF
539 > EOF
540
540
541 $ $PYTHON branchclone.py
541 $ $PYTHON branchclone.py
542 adding changesets
542 adding changesets
543 adding manifests
543 adding manifests
544 adding file changes
544 adding file changes
545 added 14 changesets with 14 changes to 3 files
545 added 14 changesets with 14 changes to 3 files
546 updating to branch stable
546 updating to branch stable
547 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
547 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
548 $ rm -r ua
548 $ rm -r ua
549
549
550
550
551 Test clone with special '@' bookmark:
551 Test clone with special '@' bookmark:
552 $ cd a
552 $ cd a
553 $ hg bookmark -r a7949464abda @ # branch point of stable from default
553 $ hg bookmark -r a7949464abda @ # branch point of stable from default
554 $ hg clone . ../i
554 $ hg clone . ../i
555 updating to bookmark @
555 updating to bookmark @
556 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
556 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
557 $ hg id -i ../i
557 $ hg id -i ../i
558 a7949464abda
558 a7949464abda
559 $ rm -r ../i
559 $ rm -r ../i
560
560
561 $ hg bookmark -f -r stable @
561 $ hg bookmark -f -r stable @
562 $ hg bookmarks
562 $ hg bookmarks
563 @ 15:0aae7cf88f0d
563 @ 15:0aae7cf88f0d
564 $ hg clone . ../i
564 $ hg clone . ../i
565 updating to bookmark @ on branch stable
565 updating to bookmark @ on branch stable
566 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
566 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
567 $ hg id -i ../i
567 $ hg id -i ../i
568 0aae7cf88f0d
568 0aae7cf88f0d
569 $ cd "$TESTTMP"
569 $ cd "$TESTTMP"
570
570
571
571
572 Testing failures:
572 Testing failures:
573
573
574 $ mkdir fail
574 $ mkdir fail
575 $ cd fail
575 $ cd fail
576
576
577 No local source
577 No local source
578
578
579 $ hg clone a b
579 $ hg clone a b
580 abort: repository a not found!
580 abort: repository a not found!
581 [255]
581 [255]
582
582
583 No remote source
583 No remote source
584
584
585 #if windows
585 #if windows
586 $ hg clone http://$LOCALIP:3121/a b
586 $ hg clone http://$LOCALIP:3121/a b
587 abort: error: * (glob)
587 abort: error: * (glob)
588 [255]
588 [255]
589 #else
589 #else
590 $ hg clone http://$LOCALIP:3121/a b
590 $ hg clone http://$LOCALIP:3121/a b
591 abort: error: *refused* (glob)
591 abort: error: *refused* (glob)
592 [255]
592 [255]
593 #endif
593 #endif
594 $ rm -rf b # work around bug with http clone
594 $ rm -rf b # work around bug with http clone
595
595
596
596
597 #if unix-permissions no-root
597 #if unix-permissions no-root
598
598
599 Inaccessible source
599 Inaccessible source
600
600
601 $ mkdir a
601 $ mkdir a
602 $ chmod 000 a
602 $ chmod 000 a
603 $ hg clone a b
603 $ hg clone a b
604 abort: repository a not found!
604 abort: repository a not found!
605 [255]
605 [255]
606
606
607 Inaccessible destination
607 Inaccessible destination
608
608
609 $ hg init b
609 $ hg init b
610 $ cd b
610 $ cd b
611 $ hg clone . ../a
611 $ hg clone . ../a
612 abort: Permission denied: '../a'
612 abort: Permission denied: '../a'
613 [255]
613 [255]
614 $ cd ..
614 $ cd ..
615 $ chmod 700 a
615 $ chmod 700 a
616 $ rm -r a b
616 $ rm -r a b
617
617
618 #endif
618 #endif
619
619
620
620
621 #if fifo
621 #if fifo
622
622
623 Source of wrong type
623 Source of wrong type
624
624
625 $ mkfifo a
625 $ mkfifo a
626 $ hg clone a b
626 $ hg clone a b
627 abort: repository a not found!
627 abort: repository a not found!
628 [255]
628 [255]
629 $ rm a
629 $ rm a
630
630
631 #endif
631 #endif
632
632
633 Default destination, same directory
633 Default destination, same directory
634
634
635 $ hg init q
635 $ hg init q
636 $ hg clone q
636 $ hg clone q
637 destination directory: q
637 destination directory: q
638 abort: destination 'q' is not empty
638 abort: destination 'q' is not empty
639 [255]
639 [255]
640
640
641 destination directory not empty
641 destination directory not empty
642
642
643 $ mkdir a
643 $ mkdir a
644 $ echo stuff > a/a
644 $ echo stuff > a/a
645 $ hg clone q a
645 $ hg clone q a
646 abort: destination 'a' is not empty
646 abort: destination 'a' is not empty
647 [255]
647 [255]
648
648
649
649
650 #if unix-permissions no-root
650 #if unix-permissions no-root
651
651
652 leave existing directory in place after clone failure
652 leave existing directory in place after clone failure
653
653
654 $ hg init c
654 $ hg init c
655 $ cd c
655 $ cd c
656 $ echo c > c
656 $ echo c > c
657 $ hg commit -A -m test
657 $ hg commit -A -m test
658 adding c
658 adding c
659 $ chmod -rx .hg/store/data
659 $ chmod -rx .hg/store/data
660 $ cd ..
660 $ cd ..
661 $ mkdir d
661 $ mkdir d
662 $ hg clone c d 2> err
662 $ hg clone c d 2> err
663 [255]
663 [255]
664 $ test -d d
664 $ test -d d
665 $ test -d d/.hg
665 $ test -d d/.hg
666 [1]
666 [1]
667
667
668 re-enable perm to allow deletion
668 re-enable perm to allow deletion
669
669
670 $ chmod +rx c/.hg/store/data
670 $ chmod +rx c/.hg/store/data
671
671
672 #endif
672 #endif
673
673
674 $ cd ..
674 $ cd ..
675
675
676 Test clone from the repository in (emulated) revlog format 0 (issue4203):
676 Test clone from the repository in (emulated) revlog format 0 (issue4203):
677
677
678 $ mkdir issue4203
678 $ mkdir issue4203
679 $ mkdir -p src/.hg
679 $ mkdir -p src/.hg
680 $ echo foo > src/foo
680 $ echo foo > src/foo
681 $ hg -R src add src/foo
681 $ hg -R src add src/foo
682 $ hg -R src commit -m '#0'
682 $ hg -R src commit -m '#0'
683 $ hg -R src log -q
683 $ hg -R src log -q
684 0:e1bab28bca43
684 0:e1bab28bca43
685 $ hg clone -U -q src dst
685 $ hg clone -U -q src dst
686 $ hg -R dst log -q
686 $ hg -R dst log -q
687 0:e1bab28bca43
687 0:e1bab28bca43
688
688
689 Create repositories to test auto sharing functionality
689 Create repositories to test auto sharing functionality
690
690
691 $ cat >> $HGRCPATH << EOF
691 $ cat >> $HGRCPATH << EOF
692 > [extensions]
692 > [extensions]
693 > share=
693 > share=
694 > EOF
694 > EOF
695
695
696 $ hg init empty
696 $ hg init empty
697 $ hg init source1a
697 $ hg init source1a
698 $ cd source1a
698 $ cd source1a
699 $ echo initial1 > foo
699 $ echo initial1 > foo
700 $ hg -q commit -A -m initial
700 $ hg -q commit -A -m initial
701 $ echo second > foo
701 $ echo second > foo
702 $ hg commit -m second
702 $ hg commit -m second
703 $ cd ..
703 $ cd ..
704
704
705 $ hg init filteredrev0
705 $ hg init filteredrev0
706 $ cd filteredrev0
706 $ cd filteredrev0
707 $ cat >> .hg/hgrc << EOF
707 $ cat >> .hg/hgrc << EOF
708 > [experimental]
708 > [experimental]
709 > evolution=createmarkers
709 > evolution=createmarkers
710 > EOF
710 > EOF
711 $ echo initial1 > foo
711 $ echo initial1 > foo
712 $ hg -q commit -A -m initial0
712 $ hg -q commit -A -m initial0
713 $ hg -q up -r null
713 $ hg -q up -r null
714 $ echo initial2 > foo
714 $ echo initial2 > foo
715 $ hg -q commit -A -m initial1
715 $ hg -q commit -A -m initial1
716 $ hg debugobsolete c05d5c47a5cf81401869999f3d05f7d699d2b29a e082c1832e09a7d1e78b7fd49a592d372de854c8
716 $ hg debugobsolete c05d5c47a5cf81401869999f3d05f7d699d2b29a e082c1832e09a7d1e78b7fd49a592d372de854c8
717 $ cd ..
717 $ cd ..
718
718
719 $ hg -q clone --pull source1a source1b
719 $ hg -q clone --pull source1a source1b
720 $ cd source1a
720 $ cd source1a
721 $ hg bookmark bookA
721 $ hg bookmark bookA
722 $ echo 1a > foo
722 $ echo 1a > foo
723 $ hg commit -m 1a
723 $ hg commit -m 1a
724 $ cd ../source1b
724 $ cd ../source1b
725 $ hg -q up -r 0
725 $ hg -q up -r 0
726 $ echo head1 > foo
726 $ echo head1 > foo
727 $ hg commit -m head1
727 $ hg commit -m head1
728 created new head
728 created new head
729 $ hg bookmark head1
729 $ hg bookmark head1
730 $ hg -q up -r 0
730 $ hg -q up -r 0
731 $ echo head2 > foo
731 $ echo head2 > foo
732 $ hg commit -m head2
732 $ hg commit -m head2
733 created new head
733 created new head
734 $ hg bookmark head2
734 $ hg bookmark head2
735 $ hg -q up -r 0
735 $ hg -q up -r 0
736 $ hg branch branch1
736 $ hg branch branch1
737 marked working directory as branch branch1
737 marked working directory as branch branch1
738 (branches are permanent and global, did you want a bookmark?)
738 (branches are permanent and global, did you want a bookmark?)
739 $ echo branch1 > foo
739 $ echo branch1 > foo
740 $ hg commit -m branch1
740 $ hg commit -m branch1
741 $ hg -q up -r 0
741 $ hg -q up -r 0
742 $ hg branch branch2
742 $ hg branch branch2
743 marked working directory as branch branch2
743 marked working directory as branch branch2
744 $ echo branch2 > foo
744 $ echo branch2 > foo
745 $ hg commit -m branch2
745 $ hg commit -m branch2
746 $ cd ..
746 $ cd ..
747 $ hg init source2
747 $ hg init source2
748 $ cd source2
748 $ cd source2
749 $ echo initial2 > foo
749 $ echo initial2 > foo
750 $ hg -q commit -A -m initial2
750 $ hg -q commit -A -m initial2
751 $ echo second > foo
751 $ echo second > foo
752 $ hg commit -m second
752 $ hg commit -m second
753 $ cd ..
753 $ cd ..
754
754
755 Clone with auto share from an empty repo should not result in share
755 Clone with auto share from an empty repo should not result in share
756
756
757 $ mkdir share
757 $ mkdir share
758 $ hg --config share.pool=share clone empty share-empty
758 $ hg --config share.pool=share clone empty share-empty
759 (not using pooled storage: remote appears to be empty)
759 (not using pooled storage: remote appears to be empty)
760 updating to branch default
760 updating to branch default
761 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
761 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
762 $ ls share
762 $ ls share
763 $ test -d share-empty/.hg/store
763 $ test -d share-empty/.hg/store
764 $ test -f share-empty/.hg/sharedpath
764 $ test -f share-empty/.hg/sharedpath
765 [1]
765 [1]
766
766
767 Clone with auto share from a repo with filtered revision 0 should not result in share
767 Clone with auto share from a repo with filtered revision 0 should not result in share
768
768
769 $ hg --config share.pool=share clone filteredrev0 share-filtered
769 $ hg --config share.pool=share clone filteredrev0 share-filtered
770 (not using pooled storage: unable to resolve identity of remote)
770 (not using pooled storage: unable to resolve identity of remote)
771 requesting all changes
771 requesting all changes
772 adding changesets
772 adding changesets
773 adding manifests
773 adding manifests
774 adding file changes
774 adding file changes
775 added 1 changesets with 1 changes to 1 files
775 added 1 changesets with 1 changes to 1 files
776 updating to branch default
776 updating to branch default
777 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
777 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
778
778
779 Clone from repo with content should result in shared store being created
779 Clone from repo with content should result in shared store being created
780
780
781 $ hg --config share.pool=share clone source1a share-dest1a
781 $ hg --config share.pool=share clone source1a share-dest1a
782 (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
782 (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
783 requesting all changes
783 requesting all changes
784 adding changesets
784 adding changesets
785 adding manifests
785 adding manifests
786 adding file changes
786 adding file changes
787 added 3 changesets with 3 changes to 1 files
787 added 3 changesets with 3 changes to 1 files
788 searching for changes
788 searching for changes
789 no changes found
789 no changes found
790 adding remote bookmark bookA
790 adding remote bookmark bookA
791 updating working directory
791 updating working directory
792 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
792 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
793
793
794 The shared repo should have been created
794 The shared repo should have been created
795
795
796 $ ls share
796 $ ls share
797 b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1
797 b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1
798
798
799 The destination should point to it
799 The destination should point to it
800
800
801 $ cat share-dest1a/.hg/sharedpath; echo
801 $ cat share-dest1a/.hg/sharedpath; echo
802 $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg (glob)
802 $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg (glob)
803
803
804 The destination should have bookmarks
804 The destination should have bookmarks
805
805
806 $ hg -R share-dest1a bookmarks
806 $ hg -R share-dest1a bookmarks
807 bookA 2:e5bfe23c0b47
807 bookA 2:e5bfe23c0b47
808
808
809 The default path should be the remote, not the share
809 The default path should be the remote, not the share
810
810
811 $ hg -R share-dest1a config paths.default
811 $ hg -R share-dest1a config paths.default
812 $TESTTMP/source1a (glob)
812 $TESTTMP/source1a (glob)
813
813
814 Clone with existing share dir should result in pull + share
814 Clone with existing share dir should result in pull + share
815
815
816 $ hg --config share.pool=share clone source1b share-dest1b
816 $ hg --config share.pool=share clone source1b share-dest1b
817 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
817 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
818 searching for changes
818 searching for changes
819 adding changesets
819 adding changesets
820 adding manifests
820 adding manifests
821 adding file changes
821 adding file changes
822 added 4 changesets with 4 changes to 1 files (+4 heads)
822 added 4 changesets with 4 changes to 1 files (+4 heads)
823 adding remote bookmark head1
823 adding remote bookmark head1
824 adding remote bookmark head2
824 adding remote bookmark head2
825 updating working directory
825 updating working directory
826 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
826 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
827
827
828 $ ls share
828 $ ls share
829 b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1
829 b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1
830
830
831 $ cat share-dest1b/.hg/sharedpath; echo
831 $ cat share-dest1b/.hg/sharedpath; echo
832 $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg (glob)
832 $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg (glob)
833
833
834 We only get bookmarks from the remote, not everything in the share
834 We only get bookmarks from the remote, not everything in the share
835
835
836 $ hg -R share-dest1b bookmarks
836 $ hg -R share-dest1b bookmarks
837 head1 3:4a8dc1ab4c13
837 head1 3:4a8dc1ab4c13
838 head2 4:99f71071f117
838 head2 4:99f71071f117
839
839
840 Default path should be source, not share.
840 Default path should be source, not share.
841
841
842 $ hg -R share-dest1b config paths.default
842 $ hg -R share-dest1b config paths.default
843 $TESTTMP/source1b (glob)
843 $TESTTMP/source1b (glob)
844
844
845 Checked out revision should be head of default branch
845 Checked out revision should be head of default branch
846
846
847 $ hg -R share-dest1b log -r .
847 $ hg -R share-dest1b log -r .
848 changeset: 4:99f71071f117
848 changeset: 4:99f71071f117
849 bookmark: head2
849 bookmark: head2
850 parent: 0:b5f04eac9d8f
850 parent: 0:b5f04eac9d8f
851 user: test
851 user: test
852 date: Thu Jan 01 00:00:00 1970 +0000
852 date: Thu Jan 01 00:00:00 1970 +0000
853 summary: head2
853 summary: head2
854
854
855
855
856 Clone from unrelated repo should result in new share
856 Clone from unrelated repo should result in new share
857
857
858 $ hg --config share.pool=share clone source2 share-dest2
858 $ hg --config share.pool=share clone source2 share-dest2
859 (sharing from new pooled repository 22aeff664783fd44c6d9b435618173c118c3448e)
859 (sharing from new pooled repository 22aeff664783fd44c6d9b435618173c118c3448e)
860 requesting all changes
860 requesting all changes
861 adding changesets
861 adding changesets
862 adding manifests
862 adding manifests
863 adding file changes
863 adding file changes
864 added 2 changesets with 2 changes to 1 files
864 added 2 changesets with 2 changes to 1 files
865 searching for changes
865 searching for changes
866 no changes found
866 no changes found
867 updating working directory
867 updating working directory
868 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
868 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
869
869
870 $ ls share
870 $ ls share
871 22aeff664783fd44c6d9b435618173c118c3448e
871 22aeff664783fd44c6d9b435618173c118c3448e
872 b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1
872 b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1
873
873
874 remote naming mode works as advertised
874 remote naming mode works as advertised
875
875
876 $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1a share-remote1a
876 $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1a share-remote1a
877 (sharing from new pooled repository 195bb1fcdb595c14a6c13e0269129ed78f6debde)
877 (sharing from new pooled repository 195bb1fcdb595c14a6c13e0269129ed78f6debde)
878 requesting all changes
878 requesting all changes
879 adding changesets
879 adding changesets
880 adding manifests
880 adding manifests
881 adding file changes
881 adding file changes
882 added 3 changesets with 3 changes to 1 files
882 added 3 changesets with 3 changes to 1 files
883 searching for changes
883 searching for changes
884 no changes found
884 no changes found
885 adding remote bookmark bookA
885 adding remote bookmark bookA
886 updating working directory
886 updating working directory
887 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
887 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
888
888
889 $ ls shareremote
889 $ ls shareremote
890 195bb1fcdb595c14a6c13e0269129ed78f6debde
890 195bb1fcdb595c14a6c13e0269129ed78f6debde
891
891
892 $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1b share-remote1b
892 $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1b share-remote1b
893 (sharing from new pooled repository c0d4f83847ca2a873741feb7048a45085fd47c46)
893 (sharing from new pooled repository c0d4f83847ca2a873741feb7048a45085fd47c46)
894 requesting all changes
894 requesting all changes
895 adding changesets
895 adding changesets
896 adding manifests
896 adding manifests
897 adding file changes
897 adding file changes
898 added 6 changesets with 6 changes to 1 files (+4 heads)
898 added 6 changesets with 6 changes to 1 files (+4 heads)
899 searching for changes
899 searching for changes
900 no changes found
900 no changes found
901 adding remote bookmark head1
901 adding remote bookmark head1
902 adding remote bookmark head2
902 adding remote bookmark head2
903 updating working directory
903 updating working directory
904 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
904 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
905
905
906 $ ls shareremote
906 $ ls shareremote
907 195bb1fcdb595c14a6c13e0269129ed78f6debde
907 195bb1fcdb595c14a6c13e0269129ed78f6debde
908 c0d4f83847ca2a873741feb7048a45085fd47c46
908 c0d4f83847ca2a873741feb7048a45085fd47c46
909
909
910 request to clone a single revision is respected in sharing mode
910 request to clone a single revision is respected in sharing mode
911
911
912 $ hg --config share.pool=sharerevs clone -r 4a8dc1ab4c13 source1b share-1arev
912 $ hg --config share.pool=sharerevs clone -r 4a8dc1ab4c13 source1b share-1arev
913 (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
913 (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
914 adding changesets
914 adding changesets
915 adding manifests
915 adding manifests
916 adding file changes
916 adding file changes
917 added 2 changesets with 2 changes to 1 files
917 added 2 changesets with 2 changes to 1 files
918 no changes found
918 no changes found
919 adding remote bookmark head1
919 adding remote bookmark head1
920 updating working directory
920 updating working directory
921 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
921 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
922
922
923 $ hg -R share-1arev log -G
923 $ hg -R share-1arev log -G
924 @ changeset: 1:4a8dc1ab4c13
924 @ changeset: 1:4a8dc1ab4c13
925 | bookmark: head1
925 | bookmark: head1
926 | tag: tip
926 | tag: tip
927 | user: test
927 | user: test
928 | date: Thu Jan 01 00:00:00 1970 +0000
928 | date: Thu Jan 01 00:00:00 1970 +0000
929 | summary: head1
929 | summary: head1
930 |
930 |
931 o changeset: 0:b5f04eac9d8f
931 o changeset: 0:b5f04eac9d8f
932 user: test
932 user: test
933 date: Thu Jan 01 00:00:00 1970 +0000
933 date: Thu Jan 01 00:00:00 1970 +0000
934 summary: initial
934 summary: initial
935
935
936
936
937 making another clone should only pull down requested rev
937 making another clone should only pull down requested rev
938
938
939 $ hg --config share.pool=sharerevs clone -r 99f71071f117 source1b share-1brev
939 $ hg --config share.pool=sharerevs clone -r 99f71071f117 source1b share-1brev
940 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
940 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
941 searching for changes
941 searching for changes
942 adding changesets
942 adding changesets
943 adding manifests
943 adding manifests
944 adding file changes
944 adding file changes
945 added 1 changesets with 1 changes to 1 files (+1 heads)
945 added 1 changesets with 1 changes to 1 files (+1 heads)
946 adding remote bookmark head1
946 adding remote bookmark head1
947 adding remote bookmark head2
947 adding remote bookmark head2
948 updating working directory
948 updating working directory
949 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
949 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
950
950
951 $ hg -R share-1brev log -G
951 $ hg -R share-1brev log -G
952 @ changeset: 2:99f71071f117
952 @ changeset: 2:99f71071f117
953 | bookmark: head2
953 | bookmark: head2
954 | tag: tip
954 | tag: tip
955 | parent: 0:b5f04eac9d8f
955 | parent: 0:b5f04eac9d8f
956 | user: test
956 | user: test
957 | date: Thu Jan 01 00:00:00 1970 +0000
957 | date: Thu Jan 01 00:00:00 1970 +0000
958 | summary: head2
958 | summary: head2
959 |
959 |
960 | o changeset: 1:4a8dc1ab4c13
960 | o changeset: 1:4a8dc1ab4c13
961 |/ bookmark: head1
961 |/ bookmark: head1
962 | user: test
962 | user: test
963 | date: Thu Jan 01 00:00:00 1970 +0000
963 | date: Thu Jan 01 00:00:00 1970 +0000
964 | summary: head1
964 | summary: head1
965 |
965 |
966 o changeset: 0:b5f04eac9d8f
966 o changeset: 0:b5f04eac9d8f
967 user: test
967 user: test
968 date: Thu Jan 01 00:00:00 1970 +0000
968 date: Thu Jan 01 00:00:00 1970 +0000
969 summary: initial
969 summary: initial
970
970
971
971
972 Request to clone a single branch is respected in sharing mode
972 Request to clone a single branch is respected in sharing mode
973
973
974 $ hg --config share.pool=sharebranch clone -b branch1 source1b share-1bbranch1
974 $ hg --config share.pool=sharebranch clone -b branch1 source1b share-1bbranch1
975 (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
975 (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
976 adding changesets
976 adding changesets
977 adding manifests
977 adding manifests
978 adding file changes
978 adding file changes
979 added 2 changesets with 2 changes to 1 files
979 added 2 changesets with 2 changes to 1 files
980 no changes found
980 no changes found
981 updating working directory
981 updating working directory
982 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
982 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
983
983
984 $ hg -R share-1bbranch1 log -G
984 $ hg -R share-1bbranch1 log -G
985 o changeset: 1:5f92a6c1a1b1
985 o changeset: 1:5f92a6c1a1b1
986 | branch: branch1
986 | branch: branch1
987 | tag: tip
987 | tag: tip
988 | user: test
988 | user: test
989 | date: Thu Jan 01 00:00:00 1970 +0000
989 | date: Thu Jan 01 00:00:00 1970 +0000
990 | summary: branch1
990 | summary: branch1
991 |
991 |
992 @ changeset: 0:b5f04eac9d8f
992 @ changeset: 0:b5f04eac9d8f
993 user: test
993 user: test
994 date: Thu Jan 01 00:00:00 1970 +0000
994 date: Thu Jan 01 00:00:00 1970 +0000
995 summary: initial
995 summary: initial
996
996
997
997
998 $ hg --config share.pool=sharebranch clone -b branch2 source1b share-1bbranch2
998 $ hg --config share.pool=sharebranch clone -b branch2 source1b share-1bbranch2
999 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
999 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
1000 searching for changes
1000 searching for changes
1001 adding changesets
1001 adding changesets
1002 adding manifests
1002 adding manifests
1003 adding file changes
1003 adding file changes
1004 added 1 changesets with 1 changes to 1 files (+1 heads)
1004 added 1 changesets with 1 changes to 1 files (+1 heads)
1005 updating working directory
1005 updating working directory
1006 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1006 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1007
1007
1008 $ hg -R share-1bbranch2 log -G
1008 $ hg -R share-1bbranch2 log -G
1009 o changeset: 2:6bacf4683960
1009 o changeset: 2:6bacf4683960
1010 | branch: branch2
1010 | branch: branch2
1011 | tag: tip
1011 | tag: tip
1012 | parent: 0:b5f04eac9d8f
1012 | parent: 0:b5f04eac9d8f
1013 | user: test
1013 | user: test
1014 | date: Thu Jan 01 00:00:00 1970 +0000
1014 | date: Thu Jan 01 00:00:00 1970 +0000
1015 | summary: branch2
1015 | summary: branch2
1016 |
1016 |
1017 | o changeset: 1:5f92a6c1a1b1
1017 | o changeset: 1:5f92a6c1a1b1
1018 |/ branch: branch1
1018 |/ branch: branch1
1019 | user: test
1019 | user: test
1020 | date: Thu Jan 01 00:00:00 1970 +0000
1020 | date: Thu Jan 01 00:00:00 1970 +0000
1021 | summary: branch1
1021 | summary: branch1
1022 |
1022 |
1023 @ changeset: 0:b5f04eac9d8f
1023 @ changeset: 0:b5f04eac9d8f
1024 user: test
1024 user: test
1025 date: Thu Jan 01 00:00:00 1970 +0000
1025 date: Thu Jan 01 00:00:00 1970 +0000
1026 summary: initial
1026 summary: initial
1027
1027
1028
1028
1029 -U is respected in share clone mode
1029 -U is respected in share clone mode
1030
1030
1031 $ hg --config share.pool=share clone -U source1a share-1anowc
1031 $ hg --config share.pool=share clone -U source1a share-1anowc
1032 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
1032 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
1033 searching for changes
1033 searching for changes
1034 no changes found
1034 no changes found
1035 adding remote bookmark bookA
1035 adding remote bookmark bookA
1036
1036
1037 $ ls share-1anowc
1037 $ ls share-1anowc
1038
1038
1039 Test that auto sharing doesn't cause failure of "hg clone local remote"
1039 Test that auto sharing doesn't cause failure of "hg clone local remote"
1040
1040
1041 $ cd $TESTTMP
1041 $ cd $TESTTMP
1042 $ hg -R a id -r 0
1042 $ hg -R a id -r 0
1043 acb14030fe0a
1043 acb14030fe0a
1044 $ hg id -R remote -r 0
1044 $ hg id -R remote -r 0
1045 abort: repository remote not found!
1045 abort: repository remote not found!
1046 [255]
1046 [255]
1047 $ hg --config share.pool=share -q clone -e "$PYTHON \"$TESTDIR/dummyssh\"" a ssh://user@dummy/remote
1047 $ hg --config share.pool=share -q clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" a ssh://user@dummy/remote
1048 $ hg -R remote id -r 0
1048 $ hg -R remote id -r 0
1049 acb14030fe0a
1049 acb14030fe0a
1050
1050
1051 Cloning into pooled storage doesn't race (issue5104)
1051 Cloning into pooled storage doesn't race (issue5104)
1052
1052
1053 $ HGPOSTLOCKDELAY=2.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace1 > race1.log 2>&1 &
1053 $ HGPOSTLOCKDELAY=2.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace1 > race1.log 2>&1 &
1054 $ HGPRELOCKDELAY=1.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace2 > race2.log 2>&1
1054 $ HGPRELOCKDELAY=1.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace2 > race2.log 2>&1
1055 $ wait
1055 $ wait
1056
1056
1057 $ hg -R share-destrace1 log -r tip
1057 $ hg -R share-destrace1 log -r tip
1058 changeset: 2:e5bfe23c0b47
1058 changeset: 2:e5bfe23c0b47
1059 bookmark: bookA
1059 bookmark: bookA
1060 tag: tip
1060 tag: tip
1061 user: test
1061 user: test
1062 date: Thu Jan 01 00:00:00 1970 +0000
1062 date: Thu Jan 01 00:00:00 1970 +0000
1063 summary: 1a
1063 summary: 1a
1064
1064
1065
1065
1066 $ hg -R share-destrace2 log -r tip
1066 $ hg -R share-destrace2 log -r tip
1067 changeset: 2:e5bfe23c0b47
1067 changeset: 2:e5bfe23c0b47
1068 bookmark: bookA
1068 bookmark: bookA
1069 tag: tip
1069 tag: tip
1070 user: test
1070 user: test
1071 date: Thu Jan 01 00:00:00 1970 +0000
1071 date: Thu Jan 01 00:00:00 1970 +0000
1072 summary: 1a
1072 summary: 1a
1073
1073
1074 One repo should be new, the other should be shared from the pool. We
1074 One repo should be new, the other should be shared from the pool. We
1075 don't care which is which, so we just make sure we always print the
1075 don't care which is which, so we just make sure we always print the
1076 one containing "new pooled" first, then one one containing "existing
1076 one containing "new pooled" first, then one one containing "existing
1077 pooled".
1077 pooled".
1078
1078
1079 $ (grep 'new pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock
1079 $ (grep 'new pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock
1080 (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
1080 (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
1081 requesting all changes
1081 requesting all changes
1082 adding changesets
1082 adding changesets
1083 adding manifests
1083 adding manifests
1084 adding file changes
1084 adding file changes
1085 added 3 changesets with 3 changes to 1 files
1085 added 3 changesets with 3 changes to 1 files
1086 searching for changes
1086 searching for changes
1087 no changes found
1087 no changes found
1088 adding remote bookmark bookA
1088 adding remote bookmark bookA
1089 updating working directory
1089 updating working directory
1090 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1090 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1091
1091
1092 $ (grep 'existing pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock
1092 $ (grep 'existing pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock
1093 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
1093 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
1094 searching for changes
1094 searching for changes
1095 no changes found
1095 no changes found
1096 adding remote bookmark bookA
1096 adding remote bookmark bookA
1097 updating working directory
1097 updating working directory
1098 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1098 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -1,433 +1,433
1 Set up a server
1 Set up a server
2
2
3 $ cat >> $HGRCPATH << EOF
3 $ cat >> $HGRCPATH << EOF
4 > [format]
4 > [format]
5 > usegeneraldelta=yes
5 > usegeneraldelta=yes
6 > EOF
6 > EOF
7 $ hg init server
7 $ hg init server
8 $ cd server
8 $ cd server
9 $ cat >> .hg/hgrc << EOF
9 $ cat >> .hg/hgrc << EOF
10 > [extensions]
10 > [extensions]
11 > clonebundles =
11 > clonebundles =
12 > EOF
12 > EOF
13
13
14 $ touch foo
14 $ touch foo
15 $ hg -q commit -A -m 'add foo'
15 $ hg -q commit -A -m 'add foo'
16 $ touch bar
16 $ touch bar
17 $ hg -q commit -A -m 'add bar'
17 $ hg -q commit -A -m 'add bar'
18
18
19 $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
19 $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
20 $ cat hg.pid >> $DAEMON_PIDS
20 $ cat hg.pid >> $DAEMON_PIDS
21 $ cd ..
21 $ cd ..
22
22
23 Missing manifest should not result in server lookup
23 Missing manifest should not result in server lookup
24
24
25 $ hg --verbose clone -U http://localhost:$HGPORT no-manifest
25 $ hg --verbose clone -U http://localhost:$HGPORT no-manifest
26 requesting all changes
26 requesting all changes
27 adding changesets
27 adding changesets
28 adding manifests
28 adding manifests
29 adding file changes
29 adding file changes
30 added 2 changesets with 2 changes to 2 files
30 added 2 changesets with 2 changes to 2 files
31
31
32 $ cat server/access.log
32 $ cat server/access.log
33 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
33 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
34 * - - [*] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
34 * - - [*] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
35 * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=aaff8d2ffbbf07a46dd1f05d8ae7877e3f56e2a2&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
35 * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=aaff8d2ffbbf07a46dd1f05d8ae7877e3f56e2a2&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
36
36
37 Empty manifest file results in retrieval
37 Empty manifest file results in retrieval
38 (the extension only checks if the manifest file exists)
38 (the extension only checks if the manifest file exists)
39
39
40 $ touch server/.hg/clonebundles.manifest
40 $ touch server/.hg/clonebundles.manifest
41 $ hg --verbose clone -U http://localhost:$HGPORT empty-manifest
41 $ hg --verbose clone -U http://localhost:$HGPORT empty-manifest
42 no clone bundles available on remote; falling back to regular clone
42 no clone bundles available on remote; falling back to regular clone
43 requesting all changes
43 requesting all changes
44 adding changesets
44 adding changesets
45 adding manifests
45 adding manifests
46 adding file changes
46 adding file changes
47 added 2 changesets with 2 changes to 2 files
47 added 2 changesets with 2 changes to 2 files
48
48
49 Manifest file with invalid URL aborts
49 Manifest file with invalid URL aborts
50
50
51 $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest
51 $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest
52 $ hg clone http://localhost:$HGPORT 404-url
52 $ hg clone http://localhost:$HGPORT 404-url
53 applying clone bundle from http://does.not.exist/bundle.hg
53 applying clone bundle from http://does.not.exist/bundle.hg
54 error fetching bundle: (.* not known|No address associated with hostname) (re) (no-windows !)
54 error fetching bundle: (.* not known|No address associated with hostname) (re) (no-windows !)
55 error fetching bundle: [Errno 11004] getaddrinfo failed (windows !)
55 error fetching bundle: [Errno 11004] getaddrinfo failed (windows !)
56 abort: error applying bundle
56 abort: error applying bundle
57 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
57 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
58 [255]
58 [255]
59
59
60 Server is not running aborts
60 Server is not running aborts
61
61
62 $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest
62 $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest
63 $ hg clone http://localhost:$HGPORT server-not-runner
63 $ hg clone http://localhost:$HGPORT server-not-runner
64 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
64 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
65 error fetching bundle: (.* refused.*|Protocol not supported|(.* )?Cannot assign requested address) (re)
65 error fetching bundle: (.* refused.*|Protocol not supported|(.* )?Cannot assign requested address) (re)
66 abort: error applying bundle
66 abort: error applying bundle
67 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
67 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
68 [255]
68 [255]
69
69
70 Server returns 404
70 Server returns 404
71
71
72 $ $PYTHON $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid
72 $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid
73 $ cat http.pid >> $DAEMON_PIDS
73 $ cat http.pid >> $DAEMON_PIDS
74 $ hg clone http://localhost:$HGPORT running-404
74 $ hg clone http://localhost:$HGPORT running-404
75 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
75 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
76 HTTP error fetching bundle: HTTP Error 404: File not found
76 HTTP error fetching bundle: HTTP Error 404: File not found
77 abort: error applying bundle
77 abort: error applying bundle
78 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
78 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
79 [255]
79 [255]
80
80
81 We can override failure to fall back to regular clone
81 We can override failure to fall back to regular clone
82
82
83 $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback
83 $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback
84 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
84 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
85 HTTP error fetching bundle: HTTP Error 404: File not found
85 HTTP error fetching bundle: HTTP Error 404: File not found
86 falling back to normal clone
86 falling back to normal clone
87 requesting all changes
87 requesting all changes
88 adding changesets
88 adding changesets
89 adding manifests
89 adding manifests
90 adding file changes
90 adding file changes
91 added 2 changesets with 2 changes to 2 files
91 added 2 changesets with 2 changes to 2 files
92
92
93 Bundle with partial content works
93 Bundle with partial content works
94
94
95 $ hg -R server bundle --type gzip-v1 --base null -r 53245c60e682 partial.hg
95 $ hg -R server bundle --type gzip-v1 --base null -r 53245c60e682 partial.hg
96 1 changesets found
96 1 changesets found
97
97
98 We verify exact bundle content as an extra check against accidental future
98 We verify exact bundle content as an extra check against accidental future
99 changes. If this output changes, we could break old clients.
99 changes. If this output changes, we could break old clients.
100
100
101 $ f --size --hexdump partial.hg
101 $ f --size --hexdump partial.hg
102 partial.hg: size=207
102 partial.hg: size=207
103 0000: 48 47 31 30 47 5a 78 9c 63 60 60 98 17 ac 12 93 |HG10GZx.c``.....|
103 0000: 48 47 31 30 47 5a 78 9c 63 60 60 98 17 ac 12 93 |HG10GZx.c``.....|
104 0010: f0 ac a9 23 45 70 cb bf 0d 5f 59 4e 4a 7f 79 21 |...#Ep..._YNJ.y!|
104 0010: f0 ac a9 23 45 70 cb bf 0d 5f 59 4e 4a 7f 79 21 |...#Ep..._YNJ.y!|
105 0020: 9b cc 40 24 20 a0 d7 ce 2c d1 38 25 cd 24 25 d5 |..@$ ...,.8%.$%.|
105 0020: 9b cc 40 24 20 a0 d7 ce 2c d1 38 25 cd 24 25 d5 |..@$ ...,.8%.$%.|
106 0030: d8 c2 22 cd 38 d9 24 cd 22 d5 c8 22 cd 24 cd 32 |..".8.$."..".$.2|
106 0030: d8 c2 22 cd 38 d9 24 cd 22 d5 c8 22 cd 24 cd 32 |..".8.$."..".$.2|
107 0040: d1 c2 d0 c4 c8 d2 32 d1 38 39 29 c9 34 cd d4 80 |......2.89).4...|
107 0040: d1 c2 d0 c4 c8 d2 32 d1 38 39 29 c9 34 cd d4 80 |......2.89).4...|
108 0050: ab 24 b5 b8 84 cb 40 c1 80 2b 2d 3f 9f 8b 2b 31 |.$....@..+-?..+1|
108 0050: ab 24 b5 b8 84 cb 40 c1 80 2b 2d 3f 9f 8b 2b 31 |.$....@..+-?..+1|
109 0060: 25 45 01 c8 80 9a d2 9b 65 fb e5 9e 45 bf 8d 7f |%E......e...E...|
109 0060: 25 45 01 c8 80 9a d2 9b 65 fb e5 9e 45 bf 8d 7f |%E......e...E...|
110 0070: 9f c6 97 9f 2b 44 34 67 d9 ec 8e 0f a0 92 0b 75 |....+D4g.......u|
110 0070: 9f c6 97 9f 2b 44 34 67 d9 ec 8e 0f a0 92 0b 75 |....+D4g.......u|
111 0080: 41 d6 24 59 18 a4 a4 9a a6 18 1a 5b 98 9b 5a 98 |A.$Y.......[..Z.|
111 0080: 41 d6 24 59 18 a4 a4 9a a6 18 1a 5b 98 9b 5a 98 |A.$Y.......[..Z.|
112 0090: 9a 18 26 9b a6 19 98 1a 99 99 26 a6 18 9a 98 24 |..&.......&....$|
112 0090: 9a 18 26 9b a6 19 98 1a 99 99 26 a6 18 9a 98 24 |..&.......&....$|
113 00a0: 26 59 a6 25 5a 98 a5 18 a6 24 71 41 35 b1 43 dc |&Y.%Z....$qA5.C.|
113 00a0: 26 59 a6 25 5a 98 a5 18 a6 24 71 41 35 b1 43 dc |&Y.%Z....$qA5.C.|
114 00b0: 16 b2 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 d7 8a |.....E..V....R..|
114 00b0: 16 b2 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 d7 8a |.....E..V....R..|
115 00c0: 78 ed fc d5 76 f1 36 35 dc 05 00 36 ed 5e c7 |x...v.65...6.^.|
115 00c0: 78 ed fc d5 76 f1 36 35 dc 05 00 36 ed 5e c7 |x...v.65...6.^.|
116
116
117 $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest
117 $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest
118 $ hg clone -U http://localhost:$HGPORT partial-bundle
118 $ hg clone -U http://localhost:$HGPORT partial-bundle
119 applying clone bundle from http://localhost:$HGPORT1/partial.hg
119 applying clone bundle from http://localhost:$HGPORT1/partial.hg
120 adding changesets
120 adding changesets
121 adding manifests
121 adding manifests
122 adding file changes
122 adding file changes
123 added 1 changesets with 1 changes to 1 files
123 added 1 changesets with 1 changes to 1 files
124 finished applying clone bundle
124 finished applying clone bundle
125 searching for changes
125 searching for changes
126 adding changesets
126 adding changesets
127 adding manifests
127 adding manifests
128 adding file changes
128 adding file changes
129 added 1 changesets with 1 changes to 1 files
129 added 1 changesets with 1 changes to 1 files
130
130
131 Incremental pull doesn't fetch bundle
131 Incremental pull doesn't fetch bundle
132
132
133 $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone
133 $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone
134 adding changesets
134 adding changesets
135 adding manifests
135 adding manifests
136 adding file changes
136 adding file changes
137 added 1 changesets with 1 changes to 1 files
137 added 1 changesets with 1 changes to 1 files
138
138
139 $ cd partial-clone
139 $ cd partial-clone
140 $ hg pull
140 $ hg pull
141 pulling from http://localhost:$HGPORT/
141 pulling from http://localhost:$HGPORT/
142 searching for changes
142 searching for changes
143 adding changesets
143 adding changesets
144 adding manifests
144 adding manifests
145 adding file changes
145 adding file changes
146 added 1 changesets with 1 changes to 1 files
146 added 1 changesets with 1 changes to 1 files
147 (run 'hg update' to get a working copy)
147 (run 'hg update' to get a working copy)
148 $ cd ..
148 $ cd ..
149
149
150 Bundle with full content works
150 Bundle with full content works
151
151
152 $ hg -R server bundle --type gzip-v2 --base null -r tip full.hg
152 $ hg -R server bundle --type gzip-v2 --base null -r tip full.hg
153 2 changesets found
153 2 changesets found
154
154
155 Again, we perform an extra check against bundle content changes. If this content
155 Again, we perform an extra check against bundle content changes. If this content
156 changes, clone bundles produced by new Mercurial versions may not be readable
156 changes, clone bundles produced by new Mercurial versions may not be readable
157 by old clients.
157 by old clients.
158
158
159 $ f --size --hexdump full.hg
159 $ f --size --hexdump full.hg
160 full.hg: size=396
160 full.hg: size=396
161 0000: 48 47 32 30 00 00 00 0e 43 6f 6d 70 72 65 73 73 |HG20....Compress|
161 0000: 48 47 32 30 00 00 00 0e 43 6f 6d 70 72 65 73 73 |HG20....Compress|
162 0010: 69 6f 6e 3d 47 5a 78 9c 63 60 60 d0 e4 76 f6 70 |ion=GZx.c``..v.p|
162 0010: 69 6f 6e 3d 47 5a 78 9c 63 60 60 d0 e4 76 f6 70 |ion=GZx.c``..v.p|
163 0020: f4 73 77 75 0f f2 0f 0d 60 00 02 46 46 76 26 4e |.swu....`..FFv&N|
163 0020: f4 73 77 75 0f f2 0f 0d 60 00 02 46 46 76 26 4e |.swu....`..FFv&N|
164 0030: c6 b2 d4 a2 e2 cc fc 3c 03 a3 bc a4 e4 8c c4 bc |.......<........|
164 0030: c6 b2 d4 a2 e2 cc fc 3c 03 a3 bc a4 e4 8c c4 bc |.......<........|
165 0040: f4 d4 62 23 06 06 e6 19 40 f9 4d c1 2a 31 09 cf |..b#....@.M.*1..|
165 0040: f4 d4 62 23 06 06 e6 19 40 f9 4d c1 2a 31 09 cf |..b#....@.M.*1..|
166 0050: 9a 3a 52 04 b7 fc db f0 95 e5 a4 f4 97 17 b2 c9 |.:R.............|
166 0050: 9a 3a 52 04 b7 fc db f0 95 e5 a4 f4 97 17 b2 c9 |.:R.............|
167 0060: 0c 14 00 02 e6 d9 99 25 1a a7 a4 99 a4 a4 1a 5b |.......%.......[|
167 0060: 0c 14 00 02 e6 d9 99 25 1a a7 a4 99 a4 a4 1a 5b |.......%.......[|
168 0070: 58 a4 19 27 9b a4 59 a4 1a 59 a4 99 a4 59 26 5a |X..'..Y..Y...Y&Z|
168 0070: 58 a4 19 27 9b a4 59 a4 1a 59 a4 99 a4 59 26 5a |X..'..Y..Y...Y&Z|
169 0080: 18 9a 18 59 5a 26 1a 27 27 25 99 a6 99 1a 70 95 |...YZ&.''%....p.|
169 0080: 18 9a 18 59 5a 26 1a 27 27 25 99 a6 99 1a 70 95 |...YZ&.''%....p.|
170 0090: a4 16 97 70 19 28 18 70 a5 e5 e7 73 71 25 a6 a4 |...p.(.p...sq%..|
170 0090: a4 16 97 70 19 28 18 70 a5 e5 e7 73 71 25 a6 a4 |...p.(.p...sq%..|
171 00a0: 28 00 19 20 17 af fa df ab ff 7b 3f fb 92 dc 8b |(.. ......{?....|
171 00a0: 28 00 19 20 17 af fa df ab ff 7b 3f fb 92 dc 8b |(.. ......{?....|
172 00b0: 1f 62 bb 9e b7 d7 d9 87 3d 5a 44 89 2f b0 99 87 |.b......=ZD./...|
172 00b0: 1f 62 bb 9e b7 d7 d9 87 3d 5a 44 89 2f b0 99 87 |.b......=ZD./...|
173 00c0: ec e2 54 63 43 e3 b4 64 43 73 23 33 43 53 0b 63 |..TcC..dCs#3CS.c|
173 00c0: ec e2 54 63 43 e3 b4 64 43 73 23 33 43 53 0b 63 |..TcC..dCs#3CS.c|
174 00d0: d3 14 23 03 a0 fb 2c 2c 0c d3 80 1e 30 49 49 b1 |..#...,,....0II.|
174 00d0: d3 14 23 03 a0 fb 2c 2c 0c d3 80 1e 30 49 49 b1 |..#...,,....0II.|
175 00e0: 4c 4a 32 48 33 30 b0 34 42 b8 38 29 b1 08 e2 62 |LJ2H30.4B.8)...b|
175 00e0: 4c 4a 32 48 33 30 b0 34 42 b8 38 29 b1 08 e2 62 |LJ2H30.4B.8)...b|
176 00f0: 20 03 6a ca c2 2c db 2f f7 2c fa 6d fc fb 34 be | .j..,./.,.m..4.|
176 00f0: 20 03 6a ca c2 2c db 2f f7 2c fa 6d fc fb 34 be | .j..,./.,.m..4.|
177 0100: fc 5c 21 a2 39 cb 66 77 7c 00 0d c3 59 17 14 58 |.\!.9.fw|...Y..X|
177 0100: fc 5c 21 a2 39 cb 66 77 7c 00 0d c3 59 17 14 58 |.\!.9.fw|...Y..X|
178 0110: 49 16 06 29 a9 a6 29 86 c6 16 e6 a6 16 a6 26 86 |I..)..).......&.|
178 0110: 49 16 06 29 a9 a6 29 86 c6 16 e6 a6 16 a6 26 86 |I..)..).......&.|
179 0120: c9 a6 69 06 a6 46 66 a6 89 29 86 26 26 89 49 96 |..i..Ff..).&&.I.|
179 0120: c9 a6 69 06 a6 46 66 a6 89 29 86 26 26 89 49 96 |..i..Ff..).&&.I.|
180 0130: 69 89 16 66 29 86 29 49 5c 20 07 3e 16 fe 23 ae |i..f).)I\ .>..#.|
180 0130: 69 89 16 66 29 86 29 49 5c 20 07 3e 16 fe 23 ae |i..f).)I\ .>..#.|
181 0140: 26 da 1c ab 10 1f d1 f8 e3 b3 ef cd dd fc 0c 93 |&...............|
181 0140: 26 da 1c ab 10 1f d1 f8 e3 b3 ef cd dd fc 0c 93 |&...............|
182 0150: 88 75 34 36 75 04 82 55 17 14 36 a4 38 10 04 d8 |.u46u..U..6.8...|
182 0150: 88 75 34 36 75 04 82 55 17 14 36 a4 38 10 04 d8 |.u46u..U..6.8...|
183 0160: 21 01 9a b1 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 |!......E..V....R|
183 0160: 21 01 9a b1 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 |!......E..V....R|
184 0170: d7 8a 78 ed fc d5 76 f1 36 25 81 89 c7 ad ec 90 |..x...v.6%......|
184 0170: d7 8a 78 ed fc d5 76 f1 36 25 81 89 c7 ad ec 90 |..x...v.6%......|
185 0180: 54 47 75 2b 89 49 b1 00 d2 8a eb 92 |TGu+.I......|
185 0180: 54 47 75 2b 89 49 b1 00 d2 8a eb 92 |TGu+.I......|
186
186
187 $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest
187 $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest
188 $ hg clone -U http://localhost:$HGPORT full-bundle
188 $ hg clone -U http://localhost:$HGPORT full-bundle
189 applying clone bundle from http://localhost:$HGPORT1/full.hg
189 applying clone bundle from http://localhost:$HGPORT1/full.hg
190 adding changesets
190 adding changesets
191 adding manifests
191 adding manifests
192 adding file changes
192 adding file changes
193 added 2 changesets with 2 changes to 2 files
193 added 2 changesets with 2 changes to 2 files
194 finished applying clone bundle
194 finished applying clone bundle
195 searching for changes
195 searching for changes
196 no changes found
196 no changes found
197
197
198 Feature works over SSH
198 Feature works over SSH
199
199
200 $ hg clone -U -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/server ssh-full-clone
200 $ hg clone -U -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/server ssh-full-clone
201 applying clone bundle from http://localhost:$HGPORT1/full.hg
201 applying clone bundle from http://localhost:$HGPORT1/full.hg
202 adding changesets
202 adding changesets
203 adding manifests
203 adding manifests
204 adding file changes
204 adding file changes
205 added 2 changesets with 2 changes to 2 files
205 added 2 changesets with 2 changes to 2 files
206 finished applying clone bundle
206 finished applying clone bundle
207 searching for changes
207 searching for changes
208 no changes found
208 no changes found
209
209
210 Entry with unknown BUNDLESPEC is filtered and not used
210 Entry with unknown BUNDLESPEC is filtered and not used
211
211
212 $ cat > server/.hg/clonebundles.manifest << EOF
212 $ cat > server/.hg/clonebundles.manifest << EOF
213 > http://bad.entry1 BUNDLESPEC=UNKNOWN
213 > http://bad.entry1 BUNDLESPEC=UNKNOWN
214 > http://bad.entry2 BUNDLESPEC=xz-v1
214 > http://bad.entry2 BUNDLESPEC=xz-v1
215 > http://bad.entry3 BUNDLESPEC=none-v100
215 > http://bad.entry3 BUNDLESPEC=none-v100
216 > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2
216 > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2
217 > EOF
217 > EOF
218
218
219 $ hg clone -U http://localhost:$HGPORT filter-unknown-type
219 $ hg clone -U http://localhost:$HGPORT filter-unknown-type
220 applying clone bundle from http://localhost:$HGPORT1/full.hg
220 applying clone bundle from http://localhost:$HGPORT1/full.hg
221 adding changesets
221 adding changesets
222 adding manifests
222 adding manifests
223 adding file changes
223 adding file changes
224 added 2 changesets with 2 changes to 2 files
224 added 2 changesets with 2 changes to 2 files
225 finished applying clone bundle
225 finished applying clone bundle
226 searching for changes
226 searching for changes
227 no changes found
227 no changes found
228
228
229 Automatic fallback when all entries are filtered
229 Automatic fallback when all entries are filtered
230
230
231 $ cat > server/.hg/clonebundles.manifest << EOF
231 $ cat > server/.hg/clonebundles.manifest << EOF
232 > http://bad.entry BUNDLESPEC=UNKNOWN
232 > http://bad.entry BUNDLESPEC=UNKNOWN
233 > EOF
233 > EOF
234
234
235 $ hg clone -U http://localhost:$HGPORT filter-all
235 $ hg clone -U http://localhost:$HGPORT filter-all
236 no compatible clone bundles available on server; falling back to regular clone
236 no compatible clone bundles available on server; falling back to regular clone
237 (you may want to report this to the server operator)
237 (you may want to report this to the server operator)
238 requesting all changes
238 requesting all changes
239 adding changesets
239 adding changesets
240 adding manifests
240 adding manifests
241 adding file changes
241 adding file changes
242 added 2 changesets with 2 changes to 2 files
242 added 2 changesets with 2 changes to 2 files
243
243
244 URLs requiring SNI are filtered in Python <2.7.9
244 URLs requiring SNI are filtered in Python <2.7.9
245
245
246 $ cp full.hg sni.hg
246 $ cp full.hg sni.hg
247 $ cat > server/.hg/clonebundles.manifest << EOF
247 $ cat > server/.hg/clonebundles.manifest << EOF
248 > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true
248 > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true
249 > http://localhost:$HGPORT1/full.hg
249 > http://localhost:$HGPORT1/full.hg
250 > EOF
250 > EOF
251
251
252 #if sslcontext
252 #if sslcontext
253 Python 2.7.9+ support SNI
253 Python 2.7.9+ support SNI
254
254
255 $ hg clone -U http://localhost:$HGPORT sni-supported
255 $ hg clone -U http://localhost:$HGPORT sni-supported
256 applying clone bundle from http://localhost:$HGPORT1/sni.hg
256 applying clone bundle from http://localhost:$HGPORT1/sni.hg
257 adding changesets
257 adding changesets
258 adding manifests
258 adding manifests
259 adding file changes
259 adding file changes
260 added 2 changesets with 2 changes to 2 files
260 added 2 changesets with 2 changes to 2 files
261 finished applying clone bundle
261 finished applying clone bundle
262 searching for changes
262 searching for changes
263 no changes found
263 no changes found
264 #else
264 #else
265 Python <2.7.9 will filter SNI URLs
265 Python <2.7.9 will filter SNI URLs
266
266
267 $ hg clone -U http://localhost:$HGPORT sni-unsupported
267 $ hg clone -U http://localhost:$HGPORT sni-unsupported
268 applying clone bundle from http://localhost:$HGPORT1/full.hg
268 applying clone bundle from http://localhost:$HGPORT1/full.hg
269 adding changesets
269 adding changesets
270 adding manifests
270 adding manifests
271 adding file changes
271 adding file changes
272 added 2 changesets with 2 changes to 2 files
272 added 2 changesets with 2 changes to 2 files
273 finished applying clone bundle
273 finished applying clone bundle
274 searching for changes
274 searching for changes
275 no changes found
275 no changes found
276 #endif
276 #endif
277
277
278 Stream clone bundles are supported
278 Stream clone bundles are supported
279
279
280 $ hg -R server debugcreatestreamclonebundle packed.hg
280 $ hg -R server debugcreatestreamclonebundle packed.hg
281 writing 613 bytes for 4 files
281 writing 613 bytes for 4 files
282 bundle requirements: generaldelta, revlogv1
282 bundle requirements: generaldelta, revlogv1
283
283
284 No bundle spec should work
284 No bundle spec should work
285
285
286 $ cat > server/.hg/clonebundles.manifest << EOF
286 $ cat > server/.hg/clonebundles.manifest << EOF
287 > http://localhost:$HGPORT1/packed.hg
287 > http://localhost:$HGPORT1/packed.hg
288 > EOF
288 > EOF
289
289
290 $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec
290 $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec
291 applying clone bundle from http://localhost:$HGPORT1/packed.hg
291 applying clone bundle from http://localhost:$HGPORT1/packed.hg
292 4 files to transfer, 613 bytes of data
292 4 files to transfer, 613 bytes of data
293 transferred 613 bytes in *.* seconds (*) (glob)
293 transferred 613 bytes in *.* seconds (*) (glob)
294 finished applying clone bundle
294 finished applying clone bundle
295 searching for changes
295 searching for changes
296 no changes found
296 no changes found
297
297
298 Bundle spec without parameters should work
298 Bundle spec without parameters should work
299
299
300 $ cat > server/.hg/clonebundles.manifest << EOF
300 $ cat > server/.hg/clonebundles.manifest << EOF
301 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1
301 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1
302 > EOF
302 > EOF
303
303
304 $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec
304 $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec
305 applying clone bundle from http://localhost:$HGPORT1/packed.hg
305 applying clone bundle from http://localhost:$HGPORT1/packed.hg
306 4 files to transfer, 613 bytes of data
306 4 files to transfer, 613 bytes of data
307 transferred 613 bytes in *.* seconds (*) (glob)
307 transferred 613 bytes in *.* seconds (*) (glob)
308 finished applying clone bundle
308 finished applying clone bundle
309 searching for changes
309 searching for changes
310 no changes found
310 no changes found
311
311
312 Bundle spec with format requirements should work
312 Bundle spec with format requirements should work
313
313
314 $ cat > server/.hg/clonebundles.manifest << EOF
314 $ cat > server/.hg/clonebundles.manifest << EOF
315 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1
315 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1
316 > EOF
316 > EOF
317
317
318 $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements
318 $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements
319 applying clone bundle from http://localhost:$HGPORT1/packed.hg
319 applying clone bundle from http://localhost:$HGPORT1/packed.hg
320 4 files to transfer, 613 bytes of data
320 4 files to transfer, 613 bytes of data
321 transferred 613 bytes in *.* seconds (*) (glob)
321 transferred 613 bytes in *.* seconds (*) (glob)
322 finished applying clone bundle
322 finished applying clone bundle
323 searching for changes
323 searching for changes
324 no changes found
324 no changes found
325
325
326 Stream bundle spec with unknown requirements should be filtered out
326 Stream bundle spec with unknown requirements should be filtered out
327
327
328 $ cat > server/.hg/clonebundles.manifest << EOF
328 $ cat > server/.hg/clonebundles.manifest << EOF
329 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42
329 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42
330 > EOF
330 > EOF
331
331
332 $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements
332 $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements
333 no compatible clone bundles available on server; falling back to regular clone
333 no compatible clone bundles available on server; falling back to regular clone
334 (you may want to report this to the server operator)
334 (you may want to report this to the server operator)
335 requesting all changes
335 requesting all changes
336 adding changesets
336 adding changesets
337 adding manifests
337 adding manifests
338 adding file changes
338 adding file changes
339 added 2 changesets with 2 changes to 2 files
339 added 2 changesets with 2 changes to 2 files
340
340
341 Set up manifest for testing preferences
341 Set up manifest for testing preferences
342 (Remember, the TYPE does not have to match reality - the URL is
342 (Remember, the TYPE does not have to match reality - the URL is
343 important)
343 important)
344
344
345 $ cp full.hg gz-a.hg
345 $ cp full.hg gz-a.hg
346 $ cp full.hg gz-b.hg
346 $ cp full.hg gz-b.hg
347 $ cp full.hg bz2-a.hg
347 $ cp full.hg bz2-a.hg
348 $ cp full.hg bz2-b.hg
348 $ cp full.hg bz2-b.hg
349 $ cat > server/.hg/clonebundles.manifest << EOF
349 $ cat > server/.hg/clonebundles.manifest << EOF
350 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a
350 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a
351 > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a
351 > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a
352 > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b
352 > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b
353 > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b
353 > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b
354 > EOF
354 > EOF
355
355
356 Preferring an undefined attribute will take first entry
356 Preferring an undefined attribute will take first entry
357
357
358 $ hg --config ui.clonebundleprefers=foo=bar clone -U http://localhost:$HGPORT prefer-foo
358 $ hg --config ui.clonebundleprefers=foo=bar clone -U http://localhost:$HGPORT prefer-foo
359 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg
359 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg
360 adding changesets
360 adding changesets
361 adding manifests
361 adding manifests
362 adding file changes
362 adding file changes
363 added 2 changesets with 2 changes to 2 files
363 added 2 changesets with 2 changes to 2 files
364 finished applying clone bundle
364 finished applying clone bundle
365 searching for changes
365 searching for changes
366 no changes found
366 no changes found
367
367
368 Preferring bz2 type will download first entry of that type
368 Preferring bz2 type will download first entry of that type
369
369
370 $ hg --config ui.clonebundleprefers=COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-bz
370 $ hg --config ui.clonebundleprefers=COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-bz
371 applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg
371 applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg
372 adding changesets
372 adding changesets
373 adding manifests
373 adding manifests
374 adding file changes
374 adding file changes
375 added 2 changesets with 2 changes to 2 files
375 added 2 changesets with 2 changes to 2 files
376 finished applying clone bundle
376 finished applying clone bundle
377 searching for changes
377 searching for changes
378 no changes found
378 no changes found
379
379
380 Preferring multiple values of an option works
380 Preferring multiple values of an option works
381
381
382 $ hg --config ui.clonebundleprefers=COMPRESSION=unknown,COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-multiple-bz
382 $ hg --config ui.clonebundleprefers=COMPRESSION=unknown,COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-multiple-bz
383 applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg
383 applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg
384 adding changesets
384 adding changesets
385 adding manifests
385 adding manifests
386 adding file changes
386 adding file changes
387 added 2 changesets with 2 changes to 2 files
387 added 2 changesets with 2 changes to 2 files
388 finished applying clone bundle
388 finished applying clone bundle
389 searching for changes
389 searching for changes
390 no changes found
390 no changes found
391
391
392 Sorting multiple values should get us back to original first entry
392 Sorting multiple values should get us back to original first entry
393
393
394 $ hg --config ui.clonebundleprefers=BUNDLESPEC=unknown,BUNDLESPEC=gzip-v2,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-multiple-gz
394 $ hg --config ui.clonebundleprefers=BUNDLESPEC=unknown,BUNDLESPEC=gzip-v2,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-multiple-gz
395 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg
395 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg
396 adding changesets
396 adding changesets
397 adding manifests
397 adding manifests
398 adding file changes
398 adding file changes
399 added 2 changesets with 2 changes to 2 files
399 added 2 changesets with 2 changes to 2 files
400 finished applying clone bundle
400 finished applying clone bundle
401 searching for changes
401 searching for changes
402 no changes found
402 no changes found
403
403
404 Preferring multiple attributes has correct order
404 Preferring multiple attributes has correct order
405
405
406 $ hg --config ui.clonebundleprefers=extra=b,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-separate-attributes
406 $ hg --config ui.clonebundleprefers=extra=b,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-separate-attributes
407 applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg
407 applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg
408 adding changesets
408 adding changesets
409 adding manifests
409 adding manifests
410 adding file changes
410 adding file changes
411 added 2 changesets with 2 changes to 2 files
411 added 2 changesets with 2 changes to 2 files
412 finished applying clone bundle
412 finished applying clone bundle
413 searching for changes
413 searching for changes
414 no changes found
414 no changes found
415
415
416 Test where attribute is missing from some entries
416 Test where attribute is missing from some entries
417
417
418 $ cat > server/.hg/clonebundles.manifest << EOF
418 $ cat > server/.hg/clonebundles.manifest << EOF
419 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
419 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
420 > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2
420 > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2
421 > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b
421 > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b
422 > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b
422 > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b
423 > EOF
423 > EOF
424
424
425 $ hg --config ui.clonebundleprefers=extra=b clone -U http://localhost:$HGPORT prefer-partially-defined-attribute
425 $ hg --config ui.clonebundleprefers=extra=b clone -U http://localhost:$HGPORT prefer-partially-defined-attribute
426 applying clone bundle from http://localhost:$HGPORT1/gz-b.hg
426 applying clone bundle from http://localhost:$HGPORT1/gz-b.hg
427 adding changesets
427 adding changesets
428 adding manifests
428 adding manifests
429 adding file changes
429 adding file changes
430 added 2 changesets with 2 changes to 2 files
430 added 2 changesets with 2 changes to 2 files
431 finished applying clone bundle
431 finished applying clone bundle
432 searching for changes
432 searching for changes
433 no changes found
433 no changes found
@@ -1,96 +1,96
1 #require killdaemons
1 #require killdaemons
2
2
3 $ hgserve() {
3 $ hgserve() {
4 > hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid \
4 > hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid \
5 > -E errors.log -v $@ > startup.log
5 > -E errors.log -v $@ > startup.log
6 > # Grepping hg serve stdout would hang on Windows
6 > # Grepping hg serve stdout would hang on Windows
7 > grep -v 'listening at' startup.log
7 > grep -v 'listening at' startup.log
8 > cat hg.pid >> "$DAEMON_PIDS"
8 > cat hg.pid >> "$DAEMON_PIDS"
9 > }
9 > }
10 $ hg init a
10 $ hg init a
11 $ hg --encoding utf-8 -R a branch Γ¦
11 $ hg --encoding utf-8 -R a branch Γ¦
12 marked working directory as branch \xc3\xa6 (esc)
12 marked working directory as branch \xc3\xa6 (esc)
13 (branches are permanent and global, did you want a bookmark?)
13 (branches are permanent and global, did you want a bookmark?)
14 $ echo foo > a/foo
14 $ echo foo > a/foo
15 $ hg -R a ci -Am foo
15 $ hg -R a ci -Am foo
16 adding foo
16 adding foo
17 $ hgserve -R a --config web.push_ssl=False --config web.allow_push=* --encoding latin1
17 $ hgserve -R a --config web.push_ssl=False --config web.allow_push=* --encoding latin1
18 $ hg --encoding utf-8 clone http://localhost:$HGPORT1 b
18 $ hg --encoding utf-8 clone http://localhost:$HGPORT1 b
19 requesting all changes
19 requesting all changes
20 adding changesets
20 adding changesets
21 adding manifests
21 adding manifests
22 adding file changes
22 adding file changes
23 added 1 changesets with 1 changes to 1 files
23 added 1 changesets with 1 changes to 1 files
24 updating to branch \xc3\xa6 (esc)
24 updating to branch \xc3\xa6 (esc)
25 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
25 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
26 $ hg --encoding utf-8 -R b log
26 $ hg --encoding utf-8 -R b log
27 changeset: 0:867c11ce77b8
27 changeset: 0:867c11ce77b8
28 branch: \xc3\xa6 (esc)
28 branch: \xc3\xa6 (esc)
29 tag: tip
29 tag: tip
30 user: test
30 user: test
31 date: Thu Jan 01 00:00:00 1970 +0000
31 date: Thu Jan 01 00:00:00 1970 +0000
32 summary: foo
32 summary: foo
33
33
34 $ echo bar >> b/foo
34 $ echo bar >> b/foo
35 $ hg -R b ci -m bar
35 $ hg -R b ci -m bar
36 $ hg --encoding utf-8 -R b push
36 $ hg --encoding utf-8 -R b push
37 pushing to http://localhost:$HGPORT1/
37 pushing to http://localhost:$HGPORT1/
38 searching for changes
38 searching for changes
39 remote: adding changesets
39 remote: adding changesets
40 remote: adding manifests
40 remote: adding manifests
41 remote: adding file changes
41 remote: adding file changes
42 remote: added 1 changesets with 1 changes to 1 files
42 remote: added 1 changesets with 1 changes to 1 files
43 $ hg -R a --encoding utf-8 log
43 $ hg -R a --encoding utf-8 log
44 changeset: 1:58e7c90d67cb
44 changeset: 1:58e7c90d67cb
45 branch: \xc3\xa6 (esc)
45 branch: \xc3\xa6 (esc)
46 tag: tip
46 tag: tip
47 user: test
47 user: test
48 date: Thu Jan 01 00:00:00 1970 +0000
48 date: Thu Jan 01 00:00:00 1970 +0000
49 summary: bar
49 summary: bar
50
50
51 changeset: 0:867c11ce77b8
51 changeset: 0:867c11ce77b8
52 branch: \xc3\xa6 (esc)
52 branch: \xc3\xa6 (esc)
53 user: test
53 user: test
54 date: Thu Jan 01 00:00:00 1970 +0000
54 date: Thu Jan 01 00:00:00 1970 +0000
55 summary: foo
55 summary: foo
56
56
57 $ killdaemons.py hg.pid
57 $ killdaemons.py hg.pid
58
58
59 verify 7e7d56fe4833 (encoding fallback in branchmap to maintain compatibility with 1.3.x)
59 verify 7e7d56fe4833 (encoding fallback in branchmap to maintain compatibility with 1.3.x)
60
60
61 $ cat <<EOF > oldhg
61 $ cat <<EOF > oldhg
62 > import sys
62 > import sys
63 > from mercurial import ui, hg, commands
63 > from mercurial import ui, hg, commands
64 >
64 >
65 > class StdoutWrapper(object):
65 > class StdoutWrapper(object):
66 > def __init__(self, stdout):
66 > def __init__(self, stdout):
67 > self._file = stdout
67 > self._file = stdout
68 >
68 >
69 > def write(self, data):
69 > def write(self, data):
70 > if data == '47\n':
70 > if data == '47\n':
71 > # latin1 encoding is one %xx (3 bytes) shorter
71 > # latin1 encoding is one %xx (3 bytes) shorter
72 > data = '44\n'
72 > data = '44\n'
73 > elif data.startswith('%C3%A6 '):
73 > elif data.startswith('%C3%A6 '):
74 > # translate to latin1 encoding
74 > # translate to latin1 encoding
75 > data = '%%E6 %s' % data[7:]
75 > data = '%%E6 %s' % data[7:]
76 > self._file.write(data)
76 > self._file.write(data)
77 >
77 >
78 > def __getattr__(self, name):
78 > def __getattr__(self, name):
79 > return getattr(self._file, name)
79 > return getattr(self._file, name)
80 >
80 >
81 > sys.stdout = StdoutWrapper(sys.stdout)
81 > sys.stdout = StdoutWrapper(sys.stdout)
82 > sys.stderr = StdoutWrapper(sys.stderr)
82 > sys.stderr = StdoutWrapper(sys.stderr)
83 >
83 >
84 > myui = ui.ui.load()
84 > myui = ui.ui.load()
85 > repo = hg.repository(myui, 'a')
85 > repo = hg.repository(myui, 'a')
86 > commands.serve(myui, repo, stdio=True, cmdserver=False)
86 > commands.serve(myui, repo, stdio=True, cmdserver=False)
87 > EOF
87 > EOF
88 $ echo baz >> b/foo
88 $ echo baz >> b/foo
89 $ hg -R b ci -m baz
89 $ hg -R b ci -m baz
90 $ hg push -R b -e '$PYTHON oldhg' ssh://dummy/ --encoding latin1
90 $ hg push -R b -e "\"$PYTHON\" oldhg" ssh://dummy/ --encoding latin1
91 pushing to ssh://dummy/
91 pushing to ssh://dummy/
92 searching for changes
92 searching for changes
93 remote: adding changesets
93 remote: adding changesets
94 remote: adding manifests
94 remote: adding manifests
95 remote: adding file changes
95 remote: adding file changes
96 remote: added 1 changesets with 1 changes to 1 files
96 remote: added 1 changesets with 1 changes to 1 files
@@ -1,262 +1,262
1 This test tries to exercise the ssh functionality with a dummy script
1 This test tries to exercise the ssh functionality with a dummy script
2
2
3 (enable general delta early)
3 (enable general delta early)
4
4
5 $ cat << EOF >> $HGRCPATH
5 $ cat << EOF >> $HGRCPATH
6 > [format]
6 > [format]
7 > usegeneraldelta=yes
7 > usegeneraldelta=yes
8 > EOF
8 > EOF
9
9
10 $ checknewrepo()
10 $ checknewrepo()
11 > {
11 > {
12 > name=$1
12 > name=$1
13 > if [ -d "$name"/.hg/store ]; then
13 > if [ -d "$name"/.hg/store ]; then
14 > echo store created
14 > echo store created
15 > fi
15 > fi
16 > if [ -f "$name"/.hg/00changelog.i ]; then
16 > if [ -f "$name"/.hg/00changelog.i ]; then
17 > echo 00changelog.i created
17 > echo 00changelog.i created
18 > fi
18 > fi
19 > cat "$name"/.hg/requires
19 > cat "$name"/.hg/requires
20 > }
20 > }
21
21
22 creating 'local'
22 creating 'local'
23
23
24 $ hg init local
24 $ hg init local
25 $ checknewrepo local
25 $ checknewrepo local
26 store created
26 store created
27 00changelog.i created
27 00changelog.i created
28 dotencode
28 dotencode
29 fncache
29 fncache
30 generaldelta
30 generaldelta
31 revlogv1
31 revlogv1
32 store
32 store
33 $ echo this > local/foo
33 $ echo this > local/foo
34 $ hg ci --cwd local -A -m "init"
34 $ hg ci --cwd local -A -m "init"
35 adding foo
35 adding foo
36
36
37 test custom revlog chunk cache sizes
37 test custom revlog chunk cache sizes
38
38
39 $ hg --config format.chunkcachesize=0 log -R local -pv
39 $ hg --config format.chunkcachesize=0 log -R local -pv
40 abort: revlog chunk cache size 0 is not greater than 0!
40 abort: revlog chunk cache size 0 is not greater than 0!
41 [255]
41 [255]
42 $ hg --config format.chunkcachesize=1023 log -R local -pv
42 $ hg --config format.chunkcachesize=1023 log -R local -pv
43 abort: revlog chunk cache size 1023 is not a power of 2!
43 abort: revlog chunk cache size 1023 is not a power of 2!
44 [255]
44 [255]
45 $ hg --config format.chunkcachesize=1024 log -R local -pv
45 $ hg --config format.chunkcachesize=1024 log -R local -pv
46 changeset: 0:08b9e9f63b32
46 changeset: 0:08b9e9f63b32
47 tag: tip
47 tag: tip
48 user: test
48 user: test
49 date: Thu Jan 01 00:00:00 1970 +0000
49 date: Thu Jan 01 00:00:00 1970 +0000
50 files: foo
50 files: foo
51 description:
51 description:
52 init
52 init
53
53
54
54
55 diff -r 000000000000 -r 08b9e9f63b32 foo
55 diff -r 000000000000 -r 08b9e9f63b32 foo
56 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
56 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
57 +++ b/foo Thu Jan 01 00:00:00 1970 +0000
57 +++ b/foo Thu Jan 01 00:00:00 1970 +0000
58 @@ -0,0 +1,1 @@
58 @@ -0,0 +1,1 @@
59 +this
59 +this
60
60
61
61
62 creating repo with format.usestore=false
62 creating repo with format.usestore=false
63
63
64 $ hg --config format.usestore=false init old
64 $ hg --config format.usestore=false init old
65 $ checknewrepo old
65 $ checknewrepo old
66 generaldelta
66 generaldelta
67 revlogv1
67 revlogv1
68
68
69 creating repo with format.usefncache=false
69 creating repo with format.usefncache=false
70
70
71 $ hg --config format.usefncache=false init old2
71 $ hg --config format.usefncache=false init old2
72 $ checknewrepo old2
72 $ checknewrepo old2
73 store created
73 store created
74 00changelog.i created
74 00changelog.i created
75 generaldelta
75 generaldelta
76 revlogv1
76 revlogv1
77 store
77 store
78
78
79 creating repo with format.dotencode=false
79 creating repo with format.dotencode=false
80
80
81 $ hg --config format.dotencode=false init old3
81 $ hg --config format.dotencode=false init old3
82 $ checknewrepo old3
82 $ checknewrepo old3
83 store created
83 store created
84 00changelog.i created
84 00changelog.i created
85 fncache
85 fncache
86 generaldelta
86 generaldelta
87 revlogv1
87 revlogv1
88 store
88 store
89
89
90 creating repo with format.dotencode=false
90 creating repo with format.dotencode=false
91
91
92 $ hg --config format.generaldelta=false --config format.usegeneraldelta=false init old4
92 $ hg --config format.generaldelta=false --config format.usegeneraldelta=false init old4
93 $ checknewrepo old4
93 $ checknewrepo old4
94 store created
94 store created
95 00changelog.i created
95 00changelog.i created
96 dotencode
96 dotencode
97 fncache
97 fncache
98 revlogv1
98 revlogv1
99 store
99 store
100
100
101 test failure
101 test failure
102
102
103 $ hg init local
103 $ hg init local
104 abort: repository local already exists!
104 abort: repository local already exists!
105 [255]
105 [255]
106
106
107 init+push to remote2
107 init+push to remote2
108
108
109 $ hg init -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote2
109 $ hg init -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote2
110 $ hg incoming -R remote2 local
110 $ hg incoming -R remote2 local
111 comparing with local
111 comparing with local
112 changeset: 0:08b9e9f63b32
112 changeset: 0:08b9e9f63b32
113 tag: tip
113 tag: tip
114 user: test
114 user: test
115 date: Thu Jan 01 00:00:00 1970 +0000
115 date: Thu Jan 01 00:00:00 1970 +0000
116 summary: init
116 summary: init
117
117
118
118
119 $ hg push -R local -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote2
119 $ hg push -R local -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote2
120 pushing to ssh://user@dummy/remote2
120 pushing to ssh://user@dummy/remote2
121 searching for changes
121 searching for changes
122 remote: adding changesets
122 remote: adding changesets
123 remote: adding manifests
123 remote: adding manifests
124 remote: adding file changes
124 remote: adding file changes
125 remote: added 1 changesets with 1 changes to 1 files
125 remote: added 1 changesets with 1 changes to 1 files
126
126
127 clone to remote1
127 clone to remote1
128
128
129 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remote1
129 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remote1
130 searching for changes
130 searching for changes
131 remote: adding changesets
131 remote: adding changesets
132 remote: adding manifests
132 remote: adding manifests
133 remote: adding file changes
133 remote: adding file changes
134 remote: added 1 changesets with 1 changes to 1 files
134 remote: added 1 changesets with 1 changes to 1 files
135
135
136 The largefiles extension doesn't crash
136 The largefiles extension doesn't crash
137 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remotelf --config extensions.largefiles=
137 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remotelf --config extensions.largefiles=
138 The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !)
138 The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !)
139 The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !)
139 The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !)
140 searching for changes
140 searching for changes
141 remote: adding changesets
141 remote: adding changesets
142 remote: adding manifests
142 remote: adding manifests
143 remote: adding file changes
143 remote: adding file changes
144 remote: added 1 changesets with 1 changes to 1 files
144 remote: added 1 changesets with 1 changes to 1 files
145
145
146 init to existing repo
146 init to existing repo
147
147
148 $ hg init -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote1
148 $ hg init -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote1
149 abort: repository remote1 already exists!
149 abort: repository remote1 already exists!
150 abort: could not create remote repo!
150 abort: could not create remote repo!
151 [255]
151 [255]
152
152
153 clone to existing repo
153 clone to existing repo
154
154
155 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remote1
155 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remote1
156 abort: repository remote1 already exists!
156 abort: repository remote1 already exists!
157 abort: could not create remote repo!
157 abort: could not create remote repo!
158 [255]
158 [255]
159
159
160 output of dummyssh
160 output of dummyssh
161
161
162 $ cat dummylog
162 $ cat dummylog
163 Got arguments 1:user@dummy 2:hg init remote2
163 Got arguments 1:user@dummy 2:hg init remote2
164 Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio
164 Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio
165 Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio
165 Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio
166 Got arguments 1:user@dummy 2:hg init remote1
166 Got arguments 1:user@dummy 2:hg init remote1
167 Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio
167 Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio
168 Got arguments 1:user@dummy 2:hg init remotelf
168 Got arguments 1:user@dummy 2:hg init remotelf
169 Got arguments 1:user@dummy 2:hg -R remotelf serve --stdio
169 Got arguments 1:user@dummy 2:hg -R remotelf serve --stdio
170 Got arguments 1:user@dummy 2:hg init remote1
170 Got arguments 1:user@dummy 2:hg init remote1
171 Got arguments 1:user@dummy 2:hg init remote1
171 Got arguments 1:user@dummy 2:hg init remote1
172
172
173 comparing repositories
173 comparing repositories
174
174
175 $ hg tip -q -R local
175 $ hg tip -q -R local
176 0:08b9e9f63b32
176 0:08b9e9f63b32
177 $ hg tip -q -R remote1
177 $ hg tip -q -R remote1
178 0:08b9e9f63b32
178 0:08b9e9f63b32
179 $ hg tip -q -R remote2
179 $ hg tip -q -R remote2
180 0:08b9e9f63b32
180 0:08b9e9f63b32
181
181
182 check names for repositories (clashes with URL schemes, special chars)
182 check names for repositories (clashes with URL schemes, special chars)
183
183
184 $ for i in bundle file hg http https old-http ssh static-http "with space"; do
184 $ for i in bundle file hg http https old-http ssh static-http "with space"; do
185 > printf "hg init \"$i\"... "
185 > printf "hg init \"$i\"... "
186 > hg init "$i"
186 > hg init "$i"
187 > test -d "$i" -a -d "$i/.hg" && echo "ok" || echo "failed"
187 > test -d "$i" -a -d "$i/.hg" && echo "ok" || echo "failed"
188 > done
188 > done
189 hg init "bundle"... ok
189 hg init "bundle"... ok
190 hg init "file"... ok
190 hg init "file"... ok
191 hg init "hg"... ok
191 hg init "hg"... ok
192 hg init "http"... ok
192 hg init "http"... ok
193 hg init "https"... ok
193 hg init "https"... ok
194 hg init "old-http"... ok
194 hg init "old-http"... ok
195 hg init "ssh"... ok
195 hg init "ssh"... ok
196 hg init "static-http"... ok
196 hg init "static-http"... ok
197 hg init "with space"... ok
197 hg init "with space"... ok
198 #if eol-in-paths
198 #if eol-in-paths
199 /* " " is not a valid name for a directory on Windows */
199 /* " " is not a valid name for a directory on Windows */
200 $ hg init " "
200 $ hg init " "
201 $ test -d " "
201 $ test -d " "
202 $ test -d " /.hg"
202 $ test -d " /.hg"
203 #endif
203 #endif
204
204
205 creating 'local/sub/repo'
205 creating 'local/sub/repo'
206
206
207 $ hg init local/sub/repo
207 $ hg init local/sub/repo
208 $ checknewrepo local/sub/repo
208 $ checknewrepo local/sub/repo
209 store created
209 store created
210 00changelog.i created
210 00changelog.i created
211 dotencode
211 dotencode
212 fncache
212 fncache
213 generaldelta
213 generaldelta
214 revlogv1
214 revlogv1
215 store
215 store
216
216
217 prepare test of init of url configured from paths
217 prepare test of init of url configured from paths
218
218
219 $ echo '[paths]' >> $HGRCPATH
219 $ echo '[paths]' >> $HGRCPATH
220 $ echo "somewhere = `pwd`/url from paths" >> $HGRCPATH
220 $ echo "somewhere = `pwd`/url from paths" >> $HGRCPATH
221 $ echo "elsewhere = `pwd`/another paths url" >> $HGRCPATH
221 $ echo "elsewhere = `pwd`/another paths url" >> $HGRCPATH
222
222
223 init should (for consistency with clone) expand the url
223 init should (for consistency with clone) expand the url
224
224
225 $ hg init somewhere
225 $ hg init somewhere
226 $ checknewrepo "url from paths"
226 $ checknewrepo "url from paths"
227 store created
227 store created
228 00changelog.i created
228 00changelog.i created
229 dotencode
229 dotencode
230 fncache
230 fncache
231 generaldelta
231 generaldelta
232 revlogv1
232 revlogv1
233 store
233 store
234
234
235 verify that clone also expand urls
235 verify that clone also expand urls
236
236
237 $ hg clone somewhere elsewhere
237 $ hg clone somewhere elsewhere
238 updating to branch default
238 updating to branch default
239 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
239 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
240 $ checknewrepo "another paths url"
240 $ checknewrepo "another paths url"
241 store created
241 store created
242 00changelog.i created
242 00changelog.i created
243 dotencode
243 dotencode
244 fncache
244 fncache
245 generaldelta
245 generaldelta
246 revlogv1
246 revlogv1
247 store
247 store
248
248
249 clone bookmarks
249 clone bookmarks
250
250
251 $ hg -R local bookmark test
251 $ hg -R local bookmark test
252 $ hg -R local bookmarks
252 $ hg -R local bookmarks
253 * test 0:08b9e9f63b32
253 * test 0:08b9e9f63b32
254 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remote-bookmarks
254 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remote-bookmarks
255 searching for changes
255 searching for changes
256 remote: adding changesets
256 remote: adding changesets
257 remote: adding manifests
257 remote: adding manifests
258 remote: adding file changes
258 remote: adding file changes
259 remote: added 1 changesets with 1 changes to 1 files
259 remote: added 1 changesets with 1 changes to 1 files
260 exporting bookmark test
260 exporting bookmark test
261 $ hg -R remote-bookmarks bookmarks
261 $ hg -R remote-bookmarks bookmarks
262 test 0:08b9e9f63b32
262 test 0:08b9e9f63b32
@@ -1,447 +1,447
1 This file contains testcases that tend to be related to the wire protocol part
1 This file contains testcases that tend to be related to the wire protocol part
2 of largefiles.
2 of largefiles.
3
3
4 $ USERCACHE="$TESTTMP/cache"; export USERCACHE
4 $ USERCACHE="$TESTTMP/cache"; export USERCACHE
5 $ mkdir "${USERCACHE}"
5 $ mkdir "${USERCACHE}"
6 $ cat >> $HGRCPATH <<EOF
6 $ cat >> $HGRCPATH <<EOF
7 > [extensions]
7 > [extensions]
8 > largefiles=
8 > largefiles=
9 > purge=
9 > purge=
10 > rebase=
10 > rebase=
11 > transplant=
11 > transplant=
12 > [phases]
12 > [phases]
13 > publish=False
13 > publish=False
14 > [largefiles]
14 > [largefiles]
15 > minsize=2
15 > minsize=2
16 > patterns=glob:**.dat
16 > patterns=glob:**.dat
17 > usercache=${USERCACHE}
17 > usercache=${USERCACHE}
18 > [web]
18 > [web]
19 > allow_archive = zip
19 > allow_archive = zip
20 > [hooks]
20 > [hooks]
21 > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status"
21 > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status"
22 > EOF
22 > EOF
23
23
24
24
25 #if serve
25 #if serve
26 vanilla clients not locked out from largefiles servers on vanilla repos
26 vanilla clients not locked out from largefiles servers on vanilla repos
27 $ mkdir r1
27 $ mkdir r1
28 $ cd r1
28 $ cd r1
29 $ hg init
29 $ hg init
30 $ echo c1 > f1
30 $ echo c1 > f1
31 $ hg add f1
31 $ hg add f1
32 $ hg commit -m "m1"
32 $ hg commit -m "m1"
33 Invoking status precommit hook
33 Invoking status precommit hook
34 A f1
34 A f1
35 $ cd ..
35 $ cd ..
36 $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid
36 $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid
37 $ cat hg.pid >> $DAEMON_PIDS
37 $ cat hg.pid >> $DAEMON_PIDS
38 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2
38 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2
39 requesting all changes
39 requesting all changes
40 adding changesets
40 adding changesets
41 adding manifests
41 adding manifests
42 adding file changes
42 adding file changes
43 added 1 changesets with 1 changes to 1 files
43 added 1 changesets with 1 changes to 1 files
44 updating to branch default
44 updating to branch default
45 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
46
46
47 largefiles clients still work with vanilla servers
47 largefiles clients still work with vanilla servers
48 $ hg serve --config extensions.largefiles=! -R r1 -d -p $HGPORT1 --pid-file hg.pid
48 $ hg serve --config extensions.largefiles=! -R r1 -d -p $HGPORT1 --pid-file hg.pid
49 $ cat hg.pid >> $DAEMON_PIDS
49 $ cat hg.pid >> $DAEMON_PIDS
50 $ hg clone http://localhost:$HGPORT1 r3
50 $ hg clone http://localhost:$HGPORT1 r3
51 requesting all changes
51 requesting all changes
52 adding changesets
52 adding changesets
53 adding manifests
53 adding manifests
54 adding file changes
54 adding file changes
55 added 1 changesets with 1 changes to 1 files
55 added 1 changesets with 1 changes to 1 files
56 updating to branch default
56 updating to branch default
57 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
57 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
58 #endif
58 #endif
59
59
60 vanilla clients locked out from largefiles http repos
60 vanilla clients locked out from largefiles http repos
61 $ mkdir r4
61 $ mkdir r4
62 $ cd r4
62 $ cd r4
63 $ hg init
63 $ hg init
64 $ echo c1 > f1
64 $ echo c1 > f1
65 $ hg add --large f1
65 $ hg add --large f1
66 $ hg commit -m "m1"
66 $ hg commit -m "m1"
67 Invoking status precommit hook
67 Invoking status precommit hook
68 A f1
68 A f1
69 $ cd ..
69 $ cd ..
70
70
71 largefiles can be pushed locally (issue3583)
71 largefiles can be pushed locally (issue3583)
72 $ hg init dest
72 $ hg init dest
73 $ cd r4
73 $ cd r4
74 $ hg outgoing ../dest
74 $ hg outgoing ../dest
75 comparing with ../dest
75 comparing with ../dest
76 searching for changes
76 searching for changes
77 changeset: 0:639881c12b4c
77 changeset: 0:639881c12b4c
78 tag: tip
78 tag: tip
79 user: test
79 user: test
80 date: Thu Jan 01 00:00:00 1970 +0000
80 date: Thu Jan 01 00:00:00 1970 +0000
81 summary: m1
81 summary: m1
82
82
83 $ hg push ../dest
83 $ hg push ../dest
84 pushing to ../dest
84 pushing to ../dest
85 searching for changes
85 searching for changes
86 adding changesets
86 adding changesets
87 adding manifests
87 adding manifests
88 adding file changes
88 adding file changes
89 added 1 changesets with 1 changes to 1 files
89 added 1 changesets with 1 changes to 1 files
90
90
91 exit code with nothing outgoing (issue3611)
91 exit code with nothing outgoing (issue3611)
92 $ hg outgoing ../dest
92 $ hg outgoing ../dest
93 comparing with ../dest
93 comparing with ../dest
94 searching for changes
94 searching for changes
95 no changes found
95 no changes found
96 [1]
96 [1]
97 $ cd ..
97 $ cd ..
98
98
99 #if serve
99 #if serve
100 $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid
100 $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid
101 $ cat hg.pid >> $DAEMON_PIDS
101 $ cat hg.pid >> $DAEMON_PIDS
102 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5
102 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5
103 abort: remote error:
103 abort: remote error:
104
104
105 This repository uses the largefiles extension.
105 This repository uses the largefiles extension.
106
106
107 Please enable it in your Mercurial config file.
107 Please enable it in your Mercurial config file.
108 [255]
108 [255]
109
109
110 used all HGPORTs, kill all daemons
110 used all HGPORTs, kill all daemons
111 $ killdaemons.py
111 $ killdaemons.py
112 #endif
112 #endif
113
113
114 vanilla clients locked out from largefiles ssh repos
114 vanilla clients locked out from largefiles ssh repos
115 $ hg --config extensions.largefiles=! clone -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5
115 $ hg --config extensions.largefiles=! clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5
116 remote:
116 remote:
117 remote: This repository uses the largefiles extension.
117 remote: This repository uses the largefiles extension.
118 remote:
118 remote:
119 remote: Please enable it in your Mercurial config file.
119 remote: Please enable it in your Mercurial config file.
120 remote:
120 remote:
121 remote: -
121 remote: -
122 abort: remote error
122 abort: remote error
123 (check previous remote output)
123 (check previous remote output)
124 [255]
124 [255]
125
125
126 #if serve
126 #if serve
127
127
128 largefiles clients refuse to push largefiles repos to vanilla servers
128 largefiles clients refuse to push largefiles repos to vanilla servers
129 $ mkdir r6
129 $ mkdir r6
130 $ cd r6
130 $ cd r6
131 $ hg init
131 $ hg init
132 $ echo c1 > f1
132 $ echo c1 > f1
133 $ hg add f1
133 $ hg add f1
134 $ hg commit -m "m1"
134 $ hg commit -m "m1"
135 Invoking status precommit hook
135 Invoking status precommit hook
136 A f1
136 A f1
137 $ cat >> .hg/hgrc <<!
137 $ cat >> .hg/hgrc <<!
138 > [web]
138 > [web]
139 > push_ssl = false
139 > push_ssl = false
140 > allow_push = *
140 > allow_push = *
141 > !
141 > !
142 $ cd ..
142 $ cd ..
143 $ hg clone r6 r7
143 $ hg clone r6 r7
144 updating to branch default
144 updating to branch default
145 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
145 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
146 $ cd r7
146 $ cd r7
147 $ echo c2 > f2
147 $ echo c2 > f2
148 $ hg add --large f2
148 $ hg add --large f2
149 $ hg commit -m "m2"
149 $ hg commit -m "m2"
150 Invoking status precommit hook
150 Invoking status precommit hook
151 A f2
151 A f2
152 $ hg verify --large
152 $ hg verify --large
153 checking changesets
153 checking changesets
154 checking manifests
154 checking manifests
155 crosschecking files in changesets and manifests
155 crosschecking files in changesets and manifests
156 checking files
156 checking files
157 2 files, 2 changesets, 2 total revisions
157 2 files, 2 changesets, 2 total revisions
158 searching 1 changesets for largefiles
158 searching 1 changesets for largefiles
159 verified existence of 1 revisions of 1 largefiles
159 verified existence of 1 revisions of 1 largefiles
160 $ hg serve --config extensions.largefiles=! -R ../r6 -d -p $HGPORT --pid-file ../hg.pid
160 $ hg serve --config extensions.largefiles=! -R ../r6 -d -p $HGPORT --pid-file ../hg.pid
161 $ cat ../hg.pid >> $DAEMON_PIDS
161 $ cat ../hg.pid >> $DAEMON_PIDS
162 $ hg push http://localhost:$HGPORT
162 $ hg push http://localhost:$HGPORT
163 pushing to http://localhost:$HGPORT/
163 pushing to http://localhost:$HGPORT/
164 searching for changes
164 searching for changes
165 abort: http://localhost:$HGPORT/ does not appear to be a largefile store
165 abort: http://localhost:$HGPORT/ does not appear to be a largefile store
166 [255]
166 [255]
167 $ cd ..
167 $ cd ..
168
168
169 putlfile errors are shown (issue3123)
169 putlfile errors are shown (issue3123)
170 Corrupt the cached largefile in r7 and move it out of the servers usercache
170 Corrupt the cached largefile in r7 and move it out of the servers usercache
171 $ mv r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 .
171 $ mv r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 .
172 $ echo 'client side corruption' > r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
172 $ echo 'client side corruption' > r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
173 $ rm "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8"
173 $ rm "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8"
174 $ hg init empty
174 $ hg init empty
175 $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \
175 $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \
176 > --config 'web.allow_push=*' --config web.push_ssl=False
176 > --config 'web.allow_push=*' --config web.push_ssl=False
177 $ cat hg.pid >> $DAEMON_PIDS
177 $ cat hg.pid >> $DAEMON_PIDS
178 $ hg push -R r7 http://localhost:$HGPORT1
178 $ hg push -R r7 http://localhost:$HGPORT1
179 pushing to http://localhost:$HGPORT1/
179 pushing to http://localhost:$HGPORT1/
180 searching for changes
180 searching for changes
181 remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash
181 remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash
182 abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob)
182 abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob)
183 [255]
183 [255]
184 $ mv 4cdac4d8b084d0b599525cf732437fb337d422a8 r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
184 $ mv 4cdac4d8b084d0b599525cf732437fb337d422a8 r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
185 Push of file that exists on server but is corrupted - magic healing would be nice ... but too magic
185 Push of file that exists on server but is corrupted - magic healing would be nice ... but too magic
186 $ echo "server side corruption" > empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
186 $ echo "server side corruption" > empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
187 $ hg push -R r7 http://localhost:$HGPORT1
187 $ hg push -R r7 http://localhost:$HGPORT1
188 pushing to http://localhost:$HGPORT1/
188 pushing to http://localhost:$HGPORT1/
189 searching for changes
189 searching for changes
190 remote: adding changesets
190 remote: adding changesets
191 remote: adding manifests
191 remote: adding manifests
192 remote: adding file changes
192 remote: adding file changes
193 remote: added 2 changesets with 2 changes to 2 files
193 remote: added 2 changesets with 2 changes to 2 files
194 $ cat empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
194 $ cat empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
195 server side corruption
195 server side corruption
196 $ rm -rf empty
196 $ rm -rf empty
197
197
198 Push a largefiles repository to a served empty repository
198 Push a largefiles repository to a served empty repository
199 $ hg init r8
199 $ hg init r8
200 $ echo c3 > r8/f1
200 $ echo c3 > r8/f1
201 $ hg add --large r8/f1 -R r8
201 $ hg add --large r8/f1 -R r8
202 $ hg commit -m "m1" -R r8
202 $ hg commit -m "m1" -R r8
203 Invoking status precommit hook
203 Invoking status precommit hook
204 A f1
204 A f1
205 $ hg init empty
205 $ hg init empty
206 $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \
206 $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \
207 > --config 'web.allow_push=*' --config web.push_ssl=False
207 > --config 'web.allow_push=*' --config web.push_ssl=False
208 $ cat hg.pid >> $DAEMON_PIDS
208 $ cat hg.pid >> $DAEMON_PIDS
209 $ rm "${USERCACHE}"/*
209 $ rm "${USERCACHE}"/*
210 $ hg push -R r8 http://localhost:$HGPORT2/#default
210 $ hg push -R r8 http://localhost:$HGPORT2/#default
211 pushing to http://localhost:$HGPORT2/
211 pushing to http://localhost:$HGPORT2/
212 searching for changes
212 searching for changes
213 remote: adding changesets
213 remote: adding changesets
214 remote: adding manifests
214 remote: adding manifests
215 remote: adding file changes
215 remote: adding file changes
216 remote: added 1 changesets with 1 changes to 1 files
216 remote: added 1 changesets with 1 changes to 1 files
217 $ [ -f "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 ]
217 $ [ -f "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 ]
218 $ [ -f empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ]
218 $ [ -f empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ]
219
219
220 Clone over http, no largefiles pulled on clone.
220 Clone over http, no largefiles pulled on clone.
221
221
222 $ hg clone http://localhost:$HGPORT2/#default http-clone -U
222 $ hg clone http://localhost:$HGPORT2/#default http-clone -U
223 adding changesets
223 adding changesets
224 adding manifests
224 adding manifests
225 adding file changes
225 adding file changes
226 added 1 changesets with 1 changes to 1 files
226 added 1 changesets with 1 changes to 1 files
227
227
228 Archive contains largefiles
228 Archive contains largefiles
229 >>> import urllib2, os
229 >>> import urllib2, os
230 >>> u = 'http://localhost:%s/archive/default.zip' % os.environ['HGPORT2']
230 >>> u = 'http://localhost:%s/archive/default.zip' % os.environ['HGPORT2']
231 >>> with open('archive.zip', 'w') as f:
231 >>> with open('archive.zip', 'w') as f:
232 ... f.write(urllib2.urlopen(u).read())
232 ... f.write(urllib2.urlopen(u).read())
233 $ unzip -t archive.zip
233 $ unzip -t archive.zip
234 Archive: archive.zip
234 Archive: archive.zip
235 testing: empty-default/.hg_archival.txt*OK (glob)
235 testing: empty-default/.hg_archival.txt*OK (glob)
236 testing: empty-default/f1*OK (glob)
236 testing: empty-default/f1*OK (glob)
237 No errors detected in compressed data of archive.zip.
237 No errors detected in compressed data of archive.zip.
238
238
239 test 'verify' with remotestore:
239 test 'verify' with remotestore:
240
240
241 $ rm "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90
241 $ rm "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90
242 $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 .
242 $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 .
243 $ hg -R http-clone verify --large --lfa
243 $ hg -R http-clone verify --large --lfa
244 checking changesets
244 checking changesets
245 checking manifests
245 checking manifests
246 crosschecking files in changesets and manifests
246 crosschecking files in changesets and manifests
247 checking files
247 checking files
248 1 files, 1 changesets, 1 total revisions
248 1 files, 1 changesets, 1 total revisions
249 searching 1 changesets for largefiles
249 searching 1 changesets for largefiles
250 changeset 0:cf03e5bb9936: f1 missing
250 changeset 0:cf03e5bb9936: f1 missing
251 verified existence of 1 revisions of 1 largefiles
251 verified existence of 1 revisions of 1 largefiles
252 [1]
252 [1]
253 $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/
253 $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/
254 $ hg -R http-clone -q verify --large --lfa
254 $ hg -R http-clone -q verify --large --lfa
255
255
256 largefiles pulled on update - a largefile missing on the server:
256 largefiles pulled on update - a largefile missing on the server:
257 $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 .
257 $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 .
258 $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache
258 $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache
259 getting changed largefiles
259 getting changed largefiles
260 f1: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 not available from http://localhost:$HGPORT2/
260 f1: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 not available from http://localhost:$HGPORT2/
261 0 largefiles updated, 0 removed
261 0 largefiles updated, 0 removed
262 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
262 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
263 $ hg -R http-clone st
263 $ hg -R http-clone st
264 ! f1
264 ! f1
265 $ hg -R http-clone up -Cqr null
265 $ hg -R http-clone up -Cqr null
266
266
267 largefiles pulled on update - a largefile corrupted on the server:
267 largefiles pulled on update - a largefile corrupted on the server:
268 $ echo corruption > empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90
268 $ echo corruption > empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90
269 $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache
269 $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache
270 getting changed largefiles
270 getting changed largefiles
271 f1: data corruption (expected 02a439e5c31c526465ab1a0ca1f431f76b827b90, got 6a7bb2556144babe3899b25e5428123735bb1e27)
271 f1: data corruption (expected 02a439e5c31c526465ab1a0ca1f431f76b827b90, got 6a7bb2556144babe3899b25e5428123735bb1e27)
272 0 largefiles updated, 0 removed
272 0 largefiles updated, 0 removed
273 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
273 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
274 $ hg -R http-clone st
274 $ hg -R http-clone st
275 ! f1
275 ! f1
276 $ [ ! -f http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ]
276 $ [ ! -f http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ]
277 $ [ ! -f http-clone/f1 ]
277 $ [ ! -f http-clone/f1 ]
278 $ [ ! -f http-clone-usercache ]
278 $ [ ! -f http-clone-usercache ]
279 $ hg -R http-clone verify --large --lfc
279 $ hg -R http-clone verify --large --lfc
280 checking changesets
280 checking changesets
281 checking manifests
281 checking manifests
282 crosschecking files in changesets and manifests
282 crosschecking files in changesets and manifests
283 checking files
283 checking files
284 1 files, 1 changesets, 1 total revisions
284 1 files, 1 changesets, 1 total revisions
285 searching 1 changesets for largefiles
285 searching 1 changesets for largefiles
286 verified contents of 1 revisions of 1 largefiles
286 verified contents of 1 revisions of 1 largefiles
287 $ hg -R http-clone up -Cqr null
287 $ hg -R http-clone up -Cqr null
288
288
289 largefiles pulled on update - no server side problems:
289 largefiles pulled on update - no server side problems:
290 $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/
290 $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/
291 $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache --config progress.debug=true
291 $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache --config progress.debug=true
292 resolving manifests
292 resolving manifests
293 branchmerge: False, force: False, partial: False
293 branchmerge: False, force: False, partial: False
294 ancestor: 000000000000, local: 000000000000+, remote: cf03e5bb9936
294 ancestor: 000000000000, local: 000000000000+, remote: cf03e5bb9936
295 .hglf/f1: remote created -> g
295 .hglf/f1: remote created -> g
296 getting .hglf/f1
296 getting .hglf/f1
297 updating: .hglf/f1 1/1 files (100.00%)
297 updating: .hglf/f1 1/1 files (100.00%)
298 getting changed largefiles
298 getting changed largefiles
299 using http://localhost:$HGPORT2/
299 using http://localhost:$HGPORT2/
300 sending capabilities command
300 sending capabilities command
301 sending batch command
301 sending batch command
302 getting largefiles: 0/1 files (0.00%)
302 getting largefiles: 0/1 files (0.00%)
303 getting f1:02a439e5c31c526465ab1a0ca1f431f76b827b90
303 getting f1:02a439e5c31c526465ab1a0ca1f431f76b827b90
304 sending getlfile command
304 sending getlfile command
305 found 02a439e5c31c526465ab1a0ca1f431f76b827b90 in store
305 found 02a439e5c31c526465ab1a0ca1f431f76b827b90 in store
306 1 largefiles updated, 0 removed
306 1 largefiles updated, 0 removed
307 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
307 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
308
308
309 $ ls http-clone-usercache/*
309 $ ls http-clone-usercache/*
310 http-clone-usercache/02a439e5c31c526465ab1a0ca1f431f76b827b90
310 http-clone-usercache/02a439e5c31c526465ab1a0ca1f431f76b827b90
311
311
312 $ rm -rf empty http-clone*
312 $ rm -rf empty http-clone*
313
313
314 used all HGPORTs, kill all daemons
314 used all HGPORTs, kill all daemons
315 $ killdaemons.py
315 $ killdaemons.py
316
316
317 largefiles should batch verify remote calls
317 largefiles should batch verify remote calls
318
318
319 $ hg init batchverifymain
319 $ hg init batchverifymain
320 $ cd batchverifymain
320 $ cd batchverifymain
321 $ echo "aaa" >> a
321 $ echo "aaa" >> a
322 $ hg add --large a
322 $ hg add --large a
323 $ hg commit -m "a"
323 $ hg commit -m "a"
324 Invoking status precommit hook
324 Invoking status precommit hook
325 A a
325 A a
326 $ echo "bbb" >> b
326 $ echo "bbb" >> b
327 $ hg add --large b
327 $ hg add --large b
328 $ hg commit -m "b"
328 $ hg commit -m "b"
329 Invoking status precommit hook
329 Invoking status precommit hook
330 A b
330 A b
331 $ cd ..
331 $ cd ..
332 $ hg serve -R batchverifymain -d -p $HGPORT --pid-file hg.pid \
332 $ hg serve -R batchverifymain -d -p $HGPORT --pid-file hg.pid \
333 > -A access.log
333 > -A access.log
334 $ cat hg.pid >> $DAEMON_PIDS
334 $ cat hg.pid >> $DAEMON_PIDS
335 $ hg clone --noupdate http://localhost:$HGPORT batchverifyclone
335 $ hg clone --noupdate http://localhost:$HGPORT batchverifyclone
336 requesting all changes
336 requesting all changes
337 adding changesets
337 adding changesets
338 adding manifests
338 adding manifests
339 adding file changes
339 adding file changes
340 added 2 changesets with 2 changes to 2 files
340 added 2 changesets with 2 changes to 2 files
341 $ hg -R batchverifyclone verify --large --lfa
341 $ hg -R batchverifyclone verify --large --lfa
342 checking changesets
342 checking changesets
343 checking manifests
343 checking manifests
344 crosschecking files in changesets and manifests
344 crosschecking files in changesets and manifests
345 checking files
345 checking files
346 2 files, 2 changesets, 2 total revisions
346 2 files, 2 changesets, 2 total revisions
347 searching 2 changesets for largefiles
347 searching 2 changesets for largefiles
348 verified existence of 2 revisions of 2 largefiles
348 verified existence of 2 revisions of 2 largefiles
349 $ tail -1 access.log
349 $ tail -1 access.log
350 $LOCALIP - - [*] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=statlfile+sha%3D972a1a11f19934401291cc99117ec614933374ce%3Bstatlfile+sha%3Dc801c9cfe94400963fcb683246217d5db77f9a9a x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
350 $LOCALIP - - [*] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=statlfile+sha%3D972a1a11f19934401291cc99117ec614933374ce%3Bstatlfile+sha%3Dc801c9cfe94400963fcb683246217d5db77f9a9a x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
351 $ hg -R batchverifyclone update
351 $ hg -R batchverifyclone update
352 getting changed largefiles
352 getting changed largefiles
353 2 largefiles updated, 0 removed
353 2 largefiles updated, 0 removed
354 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
354 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
355
355
356 Clear log file before next test
356 Clear log file before next test
357
357
358 $ printf "" > access.log
358 $ printf "" > access.log
359
359
360 Verify should check file on remote server only when file is not
360 Verify should check file on remote server only when file is not
361 available locally.
361 available locally.
362
362
363 $ echo "ccc" >> batchverifymain/c
363 $ echo "ccc" >> batchverifymain/c
364 $ hg -R batchverifymain status
364 $ hg -R batchverifymain status
365 ? c
365 ? c
366 $ hg -R batchverifymain add --large batchverifymain/c
366 $ hg -R batchverifymain add --large batchverifymain/c
367 $ hg -R batchverifymain commit -m "c"
367 $ hg -R batchverifymain commit -m "c"
368 Invoking status precommit hook
368 Invoking status precommit hook
369 A c
369 A c
370 $ hg -R batchverifyclone pull
370 $ hg -R batchverifyclone pull
371 pulling from http://localhost:$HGPORT/
371 pulling from http://localhost:$HGPORT/
372 searching for changes
372 searching for changes
373 adding changesets
373 adding changesets
374 adding manifests
374 adding manifests
375 adding file changes
375 adding file changes
376 added 1 changesets with 1 changes to 1 files
376 added 1 changesets with 1 changes to 1 files
377 (run 'hg update' to get a working copy)
377 (run 'hg update' to get a working copy)
378 $ hg -R batchverifyclone verify --lfa
378 $ hg -R batchverifyclone verify --lfa
379 checking changesets
379 checking changesets
380 checking manifests
380 checking manifests
381 crosschecking files in changesets and manifests
381 crosschecking files in changesets and manifests
382 checking files
382 checking files
383 3 files, 3 changesets, 3 total revisions
383 3 files, 3 changesets, 3 total revisions
384 searching 3 changesets for largefiles
384 searching 3 changesets for largefiles
385 verified existence of 3 revisions of 3 largefiles
385 verified existence of 3 revisions of 3 largefiles
386 $ tail -1 access.log
386 $ tail -1 access.log
387 $LOCALIP - - [*] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=statlfile+sha%3Dc8559c3c9cfb42131794b7d8009230403b9b454c x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
387 $LOCALIP - - [*] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=statlfile+sha%3Dc8559c3c9cfb42131794b7d8009230403b9b454c x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
388
388
389 $ killdaemons.py
389 $ killdaemons.py
390
390
391 largefiles should not ask for password again after successful authorization
391 largefiles should not ask for password again after successful authorization
392
392
393 $ hg init credentialmain
393 $ hg init credentialmain
394 $ cd credentialmain
394 $ cd credentialmain
395 $ echo "aaa" >> a
395 $ echo "aaa" >> a
396 $ hg add --large a
396 $ hg add --large a
397 $ hg commit -m "a"
397 $ hg commit -m "a"
398 Invoking status precommit hook
398 Invoking status precommit hook
399 A a
399 A a
400
400
401 Before running server clear the user cache to force clone to download
401 Before running server clear the user cache to force clone to download
402 a large file from the server rather than to get it from the cache
402 a large file from the server rather than to get it from the cache
403
403
404 $ rm "${USERCACHE}"/*
404 $ rm "${USERCACHE}"/*
405
405
406 $ cd ..
406 $ cd ..
407 $ cat << EOT > userpass.py
407 $ cat << EOT > userpass.py
408 > import base64
408 > import base64
409 > from mercurial.hgweb import common
409 > from mercurial.hgweb import common
410 > def perform_authentication(hgweb, req, op):
410 > def perform_authentication(hgweb, req, op):
411 > auth = req.env.get('HTTP_AUTHORIZATION')
411 > auth = req.env.get('HTTP_AUTHORIZATION')
412 > if not auth:
412 > if not auth:
413 > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who',
413 > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who',
414 > [('WWW-Authenticate', 'Basic Realm="mercurial"')])
414 > [('WWW-Authenticate', 'Basic Realm="mercurial"')])
415 > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']:
415 > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']:
416 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no')
416 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no')
417 > def extsetup():
417 > def extsetup():
418 > common.permhooks.insert(0, perform_authentication)
418 > common.permhooks.insert(0, perform_authentication)
419 > EOT
419 > EOT
420 $ hg serve --config extensions.x=userpass.py -R credentialmain \
420 $ hg serve --config extensions.x=userpass.py -R credentialmain \
421 > -d -p $HGPORT --pid-file hg.pid -A access.log
421 > -d -p $HGPORT --pid-file hg.pid -A access.log
422 $ cat hg.pid >> $DAEMON_PIDS
422 $ cat hg.pid >> $DAEMON_PIDS
423 $ cat << EOF > get_pass.py
423 $ cat << EOF > get_pass.py
424 > import getpass
424 > import getpass
425 > def newgetpass(arg):
425 > def newgetpass(arg):
426 > return "pass"
426 > return "pass"
427 > getpass.getpass = newgetpass
427 > getpass.getpass = newgetpass
428 > EOF
428 > EOF
429 $ hg clone --config ui.interactive=true --config extensions.getpass=get_pass.py \
429 $ hg clone --config ui.interactive=true --config extensions.getpass=get_pass.py \
430 > http://user@localhost:$HGPORT credentialclone
430 > http://user@localhost:$HGPORT credentialclone
431 requesting all changes
431 requesting all changes
432 http authorization required for http://localhost:$HGPORT/
432 http authorization required for http://localhost:$HGPORT/
433 realm: mercurial
433 realm: mercurial
434 user: user
434 user: user
435 password: adding changesets
435 password: adding changesets
436 adding manifests
436 adding manifests
437 adding file changes
437 adding file changes
438 added 1 changesets with 1 changes to 1 files
438 added 1 changesets with 1 changes to 1 files
439 updating to branch default
439 updating to branch default
440 getting changed largefiles
440 getting changed largefiles
441 1 largefiles updated, 0 removed
441 1 largefiles updated, 0 removed
442 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
442 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
443
443
444 $ killdaemons.py
444 $ killdaemons.py
445 $ rm hg.pid access.log
445 $ rm hg.pid access.log
446
446
447 #endif
447 #endif
@@ -1,562 +1,562
1 This test is a duplicate of 'test-http.t' feel free to factor out
1 This test is a duplicate of 'test-http.t' feel free to factor out
2 parts that are not bundle1/bundle2 specific.
2 parts that are not bundle1/bundle2 specific.
3
3
4 $ cat << EOF >> $HGRCPATH
4 $ cat << EOF >> $HGRCPATH
5 > [devel]
5 > [devel]
6 > # This test is dedicated to interaction through old bundle
6 > # This test is dedicated to interaction through old bundle
7 > legacy.exchange = bundle1
7 > legacy.exchange = bundle1
8 > [format] # temporary settings
8 > [format] # temporary settings
9 > usegeneraldelta=yes
9 > usegeneraldelta=yes
10 > EOF
10 > EOF
11
11
12
12
13 This test tries to exercise the ssh functionality with a dummy script
13 This test tries to exercise the ssh functionality with a dummy script
14
14
15 creating 'remote' repo
15 creating 'remote' repo
16
16
17 $ hg init remote
17 $ hg init remote
18 $ cd remote
18 $ cd remote
19 $ echo this > foo
19 $ echo this > foo
20 $ echo this > fooO
20 $ echo this > fooO
21 $ hg ci -A -m "init" foo fooO
21 $ hg ci -A -m "init" foo fooO
22
22
23 insert a closed branch (issue4428)
23 insert a closed branch (issue4428)
24
24
25 $ hg up null
25 $ hg up null
26 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
26 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
27 $ hg branch closed
27 $ hg branch closed
28 marked working directory as branch closed
28 marked working directory as branch closed
29 (branches are permanent and global, did you want a bookmark?)
29 (branches are permanent and global, did you want a bookmark?)
30 $ hg ci -mc0
30 $ hg ci -mc0
31 $ hg ci --close-branch -mc1
31 $ hg ci --close-branch -mc1
32 $ hg up -q default
32 $ hg up -q default
33
33
34 configure for serving
34 configure for serving
35
35
36 $ cat <<EOF > .hg/hgrc
36 $ cat <<EOF > .hg/hgrc
37 > [server]
37 > [server]
38 > uncompressed = True
38 > uncompressed = True
39 >
39 >
40 > [hooks]
40 > [hooks]
41 > changegroup = sh -c "printenv.py changegroup-in-remote 0 ../dummylog"
41 > changegroup = sh -c "printenv.py changegroup-in-remote 0 ../dummylog"
42 > EOF
42 > EOF
43 $ cd ..
43 $ cd ..
44
44
45 repo not found error
45 repo not found error
46
46
47 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local
47 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local
48 remote: abort: repository nonexistent not found!
48 remote: abort: repository nonexistent not found!
49 abort: no suitable response from remote hg!
49 abort: no suitable response from remote hg!
50 [255]
50 [255]
51
51
52 non-existent absolute path
52 non-existent absolute path
53
53
54 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy//`pwd`/nonexistent local
54 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy//`pwd`/nonexistent local
55 remote: abort: repository /$TESTTMP/nonexistent not found!
55 remote: abort: repository /$TESTTMP/nonexistent not found!
56 abort: no suitable response from remote hg!
56 abort: no suitable response from remote hg!
57 [255]
57 [255]
58
58
59 clone remote via stream
59 clone remote via stream
60
60
61 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/remote local-stream
61 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/remote local-stream
62 streaming all changes
62 streaming all changes
63 4 files to transfer, 602 bytes of data
63 4 files to transfer, 602 bytes of data
64 transferred 602 bytes in * seconds (*) (glob)
64 transferred 602 bytes in * seconds (*) (glob)
65 searching for changes
65 searching for changes
66 no changes found
66 no changes found
67 updating to branch default
67 updating to branch default
68 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
68 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
69 $ cd local-stream
69 $ cd local-stream
70 $ hg verify
70 $ hg verify
71 checking changesets
71 checking changesets
72 checking manifests
72 checking manifests
73 crosschecking files in changesets and manifests
73 crosschecking files in changesets and manifests
74 checking files
74 checking files
75 2 files, 3 changesets, 2 total revisions
75 2 files, 3 changesets, 2 total revisions
76 $ hg branches
76 $ hg branches
77 default 0:1160648e36ce
77 default 0:1160648e36ce
78 $ cd ..
78 $ cd ..
79
79
80 clone bookmarks via stream
80 clone bookmarks via stream
81
81
82 $ hg -R local-stream book mybook
82 $ hg -R local-stream book mybook
83 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/local-stream stream2
83 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/local-stream stream2
84 streaming all changes
84 streaming all changes
85 4 files to transfer, 602 bytes of data
85 4 files to transfer, 602 bytes of data
86 transferred 602 bytes in * seconds (*) (glob)
86 transferred 602 bytes in * seconds (*) (glob)
87 searching for changes
87 searching for changes
88 no changes found
88 no changes found
89 updating to branch default
89 updating to branch default
90 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
91 $ cd stream2
91 $ cd stream2
92 $ hg book
92 $ hg book
93 mybook 0:1160648e36ce
93 mybook 0:1160648e36ce
94 $ cd ..
94 $ cd ..
95 $ rm -rf local-stream stream2
95 $ rm -rf local-stream stream2
96
96
97 clone remote via pull
97 clone remote via pull
98
98
99 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local
99 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local
100 requesting all changes
100 requesting all changes
101 adding changesets
101 adding changesets
102 adding manifests
102 adding manifests
103 adding file changes
103 adding file changes
104 added 3 changesets with 2 changes to 2 files
104 added 3 changesets with 2 changes to 2 files
105 updating to branch default
105 updating to branch default
106 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
106 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
107
107
108 verify
108 verify
109
109
110 $ cd local
110 $ cd local
111 $ hg verify
111 $ hg verify
112 checking changesets
112 checking changesets
113 checking manifests
113 checking manifests
114 crosschecking files in changesets and manifests
114 crosschecking files in changesets and manifests
115 checking files
115 checking files
116 2 files, 3 changesets, 2 total revisions
116 2 files, 3 changesets, 2 total revisions
117 $ cat >> .hg/hgrc <<EOF
117 $ cat >> .hg/hgrc <<EOF
118 > [hooks]
118 > [hooks]
119 > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog"
119 > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog"
120 > EOF
120 > EOF
121
121
122 empty default pull
122 empty default pull
123
123
124 $ hg paths
124 $ hg paths
125 default = ssh://user@dummy/remote
125 default = ssh://user@dummy/remote
126 $ hg pull -e "$PYTHON \"$TESTDIR/dummyssh\""
126 $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\""
127 pulling from ssh://user@dummy/remote
127 pulling from ssh://user@dummy/remote
128 searching for changes
128 searching for changes
129 no changes found
129 no changes found
130
130
131 pull from wrong ssh URL
131 pull from wrong ssh URL
132
132
133 $ hg pull -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist
133 $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist
134 pulling from ssh://user@dummy/doesnotexist
134 pulling from ssh://user@dummy/doesnotexist
135 remote: abort: repository doesnotexist not found!
135 remote: abort: repository doesnotexist not found!
136 abort: no suitable response from remote hg!
136 abort: no suitable response from remote hg!
137 [255]
137 [255]
138
138
139 local change
139 local change
140
140
141 $ echo bleah > foo
141 $ echo bleah > foo
142 $ hg ci -m "add"
142 $ hg ci -m "add"
143
143
144 updating rc
144 updating rc
145
145
146 $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc
146 $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc
147 $ echo "[ui]" >> .hg/hgrc
147 $ echo "[ui]" >> .hg/hgrc
148 $ echo "ssh = $PYTHON \"$TESTDIR/dummyssh\"" >> .hg/hgrc
148 $ echo "ssh = \"$PYTHON\" \"$TESTDIR/dummyssh\"" >> .hg/hgrc
149
149
150 find outgoing
150 find outgoing
151
151
152 $ hg out ssh://user@dummy/remote
152 $ hg out ssh://user@dummy/remote
153 comparing with ssh://user@dummy/remote
153 comparing with ssh://user@dummy/remote
154 searching for changes
154 searching for changes
155 changeset: 3:a28a9d1a809c
155 changeset: 3:a28a9d1a809c
156 tag: tip
156 tag: tip
157 parent: 0:1160648e36ce
157 parent: 0:1160648e36ce
158 user: test
158 user: test
159 date: Thu Jan 01 00:00:00 1970 +0000
159 date: Thu Jan 01 00:00:00 1970 +0000
160 summary: add
160 summary: add
161
161
162
162
163 find incoming on the remote side
163 find incoming on the remote side
164
164
165 $ hg incoming -R ../remote -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/local
165 $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/local
166 comparing with ssh://user@dummy/local
166 comparing with ssh://user@dummy/local
167 searching for changes
167 searching for changes
168 changeset: 3:a28a9d1a809c
168 changeset: 3:a28a9d1a809c
169 tag: tip
169 tag: tip
170 parent: 0:1160648e36ce
170 parent: 0:1160648e36ce
171 user: test
171 user: test
172 date: Thu Jan 01 00:00:00 1970 +0000
172 date: Thu Jan 01 00:00:00 1970 +0000
173 summary: add
173 summary: add
174
174
175
175
176 find incoming on the remote side (using absolute path)
176 find incoming on the remote side (using absolute path)
177
177
178 $ hg incoming -R ../remote -e "$PYTHON \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`"
178 $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`"
179 comparing with ssh://user@dummy/$TESTTMP/local
179 comparing with ssh://user@dummy/$TESTTMP/local
180 searching for changes
180 searching for changes
181 changeset: 3:a28a9d1a809c
181 changeset: 3:a28a9d1a809c
182 tag: tip
182 tag: tip
183 parent: 0:1160648e36ce
183 parent: 0:1160648e36ce
184 user: test
184 user: test
185 date: Thu Jan 01 00:00:00 1970 +0000
185 date: Thu Jan 01 00:00:00 1970 +0000
186 summary: add
186 summary: add
187
187
188
188
189 push
189 push
190
190
191 $ hg push
191 $ hg push
192 pushing to ssh://user@dummy/remote
192 pushing to ssh://user@dummy/remote
193 searching for changes
193 searching for changes
194 remote: adding changesets
194 remote: adding changesets
195 remote: adding manifests
195 remote: adding manifests
196 remote: adding file changes
196 remote: adding file changes
197 remote: added 1 changesets with 1 changes to 1 files
197 remote: added 1 changesets with 1 changes to 1 files
198 $ cd ../remote
198 $ cd ../remote
199
199
200 check remote tip
200 check remote tip
201
201
202 $ hg tip
202 $ hg tip
203 changeset: 3:a28a9d1a809c
203 changeset: 3:a28a9d1a809c
204 tag: tip
204 tag: tip
205 parent: 0:1160648e36ce
205 parent: 0:1160648e36ce
206 user: test
206 user: test
207 date: Thu Jan 01 00:00:00 1970 +0000
207 date: Thu Jan 01 00:00:00 1970 +0000
208 summary: add
208 summary: add
209
209
210 $ hg verify
210 $ hg verify
211 checking changesets
211 checking changesets
212 checking manifests
212 checking manifests
213 crosschecking files in changesets and manifests
213 crosschecking files in changesets and manifests
214 checking files
214 checking files
215 2 files, 4 changesets, 3 total revisions
215 2 files, 4 changesets, 3 total revisions
216 $ hg cat -r tip foo
216 $ hg cat -r tip foo
217 bleah
217 bleah
218 $ echo z > z
218 $ echo z > z
219 $ hg ci -A -m z z
219 $ hg ci -A -m z z
220 created new head
220 created new head
221
221
222 test pushkeys and bookmarks
222 test pushkeys and bookmarks
223
223
224 $ cd ../local
224 $ cd ../local
225 $ hg debugpushkey --config ui.ssh="$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces
225 $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces
226 bookmarks
226 bookmarks
227 namespaces
227 namespaces
228 phases
228 phases
229 $ hg book foo -r 0
229 $ hg book foo -r 0
230 $ hg out -B
230 $ hg out -B
231 comparing with ssh://user@dummy/remote
231 comparing with ssh://user@dummy/remote
232 searching for changed bookmarks
232 searching for changed bookmarks
233 foo 1160648e36ce
233 foo 1160648e36ce
234 $ hg push -B foo
234 $ hg push -B foo
235 pushing to ssh://user@dummy/remote
235 pushing to ssh://user@dummy/remote
236 searching for changes
236 searching for changes
237 no changes found
237 no changes found
238 exporting bookmark foo
238 exporting bookmark foo
239 [1]
239 [1]
240 $ hg debugpushkey --config ui.ssh="$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks
240 $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks
241 foo 1160648e36cec0054048a7edc4110c6f84fde594
241 foo 1160648e36cec0054048a7edc4110c6f84fde594
242 $ hg book -f foo
242 $ hg book -f foo
243 $ hg push --traceback
243 $ hg push --traceback
244 pushing to ssh://user@dummy/remote
244 pushing to ssh://user@dummy/remote
245 searching for changes
245 searching for changes
246 no changes found
246 no changes found
247 updating bookmark foo
247 updating bookmark foo
248 [1]
248 [1]
249 $ hg book -d foo
249 $ hg book -d foo
250 $ hg in -B
250 $ hg in -B
251 comparing with ssh://user@dummy/remote
251 comparing with ssh://user@dummy/remote
252 searching for changed bookmarks
252 searching for changed bookmarks
253 foo a28a9d1a809c
253 foo a28a9d1a809c
254 $ hg book -f -r 0 foo
254 $ hg book -f -r 0 foo
255 $ hg pull -B foo
255 $ hg pull -B foo
256 pulling from ssh://user@dummy/remote
256 pulling from ssh://user@dummy/remote
257 no changes found
257 no changes found
258 updating bookmark foo
258 updating bookmark foo
259 $ hg book -d foo
259 $ hg book -d foo
260 $ hg push -B foo
260 $ hg push -B foo
261 pushing to ssh://user@dummy/remote
261 pushing to ssh://user@dummy/remote
262 searching for changes
262 searching for changes
263 no changes found
263 no changes found
264 deleting remote bookmark foo
264 deleting remote bookmark foo
265 [1]
265 [1]
266
266
267 a bad, evil hook that prints to stdout
267 a bad, evil hook that prints to stdout
268
268
269 $ cat <<EOF > $TESTTMP/badhook
269 $ cat <<EOF > $TESTTMP/badhook
270 > import sys
270 > import sys
271 > sys.stdout.write("KABOOM\n")
271 > sys.stdout.write("KABOOM\n")
272 > EOF
272 > EOF
273
273
274 $ echo '[hooks]' >> ../remote/.hg/hgrc
274 $ echo '[hooks]' >> ../remote/.hg/hgrc
275 $ echo "changegroup.stdout = $PYTHON $TESTTMP/badhook" >> ../remote/.hg/hgrc
275 $ echo "changegroup.stdout = \"$PYTHON\" $TESTTMP/badhook" >> ../remote/.hg/hgrc
276 $ echo r > r
276 $ echo r > r
277 $ hg ci -A -m z r
277 $ hg ci -A -m z r
278
278
279 push should succeed even though it has an unexpected response
279 push should succeed even though it has an unexpected response
280
280
281 $ hg push
281 $ hg push
282 pushing to ssh://user@dummy/remote
282 pushing to ssh://user@dummy/remote
283 searching for changes
283 searching for changes
284 remote has heads on branch 'default' that are not known locally: 6c0482d977a3
284 remote has heads on branch 'default' that are not known locally: 6c0482d977a3
285 remote: adding changesets
285 remote: adding changesets
286 remote: adding manifests
286 remote: adding manifests
287 remote: adding file changes
287 remote: adding file changes
288 remote: added 1 changesets with 1 changes to 1 files
288 remote: added 1 changesets with 1 changes to 1 files
289 remote: KABOOM
289 remote: KABOOM
290 $ hg -R ../remote heads
290 $ hg -R ../remote heads
291 changeset: 5:1383141674ec
291 changeset: 5:1383141674ec
292 tag: tip
292 tag: tip
293 parent: 3:a28a9d1a809c
293 parent: 3:a28a9d1a809c
294 user: test
294 user: test
295 date: Thu Jan 01 00:00:00 1970 +0000
295 date: Thu Jan 01 00:00:00 1970 +0000
296 summary: z
296 summary: z
297
297
298 changeset: 4:6c0482d977a3
298 changeset: 4:6c0482d977a3
299 parent: 0:1160648e36ce
299 parent: 0:1160648e36ce
300 user: test
300 user: test
301 date: Thu Jan 01 00:00:00 1970 +0000
301 date: Thu Jan 01 00:00:00 1970 +0000
302 summary: z
302 summary: z
303
303
304
304
305 clone bookmarks
305 clone bookmarks
306
306
307 $ hg -R ../remote bookmark test
307 $ hg -R ../remote bookmark test
308 $ hg -R ../remote bookmarks
308 $ hg -R ../remote bookmarks
309 * test 4:6c0482d977a3
309 * test 4:6c0482d977a3
310 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks
310 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks
311 requesting all changes
311 requesting all changes
312 adding changesets
312 adding changesets
313 adding manifests
313 adding manifests
314 adding file changes
314 adding file changes
315 added 6 changesets with 5 changes to 4 files (+1 heads)
315 added 6 changesets with 5 changes to 4 files (+1 heads)
316 updating to branch default
316 updating to branch default
317 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
317 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
318 $ hg -R local-bookmarks bookmarks
318 $ hg -R local-bookmarks bookmarks
319 test 4:6c0482d977a3
319 test 4:6c0482d977a3
320
320
321 passwords in ssh urls are not supported
321 passwords in ssh urls are not supported
322 (we use a glob here because different Python versions give different
322 (we use a glob here because different Python versions give different
323 results here)
323 results here)
324
324
325 $ hg push ssh://user:erroneouspwd@dummy/remote
325 $ hg push ssh://user:erroneouspwd@dummy/remote
326 pushing to ssh://user:*@dummy/remote (glob)
326 pushing to ssh://user:*@dummy/remote (glob)
327 abort: password in URL not supported!
327 abort: password in URL not supported!
328 [255]
328 [255]
329
329
330 $ cd ..
330 $ cd ..
331
331
332 hide outer repo
332 hide outer repo
333 $ hg init
333 $ hg init
334
334
335 Test remote paths with spaces (issue2983):
335 Test remote paths with spaces (issue2983):
336
336
337 $ hg init --ssh "$PYTHON \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
337 $ hg init --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
338 $ touch "$TESTTMP/a repo/test"
338 $ touch "$TESTTMP/a repo/test"
339 $ hg -R 'a repo' commit -A -m "test"
339 $ hg -R 'a repo' commit -A -m "test"
340 adding test
340 adding test
341 $ hg -R 'a repo' tag tag
341 $ hg -R 'a repo' tag tag
342 $ hg id --ssh "$PYTHON \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
342 $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
343 73649e48688a
343 73649e48688a
344
344
345 $ hg id --ssh "$PYTHON \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO"
345 $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO"
346 abort: unknown revision 'noNoNO'!
346 abort: unknown revision 'noNoNO'!
347 [255]
347 [255]
348
348
349 Test (non-)escaping of remote paths with spaces when cloning (issue3145):
349 Test (non-)escaping of remote paths with spaces when cloning (issue3145):
350
350
351 $ hg clone --ssh "$PYTHON \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
351 $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
352 destination directory: a repo
352 destination directory: a repo
353 abort: destination 'a repo' is not empty
353 abort: destination 'a repo' is not empty
354 [255]
354 [255]
355
355
356 Test hg-ssh using a helper script that will restore PYTHONPATH (which might
356 Test hg-ssh using a helper script that will restore PYTHONPATH (which might
357 have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right
357 have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right
358 parameters:
358 parameters:
359
359
360 $ cat > ssh.sh << EOF
360 $ cat > ssh.sh << EOF
361 > userhost="\$1"
361 > userhost="\$1"
362 > SSH_ORIGINAL_COMMAND="\$2"
362 > SSH_ORIGINAL_COMMAND="\$2"
363 > export SSH_ORIGINAL_COMMAND
363 > export SSH_ORIGINAL_COMMAND
364 > PYTHONPATH="$PYTHONPATH"
364 > PYTHONPATH="$PYTHONPATH"
365 > export PYTHONPATH
365 > export PYTHONPATH
366 > $PYTHON "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo"
366 > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo"
367 > EOF
367 > EOF
368
368
369 $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo"
369 $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo"
370 73649e48688a
370 73649e48688a
371
371
372 $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo"
372 $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo"
373 remote: Illegal repository "$TESTTMP/a'repo" (glob)
373 remote: Illegal repository "$TESTTMP/a'repo" (glob)
374 abort: no suitable response from remote hg!
374 abort: no suitable response from remote hg!
375 [255]
375 [255]
376
376
377 $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo"
377 $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo"
378 remote: Illegal command "hacking -R 'a'\''repo' serve --stdio"
378 remote: Illegal command "hacking -R 'a'\''repo' serve --stdio"
379 abort: no suitable response from remote hg!
379 abort: no suitable response from remote hg!
380 [255]
380 [255]
381
381
382 $ SSH_ORIGINAL_COMMAND="'hg' serve -R 'a'repo' --stdio" $PYTHON "$TESTDIR/../contrib/hg-ssh"
382 $ SSH_ORIGINAL_COMMAND="'hg' serve -R 'a'repo' --stdio" $PYTHON "$TESTDIR/../contrib/hg-ssh"
383 Illegal command "'hg' serve -R 'a'repo' --stdio": No closing quotation
383 Illegal command "'hg' serve -R 'a'repo' --stdio": No closing quotation
384 [255]
384 [255]
385
385
386 Test hg-ssh in read-only mode:
386 Test hg-ssh in read-only mode:
387
387
388 $ cat > ssh.sh << EOF
388 $ cat > ssh.sh << EOF
389 > userhost="\$1"
389 > userhost="\$1"
390 > SSH_ORIGINAL_COMMAND="\$2"
390 > SSH_ORIGINAL_COMMAND="\$2"
391 > export SSH_ORIGINAL_COMMAND
391 > export SSH_ORIGINAL_COMMAND
392 > PYTHONPATH="$PYTHONPATH"
392 > PYTHONPATH="$PYTHONPATH"
393 > export PYTHONPATH
393 > export PYTHONPATH
394 > $PYTHON "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote"
394 > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote"
395 > EOF
395 > EOF
396
396
397 $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local
397 $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local
398 requesting all changes
398 requesting all changes
399 adding changesets
399 adding changesets
400 adding manifests
400 adding manifests
401 adding file changes
401 adding file changes
402 added 6 changesets with 5 changes to 4 files (+1 heads)
402 added 6 changesets with 5 changes to 4 files (+1 heads)
403 updating to branch default
403 updating to branch default
404 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
404 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
405
405
406 $ cd read-only-local
406 $ cd read-only-local
407 $ echo "baz" > bar
407 $ echo "baz" > bar
408 $ hg ci -A -m "unpushable commit" bar
408 $ hg ci -A -m "unpushable commit" bar
409 $ hg push --ssh "sh ../ssh.sh"
409 $ hg push --ssh "sh ../ssh.sh"
410 pushing to ssh://user@dummy/*/remote (glob)
410 pushing to ssh://user@dummy/*/remote (glob)
411 searching for changes
411 searching for changes
412 remote: Permission denied
412 remote: Permission denied
413 remote: abort: pretxnopen.hg-ssh hook failed
413 remote: abort: pretxnopen.hg-ssh hook failed
414 remote: Permission denied
414 remote: Permission denied
415 remote: pushkey-abort: prepushkey.hg-ssh hook failed
415 remote: pushkey-abort: prepushkey.hg-ssh hook failed
416 updating 6c0482d977a3 to public failed!
416 updating 6c0482d977a3 to public failed!
417 [1]
417 [1]
418
418
419 $ cd ..
419 $ cd ..
420
420
421 stderr from remote commands should be printed before stdout from local code (issue4336)
421 stderr from remote commands should be printed before stdout from local code (issue4336)
422
422
423 $ hg clone remote stderr-ordering
423 $ hg clone remote stderr-ordering
424 updating to branch default
424 updating to branch default
425 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
425 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
426 $ cd stderr-ordering
426 $ cd stderr-ordering
427 $ cat >> localwrite.py << EOF
427 $ cat >> localwrite.py << EOF
428 > from mercurial import exchange, extensions
428 > from mercurial import exchange, extensions
429 >
429 >
430 > def wrappedpush(orig, repo, *args, **kwargs):
430 > def wrappedpush(orig, repo, *args, **kwargs):
431 > res = orig(repo, *args, **kwargs)
431 > res = orig(repo, *args, **kwargs)
432 > repo.ui.write('local stdout\n')
432 > repo.ui.write('local stdout\n')
433 > return res
433 > return res
434 >
434 >
435 > def extsetup(ui):
435 > def extsetup(ui):
436 > extensions.wrapfunction(exchange, 'push', wrappedpush)
436 > extensions.wrapfunction(exchange, 'push', wrappedpush)
437 > EOF
437 > EOF
438
438
439 $ cat >> .hg/hgrc << EOF
439 $ cat >> .hg/hgrc << EOF
440 > [paths]
440 > [paths]
441 > default-push = ssh://user@dummy/remote
441 > default-push = ssh://user@dummy/remote
442 > [ui]
442 > [ui]
443 > ssh = $PYTHON "$TESTDIR/dummyssh"
443 > ssh = "$PYTHON" "$TESTDIR/dummyssh"
444 > [extensions]
444 > [extensions]
445 > localwrite = localwrite.py
445 > localwrite = localwrite.py
446 > EOF
446 > EOF
447
447
448 $ echo localwrite > foo
448 $ echo localwrite > foo
449 $ hg commit -m 'testing localwrite'
449 $ hg commit -m 'testing localwrite'
450 $ hg push
450 $ hg push
451 pushing to ssh://user@dummy/remote
451 pushing to ssh://user@dummy/remote
452 searching for changes
452 searching for changes
453 remote: adding changesets
453 remote: adding changesets
454 remote: adding manifests
454 remote: adding manifests
455 remote: adding file changes
455 remote: adding file changes
456 remote: added 1 changesets with 1 changes to 1 files
456 remote: added 1 changesets with 1 changes to 1 files
457 remote: KABOOM
457 remote: KABOOM
458 local stdout
458 local stdout
459
459
460 debug output
460 debug output
461
461
462 $ hg pull --debug ssh://user@dummy/remote
462 $ hg pull --debug ssh://user@dummy/remote
463 pulling from ssh://user@dummy/remote
463 pulling from ssh://user@dummy/remote
464 running .* ".*/dummyssh" user@dummy ('|")hg -R remote serve --stdio('|") (re)
464 running .* ".*/dummyssh" user@dummy ('|")hg -R remote serve --stdio('|") (re)
465 sending hello command
465 sending hello command
466 sending between command
466 sending between command
467 remote: 355
467 remote: 355
468 remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN
468 remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN
469 remote: 1
469 remote: 1
470 preparing listkeys for "bookmarks"
470 preparing listkeys for "bookmarks"
471 sending listkeys command
471 sending listkeys command
472 received listkey for "bookmarks": 45 bytes
472 received listkey for "bookmarks": 45 bytes
473 query 1; heads
473 query 1; heads
474 sending batch command
474 sending batch command
475 searching for changes
475 searching for changes
476 all remote heads known locally
476 all remote heads known locally
477 no changes found
477 no changes found
478 preparing listkeys for "phases"
478 preparing listkeys for "phases"
479 sending listkeys command
479 sending listkeys command
480 received listkey for "phases": 15 bytes
480 received listkey for "phases": 15 bytes
481 checking for updated bookmarks
481 checking for updated bookmarks
482
482
483 $ cd ..
483 $ cd ..
484
484
485 $ cat dummylog
485 $ cat dummylog
486 Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio
486 Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio
487 Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio
487 Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio
488 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
488 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
489 Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio
489 Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio
490 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
490 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
491 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
491 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
492 Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio
492 Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio
493 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
493 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
494 Got arguments 1:user@dummy 2:hg -R local serve --stdio
494 Got arguments 1:user@dummy 2:hg -R local serve --stdio
495 Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio
495 Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio
496 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
496 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
497 changegroup-in-remote hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP
497 changegroup-in-remote hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP
498 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
498 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
499 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
499 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
500 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
500 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
501 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
501 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
502 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
502 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
503 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
503 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
504 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
504 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
505 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
505 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
506 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
506 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
507 changegroup-in-remote hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP
507 changegroup-in-remote hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP
508 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
508 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
509 Got arguments 1:user@dummy 2:hg init 'a repo'
509 Got arguments 1:user@dummy 2:hg init 'a repo'
510 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
510 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
511 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
511 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
512 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
512 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
513 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
513 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
514 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
514 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
515 changegroup-in-remote hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP
515 changegroup-in-remote hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP
516 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
516 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
517
517
518 remote hook failure is attributed to remote
518 remote hook failure is attributed to remote
519
519
520 $ cat > $TESTTMP/failhook << EOF
520 $ cat > $TESTTMP/failhook << EOF
521 > def hook(ui, repo, **kwargs):
521 > def hook(ui, repo, **kwargs):
522 > ui.write('hook failure!\n')
522 > ui.write('hook failure!\n')
523 > ui.flush()
523 > ui.flush()
524 > return 1
524 > return 1
525 > EOF
525 > EOF
526
526
527 $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc
527 $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc
528
528
529 $ hg -q --config ui.ssh="$PYTHON $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout
529 $ hg -q --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout
530 $ cd hookout
530 $ cd hookout
531 $ touch hookfailure
531 $ touch hookfailure
532 $ hg -q commit -A -m 'remote hook failure'
532 $ hg -q commit -A -m 'remote hook failure'
533 $ hg --config ui.ssh="$PYTHON $TESTDIR/dummyssh" push
533 $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" push
534 pushing to ssh://user@dummy/remote
534 pushing to ssh://user@dummy/remote
535 searching for changes
535 searching for changes
536 remote: adding changesets
536 remote: adding changesets
537 remote: adding manifests
537 remote: adding manifests
538 remote: adding file changes
538 remote: adding file changes
539 remote: added 1 changesets with 1 changes to 1 files
539 remote: added 1 changesets with 1 changes to 1 files
540 remote: hook failure!
540 remote: hook failure!
541 remote: transaction abort!
541 remote: transaction abort!
542 remote: rollback completed
542 remote: rollback completed
543 remote: abort: pretxnchangegroup.fail hook failed
543 remote: abort: pretxnchangegroup.fail hook failed
544 [1]
544 [1]
545
545
546 abort during pull is properly reported as such
546 abort during pull is properly reported as such
547
547
548 $ echo morefoo >> ../remote/foo
548 $ echo morefoo >> ../remote/foo
549 $ hg -R ../remote commit --message "more foo to be pulled"
549 $ hg -R ../remote commit --message "more foo to be pulled"
550 $ cat >> ../remote/.hg/hgrc << EOF
550 $ cat >> ../remote/.hg/hgrc << EOF
551 > [extensions]
551 > [extensions]
552 > crash = ${TESTDIR}/crashgetbundler.py
552 > crash = ${TESTDIR}/crashgetbundler.py
553 > EOF
553 > EOF
554 $ hg --config ui.ssh="$PYTHON $TESTDIR/dummyssh" pull
554 $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" pull
555 pulling from ssh://user@dummy/remote
555 pulling from ssh://user@dummy/remote
556 searching for changes
556 searching for changes
557 adding changesets
557 adding changesets
558 remote: abort: this is an exercise
558 remote: abort: this is an exercise
559 transaction abort!
559 transaction abort!
560 rollback completed
560 rollback completed
561 abort: stream ended unexpectedly (got 0 bytes, expected 4)
561 abort: stream ended unexpectedly (got 0 bytes, expected 4)
562 [255]
562 [255]
@@ -1,195 +1,195
1 This test tries to exercise the ssh functionality with a dummy script
1 This test tries to exercise the ssh functionality with a dummy script
2
2
3 creating 'remote' repo
3 creating 'remote' repo
4
4
5 $ hg init remote
5 $ hg init remote
6 $ cd remote
6 $ cd remote
7 $ hg unbundle "$TESTDIR/bundles/remote.hg"
7 $ hg unbundle "$TESTDIR/bundles/remote.hg"
8 adding changesets
8 adding changesets
9 adding manifests
9 adding manifests
10 adding file changes
10 adding file changes
11 added 9 changesets with 7 changes to 4 files (+1 heads)
11 added 9 changesets with 7 changes to 4 files (+1 heads)
12 (run 'hg heads' to see heads, 'hg merge' to merge)
12 (run 'hg heads' to see heads, 'hg merge' to merge)
13 $ hg up tip
13 $ hg up tip
14 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
14 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
15 $ cd ..
15 $ cd ..
16
16
17 clone remote via stream
17 clone remote via stream
18
18
19 $ for i in 0 1 2 3 4 5 6 7 8; do
19 $ for i in 0 1 2 3 4 5 6 7 8; do
20 > hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" --uncompressed -r "$i" ssh://user@dummy/remote test-"$i"
20 > hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --uncompressed -r "$i" ssh://user@dummy/remote test-"$i"
21 > if cd test-"$i"; then
21 > if cd test-"$i"; then
22 > hg verify
22 > hg verify
23 > cd ..
23 > cd ..
24 > fi
24 > fi
25 > done
25 > done
26 adding changesets
26 adding changesets
27 adding manifests
27 adding manifests
28 adding file changes
28 adding file changes
29 added 1 changesets with 1 changes to 1 files
29 added 1 changesets with 1 changes to 1 files
30 updating to branch default
30 updating to branch default
31 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
31 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32 checking changesets
32 checking changesets
33 checking manifests
33 checking manifests
34 crosschecking files in changesets and manifests
34 crosschecking files in changesets and manifests
35 checking files
35 checking files
36 1 files, 1 changesets, 1 total revisions
36 1 files, 1 changesets, 1 total revisions
37 adding changesets
37 adding changesets
38 adding manifests
38 adding manifests
39 adding file changes
39 adding file changes
40 added 2 changesets with 2 changes to 1 files
40 added 2 changesets with 2 changes to 1 files
41 updating to branch default
41 updating to branch default
42 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
42 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
43 checking changesets
43 checking changesets
44 checking manifests
44 checking manifests
45 crosschecking files in changesets and manifests
45 crosschecking files in changesets and manifests
46 checking files
46 checking files
47 1 files, 2 changesets, 2 total revisions
47 1 files, 2 changesets, 2 total revisions
48 adding changesets
48 adding changesets
49 adding manifests
49 adding manifests
50 adding file changes
50 adding file changes
51 added 3 changesets with 3 changes to 1 files
51 added 3 changesets with 3 changes to 1 files
52 updating to branch default
52 updating to branch default
53 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
53 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
54 checking changesets
54 checking changesets
55 checking manifests
55 checking manifests
56 crosschecking files in changesets and manifests
56 crosschecking files in changesets and manifests
57 checking files
57 checking files
58 1 files, 3 changesets, 3 total revisions
58 1 files, 3 changesets, 3 total revisions
59 adding changesets
59 adding changesets
60 adding manifests
60 adding manifests
61 adding file changes
61 adding file changes
62 added 4 changesets with 4 changes to 1 files
62 added 4 changesets with 4 changes to 1 files
63 updating to branch default
63 updating to branch default
64 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
64 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
65 checking changesets
65 checking changesets
66 checking manifests
66 checking manifests
67 crosschecking files in changesets and manifests
67 crosschecking files in changesets and manifests
68 checking files
68 checking files
69 1 files, 4 changesets, 4 total revisions
69 1 files, 4 changesets, 4 total revisions
70 adding changesets
70 adding changesets
71 adding manifests
71 adding manifests
72 adding file changes
72 adding file changes
73 added 2 changesets with 2 changes to 1 files
73 added 2 changesets with 2 changes to 1 files
74 updating to branch default
74 updating to branch default
75 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
75 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
76 checking changesets
76 checking changesets
77 checking manifests
77 checking manifests
78 crosschecking files in changesets and manifests
78 crosschecking files in changesets and manifests
79 checking files
79 checking files
80 1 files, 2 changesets, 2 total revisions
80 1 files, 2 changesets, 2 total revisions
81 adding changesets
81 adding changesets
82 adding manifests
82 adding manifests
83 adding file changes
83 adding file changes
84 added 3 changesets with 3 changes to 1 files
84 added 3 changesets with 3 changes to 1 files
85 updating to branch default
85 updating to branch default
86 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
86 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
87 checking changesets
87 checking changesets
88 checking manifests
88 checking manifests
89 crosschecking files in changesets and manifests
89 crosschecking files in changesets and manifests
90 checking files
90 checking files
91 1 files, 3 changesets, 3 total revisions
91 1 files, 3 changesets, 3 total revisions
92 adding changesets
92 adding changesets
93 adding manifests
93 adding manifests
94 adding file changes
94 adding file changes
95 added 4 changesets with 5 changes to 2 files
95 added 4 changesets with 5 changes to 2 files
96 updating to branch default
96 updating to branch default
97 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
97 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
98 checking changesets
98 checking changesets
99 checking manifests
99 checking manifests
100 crosschecking files in changesets and manifests
100 crosschecking files in changesets and manifests
101 checking files
101 checking files
102 2 files, 4 changesets, 5 total revisions
102 2 files, 4 changesets, 5 total revisions
103 adding changesets
103 adding changesets
104 adding manifests
104 adding manifests
105 adding file changes
105 adding file changes
106 added 5 changesets with 6 changes to 3 files
106 added 5 changesets with 6 changes to 3 files
107 updating to branch default
107 updating to branch default
108 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
108 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
109 checking changesets
109 checking changesets
110 checking manifests
110 checking manifests
111 crosschecking files in changesets and manifests
111 crosschecking files in changesets and manifests
112 checking files
112 checking files
113 3 files, 5 changesets, 6 total revisions
113 3 files, 5 changesets, 6 total revisions
114 adding changesets
114 adding changesets
115 adding manifests
115 adding manifests
116 adding file changes
116 adding file changes
117 added 5 changesets with 5 changes to 2 files
117 added 5 changesets with 5 changes to 2 files
118 updating to branch default
118 updating to branch default
119 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
119 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
120 checking changesets
120 checking changesets
121 checking manifests
121 checking manifests
122 crosschecking files in changesets and manifests
122 crosschecking files in changesets and manifests
123 checking files
123 checking files
124 2 files, 5 changesets, 5 total revisions
124 2 files, 5 changesets, 5 total revisions
125 $ cd test-8
125 $ cd test-8
126 $ hg pull ../test-7
126 $ hg pull ../test-7
127 pulling from ../test-7
127 pulling from ../test-7
128 searching for changes
128 searching for changes
129 adding changesets
129 adding changesets
130 adding manifests
130 adding manifests
131 adding file changes
131 adding file changes
132 added 4 changesets with 2 changes to 3 files (+1 heads)
132 added 4 changesets with 2 changes to 3 files (+1 heads)
133 (run 'hg heads' to see heads, 'hg merge' to merge)
133 (run 'hg heads' to see heads, 'hg merge' to merge)
134 $ hg verify
134 $ hg verify
135 checking changesets
135 checking changesets
136 checking manifests
136 checking manifests
137 crosschecking files in changesets and manifests
137 crosschecking files in changesets and manifests
138 checking files
138 checking files
139 4 files, 9 changesets, 7 total revisions
139 4 files, 9 changesets, 7 total revisions
140 $ cd ..
140 $ cd ..
141 $ cd test-1
141 $ cd test-1
142 $ hg pull -e "$PYTHON \"$TESTDIR/dummyssh\"" -r 4 ssh://user@dummy/remote
142 $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" -r 4 ssh://user@dummy/remote
143 pulling from ssh://user@dummy/remote
143 pulling from ssh://user@dummy/remote
144 searching for changes
144 searching for changes
145 adding changesets
145 adding changesets
146 adding manifests
146 adding manifests
147 adding file changes
147 adding file changes
148 added 1 changesets with 0 changes to 0 files (+1 heads)
148 added 1 changesets with 0 changes to 0 files (+1 heads)
149 (run 'hg heads' to see heads, 'hg merge' to merge)
149 (run 'hg heads' to see heads, 'hg merge' to merge)
150 $ hg verify
150 $ hg verify
151 checking changesets
151 checking changesets
152 checking manifests
152 checking manifests
153 crosschecking files in changesets and manifests
153 crosschecking files in changesets and manifests
154 checking files
154 checking files
155 1 files, 3 changesets, 2 total revisions
155 1 files, 3 changesets, 2 total revisions
156 $ hg pull -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote
156 $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote
157 pulling from ssh://user@dummy/remote
157 pulling from ssh://user@dummy/remote
158 searching for changes
158 searching for changes
159 adding changesets
159 adding changesets
160 adding manifests
160 adding manifests
161 adding file changes
161 adding file changes
162 added 6 changesets with 5 changes to 4 files
162 added 6 changesets with 5 changes to 4 files
163 (run 'hg update' to get a working copy)
163 (run 'hg update' to get a working copy)
164 $ cd ..
164 $ cd ..
165 $ cd test-2
165 $ cd test-2
166 $ hg pull -e "$PYTHON \"$TESTDIR/dummyssh\"" -r 5 ssh://user@dummy/remote
166 $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" -r 5 ssh://user@dummy/remote
167 pulling from ssh://user@dummy/remote
167 pulling from ssh://user@dummy/remote
168 searching for changes
168 searching for changes
169 adding changesets
169 adding changesets
170 adding manifests
170 adding manifests
171 adding file changes
171 adding file changes
172 added 2 changesets with 0 changes to 0 files (+1 heads)
172 added 2 changesets with 0 changes to 0 files (+1 heads)
173 (run 'hg heads' to see heads, 'hg merge' to merge)
173 (run 'hg heads' to see heads, 'hg merge' to merge)
174 $ hg verify
174 $ hg verify
175 checking changesets
175 checking changesets
176 checking manifests
176 checking manifests
177 crosschecking files in changesets and manifests
177 crosschecking files in changesets and manifests
178 checking files
178 checking files
179 1 files, 5 changesets, 3 total revisions
179 1 files, 5 changesets, 3 total revisions
180 $ hg pull -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote
180 $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote
181 pulling from ssh://user@dummy/remote
181 pulling from ssh://user@dummy/remote
182 searching for changes
182 searching for changes
183 adding changesets
183 adding changesets
184 adding manifests
184 adding manifests
185 adding file changes
185 adding file changes
186 added 4 changesets with 4 changes to 4 files
186 added 4 changesets with 4 changes to 4 files
187 (run 'hg update' to get a working copy)
187 (run 'hg update' to get a working copy)
188 $ hg verify
188 $ hg verify
189 checking changesets
189 checking changesets
190 checking manifests
190 checking manifests
191 crosschecking files in changesets and manifests
191 crosschecking files in changesets and manifests
192 checking files
192 checking files
193 4 files, 9 changesets, 7 total revisions
193 4 files, 9 changesets, 7 total revisions
194
194
195 $ cd ..
195 $ cd ..
@@ -1,577 +1,577
1
1
2 This test tries to exercise the ssh functionality with a dummy script
2 This test tries to exercise the ssh functionality with a dummy script
3
3
4 $ cat <<EOF >> $HGRCPATH
4 $ cat <<EOF >> $HGRCPATH
5 > [format]
5 > [format]
6 > usegeneraldelta=yes
6 > usegeneraldelta=yes
7 > EOF
7 > EOF
8
8
9 creating 'remote' repo
9 creating 'remote' repo
10
10
11 $ hg init remote
11 $ hg init remote
12 $ cd remote
12 $ cd remote
13 $ echo this > foo
13 $ echo this > foo
14 $ echo this > fooO
14 $ echo this > fooO
15 $ hg ci -A -m "init" foo fooO
15 $ hg ci -A -m "init" foo fooO
16
16
17 insert a closed branch (issue4428)
17 insert a closed branch (issue4428)
18
18
19 $ hg up null
19 $ hg up null
20 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
20 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
21 $ hg branch closed
21 $ hg branch closed
22 marked working directory as branch closed
22 marked working directory as branch closed
23 (branches are permanent and global, did you want a bookmark?)
23 (branches are permanent and global, did you want a bookmark?)
24 $ hg ci -mc0
24 $ hg ci -mc0
25 $ hg ci --close-branch -mc1
25 $ hg ci --close-branch -mc1
26 $ hg up -q default
26 $ hg up -q default
27
27
28 configure for serving
28 configure for serving
29
29
30 $ cat <<EOF > .hg/hgrc
30 $ cat <<EOF > .hg/hgrc
31 > [server]
31 > [server]
32 > uncompressed = True
32 > uncompressed = True
33 >
33 >
34 > [hooks]
34 > [hooks]
35 > changegroup = sh -c "printenv.py changegroup-in-remote 0 ../dummylog"
35 > changegroup = sh -c "printenv.py changegroup-in-remote 0 ../dummylog"
36 > EOF
36 > EOF
37 $ cd ..
37 $ cd ..
38
38
39 repo not found error
39 repo not found error
40
40
41 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local
41 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local
42 remote: abort: repository nonexistent not found!
42 remote: abort: repository nonexistent not found!
43 abort: no suitable response from remote hg!
43 abort: no suitable response from remote hg!
44 [255]
44 [255]
45
45
46 non-existent absolute path
46 non-existent absolute path
47
47
48 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/nonexistent local
48 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/nonexistent local
49 remote: abort: repository $TESTTMP/nonexistent not found!
49 remote: abort: repository $TESTTMP/nonexistent not found!
50 abort: no suitable response from remote hg!
50 abort: no suitable response from remote hg!
51 [255]
51 [255]
52
52
53 clone remote via stream
53 clone remote via stream
54
54
55 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/remote local-stream
55 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/remote local-stream
56 streaming all changes
56 streaming all changes
57 4 files to transfer, 602 bytes of data
57 4 files to transfer, 602 bytes of data
58 transferred 602 bytes in * seconds (*) (glob)
58 transferred 602 bytes in * seconds (*) (glob)
59 searching for changes
59 searching for changes
60 no changes found
60 no changes found
61 updating to branch default
61 updating to branch default
62 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
62 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
63 $ cd local-stream
63 $ cd local-stream
64 $ hg verify
64 $ hg verify
65 checking changesets
65 checking changesets
66 checking manifests
66 checking manifests
67 crosschecking files in changesets and manifests
67 crosschecking files in changesets and manifests
68 checking files
68 checking files
69 2 files, 3 changesets, 2 total revisions
69 2 files, 3 changesets, 2 total revisions
70 $ hg branches
70 $ hg branches
71 default 0:1160648e36ce
71 default 0:1160648e36ce
72 $ cd ..
72 $ cd ..
73
73
74 clone bookmarks via stream
74 clone bookmarks via stream
75
75
76 $ hg -R local-stream book mybook
76 $ hg -R local-stream book mybook
77 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/local-stream stream2
77 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/local-stream stream2
78 streaming all changes
78 streaming all changes
79 4 files to transfer, 602 bytes of data
79 4 files to transfer, 602 bytes of data
80 transferred 602 bytes in * seconds (*) (glob)
80 transferred 602 bytes in * seconds (*) (glob)
81 searching for changes
81 searching for changes
82 no changes found
82 no changes found
83 updating to branch default
83 updating to branch default
84 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
84 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
85 $ cd stream2
85 $ cd stream2
86 $ hg book
86 $ hg book
87 mybook 0:1160648e36ce
87 mybook 0:1160648e36ce
88 $ cd ..
88 $ cd ..
89 $ rm -rf local-stream stream2
89 $ rm -rf local-stream stream2
90
90
91 clone remote via pull
91 clone remote via pull
92
92
93 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local
93 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local
94 requesting all changes
94 requesting all changes
95 adding changesets
95 adding changesets
96 adding manifests
96 adding manifests
97 adding file changes
97 adding file changes
98 added 3 changesets with 2 changes to 2 files
98 added 3 changesets with 2 changes to 2 files
99 updating to branch default
99 updating to branch default
100 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
100 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
101
101
102 verify
102 verify
103
103
104 $ cd local
104 $ cd local
105 $ hg verify
105 $ hg verify
106 checking changesets
106 checking changesets
107 checking manifests
107 checking manifests
108 crosschecking files in changesets and manifests
108 crosschecking files in changesets and manifests
109 checking files
109 checking files
110 2 files, 3 changesets, 2 total revisions
110 2 files, 3 changesets, 2 total revisions
111 $ cat >> .hg/hgrc <<EOF
111 $ cat >> .hg/hgrc <<EOF
112 > [hooks]
112 > [hooks]
113 > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog"
113 > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog"
114 > EOF
114 > EOF
115
115
116 empty default pull
116 empty default pull
117
117
118 $ hg paths
118 $ hg paths
119 default = ssh://user@dummy/remote
119 default = ssh://user@dummy/remote
120 $ hg pull -e "$PYTHON \"$TESTDIR/dummyssh\""
120 $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\""
121 pulling from ssh://user@dummy/remote
121 pulling from ssh://user@dummy/remote
122 searching for changes
122 searching for changes
123 no changes found
123 no changes found
124
124
125 pull from wrong ssh URL
125 pull from wrong ssh URL
126
126
127 $ hg pull -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist
127 $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist
128 pulling from ssh://user@dummy/doesnotexist
128 pulling from ssh://user@dummy/doesnotexist
129 remote: abort: repository doesnotexist not found!
129 remote: abort: repository doesnotexist not found!
130 abort: no suitable response from remote hg!
130 abort: no suitable response from remote hg!
131 [255]
131 [255]
132
132
133 local change
133 local change
134
134
135 $ echo bleah > foo
135 $ echo bleah > foo
136 $ hg ci -m "add"
136 $ hg ci -m "add"
137
137
138 updating rc
138 updating rc
139
139
140 $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc
140 $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc
141 $ echo "[ui]" >> .hg/hgrc
141 $ echo "[ui]" >> .hg/hgrc
142 $ echo "ssh = $PYTHON \"$TESTDIR/dummyssh\"" >> .hg/hgrc
142 $ echo "ssh = \"$PYTHON\" \"$TESTDIR/dummyssh\"" >> .hg/hgrc
143
143
144 find outgoing
144 find outgoing
145
145
146 $ hg out ssh://user@dummy/remote
146 $ hg out ssh://user@dummy/remote
147 comparing with ssh://user@dummy/remote
147 comparing with ssh://user@dummy/remote
148 searching for changes
148 searching for changes
149 changeset: 3:a28a9d1a809c
149 changeset: 3:a28a9d1a809c
150 tag: tip
150 tag: tip
151 parent: 0:1160648e36ce
151 parent: 0:1160648e36ce
152 user: test
152 user: test
153 date: Thu Jan 01 00:00:00 1970 +0000
153 date: Thu Jan 01 00:00:00 1970 +0000
154 summary: add
154 summary: add
155
155
156
156
157 find incoming on the remote side
157 find incoming on the remote side
158
158
159 $ hg incoming -R ../remote -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/local
159 $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/local
160 comparing with ssh://user@dummy/local
160 comparing with ssh://user@dummy/local
161 searching for changes
161 searching for changes
162 changeset: 3:a28a9d1a809c
162 changeset: 3:a28a9d1a809c
163 tag: tip
163 tag: tip
164 parent: 0:1160648e36ce
164 parent: 0:1160648e36ce
165 user: test
165 user: test
166 date: Thu Jan 01 00:00:00 1970 +0000
166 date: Thu Jan 01 00:00:00 1970 +0000
167 summary: add
167 summary: add
168
168
169
169
170 find incoming on the remote side (using absolute path)
170 find incoming on the remote side (using absolute path)
171
171
172 $ hg incoming -R ../remote -e "$PYTHON \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`"
172 $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`"
173 comparing with ssh://user@dummy/$TESTTMP/local
173 comparing with ssh://user@dummy/$TESTTMP/local
174 searching for changes
174 searching for changes
175 changeset: 3:a28a9d1a809c
175 changeset: 3:a28a9d1a809c
176 tag: tip
176 tag: tip
177 parent: 0:1160648e36ce
177 parent: 0:1160648e36ce
178 user: test
178 user: test
179 date: Thu Jan 01 00:00:00 1970 +0000
179 date: Thu Jan 01 00:00:00 1970 +0000
180 summary: add
180 summary: add
181
181
182
182
183 push
183 push
184
184
185 $ hg push
185 $ hg push
186 pushing to ssh://user@dummy/remote
186 pushing to ssh://user@dummy/remote
187 searching for changes
187 searching for changes
188 remote: adding changesets
188 remote: adding changesets
189 remote: adding manifests
189 remote: adding manifests
190 remote: adding file changes
190 remote: adding file changes
191 remote: added 1 changesets with 1 changes to 1 files
191 remote: added 1 changesets with 1 changes to 1 files
192 $ cd ../remote
192 $ cd ../remote
193
193
194 check remote tip
194 check remote tip
195
195
196 $ hg tip
196 $ hg tip
197 changeset: 3:a28a9d1a809c
197 changeset: 3:a28a9d1a809c
198 tag: tip
198 tag: tip
199 parent: 0:1160648e36ce
199 parent: 0:1160648e36ce
200 user: test
200 user: test
201 date: Thu Jan 01 00:00:00 1970 +0000
201 date: Thu Jan 01 00:00:00 1970 +0000
202 summary: add
202 summary: add
203
203
204 $ hg verify
204 $ hg verify
205 checking changesets
205 checking changesets
206 checking manifests
206 checking manifests
207 crosschecking files in changesets and manifests
207 crosschecking files in changesets and manifests
208 checking files
208 checking files
209 2 files, 4 changesets, 3 total revisions
209 2 files, 4 changesets, 3 total revisions
210 $ hg cat -r tip foo
210 $ hg cat -r tip foo
211 bleah
211 bleah
212 $ echo z > z
212 $ echo z > z
213 $ hg ci -A -m z z
213 $ hg ci -A -m z z
214 created new head
214 created new head
215
215
216 test pushkeys and bookmarks
216 test pushkeys and bookmarks
217
217
218 $ cd ../local
218 $ cd ../local
219 $ hg debugpushkey --config ui.ssh="$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces
219 $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces
220 bookmarks
220 bookmarks
221 namespaces
221 namespaces
222 phases
222 phases
223 $ hg book foo -r 0
223 $ hg book foo -r 0
224 $ hg out -B
224 $ hg out -B
225 comparing with ssh://user@dummy/remote
225 comparing with ssh://user@dummy/remote
226 searching for changed bookmarks
226 searching for changed bookmarks
227 foo 1160648e36ce
227 foo 1160648e36ce
228 $ hg push -B foo
228 $ hg push -B foo
229 pushing to ssh://user@dummy/remote
229 pushing to ssh://user@dummy/remote
230 searching for changes
230 searching for changes
231 no changes found
231 no changes found
232 exporting bookmark foo
232 exporting bookmark foo
233 [1]
233 [1]
234 $ hg debugpushkey --config ui.ssh="$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks
234 $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks
235 foo 1160648e36cec0054048a7edc4110c6f84fde594
235 foo 1160648e36cec0054048a7edc4110c6f84fde594
236 $ hg book -f foo
236 $ hg book -f foo
237 $ hg push --traceback
237 $ hg push --traceback
238 pushing to ssh://user@dummy/remote
238 pushing to ssh://user@dummy/remote
239 searching for changes
239 searching for changes
240 no changes found
240 no changes found
241 updating bookmark foo
241 updating bookmark foo
242 [1]
242 [1]
243 $ hg book -d foo
243 $ hg book -d foo
244 $ hg in -B
244 $ hg in -B
245 comparing with ssh://user@dummy/remote
245 comparing with ssh://user@dummy/remote
246 searching for changed bookmarks
246 searching for changed bookmarks
247 foo a28a9d1a809c
247 foo a28a9d1a809c
248 $ hg book -f -r 0 foo
248 $ hg book -f -r 0 foo
249 $ hg pull -B foo
249 $ hg pull -B foo
250 pulling from ssh://user@dummy/remote
250 pulling from ssh://user@dummy/remote
251 no changes found
251 no changes found
252 updating bookmark foo
252 updating bookmark foo
253 $ hg book -d foo
253 $ hg book -d foo
254 $ hg push -B foo
254 $ hg push -B foo
255 pushing to ssh://user@dummy/remote
255 pushing to ssh://user@dummy/remote
256 searching for changes
256 searching for changes
257 no changes found
257 no changes found
258 deleting remote bookmark foo
258 deleting remote bookmark foo
259 [1]
259 [1]
260
260
261 a bad, evil hook that prints to stdout
261 a bad, evil hook that prints to stdout
262
262
263 $ cat <<EOF > $TESTTMP/badhook
263 $ cat <<EOF > $TESTTMP/badhook
264 > import sys
264 > import sys
265 > sys.stdout.write("KABOOM\n")
265 > sys.stdout.write("KABOOM\n")
266 > EOF
266 > EOF
267
267
268 $ cat <<EOF > $TESTTMP/badpyhook.py
268 $ cat <<EOF > $TESTTMP/badpyhook.py
269 > import sys
269 > import sys
270 > def hook(ui, repo, hooktype, **kwargs):
270 > def hook(ui, repo, hooktype, **kwargs):
271 > sys.stdout.write("KABOOM IN PROCESS\n")
271 > sys.stdout.write("KABOOM IN PROCESS\n")
272 > EOF
272 > EOF
273
273
274 $ cat <<EOF >> ../remote/.hg/hgrc
274 $ cat <<EOF >> ../remote/.hg/hgrc
275 > [hooks]
275 > [hooks]
276 > changegroup.stdout = $PYTHON $TESTTMP/badhook
276 > changegroup.stdout = $PYTHON $TESTTMP/badhook
277 > changegroup.pystdout = python:$TESTTMP/badpyhook.py:hook
277 > changegroup.pystdout = python:$TESTTMP/badpyhook.py:hook
278 > EOF
278 > EOF
279 $ echo r > r
279 $ echo r > r
280 $ hg ci -A -m z r
280 $ hg ci -A -m z r
281
281
282 push should succeed even though it has an unexpected response
282 push should succeed even though it has an unexpected response
283
283
284 $ hg push
284 $ hg push
285 pushing to ssh://user@dummy/remote
285 pushing to ssh://user@dummy/remote
286 searching for changes
286 searching for changes
287 remote has heads on branch 'default' that are not known locally: 6c0482d977a3
287 remote has heads on branch 'default' that are not known locally: 6c0482d977a3
288 remote: adding changesets
288 remote: adding changesets
289 remote: adding manifests
289 remote: adding manifests
290 remote: adding file changes
290 remote: adding file changes
291 remote: added 1 changesets with 1 changes to 1 files
291 remote: added 1 changesets with 1 changes to 1 files
292 remote: KABOOM
292 remote: KABOOM
293 remote: KABOOM IN PROCESS
293 remote: KABOOM IN PROCESS
294 $ hg -R ../remote heads
294 $ hg -R ../remote heads
295 changeset: 5:1383141674ec
295 changeset: 5:1383141674ec
296 tag: tip
296 tag: tip
297 parent: 3:a28a9d1a809c
297 parent: 3:a28a9d1a809c
298 user: test
298 user: test
299 date: Thu Jan 01 00:00:00 1970 +0000
299 date: Thu Jan 01 00:00:00 1970 +0000
300 summary: z
300 summary: z
301
301
302 changeset: 4:6c0482d977a3
302 changeset: 4:6c0482d977a3
303 parent: 0:1160648e36ce
303 parent: 0:1160648e36ce
304 user: test
304 user: test
305 date: Thu Jan 01 00:00:00 1970 +0000
305 date: Thu Jan 01 00:00:00 1970 +0000
306 summary: z
306 summary: z
307
307
308
308
309 clone bookmarks
309 clone bookmarks
310
310
311 $ hg -R ../remote bookmark test
311 $ hg -R ../remote bookmark test
312 $ hg -R ../remote bookmarks
312 $ hg -R ../remote bookmarks
313 * test 4:6c0482d977a3
313 * test 4:6c0482d977a3
314 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks
314 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks
315 requesting all changes
315 requesting all changes
316 adding changesets
316 adding changesets
317 adding manifests
317 adding manifests
318 adding file changes
318 adding file changes
319 added 6 changesets with 5 changes to 4 files (+1 heads)
319 added 6 changesets with 5 changes to 4 files (+1 heads)
320 updating to branch default
320 updating to branch default
321 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
321 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
322 $ hg -R local-bookmarks bookmarks
322 $ hg -R local-bookmarks bookmarks
323 test 4:6c0482d977a3
323 test 4:6c0482d977a3
324
324
325 passwords in ssh urls are not supported
325 passwords in ssh urls are not supported
326 (we use a glob here because different Python versions give different
326 (we use a glob here because different Python versions give different
327 results here)
327 results here)
328
328
329 $ hg push ssh://user:erroneouspwd@dummy/remote
329 $ hg push ssh://user:erroneouspwd@dummy/remote
330 pushing to ssh://user:*@dummy/remote (glob)
330 pushing to ssh://user:*@dummy/remote (glob)
331 abort: password in URL not supported!
331 abort: password in URL not supported!
332 [255]
332 [255]
333
333
334 $ cd ..
334 $ cd ..
335
335
336 hide outer repo
336 hide outer repo
337 $ hg init
337 $ hg init
338
338
339 Test remote paths with spaces (issue2983):
339 Test remote paths with spaces (issue2983):
340
340
341 $ hg init --ssh "$PYTHON \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
341 $ hg init --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
342 $ touch "$TESTTMP/a repo/test"
342 $ touch "$TESTTMP/a repo/test"
343 $ hg -R 'a repo' commit -A -m "test"
343 $ hg -R 'a repo' commit -A -m "test"
344 adding test
344 adding test
345 $ hg -R 'a repo' tag tag
345 $ hg -R 'a repo' tag tag
346 $ hg id --ssh "$PYTHON \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
346 $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
347 73649e48688a
347 73649e48688a
348
348
349 $ hg id --ssh "$PYTHON \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO"
349 $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO"
350 abort: unknown revision 'noNoNO'!
350 abort: unknown revision 'noNoNO'!
351 [255]
351 [255]
352
352
353 Test (non-)escaping of remote paths with spaces when cloning (issue3145):
353 Test (non-)escaping of remote paths with spaces when cloning (issue3145):
354
354
355 $ hg clone --ssh "$PYTHON \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
355 $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
356 destination directory: a repo
356 destination directory: a repo
357 abort: destination 'a repo' is not empty
357 abort: destination 'a repo' is not empty
358 [255]
358 [255]
359
359
360 Make sure hg is really paranoid in serve --stdio mode. It used to be
360 Make sure hg is really paranoid in serve --stdio mode. It used to be
361 possible to get a debugger REPL by specifying a repo named --debugger.
361 possible to get a debugger REPL by specifying a repo named --debugger.
362 $ hg -R --debugger serve --stdio
362 $ hg -R --debugger serve --stdio
363 abort: potentially unsafe serve --stdio invocation: ['-R', '--debugger', 'serve', '--stdio']
363 abort: potentially unsafe serve --stdio invocation: ['-R', '--debugger', 'serve', '--stdio']
364 [255]
364 [255]
365 $ hg -R --config=ui.debugger=yes serve --stdio
365 $ hg -R --config=ui.debugger=yes serve --stdio
366 abort: potentially unsafe serve --stdio invocation: ['-R', '--config=ui.debugger=yes', 'serve', '--stdio']
366 abort: potentially unsafe serve --stdio invocation: ['-R', '--config=ui.debugger=yes', 'serve', '--stdio']
367 [255]
367 [255]
368 Abbreviations of 'serve' also don't work, to avoid shenanigans.
368 Abbreviations of 'serve' also don't work, to avoid shenanigans.
369 $ hg -R narf serv --stdio
369 $ hg -R narf serv --stdio
370 abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio']
370 abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio']
371 [255]
371 [255]
372
372
373 Test hg-ssh using a helper script that will restore PYTHONPATH (which might
373 Test hg-ssh using a helper script that will restore PYTHONPATH (which might
374 have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right
374 have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right
375 parameters:
375 parameters:
376
376
377 $ cat > ssh.sh << EOF
377 $ cat > ssh.sh << EOF
378 > userhost="\$1"
378 > userhost="\$1"
379 > SSH_ORIGINAL_COMMAND="\$2"
379 > SSH_ORIGINAL_COMMAND="\$2"
380 > export SSH_ORIGINAL_COMMAND
380 > export SSH_ORIGINAL_COMMAND
381 > PYTHONPATH="$PYTHONPATH"
381 > PYTHONPATH="$PYTHONPATH"
382 > export PYTHONPATH
382 > export PYTHONPATH
383 > $PYTHON "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo"
383 > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo"
384 > EOF
384 > EOF
385
385
386 $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo"
386 $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo"
387 73649e48688a
387 73649e48688a
388
388
389 $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo"
389 $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo"
390 remote: Illegal repository "$TESTTMP/a'repo" (glob)
390 remote: Illegal repository "$TESTTMP/a'repo" (glob)
391 abort: no suitable response from remote hg!
391 abort: no suitable response from remote hg!
392 [255]
392 [255]
393
393
394 $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo"
394 $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo"
395 remote: Illegal command "hacking -R 'a'\''repo' serve --stdio"
395 remote: Illegal command "hacking -R 'a'\''repo' serve --stdio"
396 abort: no suitable response from remote hg!
396 abort: no suitable response from remote hg!
397 [255]
397 [255]
398
398
399 $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" $PYTHON "$TESTDIR/../contrib/hg-ssh"
399 $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" $PYTHON "$TESTDIR/../contrib/hg-ssh"
400 Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation
400 Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation
401 [255]
401 [255]
402
402
403 Test hg-ssh in read-only mode:
403 Test hg-ssh in read-only mode:
404
404
405 $ cat > ssh.sh << EOF
405 $ cat > ssh.sh << EOF
406 > userhost="\$1"
406 > userhost="\$1"
407 > SSH_ORIGINAL_COMMAND="\$2"
407 > SSH_ORIGINAL_COMMAND="\$2"
408 > export SSH_ORIGINAL_COMMAND
408 > export SSH_ORIGINAL_COMMAND
409 > PYTHONPATH="$PYTHONPATH"
409 > PYTHONPATH="$PYTHONPATH"
410 > export PYTHONPATH
410 > export PYTHONPATH
411 > $PYTHON "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote"
411 > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote"
412 > EOF
412 > EOF
413
413
414 $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local
414 $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local
415 requesting all changes
415 requesting all changes
416 adding changesets
416 adding changesets
417 adding manifests
417 adding manifests
418 adding file changes
418 adding file changes
419 added 6 changesets with 5 changes to 4 files (+1 heads)
419 added 6 changesets with 5 changes to 4 files (+1 heads)
420 updating to branch default
420 updating to branch default
421 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
421 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
422
422
423 $ cd read-only-local
423 $ cd read-only-local
424 $ echo "baz" > bar
424 $ echo "baz" > bar
425 $ hg ci -A -m "unpushable commit" bar
425 $ hg ci -A -m "unpushable commit" bar
426 $ hg push --ssh "sh ../ssh.sh"
426 $ hg push --ssh "sh ../ssh.sh"
427 pushing to ssh://user@dummy/*/remote (glob)
427 pushing to ssh://user@dummy/*/remote (glob)
428 searching for changes
428 searching for changes
429 remote: Permission denied
429 remote: Permission denied
430 remote: pretxnopen.hg-ssh hook failed
430 remote: pretxnopen.hg-ssh hook failed
431 abort: push failed on remote
431 abort: push failed on remote
432 [255]
432 [255]
433
433
434 $ cd ..
434 $ cd ..
435
435
436 stderr from remote commands should be printed before stdout from local code (issue4336)
436 stderr from remote commands should be printed before stdout from local code (issue4336)
437
437
438 $ hg clone remote stderr-ordering
438 $ hg clone remote stderr-ordering
439 updating to branch default
439 updating to branch default
440 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
440 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
441 $ cd stderr-ordering
441 $ cd stderr-ordering
442 $ cat >> localwrite.py << EOF
442 $ cat >> localwrite.py << EOF
443 > from mercurial import exchange, extensions
443 > from mercurial import exchange, extensions
444 >
444 >
445 > def wrappedpush(orig, repo, *args, **kwargs):
445 > def wrappedpush(orig, repo, *args, **kwargs):
446 > res = orig(repo, *args, **kwargs)
446 > res = orig(repo, *args, **kwargs)
447 > repo.ui.write('local stdout\n')
447 > repo.ui.write('local stdout\n')
448 > return res
448 > return res
449 >
449 >
450 > def extsetup(ui):
450 > def extsetup(ui):
451 > extensions.wrapfunction(exchange, 'push', wrappedpush)
451 > extensions.wrapfunction(exchange, 'push', wrappedpush)
452 > EOF
452 > EOF
453
453
454 $ cat >> .hg/hgrc << EOF
454 $ cat >> .hg/hgrc << EOF
455 > [paths]
455 > [paths]
456 > default-push = ssh://user@dummy/remote
456 > default-push = ssh://user@dummy/remote
457 > [ui]
457 > [ui]
458 > ssh = $PYTHON "$TESTDIR/dummyssh"
458 > ssh = "$PYTHON" "$TESTDIR/dummyssh"
459 > [extensions]
459 > [extensions]
460 > localwrite = localwrite.py
460 > localwrite = localwrite.py
461 > EOF
461 > EOF
462
462
463 $ echo localwrite > foo
463 $ echo localwrite > foo
464 $ hg commit -m 'testing localwrite'
464 $ hg commit -m 'testing localwrite'
465 $ hg push
465 $ hg push
466 pushing to ssh://user@dummy/remote
466 pushing to ssh://user@dummy/remote
467 searching for changes
467 searching for changes
468 remote: adding changesets
468 remote: adding changesets
469 remote: adding manifests
469 remote: adding manifests
470 remote: adding file changes
470 remote: adding file changes
471 remote: added 1 changesets with 1 changes to 1 files
471 remote: added 1 changesets with 1 changes to 1 files
472 remote: KABOOM
472 remote: KABOOM
473 remote: KABOOM IN PROCESS
473 remote: KABOOM IN PROCESS
474 local stdout
474 local stdout
475
475
476 debug output
476 debug output
477
477
478 $ hg pull --debug ssh://user@dummy/remote
478 $ hg pull --debug ssh://user@dummy/remote
479 pulling from ssh://user@dummy/remote
479 pulling from ssh://user@dummy/remote
480 running .* ".*/dummyssh" user@dummy ('|")hg -R remote serve --stdio('|") (re)
480 running .* ".*/dummyssh" user@dummy ('|")hg -R remote serve --stdio('|") (re)
481 sending hello command
481 sending hello command
482 sending between command
482 sending between command
483 remote: 355
483 remote: 355
484 remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN
484 remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN
485 remote: 1
485 remote: 1
486 query 1; heads
486 query 1; heads
487 sending batch command
487 sending batch command
488 searching for changes
488 searching for changes
489 all remote heads known locally
489 all remote heads known locally
490 no changes found
490 no changes found
491 sending getbundle command
491 sending getbundle command
492 bundle2-input-bundle: with-transaction
492 bundle2-input-bundle: with-transaction
493 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
493 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
494 bundle2-input-part: total payload size 15
494 bundle2-input-part: total payload size 15
495 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
495 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
496 bundle2-input-part: total payload size 45
496 bundle2-input-part: total payload size 45
497 bundle2-input-bundle: 1 parts total
497 bundle2-input-bundle: 1 parts total
498 checking for updated bookmarks
498 checking for updated bookmarks
499
499
500 $ cd ..
500 $ cd ..
501
501
502 $ cat dummylog
502 $ cat dummylog
503 Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio
503 Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio
504 Got arguments 1:user@dummy 2:hg -R $TESTTMP/nonexistent serve --stdio
504 Got arguments 1:user@dummy 2:hg -R $TESTTMP/nonexistent serve --stdio
505 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
505 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
506 Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio
506 Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio
507 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
507 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
508 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
508 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
509 Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio
509 Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio
510 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
510 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
511 Got arguments 1:user@dummy 2:hg -R local serve --stdio
511 Got arguments 1:user@dummy 2:hg -R local serve --stdio
512 Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio
512 Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio
513 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
513 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
514 changegroup-in-remote hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP
514 changegroup-in-remote hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP
515 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
515 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
516 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
516 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
517 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
517 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
518 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
518 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
519 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
519 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
520 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
520 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
521 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
521 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
522 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
522 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
523 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
523 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
524 changegroup-in-remote hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP
524 changegroup-in-remote hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP
525 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
525 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
526 Got arguments 1:user@dummy 2:hg init 'a repo'
526 Got arguments 1:user@dummy 2:hg init 'a repo'
527 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
527 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
528 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
528 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
529 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
529 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
530 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
530 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
531 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
531 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
532 changegroup-in-remote hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP
532 changegroup-in-remote hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP
533 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
533 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
534
534
535 remote hook failure is attributed to remote
535 remote hook failure is attributed to remote
536
536
537 $ cat > $TESTTMP/failhook << EOF
537 $ cat > $TESTTMP/failhook << EOF
538 > def hook(ui, repo, **kwargs):
538 > def hook(ui, repo, **kwargs):
539 > ui.write('hook failure!\n')
539 > ui.write('hook failure!\n')
540 > ui.flush()
540 > ui.flush()
541 > return 1
541 > return 1
542 > EOF
542 > EOF
543
543
544 $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc
544 $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc
545
545
546 $ hg -q --config ui.ssh="$PYTHON $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout
546 $ hg -q --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout
547 $ cd hookout
547 $ cd hookout
548 $ touch hookfailure
548 $ touch hookfailure
549 $ hg -q commit -A -m 'remote hook failure'
549 $ hg -q commit -A -m 'remote hook failure'
550 $ hg --config ui.ssh="$PYTHON $TESTDIR/dummyssh" push
550 $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" push
551 pushing to ssh://user@dummy/remote
551 pushing to ssh://user@dummy/remote
552 searching for changes
552 searching for changes
553 remote: adding changesets
553 remote: adding changesets
554 remote: adding manifests
554 remote: adding manifests
555 remote: adding file changes
555 remote: adding file changes
556 remote: added 1 changesets with 1 changes to 1 files
556 remote: added 1 changesets with 1 changes to 1 files
557 remote: hook failure!
557 remote: hook failure!
558 remote: transaction abort!
558 remote: transaction abort!
559 remote: rollback completed
559 remote: rollback completed
560 remote: pretxnchangegroup.fail hook failed
560 remote: pretxnchangegroup.fail hook failed
561 abort: push failed on remote
561 abort: push failed on remote
562 [255]
562 [255]
563
563
564 abort during pull is properly reported as such
564 abort during pull is properly reported as such
565
565
566 $ echo morefoo >> ../remote/foo
566 $ echo morefoo >> ../remote/foo
567 $ hg -R ../remote commit --message "more foo to be pulled"
567 $ hg -R ../remote commit --message "more foo to be pulled"
568 $ cat >> ../remote/.hg/hgrc << EOF
568 $ cat >> ../remote/.hg/hgrc << EOF
569 > [extensions]
569 > [extensions]
570 > crash = ${TESTDIR}/crashgetbundler.py
570 > crash = ${TESTDIR}/crashgetbundler.py
571 > EOF
571 > EOF
572 $ hg --config ui.ssh="$PYTHON $TESTDIR/dummyssh" pull
572 $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" pull
573 pulling from ssh://user@dummy/remote
573 pulling from ssh://user@dummy/remote
574 searching for changes
574 searching for changes
575 remote: abort: this is an exercise
575 remote: abort: this is an exercise
576 abort: pull failed on remote
576 abort: pull failed on remote
577 [255]
577 [255]
@@ -1,105 +1,105
1 #require killdaemons
1 #require killdaemons
2
2
3 Preparing the subrepository 'sub'
3 Preparing the subrepository 'sub'
4
4
5 $ hg init sub
5 $ hg init sub
6 $ echo sub > sub/sub
6 $ echo sub > sub/sub
7 $ hg add -R sub
7 $ hg add -R sub
8 adding sub/sub (glob)
8 adding sub/sub (glob)
9 $ hg commit -R sub -m "sub import"
9 $ hg commit -R sub -m "sub import"
10
10
11 Preparing the 'main' repo which depends on the subrepo 'sub'
11 Preparing the 'main' repo which depends on the subrepo 'sub'
12
12
13 $ hg init main
13 $ hg init main
14 $ echo main > main/main
14 $ echo main > main/main
15 $ echo "sub = ../sub" > main/.hgsub
15 $ echo "sub = ../sub" > main/.hgsub
16 $ hg clone sub main/sub
16 $ hg clone sub main/sub
17 updating to branch default
17 updating to branch default
18 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
18 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
19 $ hg add -R main
19 $ hg add -R main
20 adding main/.hgsub (glob)
20 adding main/.hgsub (glob)
21 adding main/main (glob)
21 adding main/main (glob)
22 $ hg commit -R main -m "main import"
22 $ hg commit -R main -m "main import"
23
23
24 Cleaning both repositories, just as a clone -U
24 Cleaning both repositories, just as a clone -U
25
25
26 $ hg up -C -R sub null
26 $ hg up -C -R sub null
27 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
27 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
28 $ hg up -C -R main null
28 $ hg up -C -R main null
29 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
29 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
30 $ rm -rf main/sub
30 $ rm -rf main/sub
31
31
32 hide outer repo
32 hide outer repo
33 $ hg init
33 $ hg init
34
34
35 Serving them both using hgweb
35 Serving them both using hgweb
36
36
37 $ printf '[paths]\n/main = main\nsub = sub\n' > webdir.conf
37 $ printf '[paths]\n/main = main\nsub = sub\n' > webdir.conf
38 $ hg serve --webdir-conf webdir.conf -a localhost -p $HGPORT \
38 $ hg serve --webdir-conf webdir.conf -a localhost -p $HGPORT \
39 > -A /dev/null -E /dev/null --pid-file hg.pid -d
39 > -A /dev/null -E /dev/null --pid-file hg.pid -d
40 $ cat hg.pid >> $DAEMON_PIDS
40 $ cat hg.pid >> $DAEMON_PIDS
41
41
42 Clone main from hgweb
42 Clone main from hgweb
43
43
44 $ hg clone "http://localhost:$HGPORT/main" cloned
44 $ hg clone "http://localhost:$HGPORT/main" cloned
45 requesting all changes
45 requesting all changes
46 adding changesets
46 adding changesets
47 adding manifests
47 adding manifests
48 adding file changes
48 adding file changes
49 added 1 changesets with 3 changes to 3 files
49 added 1 changesets with 3 changes to 3 files
50 updating to branch default
50 updating to branch default
51 cloning subrepo sub from http://localhost:$HGPORT/sub
51 cloning subrepo sub from http://localhost:$HGPORT/sub
52 requesting all changes
52 requesting all changes
53 adding changesets
53 adding changesets
54 adding manifests
54 adding manifests
55 adding file changes
55 adding file changes
56 added 1 changesets with 1 changes to 1 files
56 added 1 changesets with 1 changes to 1 files
57 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
57 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
58
58
59 Checking cloned repo ids
59 Checking cloned repo ids
60
60
61 $ hg id -R cloned
61 $ hg id -R cloned
62 fdfeeb3e979e tip
62 fdfeeb3e979e tip
63 $ hg id -R cloned/sub
63 $ hg id -R cloned/sub
64 863c1745b441 tip
64 863c1745b441 tip
65
65
66 subrepo debug for 'main' clone
66 subrepo debug for 'main' clone
67
67
68 $ hg debugsub -R cloned
68 $ hg debugsub -R cloned
69 path sub
69 path sub
70 source ../sub
70 source ../sub
71 revision 863c1745b441bd97a8c4a096e87793073f4fb215
71 revision 863c1745b441bd97a8c4a096e87793073f4fb215
72
72
73 $ killdaemons.py
73 $ killdaemons.py
74
74
75 subrepo paths with ssh urls
75 subrepo paths with ssh urls
76
76
77 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/cloned sshclone
77 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/cloned sshclone
78 requesting all changes
78 requesting all changes
79 adding changesets
79 adding changesets
80 adding manifests
80 adding manifests
81 adding file changes
81 adding file changes
82 added 1 changesets with 3 changes to 3 files
82 added 1 changesets with 3 changes to 3 files
83 updating to branch default
83 updating to branch default
84 cloning subrepo sub from ssh://user@dummy/sub
84 cloning subrepo sub from ssh://user@dummy/sub
85 requesting all changes
85 requesting all changes
86 adding changesets
86 adding changesets
87 adding manifests
87 adding manifests
88 adding file changes
88 adding file changes
89 added 1 changesets with 1 changes to 1 files
89 added 1 changesets with 1 changes to 1 files
90 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
91
91
92 $ hg -R sshclone push -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/cloned
92 $ hg -R sshclone push -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/cloned
93 pushing to ssh://user@dummy/$TESTTMP/cloned
93 pushing to ssh://user@dummy/$TESTTMP/cloned
94 pushing subrepo sub to ssh://user@dummy/$TESTTMP/sub
94 pushing subrepo sub to ssh://user@dummy/$TESTTMP/sub
95 searching for changes
95 searching for changes
96 no changes found
96 no changes found
97 searching for changes
97 searching for changes
98 no changes found
98 no changes found
99 [1]
99 [1]
100
100
101 $ cat dummylog
101 $ cat dummylog
102 Got arguments 1:user@dummy 2:hg -R cloned serve --stdio
102 Got arguments 1:user@dummy 2:hg -R cloned serve --stdio
103 Got arguments 1:user@dummy 2:hg -R sub serve --stdio
103 Got arguments 1:user@dummy 2:hg -R sub serve --stdio
104 Got arguments 1:user@dummy 2:hg -R $TESTTMP/cloned serve --stdio
104 Got arguments 1:user@dummy 2:hg -R $TESTTMP/cloned serve --stdio
105 Got arguments 1:user@dummy 2:hg -R $TESTTMP/sub serve --stdio
105 Got arguments 1:user@dummy 2:hg -R $TESTTMP/sub serve --stdio
@@ -1,162 +1,162
1 #require killdaemons
1 #require killdaemons
2
2
3 Test wire protocol argument passing
3 Test wire protocol argument passing
4
4
5 Setup repo:
5 Setup repo:
6
6
7 $ hg init repo
7 $ hg init repo
8
8
9 Local:
9 Local:
10
10
11 $ hg debugwireargs repo eins zwei --three drei --four vier
11 $ hg debugwireargs repo eins zwei --three drei --four vier
12 eins zwei drei vier None
12 eins zwei drei vier None
13 $ hg debugwireargs repo eins zwei --four vier
13 $ hg debugwireargs repo eins zwei --four vier
14 eins zwei None vier None
14 eins zwei None vier None
15 $ hg debugwireargs repo eins zwei
15 $ hg debugwireargs repo eins zwei
16 eins zwei None None None
16 eins zwei None None None
17 $ hg debugwireargs repo eins zwei --five fuenf
17 $ hg debugwireargs repo eins zwei --five fuenf
18 eins zwei None None fuenf
18 eins zwei None None fuenf
19
19
20 HTTP:
20 HTTP:
21
21
22 $ hg serve -R repo -p $HGPORT -d --pid-file=hg1.pid \
22 $ hg serve -R repo -p $HGPORT -d --pid-file=hg1.pid \
23 > -E error.log -A access.log \
23 > -E error.log -A access.log \
24 > --config experimental.httppostargs=yes
24 > --config experimental.httppostargs=yes
25 $ cat hg1.pid >> $DAEMON_PIDS
25 $ cat hg1.pid >> $DAEMON_PIDS
26
26
27 $ hg debugwireargs http://localhost:$HGPORT/ un deux trois quatre
27 $ hg debugwireargs http://localhost:$HGPORT/ un deux trois quatre
28 un deux trois quatre None
28 un deux trois quatre None
29 $ hg debugwireargs http://localhost:$HGPORT/ \ un deux trois\ qu\ \ atre
29 $ hg debugwireargs http://localhost:$HGPORT/ \ un deux trois\ qu\ \ atre
30 un deux trois qu atre None
30 un deux trois qu atre None
31 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --four vier
31 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --four vier
32 eins zwei None vier None
32 eins zwei None vier None
33 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei
33 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei
34 eins zwei None None None
34 eins zwei None None None
35 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --five fuenf
35 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --five fuenf
36 eins zwei None None None
36 eins zwei None None None
37 $ hg debugwireargs http://localhost:$HGPORT/ un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
37 $ hg debugwireargs http://localhost:$HGPORT/ un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
38 un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx None
38 un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx None
39 $ cat error.log
39 $ cat error.log
40 $ cat access.log
40 $ cat access.log
41 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
41 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
42 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob)
42 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob)
43 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob)
43 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob)
44 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
44 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
45 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob)
45 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob)
46 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob)
46 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob)
47 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
47 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
48 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob)
48 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob)
49 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob)
49 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob)
50 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
50 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
51 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
51 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
52 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
52 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
53 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
53 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
54 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
54 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
55 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
55 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
56 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
56 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
57 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob)
57 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob)
58 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob)
58 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob)
59
59
60 HTTP without args-in-POST:
60 HTTP without args-in-POST:
61 $ hg serve -R repo -p $HGPORT1 -d --pid-file=hg1.pid -E error.log -A access.log
61 $ hg serve -R repo -p $HGPORT1 -d --pid-file=hg1.pid -E error.log -A access.log
62 $ cat hg1.pid >> $DAEMON_PIDS
62 $ cat hg1.pid >> $DAEMON_PIDS
63
63
64 $ hg debugwireargs http://localhost:$HGPORT1/ un deux trois quatre
64 $ hg debugwireargs http://localhost:$HGPORT1/ un deux trois quatre
65 un deux trois quatre None
65 un deux trois quatre None
66 $ hg debugwireargs http://localhost:$HGPORT1/ \ un deux trois\ qu\ \ atre
66 $ hg debugwireargs http://localhost:$HGPORT1/ \ un deux trois\ qu\ \ atre
67 un deux trois qu atre None
67 un deux trois qu atre None
68 $ hg debugwireargs http://localhost:$HGPORT1/ eins zwei --four vier
68 $ hg debugwireargs http://localhost:$HGPORT1/ eins zwei --four vier
69 eins zwei None vier None
69 eins zwei None vier None
70 $ hg debugwireargs http://localhost:$HGPORT1/ eins zwei
70 $ hg debugwireargs http://localhost:$HGPORT1/ eins zwei
71 eins zwei None None None
71 eins zwei None None None
72 $ hg debugwireargs http://localhost:$HGPORT1/ eins zwei --five fuenf
72 $ hg debugwireargs http://localhost:$HGPORT1/ eins zwei --five fuenf
73 eins zwei None None None
73 eins zwei None None None
74 $ hg debugwireargs http://localhost:$HGPORT1/ un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
74 $ hg debugwireargs http://localhost:$HGPORT1/ un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
75 un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx None
75 un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx None
76 $ cat error.log
76 $ cat error.log
77 $ cat access.log
77 $ cat access.log
78 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
78 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
79 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob)
79 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob)
80 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob)
80 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob)
81 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
81 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
82 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob)
82 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob)
83 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob)
83 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob)
84 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
84 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
85 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob)
85 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob)
86 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob)
86 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob)
87 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
87 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
88 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
88 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
89 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
89 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
90 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
90 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
91 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
91 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
92 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
92 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
93 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
93 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
94 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob)
94 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob)
95 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob)
95 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob)
96 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
96 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
97 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=quatre&one=un&three=trois&two=deux x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
97 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=quatre&one=un&three=trois&two=deux x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
98 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=quatre&one=un&three=trois&two=deux x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
98 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=quatre&one=un&three=trois&two=deux x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
99 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
99 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
100 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=qu++atre&one=+un&three=trois+&two=deux x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
100 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=qu++atre&one=+un&three=trois+&two=deux x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
101 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=qu++atre&one=+un&three=trois+&two=deux x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
101 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=qu++atre&one=+un&three=trois+&two=deux x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
102 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
102 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
103 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
103 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
104 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
104 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
105 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
105 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
106 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
106 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
107 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
107 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
108 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
108 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
109 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
109 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
110 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
110 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
111 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
111 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
112 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&one x-hgarg-2:=un&three=trois&two=deux x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
112 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&one x-hgarg-2:=un&three=trois&two=deux x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
113 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&one x-hgarg-2:=un&three=trois&two=deux x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
113 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&one x-hgarg-2:=un&three=trois&two=deux x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
114
114
115 HTTP without the httpheader capability:
115 HTTP without the httpheader capability:
116
116
117 $ HGRCPATH="`pwd`/repo/.hgrc"
117 $ HGRCPATH="`pwd`/repo/.hgrc"
118 $ export HGRCPATH
118 $ export HGRCPATH
119 $ CAP=httpheader
119 $ CAP=httpheader
120 $ . "$TESTDIR/notcapable"
120 $ . "$TESTDIR/notcapable"
121
121
122 $ hg serve -R repo -p $HGPORT2 -d --pid-file=hg2.pid -E error2.log -A access2.log
122 $ hg serve -R repo -p $HGPORT2 -d --pid-file=hg2.pid -E error2.log -A access2.log
123 $ cat hg2.pid >> $DAEMON_PIDS
123 $ cat hg2.pid >> $DAEMON_PIDS
124
124
125 $ hg debugwireargs http://localhost:$HGPORT2/ un deux trois quatre
125 $ hg debugwireargs http://localhost:$HGPORT2/ un deux trois quatre
126 un deux trois quatre None
126 un deux trois quatre None
127 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --four vier
127 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --four vier
128 eins zwei None vier None
128 eins zwei None vier None
129 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei
129 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei
130 eins zwei None None None
130 eins zwei None None None
131 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --five fuenf
131 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --five fuenf
132 eins zwei None None None
132 eins zwei None None None
133 $ cat error2.log
133 $ cat error2.log
134 $ cat access2.log
134 $ cat access2.log
135 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
135 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
136 * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
136 * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
137 * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
137 * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
138 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
138 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
139 * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
139 * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
140 * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
140 * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
141 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
141 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
142 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
142 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
143 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
143 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
144 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
144 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
145 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
145 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
146 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
146 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
147
147
148 SSH (try to exercise the ssh functionality with a dummy script):
148 SSH (try to exercise the ssh functionality with a dummy script):
149
149
150 $ hg debugwireargs --ssh "$PYTHON $TESTDIR/dummyssh" ssh://user@dummy/repo uno due tre quattro
150 $ hg debugwireargs --ssh "\"$PYTHON\" $TESTDIR/dummyssh" ssh://user@dummy/repo uno due tre quattro
151 uno due tre quattro None
151 uno due tre quattro None
152 $ hg debugwireargs --ssh "$PYTHON $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei --four vier
152 $ hg debugwireargs --ssh "\"$PYTHON\" $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei --four vier
153 eins zwei None vier None
153 eins zwei None vier None
154 $ hg debugwireargs --ssh "$PYTHON $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei
154 $ hg debugwireargs --ssh "\"$PYTHON\" $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei
155 eins zwei None None None
155 eins zwei None None None
156 $ hg debugwireargs --ssh "$PYTHON $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei --five fuenf
156 $ hg debugwireargs --ssh "\"$PYTHON\" $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei --five fuenf
157 eins zwei None None None
157 eins zwei None None None
158
158
159 Explicitly kill daemons to let the test exit on Windows
159 Explicitly kill daemons to let the test exit on Windows
160
160
161 $ killdaemons.py
161 $ killdaemons.py
162
162
General Comments 0
You need to be logged in to leave comments. Login now