Show More
@@ -1,1148 +1,1158 b'' | |||||
|
1 | #testcases sshv1 sshv2 | |||
|
2 | ||||
|
3 | #if sshv2 | |||
|
4 | $ cat >> $HGRCPATH << EOF | |||
|
5 | > [experimental] | |||
|
6 | > sshpeer.advertise-v2 = true | |||
|
7 | > sshserver.support-v2 = true | |||
|
8 | > EOF | |||
|
9 | #endif | |||
|
10 | ||||
1 | Test exchange of common information using bundle2 |
|
11 | Test exchange of common information using bundle2 | |
2 |
|
12 | |||
3 |
|
13 | |||
4 | $ getmainid() { |
|
14 | $ getmainid() { | |
5 | > hg -R main log --template '{node}\n' --rev "$1" |
|
15 | > hg -R main log --template '{node}\n' --rev "$1" | |
6 | > } |
|
16 | > } | |
7 |
|
17 | |||
8 | enable obsolescence |
|
18 | enable obsolescence | |
9 |
|
19 | |||
10 | $ cp $HGRCPATH $TESTTMP/hgrc.orig |
|
20 | $ cp $HGRCPATH $TESTTMP/hgrc.orig | |
11 | $ cat > $TESTTMP/bundle2-pushkey-hook.sh << EOF |
|
21 | $ cat > $TESTTMP/bundle2-pushkey-hook.sh << EOF | |
12 | > echo pushkey: lock state after \"\$HG_NAMESPACE\" |
|
22 | > echo pushkey: lock state after \"\$HG_NAMESPACE\" | |
13 | > hg debuglock |
|
23 | > hg debuglock | |
14 | > EOF |
|
24 | > EOF | |
15 |
|
25 | |||
16 | $ cat >> $HGRCPATH << EOF |
|
26 | $ cat >> $HGRCPATH << EOF | |
17 | > [experimental] |
|
27 | > [experimental] | |
18 | > evolution.createmarkers=True |
|
28 | > evolution.createmarkers=True | |
19 | > evolution.exchange=True |
|
29 | > evolution.exchange=True | |
20 | > bundle2-output-capture=True |
|
30 | > bundle2-output-capture=True | |
21 | > [ui] |
|
31 | > [ui] | |
22 | > ssh="$PYTHON" "$TESTDIR/dummyssh" |
|
32 | > ssh="$PYTHON" "$TESTDIR/dummyssh" | |
23 | > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} |
|
33 | > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} | |
24 | > [web] |
|
34 | > [web] | |
25 | > push_ssl = false |
|
35 | > push_ssl = false | |
26 | > allow_push = * |
|
36 | > allow_push = * | |
27 | > [phases] |
|
37 | > [phases] | |
28 | > publish=False |
|
38 | > publish=False | |
29 | > [hooks] |
|
39 | > [hooks] | |
30 | > pretxnclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n" |
|
40 | > pretxnclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n" | |
31 | > txnclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n" |
|
41 | > txnclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n" | |
32 | > txnclose.env = sh -c "HG_LOCAL= printenv.py txnclose" |
|
42 | > txnclose.env = sh -c "HG_LOCAL= printenv.py txnclose" | |
33 | > pushkey= sh "$TESTTMP/bundle2-pushkey-hook.sh" |
|
43 | > pushkey= sh "$TESTTMP/bundle2-pushkey-hook.sh" | |
34 | > EOF |
|
44 | > EOF | |
35 |
|
45 | |||
36 | The extension requires a repo (currently unused) |
|
46 | The extension requires a repo (currently unused) | |
37 |
|
47 | |||
38 | $ hg init main |
|
48 | $ hg init main | |
39 | $ cd main |
|
49 | $ cd main | |
40 | $ touch a |
|
50 | $ touch a | |
41 | $ hg add a |
|
51 | $ hg add a | |
42 | $ hg commit -m 'a' |
|
52 | $ hg commit -m 'a' | |
43 | pre-close-tip:3903775176ed draft |
|
53 | pre-close-tip:3903775176ed draft | |
44 | postclose-tip:3903775176ed draft |
|
54 | postclose-tip:3903775176ed draft | |
45 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=commit |
|
55 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=commit | |
46 |
|
56 | |||
47 | $ hg unbundle $TESTDIR/bundles/rebase.hg |
|
57 | $ hg unbundle $TESTDIR/bundles/rebase.hg | |
48 | adding changesets |
|
58 | adding changesets | |
49 | adding manifests |
|
59 | adding manifests | |
50 | adding file changes |
|
60 | adding file changes | |
51 | added 8 changesets with 7 changes to 7 files (+3 heads) |
|
61 | added 8 changesets with 7 changes to 7 files (+3 heads) | |
52 | pre-close-tip:02de42196ebe draft |
|
62 | pre-close-tip:02de42196ebe draft | |
53 | new changesets cd010b8cd998:02de42196ebe |
|
63 | new changesets cd010b8cd998:02de42196ebe | |
54 | postclose-tip:02de42196ebe draft |
|
64 | postclose-tip:02de42196ebe draft | |
55 | 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 |
|
65 | 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 | |
56 | bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob) |
|
66 | bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob) | |
57 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
67 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
58 |
|
68 | |||
59 | $ cd .. |
|
69 | $ cd .. | |
60 |
|
70 | |||
61 | Real world exchange |
|
71 | Real world exchange | |
62 | ===================== |
|
72 | ===================== | |
63 |
|
73 | |||
64 | Add more obsolescence information |
|
74 | Add more obsolescence information | |
65 |
|
75 | |||
66 | $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc` |
|
76 | $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc` | |
67 | pre-close-tip:02de42196ebe draft |
|
77 | pre-close-tip:02de42196ebe draft | |
68 | postclose-tip:02de42196ebe draft |
|
78 | postclose-tip:02de42196ebe draft | |
69 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
79 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
70 | $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c` |
|
80 | $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c` | |
71 | pre-close-tip:02de42196ebe draft |
|
81 | pre-close-tip:02de42196ebe draft | |
72 | postclose-tip:02de42196ebe draft |
|
82 | postclose-tip:02de42196ebe draft | |
73 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
83 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
74 |
|
84 | |||
75 | clone --pull |
|
85 | clone --pull | |
76 |
|
86 | |||
77 | $ hg -R main phase --public cd010b8cd998 |
|
87 | $ hg -R main phase --public cd010b8cd998 | |
78 | pre-close-tip:02de42196ebe draft |
|
88 | pre-close-tip:02de42196ebe draft | |
79 | postclose-tip:02de42196ebe draft |
|
89 | postclose-tip:02de42196ebe draft | |
80 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase |
|
90 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase | |
81 | $ hg clone main other --pull --rev 9520eea781bc |
|
91 | $ hg clone main other --pull --rev 9520eea781bc | |
82 | adding changesets |
|
92 | adding changesets | |
83 | adding manifests |
|
93 | adding manifests | |
84 | adding file changes |
|
94 | adding file changes | |
85 | added 2 changesets with 2 changes to 2 files |
|
95 | added 2 changesets with 2 changes to 2 files | |
86 | 1 new obsolescence markers |
|
96 | 1 new obsolescence markers | |
87 | pre-close-tip:9520eea781bc draft |
|
97 | pre-close-tip:9520eea781bc draft | |
88 | new changesets cd010b8cd998:9520eea781bc |
|
98 | new changesets cd010b8cd998:9520eea781bc | |
89 | postclose-tip:9520eea781bc draft |
|
99 | postclose-tip:9520eea781bc draft | |
90 | 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 |
|
100 | 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 | |
91 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
101 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
92 | updating to branch default |
|
102 | updating to branch default | |
93 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
103 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
94 | $ hg -R other log -G |
|
104 | $ hg -R other log -G | |
95 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
105 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
96 | | |
|
106 | | | |
97 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
107 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
98 |
|
108 | |||
99 | $ hg -R other debugobsolete |
|
109 | $ hg -R other debugobsolete | |
100 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
110 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
101 |
|
111 | |||
102 | pull |
|
112 | pull | |
103 |
|
113 | |||
104 | $ hg -R main phase --public 9520eea781bc |
|
114 | $ hg -R main phase --public 9520eea781bc | |
105 | pre-close-tip:02de42196ebe draft |
|
115 | pre-close-tip:02de42196ebe draft | |
106 | postclose-tip:02de42196ebe draft |
|
116 | postclose-tip:02de42196ebe draft | |
107 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase |
|
117 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase | |
108 | $ hg -R other pull -r 24b6387c8c8c |
|
118 | $ hg -R other pull -r 24b6387c8c8c | |
109 | pulling from $TESTTMP/main |
|
119 | pulling from $TESTTMP/main | |
110 | searching for changes |
|
120 | searching for changes | |
111 | adding changesets |
|
121 | adding changesets | |
112 | adding manifests |
|
122 | adding manifests | |
113 | adding file changes |
|
123 | adding file changes | |
114 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
124 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
115 | 1 new obsolescence markers |
|
125 | 1 new obsolescence markers | |
116 | pre-close-tip:24b6387c8c8c draft |
|
126 | pre-close-tip:24b6387c8c8c draft | |
117 | new changesets 24b6387c8c8c |
|
127 | new changesets 24b6387c8c8c | |
118 | postclose-tip:24b6387c8c8c draft |
|
128 | postclose-tip:24b6387c8c8c draft | |
119 | 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 |
|
129 | 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 | |
120 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
130 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
121 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
131 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
122 | $ hg -R other log -G |
|
132 | $ hg -R other log -G | |
123 | o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
133 | o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
124 | | |
|
134 | | | |
125 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
135 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
126 | |/ |
|
136 | |/ | |
127 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
137 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
128 |
|
138 | |||
129 | $ hg -R other debugobsolete |
|
139 | $ hg -R other debugobsolete | |
130 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
140 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
131 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
141 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
132 |
|
142 | |||
133 | pull empty (with phase movement) |
|
143 | pull empty (with phase movement) | |
134 |
|
144 | |||
135 | $ hg -R main phase --public 24b6387c8c8c |
|
145 | $ hg -R main phase --public 24b6387c8c8c | |
136 | pre-close-tip:02de42196ebe draft |
|
146 | pre-close-tip:02de42196ebe draft | |
137 | postclose-tip:02de42196ebe draft |
|
147 | postclose-tip:02de42196ebe draft | |
138 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase |
|
148 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase | |
139 | $ hg -R other pull -r 24b6387c8c8c |
|
149 | $ hg -R other pull -r 24b6387c8c8c | |
140 | pulling from $TESTTMP/main |
|
150 | pulling from $TESTTMP/main | |
141 | no changes found |
|
151 | no changes found | |
142 | pre-close-tip:24b6387c8c8c public |
|
152 | pre-close-tip:24b6387c8c8c public | |
143 | postclose-tip:24b6387c8c8c public |
|
153 | postclose-tip:24b6387c8c8c public | |
144 | 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 |
|
154 | 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 | |
145 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
155 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
146 | $ hg -R other log -G |
|
156 | $ hg -R other log -G | |
147 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
157 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
148 | | |
|
158 | | | |
149 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
159 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
150 | |/ |
|
160 | |/ | |
151 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
161 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
152 |
|
162 | |||
153 | $ hg -R other debugobsolete |
|
163 | $ hg -R other debugobsolete | |
154 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
164 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
155 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
165 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
156 |
|
166 | |||
157 | pull empty |
|
167 | pull empty | |
158 |
|
168 | |||
159 | $ hg -R other pull -r 24b6387c8c8c |
|
169 | $ hg -R other pull -r 24b6387c8c8c | |
160 | pulling from $TESTTMP/main |
|
170 | pulling from $TESTTMP/main | |
161 | no changes found |
|
171 | no changes found | |
162 | pre-close-tip:24b6387c8c8c public |
|
172 | pre-close-tip:24b6387c8c8c public | |
163 | postclose-tip:24b6387c8c8c public |
|
173 | postclose-tip:24b6387c8c8c public | |
164 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull |
|
174 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull | |
165 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
175 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
166 | $ hg -R other log -G |
|
176 | $ hg -R other log -G | |
167 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
177 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
168 | | |
|
178 | | | |
169 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
179 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
170 | |/ |
|
180 | |/ | |
171 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
181 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
172 |
|
182 | |||
173 | $ hg -R other debugobsolete |
|
183 | $ hg -R other debugobsolete | |
174 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
184 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
175 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
185 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
176 |
|
186 | |||
177 | add extra data to test their exchange during push |
|
187 | add extra data to test their exchange during push | |
178 |
|
188 | |||
179 | $ hg -R main bookmark --rev eea13746799a book_eea1 |
|
189 | $ hg -R main bookmark --rev eea13746799a book_eea1 | |
180 | pre-close-tip:02de42196ebe draft |
|
190 | pre-close-tip:02de42196ebe draft | |
181 | postclose-tip:02de42196ebe draft |
|
191 | postclose-tip:02de42196ebe draft | |
182 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
192 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
183 | $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a` |
|
193 | $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a` | |
184 | pre-close-tip:02de42196ebe draft |
|
194 | pre-close-tip:02de42196ebe draft | |
185 | postclose-tip:02de42196ebe draft |
|
195 | postclose-tip:02de42196ebe draft | |
186 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
196 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
187 | $ hg -R main bookmark --rev 02de42196ebe book_02de |
|
197 | $ hg -R main bookmark --rev 02de42196ebe book_02de | |
188 | pre-close-tip:02de42196ebe draft book_02de |
|
198 | pre-close-tip:02de42196ebe draft book_02de | |
189 | postclose-tip:02de42196ebe draft book_02de |
|
199 | postclose-tip:02de42196ebe draft book_02de | |
190 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
200 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
191 | $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe` |
|
201 | $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe` | |
192 | pre-close-tip:02de42196ebe draft book_02de |
|
202 | pre-close-tip:02de42196ebe draft book_02de | |
193 | postclose-tip:02de42196ebe draft book_02de |
|
203 | postclose-tip:02de42196ebe draft book_02de | |
194 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
204 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
195 | $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc |
|
205 | $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc | |
196 | pre-close-tip:02de42196ebe draft book_02de |
|
206 | pre-close-tip:02de42196ebe draft book_02de | |
197 | postclose-tip:02de42196ebe draft book_02de |
|
207 | postclose-tip:02de42196ebe draft book_02de | |
198 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
208 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
199 | $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16` |
|
209 | $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16` | |
200 | pre-close-tip:02de42196ebe draft book_02de |
|
210 | pre-close-tip:02de42196ebe draft book_02de | |
201 | postclose-tip:02de42196ebe draft book_02de |
|
211 | postclose-tip:02de42196ebe draft book_02de | |
202 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
212 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
203 | $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd |
|
213 | $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd | |
204 | pre-close-tip:02de42196ebe draft book_02de |
|
214 | pre-close-tip:02de42196ebe draft book_02de | |
205 | postclose-tip:02de42196ebe draft book_02de |
|
215 | postclose-tip:02de42196ebe draft book_02de | |
206 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
216 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
207 | $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8` |
|
217 | $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8` | |
208 | pre-close-tip:02de42196ebe draft book_02de |
|
218 | pre-close-tip:02de42196ebe draft book_02de | |
209 | postclose-tip:02de42196ebe draft book_02de |
|
219 | postclose-tip:02de42196ebe draft book_02de | |
210 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
220 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
211 | $ hg -R main bookmark --rev 32af7686d403 book_32af |
|
221 | $ hg -R main bookmark --rev 32af7686d403 book_32af | |
212 | pre-close-tip:02de42196ebe draft book_02de |
|
222 | pre-close-tip:02de42196ebe draft book_02de | |
213 | postclose-tip:02de42196ebe draft book_02de |
|
223 | postclose-tip:02de42196ebe draft book_02de | |
214 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
224 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
215 | $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403` |
|
225 | $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403` | |
216 | pre-close-tip:02de42196ebe draft book_02de |
|
226 | pre-close-tip:02de42196ebe draft book_02de | |
217 | postclose-tip:02de42196ebe draft book_02de |
|
227 | postclose-tip:02de42196ebe draft book_02de | |
218 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
228 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
219 |
|
229 | |||
220 | $ hg -R other bookmark --rev cd010b8cd998 book_eea1 |
|
230 | $ hg -R other bookmark --rev cd010b8cd998 book_eea1 | |
221 | pre-close-tip:24b6387c8c8c public |
|
231 | pre-close-tip:24b6387c8c8c public | |
222 | postclose-tip:24b6387c8c8c public |
|
232 | 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 |
|
233 | 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_02de |
|
234 | $ hg -R other bookmark --rev cd010b8cd998 book_02de | |
225 | pre-close-tip:24b6387c8c8c public |
|
235 | pre-close-tip:24b6387c8c8c public | |
226 | postclose-tip:24b6387c8c8c public |
|
236 | 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 |
|
237 | 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_42cc |
|
238 | $ hg -R other bookmark --rev cd010b8cd998 book_42cc | |
229 | pre-close-tip:24b6387c8c8c public |
|
239 | pre-close-tip:24b6387c8c8c public | |
230 | postclose-tip:24b6387c8c8c public |
|
240 | 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 |
|
241 | 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_5fdd |
|
242 | $ hg -R other bookmark --rev cd010b8cd998 book_5fdd | |
233 | pre-close-tip:24b6387c8c8c public |
|
243 | pre-close-tip:24b6387c8c8c public | |
234 | postclose-tip:24b6387c8c8c public |
|
244 | 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 |
|
245 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
236 | $ hg -R other bookmark --rev cd010b8cd998 book_32af |
|
246 | $ hg -R other bookmark --rev cd010b8cd998 book_32af | |
237 | pre-close-tip:24b6387c8c8c public |
|
247 | pre-close-tip:24b6387c8c8c public | |
238 | postclose-tip:24b6387c8c8c public |
|
248 | postclose-tip:24b6387c8c8c public | |
239 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
249 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
240 |
|
250 | |||
241 | $ hg -R main phase --public eea13746799a |
|
251 | $ hg -R main phase --public eea13746799a | |
242 | pre-close-tip:02de42196ebe draft book_02de |
|
252 | pre-close-tip:02de42196ebe draft book_02de | |
243 | postclose-tip:02de42196ebe draft book_02de |
|
253 | postclose-tip:02de42196ebe draft book_02de | |
244 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase |
|
254 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase | |
245 |
|
255 | |||
246 | push |
|
256 | push | |
247 | $ hg -R main push other --rev eea13746799a --bookmark book_eea1 |
|
257 | $ hg -R main push other --rev eea13746799a --bookmark book_eea1 | |
248 | pushing to other |
|
258 | pushing to other | |
249 | searching for changes |
|
259 | searching for changes | |
250 | remote: adding changesets |
|
260 | remote: adding changesets | |
251 | remote: adding manifests |
|
261 | remote: adding manifests | |
252 | remote: adding file changes |
|
262 | remote: adding file changes | |
253 | remote: added 1 changesets with 0 changes to 0 files (-1 heads) |
|
263 | remote: added 1 changesets with 0 changes to 0 files (-1 heads) | |
254 | remote: 1 new obsolescence markers |
|
264 | remote: 1 new obsolescence markers | |
255 | remote: pre-close-tip:eea13746799a public book_eea1 |
|
265 | remote: pre-close-tip:eea13746799a public book_eea1 | |
256 | remote: pushkey: lock state after "bookmarks" |
|
266 | remote: pushkey: lock state after "bookmarks" | |
257 | remote: lock: free |
|
267 | remote: lock: free | |
258 | remote: wlock: free |
|
268 | remote: wlock: free | |
259 | remote: postclose-tip:eea13746799a public book_eea1 |
|
269 | remote: postclose-tip:eea13746799a public book_eea1 | |
260 | 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 |
|
270 | 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 | |
261 | updating bookmark book_eea1 |
|
271 | updating bookmark book_eea1 | |
262 | pre-close-tip:02de42196ebe draft book_02de |
|
272 | pre-close-tip:02de42196ebe draft book_02de | |
263 | postclose-tip:02de42196ebe draft book_02de |
|
273 | postclose-tip:02de42196ebe draft book_02de | |
264 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response |
|
274 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response | |
265 | file:/*/$TESTTMP/other HG_URL=file:$TESTTMP/other (glob) |
|
275 | file:/*/$TESTTMP/other HG_URL=file:$TESTTMP/other (glob) | |
266 | $ hg -R other log -G |
|
276 | $ hg -R other log -G | |
267 | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |
|
277 | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G | |
268 | |\ |
|
278 | |\ | |
269 | | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
279 | | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
270 | | | |
|
280 | | | | |
271 | @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
281 | @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
272 | |/ |
|
282 | |/ | |
273 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A |
|
283 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A | |
274 |
|
284 | |||
275 | $ hg -R other debugobsolete |
|
285 | $ hg -R other debugobsolete | |
276 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
286 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
277 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
287 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
278 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
288 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
279 |
|
289 | |||
280 | pull over ssh |
|
290 | pull over ssh | |
281 |
|
291 | |||
282 | $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de |
|
292 | $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de | |
283 | pulling from ssh://user@dummy/main |
|
293 | pulling from ssh://user@dummy/main | |
284 | searching for changes |
|
294 | searching for changes | |
285 | adding changesets |
|
295 | adding changesets | |
286 | adding manifests |
|
296 | adding manifests | |
287 | adding file changes |
|
297 | adding file changes | |
288 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
298 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
289 | 1 new obsolescence markers |
|
299 | 1 new obsolescence markers | |
290 | updating bookmark book_02de |
|
300 | updating bookmark book_02de | |
291 | pre-close-tip:02de42196ebe draft book_02de |
|
301 | pre-close-tip:02de42196ebe draft book_02de | |
292 | new changesets 02de42196ebe |
|
302 | new changesets 02de42196ebe | |
293 | postclose-tip:02de42196ebe draft book_02de |
|
303 | postclose-tip:02de42196ebe draft book_02de | |
294 | 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 |
|
304 | 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 | |
295 | ssh://user@dummy/main HG_URL=ssh://user@dummy/main |
|
305 | ssh://user@dummy/main HG_URL=ssh://user@dummy/main | |
296 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
306 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
297 | $ hg -R other debugobsolete |
|
307 | $ hg -R other debugobsolete | |
298 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
308 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
299 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
309 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
300 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
310 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
301 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
311 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
302 |
|
312 | |||
303 | pull over http |
|
313 | pull over http | |
304 |
|
314 | |||
305 | $ hg serve -R main -p $HGPORT -d --pid-file=main.pid -E main-error.log |
|
315 | $ hg serve -R main -p $HGPORT -d --pid-file=main.pid -E main-error.log | |
306 | $ cat main.pid >> $DAEMON_PIDS |
|
316 | $ cat main.pid >> $DAEMON_PIDS | |
307 |
|
317 | |||
308 | $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc |
|
318 | $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc | |
309 | pulling from http://localhost:$HGPORT/ |
|
319 | pulling from http://localhost:$HGPORT/ | |
310 | searching for changes |
|
320 | searching for changes | |
311 | adding changesets |
|
321 | adding changesets | |
312 | adding manifests |
|
322 | adding manifests | |
313 | adding file changes |
|
323 | adding file changes | |
314 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
324 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
315 | 1 new obsolescence markers |
|
325 | 1 new obsolescence markers | |
316 | updating bookmark book_42cc |
|
326 | updating bookmark book_42cc | |
317 | pre-close-tip:42ccdea3bb16 draft book_42cc |
|
327 | pre-close-tip:42ccdea3bb16 draft book_42cc | |
318 | new changesets 42ccdea3bb16 |
|
328 | new changesets 42ccdea3bb16 | |
319 | postclose-tip:42ccdea3bb16 draft book_42cc |
|
329 | postclose-tip:42ccdea3bb16 draft book_42cc | |
320 | 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 |
|
330 | 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 | |
321 | http://localhost:$HGPORT/ HG_URL=http://localhost:$HGPORT/ |
|
331 | http://localhost:$HGPORT/ HG_URL=http://localhost:$HGPORT/ | |
322 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
332 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
323 | $ cat main-error.log |
|
333 | $ cat main-error.log | |
324 | $ hg -R other debugobsolete |
|
334 | $ hg -R other debugobsolete | |
325 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
335 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
326 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
336 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
327 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
337 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
328 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
338 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
329 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
339 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
330 |
|
340 | |||
331 | push over ssh |
|
341 | push over ssh | |
332 |
|
342 | |||
333 | $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd |
|
343 | $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd | |
334 | pushing to ssh://user@dummy/other |
|
344 | pushing to ssh://user@dummy/other | |
335 | searching for changes |
|
345 | searching for changes | |
336 | remote: adding changesets |
|
346 | remote: adding changesets | |
337 | remote: adding manifests |
|
347 | remote: adding manifests | |
338 | remote: adding file changes |
|
348 | remote: adding file changes | |
339 | remote: added 1 changesets with 1 changes to 1 files |
|
349 | remote: added 1 changesets with 1 changes to 1 files | |
340 | remote: 1 new obsolescence markers |
|
350 | remote: 1 new obsolescence markers | |
341 | remote: pre-close-tip:5fddd98957c8 draft book_5fdd |
|
351 | remote: pre-close-tip:5fddd98957c8 draft book_5fdd | |
342 | remote: pushkey: lock state after "bookmarks" |
|
352 | remote: pushkey: lock state after "bookmarks" | |
343 | remote: lock: free |
|
353 | remote: lock: free | |
344 | remote: wlock: free |
|
354 | remote: wlock: free | |
345 | remote: postclose-tip:5fddd98957c8 draft book_5fdd |
|
355 | remote: postclose-tip:5fddd98957c8 draft book_5fdd | |
346 | 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 |
|
356 | 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 | |
347 | updating bookmark book_5fdd |
|
357 | updating bookmark book_5fdd | |
348 | pre-close-tip:02de42196ebe draft book_02de |
|
358 | pre-close-tip:02de42196ebe draft book_02de | |
349 | postclose-tip:02de42196ebe draft book_02de |
|
359 | postclose-tip:02de42196ebe draft book_02de | |
350 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response |
|
360 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response | |
351 | ssh://user@dummy/other HG_URL=ssh://user@dummy/other |
|
361 | ssh://user@dummy/other HG_URL=ssh://user@dummy/other | |
352 | $ hg -R other log -G |
|
362 | $ hg -R other log -G | |
353 | o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C |
|
363 | o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C | |
354 | | |
|
364 | | | |
355 | o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B |
|
365 | o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B | |
356 | | |
|
366 | | | |
357 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H |
|
367 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H | |
358 | | | |
|
368 | | | | |
359 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |
|
369 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G | |
360 | | |/| |
|
370 | | |/| | |
361 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
371 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
362 | |/ / |
|
372 | |/ / | |
363 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
373 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
364 | |/ |
|
374 | |/ | |
365 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A |
|
375 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A | |
366 |
|
376 | |||
367 | $ hg -R other debugobsolete |
|
377 | $ hg -R other debugobsolete | |
368 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
378 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
369 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
379 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
370 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
380 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
371 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
381 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
372 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
382 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
373 | 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
383 | 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
374 |
|
384 | |||
375 | push over http |
|
385 | push over http | |
376 |
|
386 | |||
377 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
387 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
378 | $ cat other.pid >> $DAEMON_PIDS |
|
388 | $ cat other.pid >> $DAEMON_PIDS | |
379 |
|
389 | |||
380 | $ hg -R main phase --public 32af7686d403 |
|
390 | $ hg -R main phase --public 32af7686d403 | |
381 | pre-close-tip:02de42196ebe draft book_02de |
|
391 | pre-close-tip:02de42196ebe draft book_02de | |
382 | postclose-tip:02de42196ebe draft book_02de |
|
392 | postclose-tip:02de42196ebe draft book_02de | |
383 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase |
|
393 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase | |
384 | $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af |
|
394 | $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af | |
385 | pushing to http://localhost:$HGPORT2/ |
|
395 | pushing to http://localhost:$HGPORT2/ | |
386 | searching for changes |
|
396 | searching for changes | |
387 | remote: adding changesets |
|
397 | remote: adding changesets | |
388 | remote: adding manifests |
|
398 | remote: adding manifests | |
389 | remote: adding file changes |
|
399 | remote: adding file changes | |
390 | remote: added 1 changesets with 1 changes to 1 files |
|
400 | remote: added 1 changesets with 1 changes to 1 files | |
391 | remote: 1 new obsolescence markers |
|
401 | remote: 1 new obsolescence markers | |
392 | remote: pre-close-tip:32af7686d403 public book_32af |
|
402 | remote: pre-close-tip:32af7686d403 public book_32af | |
393 | remote: pushkey: lock state after "bookmarks" |
|
403 | remote: pushkey: lock state after "bookmarks" | |
394 | remote: lock: free |
|
404 | remote: lock: free | |
395 | remote: wlock: free |
|
405 | remote: wlock: free | |
396 | remote: postclose-tip:32af7686d403 public book_32af |
|
406 | 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) |
|
407 | 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 |
|
408 | updating bookmark book_32af | |
399 | pre-close-tip:02de42196ebe draft book_02de |
|
409 | pre-close-tip:02de42196ebe draft book_02de | |
400 | postclose-tip:02de42196ebe draft book_02de |
|
410 | 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 |
|
411 | 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/ |
|
412 | http://localhost:$HGPORT2/ HG_URL=http://localhost:$HGPORT2/ | |
403 | $ cat other-error.log |
|
413 | $ cat other-error.log | |
404 |
|
414 | |||
405 | Check final content. |
|
415 | Check final content. | |
406 |
|
416 | |||
407 | $ hg -R other log -G |
|
417 | $ hg -R other log -G | |
408 | o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D |
|
418 | o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D | |
409 | | |
|
419 | | | |
410 | o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C |
|
420 | o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C | |
411 | | |
|
421 | | | |
412 | o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B |
|
422 | o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B | |
413 | | |
|
423 | | | |
414 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H |
|
424 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H | |
415 | | | |
|
425 | | | | |
416 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |
|
426 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G | |
417 | | |/| |
|
427 | | |/| | |
418 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
428 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
419 | |/ / |
|
429 | |/ / | |
420 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
430 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
421 | |/ |
|
431 | |/ | |
422 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
432 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
423 |
|
433 | |||
424 | $ hg -R other debugobsolete |
|
434 | $ hg -R other debugobsolete | |
425 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
435 | 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'} |
|
436 | 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'} |
|
437 | 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'} |
|
438 | 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'} |
|
439 | 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'} |
|
440 | 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'} |
|
441 | 7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
432 |
|
442 | |||
433 | (check that no 'pending' files remain) |
|
443 | (check that no 'pending' files remain) | |
434 |
|
444 | |||
435 | $ ls -1 other/.hg/bookmarks* |
|
445 | $ ls -1 other/.hg/bookmarks* | |
436 | other/.hg/bookmarks |
|
446 | other/.hg/bookmarks | |
437 | $ ls -1 other/.hg/store/phaseroots* |
|
447 | $ ls -1 other/.hg/store/phaseroots* | |
438 | other/.hg/store/phaseroots |
|
448 | other/.hg/store/phaseroots | |
439 | $ ls -1 other/.hg/store/00changelog.i* |
|
449 | $ ls -1 other/.hg/store/00changelog.i* | |
440 | other/.hg/store/00changelog.i |
|
450 | other/.hg/store/00changelog.i | |
441 |
|
451 | |||
442 | Error Handling |
|
452 | Error Handling | |
443 | ============== |
|
453 | ============== | |
444 |
|
454 | |||
445 | Check that errors are properly returned to the client during push. |
|
455 | Check that errors are properly returned to the client during push. | |
446 |
|
456 | |||
447 | Setting up |
|
457 | Setting up | |
448 |
|
458 | |||
449 | $ cat > failpush.py << EOF |
|
459 | $ cat > failpush.py << EOF | |
450 | > """A small extension that makes push fails when using bundle2 |
|
460 | > """A small extension that makes push fails when using bundle2 | |
451 | > |
|
461 | > | |
452 | > used to test error handling in bundle2 |
|
462 | > used to test error handling in bundle2 | |
453 | > """ |
|
463 | > """ | |
454 | > |
|
464 | > | |
455 | > from mercurial import error |
|
465 | > from mercurial import error | |
456 | > from mercurial import bundle2 |
|
466 | > from mercurial import bundle2 | |
457 | > from mercurial import exchange |
|
467 | > from mercurial import exchange | |
458 | > from mercurial import extensions |
|
468 | > from mercurial import extensions | |
459 | > from mercurial import registrar |
|
469 | > from mercurial import registrar | |
460 | > cmdtable = {} |
|
470 | > cmdtable = {} | |
461 | > command = registrar.command(cmdtable) |
|
471 | > command = registrar.command(cmdtable) | |
462 | > |
|
472 | > | |
463 | > configtable = {} |
|
473 | > configtable = {} | |
464 | > configitem = registrar.configitem(configtable) |
|
474 | > configitem = registrar.configitem(configtable) | |
465 | > configitem('failpush', 'reason', |
|
475 | > configitem('failpush', 'reason', | |
466 | > default=None, |
|
476 | > default=None, | |
467 | > ) |
|
477 | > ) | |
468 | > |
|
478 | > | |
469 | > def _pushbundle2failpart(pushop, bundler): |
|
479 | > def _pushbundle2failpart(pushop, bundler): | |
470 | > reason = pushop.ui.config('failpush', 'reason') |
|
480 | > reason = pushop.ui.config('failpush', 'reason') | |
471 | > part = None |
|
481 | > part = None | |
472 | > if reason == 'abort': |
|
482 | > if reason == 'abort': | |
473 | > bundler.newpart('test:abort') |
|
483 | > bundler.newpart('test:abort') | |
474 | > if reason == 'unknown': |
|
484 | > if reason == 'unknown': | |
475 | > bundler.newpart('test:unknown') |
|
485 | > bundler.newpart('test:unknown') | |
476 | > if reason == 'race': |
|
486 | > if reason == 'race': | |
477 | > # 20 Bytes of crap |
|
487 | > # 20 Bytes of crap | |
478 | > bundler.newpart('check:heads', data='01234567890123456789') |
|
488 | > bundler.newpart('check:heads', data='01234567890123456789') | |
479 | > |
|
489 | > | |
480 | > @bundle2.parthandler("test:abort") |
|
490 | > @bundle2.parthandler("test:abort") | |
481 | > def handleabort(op, part): |
|
491 | > def handleabort(op, part): | |
482 | > raise error.Abort('Abandon ship!', hint="don't panic") |
|
492 | > raise error.Abort('Abandon ship!', hint="don't panic") | |
483 | > |
|
493 | > | |
484 | > def uisetup(ui): |
|
494 | > def uisetup(ui): | |
485 | > exchange.b2partsgenmapping['failpart'] = _pushbundle2failpart |
|
495 | > exchange.b2partsgenmapping['failpart'] = _pushbundle2failpart | |
486 | > exchange.b2partsgenorder.insert(0, 'failpart') |
|
496 | > exchange.b2partsgenorder.insert(0, 'failpart') | |
487 | > |
|
497 | > | |
488 | > EOF |
|
498 | > EOF | |
489 |
|
499 | |||
490 | $ cd main |
|
500 | $ cd main | |
491 | $ hg up tip |
|
501 | $ hg up tip | |
492 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
502 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
493 | $ echo 'I' > I |
|
503 | $ echo 'I' > I | |
494 | $ hg add I |
|
504 | $ hg add I | |
495 | $ hg ci -m 'I' |
|
505 | $ hg ci -m 'I' | |
496 | pre-close-tip:e7ec4e813ba6 draft |
|
506 | pre-close-tip:e7ec4e813ba6 draft | |
497 | postclose-tip:e7ec4e813ba6 draft |
|
507 | postclose-tip:e7ec4e813ba6 draft | |
498 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit |
|
508 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit | |
499 | $ hg id |
|
509 | $ hg id | |
500 | e7ec4e813ba6 tip |
|
510 | e7ec4e813ba6 tip | |
501 | $ cd .. |
|
511 | $ cd .. | |
502 |
|
512 | |||
503 | $ cat << EOF >> $HGRCPATH |
|
513 | $ cat << EOF >> $HGRCPATH | |
504 | > [extensions] |
|
514 | > [extensions] | |
505 | > failpush=$TESTTMP/failpush.py |
|
515 | > failpush=$TESTTMP/failpush.py | |
506 | > EOF |
|
516 | > EOF | |
507 |
|
517 | |||
508 | $ killdaemons.py |
|
518 | $ killdaemons.py | |
509 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
519 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
510 | $ cat other.pid >> $DAEMON_PIDS |
|
520 | $ cat other.pid >> $DAEMON_PIDS | |
511 |
|
521 | |||
512 | Doing the actual push: Abort error |
|
522 | Doing the actual push: Abort error | |
513 |
|
523 | |||
514 | $ cat << EOF >> $HGRCPATH |
|
524 | $ cat << EOF >> $HGRCPATH | |
515 | > [failpush] |
|
525 | > [failpush] | |
516 | > reason = abort |
|
526 | > reason = abort | |
517 | > EOF |
|
527 | > EOF | |
518 |
|
528 | |||
519 | $ hg -R main push other -r e7ec4e813ba6 |
|
529 | $ hg -R main push other -r e7ec4e813ba6 | |
520 | pushing to other |
|
530 | pushing to other | |
521 | searching for changes |
|
531 | searching for changes | |
522 | abort: Abandon ship! |
|
532 | abort: Abandon ship! | |
523 | (don't panic) |
|
533 | (don't panic) | |
524 | [255] |
|
534 | [255] | |
525 |
|
535 | |||
526 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
536 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
527 | pushing to ssh://user@dummy/other |
|
537 | pushing to ssh://user@dummy/other | |
528 | searching for changes |
|
538 | searching for changes | |
529 | remote: Abandon ship! |
|
539 | remote: Abandon ship! | |
530 | remote: (don't panic) |
|
540 | remote: (don't panic) | |
531 | abort: push failed on remote |
|
541 | abort: push failed on remote | |
532 | [255] |
|
542 | [255] | |
533 |
|
543 | |||
534 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
544 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
535 | pushing to http://localhost:$HGPORT2/ |
|
545 | pushing to http://localhost:$HGPORT2/ | |
536 | searching for changes |
|
546 | searching for changes | |
537 | remote: Abandon ship! |
|
547 | remote: Abandon ship! | |
538 | remote: (don't panic) |
|
548 | remote: (don't panic) | |
539 | abort: push failed on remote |
|
549 | abort: push failed on remote | |
540 | [255] |
|
550 | [255] | |
541 |
|
551 | |||
542 |
|
552 | |||
543 | Doing the actual push: unknown mandatory parts |
|
553 | Doing the actual push: unknown mandatory parts | |
544 |
|
554 | |||
545 | $ cat << EOF >> $HGRCPATH |
|
555 | $ cat << EOF >> $HGRCPATH | |
546 | > [failpush] |
|
556 | > [failpush] | |
547 | > reason = unknown |
|
557 | > reason = unknown | |
548 | > EOF |
|
558 | > EOF | |
549 |
|
559 | |||
550 | $ hg -R main push other -r e7ec4e813ba6 |
|
560 | $ hg -R main push other -r e7ec4e813ba6 | |
551 | pushing to other |
|
561 | pushing to other | |
552 | searching for changes |
|
562 | searching for changes | |
553 | abort: missing support for test:unknown |
|
563 | abort: missing support for test:unknown | |
554 | [255] |
|
564 | [255] | |
555 |
|
565 | |||
556 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
566 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
557 | pushing to ssh://user@dummy/other |
|
567 | pushing to ssh://user@dummy/other | |
558 | searching for changes |
|
568 | searching for changes | |
559 | abort: missing support for test:unknown |
|
569 | abort: missing support for test:unknown | |
560 | [255] |
|
570 | [255] | |
561 |
|
571 | |||
562 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
572 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
563 | pushing to http://localhost:$HGPORT2/ |
|
573 | pushing to http://localhost:$HGPORT2/ | |
564 | searching for changes |
|
574 | searching for changes | |
565 | abort: missing support for test:unknown |
|
575 | abort: missing support for test:unknown | |
566 | [255] |
|
576 | [255] | |
567 |
|
577 | |||
568 | Doing the actual push: race |
|
578 | Doing the actual push: race | |
569 |
|
579 | |||
570 | $ cat << EOF >> $HGRCPATH |
|
580 | $ cat << EOF >> $HGRCPATH | |
571 | > [failpush] |
|
581 | > [failpush] | |
572 | > reason = race |
|
582 | > reason = race | |
573 | > EOF |
|
583 | > EOF | |
574 |
|
584 | |||
575 | $ hg -R main push other -r e7ec4e813ba6 |
|
585 | $ hg -R main push other -r e7ec4e813ba6 | |
576 | pushing to other |
|
586 | pushing to other | |
577 | searching for changes |
|
587 | searching for changes | |
578 | abort: push failed: |
|
588 | abort: push failed: | |
579 | 'repository changed while pushing - please try again' |
|
589 | 'repository changed while pushing - please try again' | |
580 | [255] |
|
590 | [255] | |
581 |
|
591 | |||
582 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
592 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
583 | pushing to ssh://user@dummy/other |
|
593 | pushing to ssh://user@dummy/other | |
584 | searching for changes |
|
594 | searching for changes | |
585 | abort: push failed: |
|
595 | abort: push failed: | |
586 | 'repository changed while pushing - please try again' |
|
596 | 'repository changed while pushing - please try again' | |
587 | [255] |
|
597 | [255] | |
588 |
|
598 | |||
589 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
599 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
590 | pushing to http://localhost:$HGPORT2/ |
|
600 | pushing to http://localhost:$HGPORT2/ | |
591 | searching for changes |
|
601 | searching for changes | |
592 | abort: push failed: |
|
602 | abort: push failed: | |
593 | 'repository changed while pushing - please try again' |
|
603 | 'repository changed while pushing - please try again' | |
594 | [255] |
|
604 | [255] | |
595 |
|
605 | |||
596 | Doing the actual push: hook abort |
|
606 | Doing the actual push: hook abort | |
597 |
|
607 | |||
598 | $ cat << EOF >> $HGRCPATH |
|
608 | $ cat << EOF >> $HGRCPATH | |
599 | > [failpush] |
|
609 | > [failpush] | |
600 | > reason = |
|
610 | > reason = | |
601 | > [hooks] |
|
611 | > [hooks] | |
602 | > pretxnclose.failpush = sh -c "echo 'You shall not pass!'; false" |
|
612 | > pretxnclose.failpush = sh -c "echo 'You shall not pass!'; false" | |
603 | > txnabort.failpush = sh -c "echo 'Cleaning up the mess...'" |
|
613 | > txnabort.failpush = sh -c "echo 'Cleaning up the mess...'" | |
604 | > EOF |
|
614 | > EOF | |
605 |
|
615 | |||
606 | $ killdaemons.py |
|
616 | $ killdaemons.py | |
607 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
617 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
608 | $ cat other.pid >> $DAEMON_PIDS |
|
618 | $ cat other.pid >> $DAEMON_PIDS | |
609 |
|
619 | |||
610 | $ hg -R main push other -r e7ec4e813ba6 |
|
620 | $ hg -R main push other -r e7ec4e813ba6 | |
611 | pushing to other |
|
621 | pushing to other | |
612 | searching for changes |
|
622 | searching for changes | |
613 | remote: adding changesets |
|
623 | remote: adding changesets | |
614 | remote: adding manifests |
|
624 | remote: adding manifests | |
615 | remote: adding file changes |
|
625 | remote: adding file changes | |
616 | remote: added 1 changesets with 1 changes to 1 files |
|
626 | remote: added 1 changesets with 1 changes to 1 files | |
617 | remote: pre-close-tip:e7ec4e813ba6 draft |
|
627 | remote: pre-close-tip:e7ec4e813ba6 draft | |
618 | remote: You shall not pass! |
|
628 | remote: You shall not pass! | |
619 | remote: transaction abort! |
|
629 | remote: transaction abort! | |
620 | remote: Cleaning up the mess... |
|
630 | remote: Cleaning up the mess... | |
621 | remote: rollback completed |
|
631 | remote: rollback completed | |
622 | abort: pretxnclose.failpush hook exited with status 1 |
|
632 | abort: pretxnclose.failpush hook exited with status 1 | |
623 | [255] |
|
633 | [255] | |
624 |
|
634 | |||
625 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
635 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
626 | pushing to ssh://user@dummy/other |
|
636 | pushing to ssh://user@dummy/other | |
627 | searching for changes |
|
637 | searching for changes | |
628 | remote: adding changesets |
|
638 | remote: adding changesets | |
629 | remote: adding manifests |
|
639 | remote: adding manifests | |
630 | remote: adding file changes |
|
640 | remote: adding file changes | |
631 | remote: added 1 changesets with 1 changes to 1 files |
|
641 | remote: added 1 changesets with 1 changes to 1 files | |
632 | remote: pre-close-tip:e7ec4e813ba6 draft |
|
642 | remote: pre-close-tip:e7ec4e813ba6 draft | |
633 | remote: You shall not pass! |
|
643 | remote: You shall not pass! | |
634 | remote: transaction abort! |
|
644 | remote: transaction abort! | |
635 | remote: Cleaning up the mess... |
|
645 | remote: Cleaning up the mess... | |
636 | remote: rollback completed |
|
646 | remote: rollback completed | |
637 | remote: pretxnclose.failpush hook exited with status 1 |
|
647 | remote: pretxnclose.failpush hook exited with status 1 | |
638 | abort: push failed on remote |
|
648 | abort: push failed on remote | |
639 | [255] |
|
649 | [255] | |
640 |
|
650 | |||
641 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
651 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
642 | pushing to http://localhost:$HGPORT2/ |
|
652 | pushing to http://localhost:$HGPORT2/ | |
643 | searching for changes |
|
653 | searching for changes | |
644 | remote: adding changesets |
|
654 | remote: adding changesets | |
645 | remote: adding manifests |
|
655 | remote: adding manifests | |
646 | remote: adding file changes |
|
656 | remote: adding file changes | |
647 | remote: added 1 changesets with 1 changes to 1 files |
|
657 | remote: added 1 changesets with 1 changes to 1 files | |
648 | remote: pre-close-tip:e7ec4e813ba6 draft |
|
658 | remote: pre-close-tip:e7ec4e813ba6 draft | |
649 | remote: You shall not pass! |
|
659 | remote: You shall not pass! | |
650 | remote: transaction abort! |
|
660 | remote: transaction abort! | |
651 | remote: Cleaning up the mess... |
|
661 | remote: Cleaning up the mess... | |
652 | remote: rollback completed |
|
662 | remote: rollback completed | |
653 | remote: pretxnclose.failpush hook exited with status 1 |
|
663 | remote: pretxnclose.failpush hook exited with status 1 | |
654 | abort: push failed on remote |
|
664 | abort: push failed on remote | |
655 | [255] |
|
665 | [255] | |
656 |
|
666 | |||
657 | (check that no 'pending' files remain) |
|
667 | (check that no 'pending' files remain) | |
658 |
|
668 | |||
659 | $ ls -1 other/.hg/bookmarks* |
|
669 | $ ls -1 other/.hg/bookmarks* | |
660 | other/.hg/bookmarks |
|
670 | other/.hg/bookmarks | |
661 | $ ls -1 other/.hg/store/phaseroots* |
|
671 | $ ls -1 other/.hg/store/phaseroots* | |
662 | other/.hg/store/phaseroots |
|
672 | other/.hg/store/phaseroots | |
663 | $ ls -1 other/.hg/store/00changelog.i* |
|
673 | $ ls -1 other/.hg/store/00changelog.i* | |
664 | other/.hg/store/00changelog.i |
|
674 | other/.hg/store/00changelog.i | |
665 |
|
675 | |||
666 | Check error from hook during the unbundling process itself |
|
676 | Check error from hook during the unbundling process itself | |
667 |
|
677 | |||
668 | $ cat << EOF >> $HGRCPATH |
|
678 | $ cat << EOF >> $HGRCPATH | |
669 | > pretxnchangegroup = sh -c "echo 'Fail early!'; false" |
|
679 | > pretxnchangegroup = sh -c "echo 'Fail early!'; false" | |
670 | > EOF |
|
680 | > EOF | |
671 | $ killdaemons.py # reload http config |
|
681 | $ killdaemons.py # reload http config | |
672 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
682 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
673 | $ cat other.pid >> $DAEMON_PIDS |
|
683 | $ cat other.pid >> $DAEMON_PIDS | |
674 |
|
684 | |||
675 | $ hg -R main push other -r e7ec4e813ba6 |
|
685 | $ hg -R main push other -r e7ec4e813ba6 | |
676 | pushing to other |
|
686 | pushing to other | |
677 | searching for changes |
|
687 | searching for changes | |
678 | remote: adding changesets |
|
688 | remote: adding changesets | |
679 | remote: adding manifests |
|
689 | remote: adding manifests | |
680 | remote: adding file changes |
|
690 | remote: adding file changes | |
681 | remote: added 1 changesets with 1 changes to 1 files |
|
691 | remote: added 1 changesets with 1 changes to 1 files | |
682 | remote: Fail early! |
|
692 | remote: Fail early! | |
683 | remote: transaction abort! |
|
693 | remote: transaction abort! | |
684 | remote: Cleaning up the mess... |
|
694 | remote: Cleaning up the mess... | |
685 | remote: rollback completed |
|
695 | remote: rollback completed | |
686 | abort: pretxnchangegroup hook exited with status 1 |
|
696 | abort: pretxnchangegroup hook exited with status 1 | |
687 | [255] |
|
697 | [255] | |
688 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
698 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
689 | pushing to ssh://user@dummy/other |
|
699 | pushing to ssh://user@dummy/other | |
690 | searching for changes |
|
700 | searching for changes | |
691 | remote: adding changesets |
|
701 | remote: adding changesets | |
692 | remote: adding manifests |
|
702 | remote: adding manifests | |
693 | remote: adding file changes |
|
703 | remote: adding file changes | |
694 | remote: added 1 changesets with 1 changes to 1 files |
|
704 | remote: added 1 changesets with 1 changes to 1 files | |
695 | remote: Fail early! |
|
705 | remote: Fail early! | |
696 | remote: transaction abort! |
|
706 | remote: transaction abort! | |
697 | remote: Cleaning up the mess... |
|
707 | remote: Cleaning up the mess... | |
698 | remote: rollback completed |
|
708 | remote: rollback completed | |
699 | remote: pretxnchangegroup hook exited with status 1 |
|
709 | remote: pretxnchangegroup hook exited with status 1 | |
700 | abort: push failed on remote |
|
710 | abort: push failed on remote | |
701 | [255] |
|
711 | [255] | |
702 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
712 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
703 | pushing to http://localhost:$HGPORT2/ |
|
713 | pushing to http://localhost:$HGPORT2/ | |
704 | searching for changes |
|
714 | searching for changes | |
705 | remote: adding changesets |
|
715 | remote: adding changesets | |
706 | remote: adding manifests |
|
716 | remote: adding manifests | |
707 | remote: adding file changes |
|
717 | remote: adding file changes | |
708 | remote: added 1 changesets with 1 changes to 1 files |
|
718 | remote: added 1 changesets with 1 changes to 1 files | |
709 | remote: Fail early! |
|
719 | remote: Fail early! | |
710 | remote: transaction abort! |
|
720 | remote: transaction abort! | |
711 | remote: Cleaning up the mess... |
|
721 | remote: Cleaning up the mess... | |
712 | remote: rollback completed |
|
722 | remote: rollback completed | |
713 | remote: pretxnchangegroup hook exited with status 1 |
|
723 | remote: pretxnchangegroup hook exited with status 1 | |
714 | abort: push failed on remote |
|
724 | abort: push failed on remote | |
715 | [255] |
|
725 | [255] | |
716 |
|
726 | |||
717 | Check output capture control. |
|
727 | Check output capture control. | |
718 |
|
728 | |||
719 | (should be still forced for http, disabled for local and ssh) |
|
729 | (should be still forced for http, disabled for local and ssh) | |
720 |
|
730 | |||
721 | $ cat >> $HGRCPATH << EOF |
|
731 | $ cat >> $HGRCPATH << EOF | |
722 | > [experimental] |
|
732 | > [experimental] | |
723 | > bundle2-output-capture=False |
|
733 | > bundle2-output-capture=False | |
724 | > EOF |
|
734 | > EOF | |
725 |
|
735 | |||
726 | $ hg -R main push other -r e7ec4e813ba6 |
|
736 | $ hg -R main push other -r e7ec4e813ba6 | |
727 | pushing to other |
|
737 | pushing to other | |
728 | searching for changes |
|
738 | searching for changes | |
729 | adding changesets |
|
739 | adding changesets | |
730 | adding manifests |
|
740 | adding manifests | |
731 | adding file changes |
|
741 | adding file changes | |
732 | added 1 changesets with 1 changes to 1 files |
|
742 | added 1 changesets with 1 changes to 1 files | |
733 | Fail early! |
|
743 | Fail early! | |
734 | transaction abort! |
|
744 | transaction abort! | |
735 | Cleaning up the mess... |
|
745 | Cleaning up the mess... | |
736 | rollback completed |
|
746 | rollback completed | |
737 | abort: pretxnchangegroup hook exited with status 1 |
|
747 | abort: pretxnchangegroup hook exited with status 1 | |
738 | [255] |
|
748 | [255] | |
739 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
749 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
740 | pushing to ssh://user@dummy/other |
|
750 | pushing to ssh://user@dummy/other | |
741 | searching for changes |
|
751 | searching for changes | |
742 | remote: adding changesets |
|
752 | remote: adding changesets | |
743 | remote: adding manifests |
|
753 | remote: adding manifests | |
744 | remote: adding file changes |
|
754 | remote: adding file changes | |
745 | remote: added 1 changesets with 1 changes to 1 files |
|
755 | remote: added 1 changesets with 1 changes to 1 files | |
746 | remote: Fail early! |
|
756 | remote: Fail early! | |
747 | remote: transaction abort! |
|
757 | remote: transaction abort! | |
748 | remote: Cleaning up the mess... |
|
758 | remote: Cleaning up the mess... | |
749 | remote: rollback completed |
|
759 | remote: rollback completed | |
750 | remote: pretxnchangegroup hook exited with status 1 |
|
760 | remote: pretxnchangegroup hook exited with status 1 | |
751 | abort: push failed on remote |
|
761 | abort: push failed on remote | |
752 | [255] |
|
762 | [255] | |
753 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
763 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
754 | pushing to http://localhost:$HGPORT2/ |
|
764 | pushing to http://localhost:$HGPORT2/ | |
755 | searching for changes |
|
765 | searching for changes | |
756 | remote: adding changesets |
|
766 | remote: adding changesets | |
757 | remote: adding manifests |
|
767 | remote: adding manifests | |
758 | remote: adding file changes |
|
768 | remote: adding file changes | |
759 | remote: added 1 changesets with 1 changes to 1 files |
|
769 | remote: added 1 changesets with 1 changes to 1 files | |
760 | remote: Fail early! |
|
770 | remote: Fail early! | |
761 | remote: transaction abort! |
|
771 | remote: transaction abort! | |
762 | remote: Cleaning up the mess... |
|
772 | remote: Cleaning up the mess... | |
763 | remote: rollback completed |
|
773 | remote: rollback completed | |
764 | remote: pretxnchangegroup hook exited with status 1 |
|
774 | remote: pretxnchangegroup hook exited with status 1 | |
765 | abort: push failed on remote |
|
775 | abort: push failed on remote | |
766 | [255] |
|
776 | [255] | |
767 |
|
777 | |||
768 | Check abort from mandatory pushkey |
|
778 | Check abort from mandatory pushkey | |
769 |
|
779 | |||
770 | $ cat > mandatorypart.py << EOF |
|
780 | $ cat > mandatorypart.py << EOF | |
771 | > from mercurial import exchange |
|
781 | > from mercurial import exchange | |
772 | > from mercurial import pushkey |
|
782 | > from mercurial import pushkey | |
773 | > from mercurial import node |
|
783 | > from mercurial import node | |
774 | > from mercurial import error |
|
784 | > from mercurial import error | |
775 | > @exchange.b2partsgenerator('failingpuskey') |
|
785 | > @exchange.b2partsgenerator('failingpuskey') | |
776 | > def addfailingpushey(pushop, bundler): |
|
786 | > def addfailingpushey(pushop, bundler): | |
777 | > enc = pushkey.encode |
|
787 | > enc = pushkey.encode | |
778 | > part = bundler.newpart('pushkey') |
|
788 | > part = bundler.newpart('pushkey') | |
779 | > part.addparam('namespace', enc('phases')) |
|
789 | > part.addparam('namespace', enc('phases')) | |
780 | > part.addparam('key', enc(pushop.repo['cd010b8cd998'].hex())) |
|
790 | > part.addparam('key', enc(pushop.repo['cd010b8cd998'].hex())) | |
781 | > part.addparam('old', enc(str(0))) # successful update |
|
791 | > part.addparam('old', enc(str(0))) # successful update | |
782 | > part.addparam('new', enc(str(0))) |
|
792 | > part.addparam('new', enc(str(0))) | |
783 | > def fail(pushop, exc): |
|
793 | > def fail(pushop, exc): | |
784 | > raise error.Abort('Correct phase push failed (because hooks)') |
|
794 | > raise error.Abort('Correct phase push failed (because hooks)') | |
785 | > pushop.pkfailcb[part.id] = fail |
|
795 | > pushop.pkfailcb[part.id] = fail | |
786 | > EOF |
|
796 | > EOF | |
787 | $ cat >> $HGRCPATH << EOF |
|
797 | $ cat >> $HGRCPATH << EOF | |
788 | > [hooks] |
|
798 | > [hooks] | |
789 | > pretxnchangegroup= |
|
799 | > pretxnchangegroup= | |
790 | > pretxnclose.failpush= |
|
800 | > pretxnclose.failpush= | |
791 | > prepushkey.failpush = sh -c "echo 'do not push the key !'; false" |
|
801 | > prepushkey.failpush = sh -c "echo 'do not push the key !'; false" | |
792 | > [extensions] |
|
802 | > [extensions] | |
793 | > mandatorypart=$TESTTMP/mandatorypart.py |
|
803 | > mandatorypart=$TESTTMP/mandatorypart.py | |
794 | > EOF |
|
804 | > EOF | |
795 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config |
|
805 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config | |
796 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
806 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
797 | $ cat other.pid >> $DAEMON_PIDS |
|
807 | $ cat other.pid >> $DAEMON_PIDS | |
798 |
|
808 | |||
799 | (Failure from a hook) |
|
809 | (Failure from a hook) | |
800 |
|
810 | |||
801 | $ hg -R main push other -r e7ec4e813ba6 |
|
811 | $ hg -R main push other -r e7ec4e813ba6 | |
802 | pushing to other |
|
812 | pushing to other | |
803 | searching for changes |
|
813 | searching for changes | |
804 | adding changesets |
|
814 | adding changesets | |
805 | adding manifests |
|
815 | adding manifests | |
806 | adding file changes |
|
816 | adding file changes | |
807 | added 1 changesets with 1 changes to 1 files |
|
817 | added 1 changesets with 1 changes to 1 files | |
808 | do not push the key ! |
|
818 | do not push the key ! | |
809 | pushkey-abort: prepushkey.failpush hook exited with status 1 |
|
819 | pushkey-abort: prepushkey.failpush hook exited with status 1 | |
810 | transaction abort! |
|
820 | transaction abort! | |
811 | Cleaning up the mess... |
|
821 | Cleaning up the mess... | |
812 | rollback completed |
|
822 | rollback completed | |
813 | abort: Correct phase push failed (because hooks) |
|
823 | abort: Correct phase push failed (because hooks) | |
814 | [255] |
|
824 | [255] | |
815 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
825 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
816 | pushing to ssh://user@dummy/other |
|
826 | pushing to ssh://user@dummy/other | |
817 | searching for changes |
|
827 | searching for changes | |
818 | remote: adding changesets |
|
828 | remote: adding changesets | |
819 | remote: adding manifests |
|
829 | remote: adding manifests | |
820 | remote: adding file changes |
|
830 | remote: adding file changes | |
821 | remote: added 1 changesets with 1 changes to 1 files |
|
831 | remote: added 1 changesets with 1 changes to 1 files | |
822 | remote: do not push the key ! |
|
832 | remote: do not push the key ! | |
823 | remote: pushkey-abort: prepushkey.failpush hook exited with status 1 |
|
833 | remote: pushkey-abort: prepushkey.failpush hook exited with status 1 | |
824 | remote: transaction abort! |
|
834 | remote: transaction abort! | |
825 | remote: Cleaning up the mess... |
|
835 | remote: Cleaning up the mess... | |
826 | remote: rollback completed |
|
836 | remote: rollback completed | |
827 | abort: Correct phase push failed (because hooks) |
|
837 | abort: Correct phase push failed (because hooks) | |
828 | [255] |
|
838 | [255] | |
829 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
839 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
830 | pushing to http://localhost:$HGPORT2/ |
|
840 | pushing to http://localhost:$HGPORT2/ | |
831 | searching for changes |
|
841 | searching for changes | |
832 | remote: adding changesets |
|
842 | remote: adding changesets | |
833 | remote: adding manifests |
|
843 | remote: adding manifests | |
834 | remote: adding file changes |
|
844 | remote: adding file changes | |
835 | remote: added 1 changesets with 1 changes to 1 files |
|
845 | remote: added 1 changesets with 1 changes to 1 files | |
836 | remote: do not push the key ! |
|
846 | remote: do not push the key ! | |
837 | remote: pushkey-abort: prepushkey.failpush hook exited with status 1 |
|
847 | remote: pushkey-abort: prepushkey.failpush hook exited with status 1 | |
838 | remote: transaction abort! |
|
848 | remote: transaction abort! | |
839 | remote: Cleaning up the mess... |
|
849 | remote: Cleaning up the mess... | |
840 | remote: rollback completed |
|
850 | remote: rollback completed | |
841 | abort: Correct phase push failed (because hooks) |
|
851 | abort: Correct phase push failed (because hooks) | |
842 | [255] |
|
852 | [255] | |
843 |
|
853 | |||
844 | (Failure from a the pushkey) |
|
854 | (Failure from a the pushkey) | |
845 |
|
855 | |||
846 | $ cat > mandatorypart.py << EOF |
|
856 | $ cat > mandatorypart.py << EOF | |
847 | > from mercurial import exchange |
|
857 | > from mercurial import exchange | |
848 | > from mercurial import pushkey |
|
858 | > from mercurial import pushkey | |
849 | > from mercurial import node |
|
859 | > from mercurial import node | |
850 | > from mercurial import error |
|
860 | > from mercurial import error | |
851 | > @exchange.b2partsgenerator('failingpuskey') |
|
861 | > @exchange.b2partsgenerator('failingpuskey') | |
852 | > def addfailingpushey(pushop, bundler): |
|
862 | > def addfailingpushey(pushop, bundler): | |
853 | > enc = pushkey.encode |
|
863 | > enc = pushkey.encode | |
854 | > part = bundler.newpart('pushkey') |
|
864 | > part = bundler.newpart('pushkey') | |
855 | > part.addparam('namespace', enc('phases')) |
|
865 | > part.addparam('namespace', enc('phases')) | |
856 | > part.addparam('key', enc(pushop.repo['cd010b8cd998'].hex())) |
|
866 | > part.addparam('key', enc(pushop.repo['cd010b8cd998'].hex())) | |
857 | > part.addparam('old', enc(str(4))) # will fail |
|
867 | > part.addparam('old', enc(str(4))) # will fail | |
858 | > part.addparam('new', enc(str(3))) |
|
868 | > part.addparam('new', enc(str(3))) | |
859 | > def fail(pushop, exc): |
|
869 | > def fail(pushop, exc): | |
860 | > raise error.Abort('Clown phase push failed') |
|
870 | > raise error.Abort('Clown phase push failed') | |
861 | > pushop.pkfailcb[part.id] = fail |
|
871 | > pushop.pkfailcb[part.id] = fail | |
862 | > EOF |
|
872 | > EOF | |
863 | $ cat >> $HGRCPATH << EOF |
|
873 | $ cat >> $HGRCPATH << EOF | |
864 | > [hooks] |
|
874 | > [hooks] | |
865 | > prepushkey.failpush = |
|
875 | > prepushkey.failpush = | |
866 | > EOF |
|
876 | > EOF | |
867 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config |
|
877 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config | |
868 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
878 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
869 | $ cat other.pid >> $DAEMON_PIDS |
|
879 | $ cat other.pid >> $DAEMON_PIDS | |
870 |
|
880 | |||
871 | $ hg -R main push other -r e7ec4e813ba6 |
|
881 | $ hg -R main push other -r e7ec4e813ba6 | |
872 | pushing to other |
|
882 | pushing to other | |
873 | searching for changes |
|
883 | searching for changes | |
874 | adding changesets |
|
884 | adding changesets | |
875 | adding manifests |
|
885 | adding manifests | |
876 | adding file changes |
|
886 | adding file changes | |
877 | added 1 changesets with 1 changes to 1 files |
|
887 | added 1 changesets with 1 changes to 1 files | |
878 | transaction abort! |
|
888 | transaction abort! | |
879 | Cleaning up the mess... |
|
889 | Cleaning up the mess... | |
880 | rollback completed |
|
890 | rollback completed | |
881 | pushkey: lock state after "phases" |
|
891 | pushkey: lock state after "phases" | |
882 | lock: free |
|
892 | lock: free | |
883 | wlock: free |
|
893 | wlock: free | |
884 | abort: Clown phase push failed |
|
894 | abort: Clown phase push failed | |
885 | [255] |
|
895 | [255] | |
886 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
896 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
887 | pushing to ssh://user@dummy/other |
|
897 | pushing to ssh://user@dummy/other | |
888 | searching for changes |
|
898 | searching for changes | |
889 | remote: adding changesets |
|
899 | remote: adding changesets | |
890 | remote: adding manifests |
|
900 | remote: adding manifests | |
891 | remote: adding file changes |
|
901 | remote: adding file changes | |
892 | remote: added 1 changesets with 1 changes to 1 files |
|
902 | remote: added 1 changesets with 1 changes to 1 files | |
893 | remote: transaction abort! |
|
903 | remote: transaction abort! | |
894 | remote: Cleaning up the mess... |
|
904 | remote: Cleaning up the mess... | |
895 | remote: rollback completed |
|
905 | remote: rollback completed | |
896 | remote: pushkey: lock state after "phases" |
|
906 | remote: pushkey: lock state after "phases" | |
897 | remote: lock: free |
|
907 | remote: lock: free | |
898 | remote: wlock: free |
|
908 | remote: wlock: free | |
899 | abort: Clown phase push failed |
|
909 | abort: Clown phase push failed | |
900 | [255] |
|
910 | [255] | |
901 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
911 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
902 | pushing to http://localhost:$HGPORT2/ |
|
912 | pushing to http://localhost:$HGPORT2/ | |
903 | searching for changes |
|
913 | searching for changes | |
904 | remote: adding changesets |
|
914 | remote: adding changesets | |
905 | remote: adding manifests |
|
915 | remote: adding manifests | |
906 | remote: adding file changes |
|
916 | remote: adding file changes | |
907 | remote: added 1 changesets with 1 changes to 1 files |
|
917 | remote: added 1 changesets with 1 changes to 1 files | |
908 | remote: transaction abort! |
|
918 | remote: transaction abort! | |
909 | remote: Cleaning up the mess... |
|
919 | remote: Cleaning up the mess... | |
910 | remote: rollback completed |
|
920 | remote: rollback completed | |
911 | remote: pushkey: lock state after "phases" |
|
921 | remote: pushkey: lock state after "phases" | |
912 | remote: lock: free |
|
922 | remote: lock: free | |
913 | remote: wlock: free |
|
923 | remote: wlock: free | |
914 | abort: Clown phase push failed |
|
924 | abort: Clown phase push failed | |
915 | [255] |
|
925 | [255] | |
916 |
|
926 | |||
917 | Test lazily acquiring the lock during unbundle |
|
927 | Test lazily acquiring the lock during unbundle | |
918 | $ cp $TESTTMP/hgrc.orig $HGRCPATH |
|
928 | $ cp $TESTTMP/hgrc.orig $HGRCPATH | |
919 | $ cat >> $HGRCPATH <<EOF |
|
929 | $ cat >> $HGRCPATH <<EOF | |
920 | > [ui] |
|
930 | > [ui] | |
921 | > ssh="$PYTHON" "$TESTDIR/dummyssh" |
|
931 | > ssh="$PYTHON" "$TESTDIR/dummyssh" | |
922 | > EOF |
|
932 | > EOF | |
923 |
|
933 | |||
924 | $ cat >> $TESTTMP/locktester.py <<EOF |
|
934 | $ cat >> $TESTTMP/locktester.py <<EOF | |
925 | > import os |
|
935 | > import os | |
926 | > from mercurial import extensions, bundle2, util |
|
936 | > from mercurial import extensions, bundle2, util | |
927 | > def checklock(orig, repo, *args, **kwargs): |
|
937 | > def checklock(orig, repo, *args, **kwargs): | |
928 | > if repo.svfs.lexists("lock"): |
|
938 | > if repo.svfs.lexists("lock"): | |
929 | > raise util.Abort("Lock should not be taken") |
|
939 | > raise util.Abort("Lock should not be taken") | |
930 | > return orig(repo, *args, **kwargs) |
|
940 | > return orig(repo, *args, **kwargs) | |
931 | > def extsetup(ui): |
|
941 | > def extsetup(ui): | |
932 | > extensions.wrapfunction(bundle2, 'processbundle', checklock) |
|
942 | > extensions.wrapfunction(bundle2, 'processbundle', checklock) | |
933 | > EOF |
|
943 | > EOF | |
934 |
|
944 | |||
935 | $ hg init lazylock |
|
945 | $ hg init lazylock | |
936 | $ cat >> lazylock/.hg/hgrc <<EOF |
|
946 | $ cat >> lazylock/.hg/hgrc <<EOF | |
937 | > [extensions] |
|
947 | > [extensions] | |
938 | > locktester=$TESTTMP/locktester.py |
|
948 | > locktester=$TESTTMP/locktester.py | |
939 | > EOF |
|
949 | > EOF | |
940 |
|
950 | |||
941 | $ hg clone -q ssh://user@dummy/lazylock lazylockclient |
|
951 | $ hg clone -q ssh://user@dummy/lazylock lazylockclient | |
942 | $ cd lazylockclient |
|
952 | $ cd lazylockclient | |
943 | $ touch a && hg ci -Aqm a |
|
953 | $ touch a && hg ci -Aqm a | |
944 | $ hg push |
|
954 | $ hg push | |
945 | pushing to ssh://user@dummy/lazylock |
|
955 | pushing to ssh://user@dummy/lazylock | |
946 | searching for changes |
|
956 | searching for changes | |
947 | remote: Lock should not be taken |
|
957 | remote: Lock should not be taken | |
948 | abort: push failed on remote |
|
958 | abort: push failed on remote | |
949 | [255] |
|
959 | [255] | |
950 |
|
960 | |||
951 | $ cat >> ../lazylock/.hg/hgrc <<EOF |
|
961 | $ cat >> ../lazylock/.hg/hgrc <<EOF | |
952 | > [experimental] |
|
962 | > [experimental] | |
953 | > bundle2lazylocking=True |
|
963 | > bundle2lazylocking=True | |
954 | > EOF |
|
964 | > EOF | |
955 | $ hg push |
|
965 | $ hg push | |
956 | pushing to ssh://user@dummy/lazylock |
|
966 | pushing to ssh://user@dummy/lazylock | |
957 | searching for changes |
|
967 | searching for changes | |
958 | remote: adding changesets |
|
968 | remote: adding changesets | |
959 | remote: adding manifests |
|
969 | remote: adding manifests | |
960 | remote: adding file changes |
|
970 | remote: adding file changes | |
961 | remote: added 1 changesets with 1 changes to 1 files |
|
971 | remote: added 1 changesets with 1 changes to 1 files | |
962 |
|
972 | |||
963 | $ cd .. |
|
973 | $ cd .. | |
964 |
|
974 | |||
965 | Servers can disable bundle1 for clone/pull operations |
|
975 | Servers can disable bundle1 for clone/pull operations | |
966 |
|
976 | |||
967 | $ killdaemons.py |
|
977 | $ killdaemons.py | |
968 | $ hg init bundle2onlyserver |
|
978 | $ hg init bundle2onlyserver | |
969 | $ cd bundle2onlyserver |
|
979 | $ cd bundle2onlyserver | |
970 | $ cat > .hg/hgrc << EOF |
|
980 | $ cat > .hg/hgrc << EOF | |
971 | > [server] |
|
981 | > [server] | |
972 | > bundle1.pull = false |
|
982 | > bundle1.pull = false | |
973 | > EOF |
|
983 | > EOF | |
974 |
|
984 | |||
975 | $ touch foo |
|
985 | $ touch foo | |
976 | $ hg -q commit -A -m initial |
|
986 | $ hg -q commit -A -m initial | |
977 |
|
987 | |||
978 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
988 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
979 | $ cat hg.pid >> $DAEMON_PIDS |
|
989 | $ cat hg.pid >> $DAEMON_PIDS | |
980 |
|
990 | |||
981 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2 |
|
991 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2 | |
982 | requesting all changes |
|
992 | requesting all changes | |
983 | abort: remote error: |
|
993 | abort: remote error: | |
984 | incompatible Mercurial client; bundle2 required |
|
994 | incompatible Mercurial client; bundle2 required | |
985 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
995 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
986 | [255] |
|
996 | [255] | |
987 | $ killdaemons.py |
|
997 | $ killdaemons.py | |
988 | $ cd .. |
|
998 | $ cd .. | |
989 |
|
999 | |||
990 | bundle1 can still pull non-generaldelta repos when generaldelta bundle1 disabled |
|
1000 | bundle1 can still pull non-generaldelta repos when generaldelta bundle1 disabled | |
991 |
|
1001 | |||
992 | $ hg --config format.usegeneraldelta=false init notgdserver |
|
1002 | $ hg --config format.usegeneraldelta=false init notgdserver | |
993 | $ cd notgdserver |
|
1003 | $ cd notgdserver | |
994 | $ cat > .hg/hgrc << EOF |
|
1004 | $ cat > .hg/hgrc << EOF | |
995 | > [server] |
|
1005 | > [server] | |
996 | > bundle1gd.pull = false |
|
1006 | > bundle1gd.pull = false | |
997 | > EOF |
|
1007 | > EOF | |
998 |
|
1008 | |||
999 | $ touch foo |
|
1009 | $ touch foo | |
1000 | $ hg -q commit -A -m initial |
|
1010 | $ hg -q commit -A -m initial | |
1001 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
1011 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
1002 | $ cat hg.pid >> $DAEMON_PIDS |
|
1012 | $ cat hg.pid >> $DAEMON_PIDS | |
1003 |
|
1013 | |||
1004 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-1 |
|
1014 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-1 | |
1005 | requesting all changes |
|
1015 | requesting all changes | |
1006 | adding changesets |
|
1016 | adding changesets | |
1007 | adding manifests |
|
1017 | adding manifests | |
1008 | adding file changes |
|
1018 | adding file changes | |
1009 | added 1 changesets with 1 changes to 1 files |
|
1019 | added 1 changesets with 1 changes to 1 files | |
1010 | new changesets 96ee1d7354c4 |
|
1020 | new changesets 96ee1d7354c4 | |
1011 | updating to branch default |
|
1021 | updating to branch default | |
1012 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1022 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1013 |
|
1023 | |||
1014 | $ killdaemons.py |
|
1024 | $ killdaemons.py | |
1015 | $ cd ../bundle2onlyserver |
|
1025 | $ cd ../bundle2onlyserver | |
1016 |
|
1026 | |||
1017 | bundle1 pull can be disabled for generaldelta repos only |
|
1027 | bundle1 pull can be disabled for generaldelta repos only | |
1018 |
|
1028 | |||
1019 | $ cat > .hg/hgrc << EOF |
|
1029 | $ cat > .hg/hgrc << EOF | |
1020 | > [server] |
|
1030 | > [server] | |
1021 | > bundle1gd.pull = false |
|
1031 | > bundle1gd.pull = false | |
1022 | > EOF |
|
1032 | > EOF | |
1023 |
|
1033 | |||
1024 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
1034 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
1025 | $ cat hg.pid >> $DAEMON_PIDS |
|
1035 | $ cat hg.pid >> $DAEMON_PIDS | |
1026 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2 |
|
1036 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2 | |
1027 | requesting all changes |
|
1037 | requesting all changes | |
1028 | abort: remote error: |
|
1038 | abort: remote error: | |
1029 | incompatible Mercurial client; bundle2 required |
|
1039 | incompatible Mercurial client; bundle2 required | |
1030 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
1040 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
1031 | [255] |
|
1041 | [255] | |
1032 |
|
1042 | |||
1033 | $ killdaemons.py |
|
1043 | $ killdaemons.py | |
1034 |
|
1044 | |||
1035 | Verify the global server.bundle1 option works |
|
1045 | Verify the global server.bundle1 option works | |
1036 |
|
1046 | |||
1037 | $ cd .. |
|
1047 | $ cd .. | |
1038 | $ cat > bundle2onlyserver/.hg/hgrc << EOF |
|
1048 | $ cat > bundle2onlyserver/.hg/hgrc << EOF | |
1039 | > [server] |
|
1049 | > [server] | |
1040 | > bundle1 = false |
|
1050 | > bundle1 = false | |
1041 | > EOF |
|
1051 | > EOF | |
1042 | $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid |
|
1052 | $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid | |
1043 | $ cat hg.pid >> $DAEMON_PIDS |
|
1053 | $ cat hg.pid >> $DAEMON_PIDS | |
1044 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT not-bundle2 |
|
1054 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT not-bundle2 | |
1045 | requesting all changes |
|
1055 | requesting all changes | |
1046 | abort: remote error: |
|
1056 | abort: remote error: | |
1047 | incompatible Mercurial client; bundle2 required |
|
1057 | incompatible Mercurial client; bundle2 required | |
1048 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
1058 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
1049 | [255] |
|
1059 | [255] | |
1050 | $ killdaemons.py |
|
1060 | $ killdaemons.py | |
1051 |
|
1061 | |||
1052 | $ hg --config devel.legacy.exchange=bundle1 clone ssh://user@dummy/bundle2onlyserver not-bundle2-ssh |
|
1062 | $ hg --config devel.legacy.exchange=bundle1 clone ssh://user@dummy/bundle2onlyserver not-bundle2-ssh | |
1053 | requesting all changes |
|
1063 | requesting all changes | |
1054 | adding changesets |
|
1064 | adding changesets | |
1055 | remote: abort: incompatible Mercurial client; bundle2 required |
|
1065 | remote: abort: incompatible Mercurial client; bundle2 required | |
1056 | remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
1066 | remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
1057 | transaction abort! |
|
1067 | transaction abort! | |
1058 | rollback completed |
|
1068 | rollback completed | |
1059 | abort: stream ended unexpectedly (got 0 bytes, expected 4) |
|
1069 | abort: stream ended unexpectedly (got 0 bytes, expected 4) | |
1060 | [255] |
|
1070 | [255] | |
1061 |
|
1071 | |||
1062 | $ cat > bundle2onlyserver/.hg/hgrc << EOF |
|
1072 | $ cat > bundle2onlyserver/.hg/hgrc << EOF | |
1063 | > [server] |
|
1073 | > [server] | |
1064 | > bundle1gd = false |
|
1074 | > bundle1gd = false | |
1065 | > EOF |
|
1075 | > EOF | |
1066 | $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid |
|
1076 | $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid | |
1067 | $ cat hg.pid >> $DAEMON_PIDS |
|
1077 | $ cat hg.pid >> $DAEMON_PIDS | |
1068 |
|
1078 | |||
1069 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2 |
|
1079 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2 | |
1070 | requesting all changes |
|
1080 | requesting all changes | |
1071 | abort: remote error: |
|
1081 | abort: remote error: | |
1072 | incompatible Mercurial client; bundle2 required |
|
1082 | incompatible Mercurial client; bundle2 required | |
1073 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
1083 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
1074 | [255] |
|
1084 | [255] | |
1075 |
|
1085 | |||
1076 | $ killdaemons.py |
|
1086 | $ killdaemons.py | |
1077 |
|
1087 | |||
1078 | $ cd notgdserver |
|
1088 | $ cd notgdserver | |
1079 | $ cat > .hg/hgrc << EOF |
|
1089 | $ cat > .hg/hgrc << EOF | |
1080 | > [server] |
|
1090 | > [server] | |
1081 | > bundle1gd = false |
|
1091 | > bundle1gd = false | |
1082 | > EOF |
|
1092 | > EOF | |
1083 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
1093 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
1084 | $ cat hg.pid >> $DAEMON_PIDS |
|
1094 | $ cat hg.pid >> $DAEMON_PIDS | |
1085 |
|
1095 | |||
1086 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-2 |
|
1096 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-2 | |
1087 | requesting all changes |
|
1097 | requesting all changes | |
1088 | adding changesets |
|
1098 | adding changesets | |
1089 | adding manifests |
|
1099 | adding manifests | |
1090 | adding file changes |
|
1100 | adding file changes | |
1091 | added 1 changesets with 1 changes to 1 files |
|
1101 | added 1 changesets with 1 changes to 1 files | |
1092 | new changesets 96ee1d7354c4 |
|
1102 | new changesets 96ee1d7354c4 | |
1093 | updating to branch default |
|
1103 | updating to branch default | |
1094 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1104 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1095 |
|
1105 | |||
1096 | $ killdaemons.py |
|
1106 | $ killdaemons.py | |
1097 | $ cd ../bundle2onlyserver |
|
1107 | $ cd ../bundle2onlyserver | |
1098 |
|
1108 | |||
1099 | Verify bundle1 pushes can be disabled |
|
1109 | Verify bundle1 pushes can be disabled | |
1100 |
|
1110 | |||
1101 | $ cat > .hg/hgrc << EOF |
|
1111 | $ cat > .hg/hgrc << EOF | |
1102 | > [server] |
|
1112 | > [server] | |
1103 | > bundle1.push = false |
|
1113 | > bundle1.push = false | |
1104 | > [web] |
|
1114 | > [web] | |
1105 | > allow_push = * |
|
1115 | > allow_push = * | |
1106 | > push_ssl = false |
|
1116 | > push_ssl = false | |
1107 | > EOF |
|
1117 | > EOF | |
1108 |
|
1118 | |||
1109 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
1119 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -E error.log | |
1110 | $ cat hg.pid >> $DAEMON_PIDS |
|
1120 | $ cat hg.pid >> $DAEMON_PIDS | |
1111 | $ cd .. |
|
1121 | $ cd .. | |
1112 |
|
1122 | |||
1113 | $ hg clone http://localhost:$HGPORT bundle2-only |
|
1123 | $ hg clone http://localhost:$HGPORT bundle2-only | |
1114 | requesting all changes |
|
1124 | requesting all changes | |
1115 | adding changesets |
|
1125 | adding changesets | |
1116 | adding manifests |
|
1126 | adding manifests | |
1117 | adding file changes |
|
1127 | adding file changes | |
1118 | added 1 changesets with 1 changes to 1 files |
|
1128 | added 1 changesets with 1 changes to 1 files | |
1119 | new changesets 96ee1d7354c4 |
|
1129 | new changesets 96ee1d7354c4 | |
1120 | updating to branch default |
|
1130 | updating to branch default | |
1121 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1131 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1122 | $ cd bundle2-only |
|
1132 | $ cd bundle2-only | |
1123 | $ echo commit > foo |
|
1133 | $ echo commit > foo | |
1124 | $ hg commit -m commit |
|
1134 | $ hg commit -m commit | |
1125 | $ hg --config devel.legacy.exchange=bundle1 push |
|
1135 | $ hg --config devel.legacy.exchange=bundle1 push | |
1126 | pushing to http://localhost:$HGPORT/ |
|
1136 | pushing to http://localhost:$HGPORT/ | |
1127 | searching for changes |
|
1137 | searching for changes | |
1128 | abort: remote error: |
|
1138 | abort: remote error: | |
1129 | incompatible Mercurial client; bundle2 required |
|
1139 | incompatible Mercurial client; bundle2 required | |
1130 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
1140 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
1131 | [255] |
|
1141 | [255] | |
1132 |
|
1142 | |||
1133 | (also check with ssh) |
|
1143 | (also check with ssh) | |
1134 |
|
1144 | |||
1135 | $ hg --config devel.legacy.exchange=bundle1 push ssh://user@dummy/bundle2onlyserver |
|
1145 | $ hg --config devel.legacy.exchange=bundle1 push ssh://user@dummy/bundle2onlyserver | |
1136 | pushing to ssh://user@dummy/bundle2onlyserver |
|
1146 | pushing to ssh://user@dummy/bundle2onlyserver | |
1137 | searching for changes |
|
1147 | searching for changes | |
1138 | remote: abort: incompatible Mercurial client; bundle2 required |
|
1148 | remote: abort: incompatible Mercurial client; bundle2 required | |
1139 | remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
1149 | remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
1140 | [1] |
|
1150 | [1] | |
1141 |
|
1151 | |||
1142 | $ hg push |
|
1152 | $ hg push | |
1143 | pushing to http://localhost:$HGPORT/ |
|
1153 | pushing to http://localhost:$HGPORT/ | |
1144 | searching for changes |
|
1154 | searching for changes | |
1145 | remote: adding changesets |
|
1155 | remote: adding changesets | |
1146 | remote: adding manifests |
|
1156 | remote: adding manifests | |
1147 | remote: adding file changes |
|
1157 | remote: adding file changes | |
1148 | remote: added 1 changesets with 1 changes to 1 files |
|
1158 | remote: added 1 changesets with 1 changes to 1 files |
@@ -1,110 +1,120 b'' | |||||
|
1 | #testcases sshv1 sshv2 | |||
|
2 | ||||
|
3 | #if sshv2 | |||
|
4 | $ cat >> $HGRCPATH << EOF | |||
|
5 | > [experimental] | |||
|
6 | > sshpeer.advertise-v2 = true | |||
|
7 | > sshserver.support-v2 = true | |||
|
8 | > EOF | |||
|
9 | #endif | |||
|
10 | ||||
1 | $ cat > bundle2.py << EOF |
|
11 | $ cat > bundle2.py << EOF | |
2 | > """A small extension to test bundle2 pushback parts. |
|
12 | > """A small extension to test bundle2 pushback parts. | |
3 | > Current bundle2 implementation doesn't provide a way to generate those |
|
13 | > Current bundle2 implementation doesn't provide a way to generate those | |
4 | > parts, so they must be created by extensions. |
|
14 | > parts, so they must be created by extensions. | |
5 | > """ |
|
15 | > """ | |
6 | > from __future__ import absolute_import |
|
16 | > from __future__ import absolute_import | |
7 | > from mercurial import bundle2, exchange, pushkey, util |
|
17 | > from mercurial import bundle2, exchange, pushkey, util | |
8 | > def _newhandlechangegroup(op, inpart): |
|
18 | > def _newhandlechangegroup(op, inpart): | |
9 | > """This function wraps the changegroup part handler for getbundle. |
|
19 | > """This function wraps the changegroup part handler for getbundle. | |
10 | > It issues an additional pushkey part to send a new |
|
20 | > It issues an additional pushkey part to send a new | |
11 | > bookmark back to the client""" |
|
21 | > bookmark back to the client""" | |
12 | > result = bundle2.handlechangegroup(op, inpart) |
|
22 | > result = bundle2.handlechangegroup(op, inpart) | |
13 | > if 'pushback' in op.reply.capabilities: |
|
23 | > if 'pushback' in op.reply.capabilities: | |
14 | > params = {'namespace': 'bookmarks', |
|
24 | > params = {'namespace': 'bookmarks', | |
15 | > 'key': 'new-server-mark', |
|
25 | > 'key': 'new-server-mark', | |
16 | > 'old': '', |
|
26 | > 'old': '', | |
17 | > 'new': 'tip'} |
|
27 | > 'new': 'tip'} | |
18 | > encodedparams = [(k, pushkey.encode(v)) for (k,v) in params.items()] |
|
28 | > encodedparams = [(k, pushkey.encode(v)) for (k,v) in params.items()] | |
19 | > op.reply.newpart('pushkey', mandatoryparams=encodedparams) |
|
29 | > op.reply.newpart('pushkey', mandatoryparams=encodedparams) | |
20 | > else: |
|
30 | > else: | |
21 | > op.reply.newpart('output', data='pushback not enabled') |
|
31 | > op.reply.newpart('output', data='pushback not enabled') | |
22 | > return result |
|
32 | > return result | |
23 | > _newhandlechangegroup.params = bundle2.handlechangegroup.params |
|
33 | > _newhandlechangegroup.params = bundle2.handlechangegroup.params | |
24 | > bundle2.parthandlermapping['changegroup'] = _newhandlechangegroup |
|
34 | > bundle2.parthandlermapping['changegroup'] = _newhandlechangegroup | |
25 | > EOF |
|
35 | > EOF | |
26 |
|
36 | |||
27 | $ cat >> $HGRCPATH <<EOF |
|
37 | $ cat >> $HGRCPATH <<EOF | |
28 | > [ui] |
|
38 | > [ui] | |
29 | > ssh = $PYTHON "$TESTDIR/dummyssh" |
|
39 | > ssh = $PYTHON "$TESTDIR/dummyssh" | |
30 | > username = nobody <no.reply@example.com> |
|
40 | > username = nobody <no.reply@example.com> | |
31 | > |
|
41 | > | |
32 | > [alias] |
|
42 | > [alias] | |
33 | > tglog = log -G -T "{desc} [{phase}:{node|short}]" |
|
43 | > tglog = log -G -T "{desc} [{phase}:{node|short}]" | |
34 | > EOF |
|
44 | > EOF | |
35 |
|
45 | |||
36 | Set up server repository |
|
46 | Set up server repository | |
37 |
|
47 | |||
38 | $ hg init server |
|
48 | $ hg init server | |
39 | $ cd server |
|
49 | $ cd server | |
40 | $ echo c0 > f0 |
|
50 | $ echo c0 > f0 | |
41 | $ hg commit -Am 0 |
|
51 | $ hg commit -Am 0 | |
42 | adding f0 |
|
52 | adding f0 | |
43 |
|
53 | |||
44 | Set up client repository |
|
54 | Set up client repository | |
45 |
|
55 | |||
46 | $ cd .. |
|
56 | $ cd .. | |
47 | $ hg clone ssh://user@dummy/server client -q |
|
57 | $ hg clone ssh://user@dummy/server client -q | |
48 | $ cd client |
|
58 | $ cd client | |
49 |
|
59 | |||
50 | Enable extension |
|
60 | Enable extension | |
51 | $ cat >> $HGRCPATH <<EOF |
|
61 | $ cat >> $HGRCPATH <<EOF | |
52 | > [extensions] |
|
62 | > [extensions] | |
53 | > bundle2=$TESTTMP/bundle2.py |
|
63 | > bundle2=$TESTTMP/bundle2.py | |
54 | > EOF |
|
64 | > EOF | |
55 |
|
65 | |||
56 | Without config |
|
66 | Without config | |
57 |
|
67 | |||
58 | $ cd ../client |
|
68 | $ cd ../client | |
59 | $ echo c1 > f1 |
|
69 | $ echo c1 > f1 | |
60 | $ hg commit -Am 1 |
|
70 | $ hg commit -Am 1 | |
61 | adding f1 |
|
71 | adding f1 | |
62 | $ hg push |
|
72 | $ hg push | |
63 | pushing to ssh://user@dummy/server |
|
73 | pushing to ssh://user@dummy/server | |
64 | searching for changes |
|
74 | searching for changes | |
65 | remote: adding changesets |
|
75 | remote: adding changesets | |
66 | remote: adding manifests |
|
76 | remote: adding manifests | |
67 | remote: adding file changes |
|
77 | remote: adding file changes | |
68 | remote: added 1 changesets with 1 changes to 1 files |
|
78 | remote: added 1 changesets with 1 changes to 1 files | |
69 | remote: pushback not enabled |
|
79 | remote: pushback not enabled | |
70 | $ hg bookmark |
|
80 | $ hg bookmark | |
71 | no bookmarks set |
|
81 | no bookmarks set | |
72 |
|
82 | |||
73 | $ cd ../server |
|
83 | $ cd ../server | |
74 | $ hg tglog |
|
84 | $ hg tglog | |
75 | o 1 [public:2b9c7234e035] |
|
85 | o 1 [public:2b9c7234e035] | |
76 | | |
|
86 | | | |
77 | @ 0 [public:6cee5c8f3e5b] |
|
87 | @ 0 [public:6cee5c8f3e5b] | |
78 |
|
88 | |||
79 |
|
89 | |||
80 |
|
90 | |||
81 |
|
91 | |||
82 | With config |
|
92 | With config | |
83 |
|
93 | |||
84 | $ cd ../client |
|
94 | $ cd ../client | |
85 | $ echo '[experimental]' >> .hg/hgrc |
|
95 | $ echo '[experimental]' >> .hg/hgrc | |
86 | $ echo 'bundle2.pushback = True' >> .hg/hgrc |
|
96 | $ echo 'bundle2.pushback = True' >> .hg/hgrc | |
87 | $ echo c2 > f2 |
|
97 | $ echo c2 > f2 | |
88 | $ hg commit -Am 2 |
|
98 | $ hg commit -Am 2 | |
89 | adding f2 |
|
99 | adding f2 | |
90 | $ hg push |
|
100 | $ hg push | |
91 | pushing to ssh://user@dummy/server |
|
101 | pushing to ssh://user@dummy/server | |
92 | searching for changes |
|
102 | searching for changes | |
93 | remote: adding changesets |
|
103 | remote: adding changesets | |
94 | remote: adding manifests |
|
104 | remote: adding manifests | |
95 | remote: adding file changes |
|
105 | remote: adding file changes | |
96 | remote: added 1 changesets with 1 changes to 1 files |
|
106 | remote: added 1 changesets with 1 changes to 1 files | |
97 | $ hg bookmark |
|
107 | $ hg bookmark | |
98 | new-server-mark 2:0a76dfb2e179 |
|
108 | new-server-mark 2:0a76dfb2e179 | |
99 |
|
109 | |||
100 | $ cd ../server |
|
110 | $ cd ../server | |
101 | $ hg tglog |
|
111 | $ hg tglog | |
102 | o 2 [public:0a76dfb2e179] |
|
112 | o 2 [public:0a76dfb2e179] | |
103 | | |
|
113 | | | |
104 | o 1 [public:2b9c7234e035] |
|
114 | o 1 [public:2b9c7234e035] | |
105 | | |
|
115 | | | |
106 | @ 0 [public:6cee5c8f3e5b] |
|
116 | @ 0 [public:6cee5c8f3e5b] | |
107 |
|
117 | |||
108 |
|
118 | |||
109 |
|
119 | |||
110 |
|
120 |
@@ -1,604 +1,614 b'' | |||||
1 | #require killdaemons |
|
1 | #require killdaemons | |
2 |
|
2 | |||
|
3 | #testcases sshv1 sshv2 | |||
|
4 | ||||
|
5 | #if sshv2 | |||
|
6 | $ cat >> $HGRCPATH << EOF | |||
|
7 | > [experimental] | |||
|
8 | > sshpeer.advertise-v2 = true | |||
|
9 | > sshserver.support-v2 = true | |||
|
10 | > EOF | |||
|
11 | #endif | |||
|
12 | ||||
3 |
|
|
13 | Create an extension to test bundle2 remote-changegroup parts | |
4 |
|
14 | |||
5 | $ cat > bundle2.py << EOF |
|
15 | $ cat > bundle2.py << EOF | |
6 | > """A small extension to test bundle2 remote-changegroup parts. |
|
16 | > """A small extension to test bundle2 remote-changegroup parts. | |
7 | > |
|
17 | > | |
8 | > Current bundle2 implementation doesn't provide a way to generate those |
|
18 | > Current bundle2 implementation doesn't provide a way to generate those | |
9 | > parts, so they must be created by extensions. |
|
19 | > parts, so they must be created by extensions. | |
10 | > """ |
|
20 | > """ | |
11 | > from mercurial import bundle2, changegroup, discovery, exchange, util |
|
21 | > from mercurial import bundle2, changegroup, discovery, exchange, util | |
12 | > |
|
22 | > | |
13 | > def _getbundlechangegrouppart(bundler, repo, source, bundlecaps=None, |
|
23 | > def _getbundlechangegrouppart(bundler, repo, source, bundlecaps=None, | |
14 | > b2caps=None, heads=None, common=None, |
|
24 | > b2caps=None, heads=None, common=None, | |
15 | > **kwargs): |
|
25 | > **kwargs): | |
16 | > """this function replaces the changegroup part handler for getbundle. |
|
26 | > """this function replaces the changegroup part handler for getbundle. | |
17 | > It allows to create a set of arbitrary parts containing changegroups |
|
27 | > It allows to create a set of arbitrary parts containing changegroups | |
18 | > and remote-changegroups, as described in a bundle2maker file in the |
|
28 | > and remote-changegroups, as described in a bundle2maker file in the | |
19 | > repository .hg/ directory. |
|
29 | > repository .hg/ directory. | |
20 | > |
|
30 | > | |
21 | > Each line of that bundle2maker file contain a description of the |
|
31 | > Each line of that bundle2maker file contain a description of the | |
22 | > part to add: |
|
32 | > part to add: | |
23 | > - changegroup common_revset heads_revset |
|
33 | > - changegroup common_revset heads_revset | |
24 | > Creates a changegroup part based, using common_revset and |
|
34 | > Creates a changegroup part based, using common_revset and | |
25 | > heads_revset for outgoing |
|
35 | > heads_revset for outgoing | |
26 | > - remote-changegroup url file |
|
36 | > - remote-changegroup url file | |
27 | > Creates a remote-changegroup part for a bundle at the given |
|
37 | > Creates a remote-changegroup part for a bundle at the given | |
28 | > url. Size and digest, as required by the client, are computed |
|
38 | > url. Size and digest, as required by the client, are computed | |
29 | > from the given file. |
|
39 | > from the given file. | |
30 | > - raw-remote-changegroup <python expression> |
|
40 | > - raw-remote-changegroup <python expression> | |
31 | > Creates a remote-changegroup part with the data given in the |
|
41 | > Creates a remote-changegroup part with the data given in the | |
32 | > Python expression as parameters. The Python expression is |
|
42 | > Python expression as parameters. The Python expression is | |
33 | > evaluated with eval, and is expected to be a dict. |
|
43 | > evaluated with eval, and is expected to be a dict. | |
34 | > """ |
|
44 | > """ | |
35 | > def newpart(name, data=''): |
|
45 | > def newpart(name, data=''): | |
36 | > """wrapper around bundler.newpart adding an extra part making the |
|
46 | > """wrapper around bundler.newpart adding an extra part making the | |
37 | > client output information about each processed part""" |
|
47 | > client output information about each processed part""" | |
38 | > bundler.newpart('output', data=name) |
|
48 | > bundler.newpart('output', data=name) | |
39 | > part = bundler.newpart(name, data=data) |
|
49 | > part = bundler.newpart(name, data=data) | |
40 | > return part |
|
50 | > return part | |
41 | > |
|
51 | > | |
42 | > for line in open(repo.vfs.join('bundle2maker'), 'r'): |
|
52 | > for line in open(repo.vfs.join('bundle2maker'), 'r'): | |
43 | > line = line.strip() |
|
53 | > line = line.strip() | |
44 | > try: |
|
54 | > try: | |
45 | > verb, args = line.split(None, 1) |
|
55 | > verb, args = line.split(None, 1) | |
46 | > except ValueError: |
|
56 | > except ValueError: | |
47 | > verb, args = line, '' |
|
57 | > verb, args = line, '' | |
48 | > if verb == 'remote-changegroup': |
|
58 | > if verb == 'remote-changegroup': | |
49 | > url, file = args.split() |
|
59 | > url, file = args.split() | |
50 | > bundledata = open(file, 'rb').read() |
|
60 | > bundledata = open(file, 'rb').read() | |
51 | > digest = util.digester.preferred(b2caps['digests']) |
|
61 | > digest = util.digester.preferred(b2caps['digests']) | |
52 | > d = util.digester([digest], bundledata) |
|
62 | > d = util.digester([digest], bundledata) | |
53 | > part = newpart('remote-changegroup') |
|
63 | > part = newpart('remote-changegroup') | |
54 | > part.addparam('url', url) |
|
64 | > part.addparam('url', url) | |
55 | > part.addparam('size', str(len(bundledata))) |
|
65 | > part.addparam('size', str(len(bundledata))) | |
56 | > part.addparam('digests', digest) |
|
66 | > part.addparam('digests', digest) | |
57 | > part.addparam('digest:%s' % digest, d[digest]) |
|
67 | > part.addparam('digest:%s' % digest, d[digest]) | |
58 | > elif verb == 'raw-remote-changegroup': |
|
68 | > elif verb == 'raw-remote-changegroup': | |
59 | > part = newpart('remote-changegroup') |
|
69 | > part = newpart('remote-changegroup') | |
60 | > for k, v in eval(args).items(): |
|
70 | > for k, v in eval(args).items(): | |
61 | > part.addparam(k, str(v)) |
|
71 | > part.addparam(k, str(v)) | |
62 | > elif verb == 'changegroup': |
|
72 | > elif verb == 'changegroup': | |
63 | > _common, heads = args.split() |
|
73 | > _common, heads = args.split() | |
64 | > common.extend(repo.lookup(r) for r in repo.revs(_common)) |
|
74 | > common.extend(repo.lookup(r) for r in repo.revs(_common)) | |
65 | > heads = [repo.lookup(r) for r in repo.revs(heads)] |
|
75 | > heads = [repo.lookup(r) for r in repo.revs(heads)] | |
66 | > outgoing = discovery.outgoing(repo, common, heads) |
|
76 | > outgoing = discovery.outgoing(repo, common, heads) | |
67 | > cg = changegroup.makechangegroup(repo, outgoing, '01', |
|
77 | > cg = changegroup.makechangegroup(repo, outgoing, '01', | |
68 | > 'changegroup') |
|
78 | > 'changegroup') | |
69 | > newpart('changegroup', cg.getchunks()) |
|
79 | > newpart('changegroup', cg.getchunks()) | |
70 | > else: |
|
80 | > else: | |
71 | > raise Exception('unknown verb') |
|
81 | > raise Exception('unknown verb') | |
72 | > |
|
82 | > | |
73 | > exchange.getbundle2partsmapping['changegroup'] = _getbundlechangegrouppart |
|
83 | > exchange.getbundle2partsmapping['changegroup'] = _getbundlechangegrouppart | |
74 | > EOF |
|
84 | > EOF | |
75 |
|
85 | |||
76 | Start a simple HTTP server to serve bundles |
|
86 | Start a simple HTTP server to serve bundles | |
77 |
|
87 | |||
78 | $ $PYTHON "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid |
|
88 | $ $PYTHON "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid | |
79 | $ cat dumb.pid >> $DAEMON_PIDS |
|
89 | $ cat dumb.pid >> $DAEMON_PIDS | |
80 |
|
90 | |||
81 | $ cat >> $HGRCPATH << EOF |
|
91 | $ cat >> $HGRCPATH << EOF | |
82 | > [ui] |
|
92 | > [ui] | |
83 | > ssh=$PYTHON "$TESTDIR/dummyssh" |
|
93 | > ssh=$PYTHON "$TESTDIR/dummyssh" | |
84 | > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} |
|
94 | > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} | |
85 | > EOF |
|
95 | > EOF | |
86 |
|
96 | |||
87 | $ hg init repo |
|
97 | $ hg init repo | |
88 |
|
98 | |||
89 | $ hg -R repo unbundle $TESTDIR/bundles/rebase.hg |
|
99 | $ hg -R repo unbundle $TESTDIR/bundles/rebase.hg | |
90 | adding changesets |
|
100 | adding changesets | |
91 | adding manifests |
|
101 | adding manifests | |
92 | adding file changes |
|
102 | adding file changes | |
93 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
103 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
94 | new changesets cd010b8cd998:02de42196ebe |
|
104 | new changesets cd010b8cd998:02de42196ebe | |
95 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
105 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
96 |
|
106 | |||
97 | $ hg -R repo log -G |
|
107 | $ hg -R repo log -G | |
98 | o 7:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> H |
|
108 | o 7:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> H | |
99 | | |
|
109 | | | |
100 | | o 6:eea13746799a draft Nicolas Dumazet <nicdumz.commits@gmail.com> G |
|
110 | | o 6:eea13746799a draft Nicolas Dumazet <nicdumz.commits@gmail.com> G | |
101 | |/| |
|
111 | |/| | |
102 | o | 5:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
112 | o | 5:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
103 | | | |
|
113 | | | | |
104 | | o 4:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
114 | | o 4:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
105 | |/ |
|
115 | |/ | |
106 | | o 3:32af7686d403 draft Nicolas Dumazet <nicdumz.commits@gmail.com> D |
|
116 | | o 3:32af7686d403 draft Nicolas Dumazet <nicdumz.commits@gmail.com> D | |
107 | | | |
|
117 | | | | |
108 | | o 2:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> C |
|
118 | | o 2:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> C | |
109 | | | |
|
119 | | | | |
110 | | o 1:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> B |
|
120 | | o 1:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> B | |
111 | |/ |
|
121 | |/ | |
112 | o 0:cd010b8cd998 draft Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
122 | o 0:cd010b8cd998 draft Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
113 |
|
123 | |||
114 | $ hg clone repo orig |
|
124 | $ hg clone repo orig | |
115 | updating to branch default |
|
125 | updating to branch default | |
116 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
126 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
117 |
|
127 | |||
118 | $ cat > repo/.hg/hgrc << EOF |
|
128 | $ cat > repo/.hg/hgrc << EOF | |
119 | > [extensions] |
|
129 | > [extensions] | |
120 | > bundle2=$TESTTMP/bundle2.py |
|
130 | > bundle2=$TESTTMP/bundle2.py | |
121 | > EOF |
|
131 | > EOF | |
122 |
|
132 | |||
123 | Test a pull with an remote-changegroup |
|
133 | Test a pull with an remote-changegroup | |
124 |
|
134 | |||
125 | $ hg bundle -R repo --type v1 --base '0:4' -r '5:7' bundle.hg |
|
135 | $ hg bundle -R repo --type v1 --base '0:4' -r '5:7' bundle.hg | |
126 | 3 changesets found |
|
136 | 3 changesets found | |
127 | $ cat > repo/.hg/bundle2maker << EOF |
|
137 | $ cat > repo/.hg/bundle2maker << EOF | |
128 | > remote-changegroup http://localhost:$HGPORT/bundle.hg bundle.hg |
|
138 | > remote-changegroup http://localhost:$HGPORT/bundle.hg bundle.hg | |
129 | > EOF |
|
139 | > EOF | |
130 | $ hg clone orig clone -r 3 -r 4 |
|
140 | $ hg clone orig clone -r 3 -r 4 | |
131 | adding changesets |
|
141 | adding changesets | |
132 | adding manifests |
|
142 | adding manifests | |
133 | adding file changes |
|
143 | adding file changes | |
134 | added 5 changesets with 5 changes to 5 files (+1 heads) |
|
144 | added 5 changesets with 5 changes to 5 files (+1 heads) | |
135 | new changesets cd010b8cd998:9520eea781bc |
|
145 | new changesets cd010b8cd998:9520eea781bc | |
136 | updating to branch default |
|
146 | updating to branch default | |
137 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
147 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
138 | $ hg pull -R clone ssh://user@dummy/repo |
|
148 | $ hg pull -R clone ssh://user@dummy/repo | |
139 | pulling from ssh://user@dummy/repo |
|
149 | pulling from ssh://user@dummy/repo | |
140 | searching for changes |
|
150 | searching for changes | |
141 | remote: remote-changegroup |
|
151 | remote: remote-changegroup | |
142 | adding changesets |
|
152 | adding changesets | |
143 | adding manifests |
|
153 | adding manifests | |
144 | adding file changes |
|
154 | adding file changes | |
145 | added 3 changesets with 2 changes to 2 files (+1 heads) |
|
155 | added 3 changesets with 2 changes to 2 files (+1 heads) | |
146 | new changesets 24b6387c8c8c:02de42196ebe |
|
156 | new changesets 24b6387c8c8c:02de42196ebe | |
147 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
157 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
148 | $ hg -R clone log -G |
|
158 | $ hg -R clone log -G | |
149 | o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H |
|
159 | o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H | |
150 | | |
|
160 | | | |
151 | | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G |
|
161 | | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G | |
152 | |/| |
|
162 | |/| | |
153 | o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
163 | o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
154 | | | |
|
164 | | | | |
155 | | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
165 | | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
156 | |/ |
|
166 | |/ | |
157 | | @ 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D |
|
167 | | @ 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D | |
158 | | | |
|
168 | | | | |
159 | | o 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C |
|
169 | | o 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C | |
160 | | | |
|
170 | | | | |
161 | | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B |
|
171 | | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B | |
162 | |/ |
|
172 | |/ | |
163 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
173 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
164 |
|
174 | |||
165 | $ rm -rf clone |
|
175 | $ rm -rf clone | |
166 |
|
176 | |||
167 | Test a pull with an remote-changegroup and a following changegroup |
|
177 | Test a pull with an remote-changegroup and a following changegroup | |
168 |
|
178 | |||
169 | $ hg bundle -R repo --type v1 --base 2 -r '3:4' bundle2.hg |
|
179 | $ hg bundle -R repo --type v1 --base 2 -r '3:4' bundle2.hg | |
170 | 2 changesets found |
|
180 | 2 changesets found | |
171 | $ cat > repo/.hg/bundle2maker << EOF |
|
181 | $ cat > repo/.hg/bundle2maker << EOF | |
172 | > remote-changegroup http://localhost:$HGPORT/bundle2.hg bundle2.hg |
|
182 | > remote-changegroup http://localhost:$HGPORT/bundle2.hg bundle2.hg | |
173 | > changegroup 0:4 5:7 |
|
183 | > changegroup 0:4 5:7 | |
174 | > EOF |
|
184 | > EOF | |
175 | $ hg clone orig clone -r 2 |
|
185 | $ hg clone orig clone -r 2 | |
176 | adding changesets |
|
186 | adding changesets | |
177 | adding manifests |
|
187 | adding manifests | |
178 | adding file changes |
|
188 | adding file changes | |
179 | added 3 changesets with 3 changes to 3 files |
|
189 | added 3 changesets with 3 changes to 3 files | |
180 | new changesets cd010b8cd998:5fddd98957c8 |
|
190 | new changesets cd010b8cd998:5fddd98957c8 | |
181 | updating to branch default |
|
191 | updating to branch default | |
182 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
192 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
183 | $ hg pull -R clone ssh://user@dummy/repo |
|
193 | $ hg pull -R clone ssh://user@dummy/repo | |
184 | pulling from ssh://user@dummy/repo |
|
194 | pulling from ssh://user@dummy/repo | |
185 | searching for changes |
|
195 | searching for changes | |
186 | remote: remote-changegroup |
|
196 | remote: remote-changegroup | |
187 | adding changesets |
|
197 | adding changesets | |
188 | adding manifests |
|
198 | adding manifests | |
189 | adding file changes |
|
199 | adding file changes | |
190 | added 2 changesets with 2 changes to 2 files (+1 heads) |
|
200 | added 2 changesets with 2 changes to 2 files (+1 heads) | |
191 | remote: changegroup |
|
201 | remote: changegroup | |
192 | adding changesets |
|
202 | adding changesets | |
193 | adding manifests |
|
203 | adding manifests | |
194 | adding file changes |
|
204 | adding file changes | |
195 | added 3 changesets with 2 changes to 2 files (+1 heads) |
|
205 | added 3 changesets with 2 changes to 2 files (+1 heads) | |
196 | new changesets 32af7686d403:02de42196ebe |
|
206 | new changesets 32af7686d403:02de42196ebe | |
197 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
207 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
198 | $ hg -R clone log -G |
|
208 | $ hg -R clone log -G | |
199 | o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H |
|
209 | o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H | |
200 | | |
|
210 | | | |
201 | | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G |
|
211 | | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G | |
202 | |/| |
|
212 | |/| | |
203 | o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
213 | o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
204 | | | |
|
214 | | | | |
205 | | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
215 | | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
206 | |/ |
|
216 | |/ | |
207 | | o 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D |
|
217 | | o 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D | |
208 | | | |
|
218 | | | | |
209 | | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C |
|
219 | | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C | |
210 | | | |
|
220 | | | | |
211 | | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B |
|
221 | | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B | |
212 | |/ |
|
222 | |/ | |
213 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
223 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
214 |
|
224 | |||
215 | $ rm -rf clone |
|
225 | $ rm -rf clone | |
216 |
|
226 | |||
217 | Test a pull with a changegroup followed by an remote-changegroup |
|
227 | Test a pull with a changegroup followed by an remote-changegroup | |
218 |
|
228 | |||
219 | $ hg bundle -R repo --type v1 --base '0:4' -r '5:7' bundle3.hg |
|
229 | $ hg bundle -R repo --type v1 --base '0:4' -r '5:7' bundle3.hg | |
220 | 3 changesets found |
|
230 | 3 changesets found | |
221 | $ cat > repo/.hg/bundle2maker << EOF |
|
231 | $ cat > repo/.hg/bundle2maker << EOF | |
222 | > changegroup 000000000000 :4 |
|
232 | > changegroup 000000000000 :4 | |
223 | > remote-changegroup http://localhost:$HGPORT/bundle3.hg bundle3.hg |
|
233 | > remote-changegroup http://localhost:$HGPORT/bundle3.hg bundle3.hg | |
224 | > EOF |
|
234 | > EOF | |
225 | $ hg clone orig clone -r 2 |
|
235 | $ hg clone orig clone -r 2 | |
226 | adding changesets |
|
236 | adding changesets | |
227 | adding manifests |
|
237 | adding manifests | |
228 | adding file changes |
|
238 | adding file changes | |
229 | added 3 changesets with 3 changes to 3 files |
|
239 | added 3 changesets with 3 changes to 3 files | |
230 | new changesets cd010b8cd998:5fddd98957c8 |
|
240 | new changesets cd010b8cd998:5fddd98957c8 | |
231 | updating to branch default |
|
241 | updating to branch default | |
232 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
242 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
233 | $ hg pull -R clone ssh://user@dummy/repo |
|
243 | $ hg pull -R clone ssh://user@dummy/repo | |
234 | pulling from ssh://user@dummy/repo |
|
244 | pulling from ssh://user@dummy/repo | |
235 | searching for changes |
|
245 | searching for changes | |
236 | remote: changegroup |
|
246 | remote: changegroup | |
237 | adding changesets |
|
247 | adding changesets | |
238 | adding manifests |
|
248 | adding manifests | |
239 | adding file changes |
|
249 | adding file changes | |
240 | added 2 changesets with 2 changes to 2 files (+1 heads) |
|
250 | added 2 changesets with 2 changes to 2 files (+1 heads) | |
241 | remote: remote-changegroup |
|
251 | remote: remote-changegroup | |
242 | adding changesets |
|
252 | adding changesets | |
243 | adding manifests |
|
253 | adding manifests | |
244 | adding file changes |
|
254 | adding file changes | |
245 | added 3 changesets with 2 changes to 2 files (+1 heads) |
|
255 | added 3 changesets with 2 changes to 2 files (+1 heads) | |
246 | new changesets 32af7686d403:02de42196ebe |
|
256 | new changesets 32af7686d403:02de42196ebe | |
247 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
257 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
248 | $ hg -R clone log -G |
|
258 | $ hg -R clone log -G | |
249 | o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H |
|
259 | o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H | |
250 | | |
|
260 | | | |
251 | | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G |
|
261 | | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G | |
252 | |/| |
|
262 | |/| | |
253 | o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
263 | o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
254 | | | |
|
264 | | | | |
255 | | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
265 | | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
256 | |/ |
|
266 | |/ | |
257 | | o 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D |
|
267 | | o 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D | |
258 | | | |
|
268 | | | | |
259 | | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C |
|
269 | | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C | |
260 | | | |
|
270 | | | | |
261 | | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B |
|
271 | | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B | |
262 | |/ |
|
272 | |/ | |
263 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
273 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
264 |
|
274 | |||
265 | $ rm -rf clone |
|
275 | $ rm -rf clone | |
266 |
|
276 | |||
267 | Test a pull with two remote-changegroups and a changegroup |
|
277 | Test a pull with two remote-changegroups and a changegroup | |
268 |
|
278 | |||
269 | $ hg bundle -R repo --type v1 --base 2 -r '3:4' bundle4.hg |
|
279 | $ hg bundle -R repo --type v1 --base 2 -r '3:4' bundle4.hg | |
270 | 2 changesets found |
|
280 | 2 changesets found | |
271 | $ hg bundle -R repo --type v1 --base '3:4' -r '5:6' bundle5.hg |
|
281 | $ hg bundle -R repo --type v1 --base '3:4' -r '5:6' bundle5.hg | |
272 | 2 changesets found |
|
282 | 2 changesets found | |
273 | $ cat > repo/.hg/bundle2maker << EOF |
|
283 | $ cat > repo/.hg/bundle2maker << EOF | |
274 | > remote-changegroup http://localhost:$HGPORT/bundle4.hg bundle4.hg |
|
284 | > remote-changegroup http://localhost:$HGPORT/bundle4.hg bundle4.hg | |
275 | > remote-changegroup http://localhost:$HGPORT/bundle5.hg bundle5.hg |
|
285 | > remote-changegroup http://localhost:$HGPORT/bundle5.hg bundle5.hg | |
276 | > changegroup 0:6 7 |
|
286 | > changegroup 0:6 7 | |
277 | > EOF |
|
287 | > EOF | |
278 | $ hg clone orig clone -r 2 |
|
288 | $ hg clone orig clone -r 2 | |
279 | adding changesets |
|
289 | adding changesets | |
280 | adding manifests |
|
290 | adding manifests | |
281 | adding file changes |
|
291 | adding file changes | |
282 | added 3 changesets with 3 changes to 3 files |
|
292 | added 3 changesets with 3 changes to 3 files | |
283 | new changesets cd010b8cd998:5fddd98957c8 |
|
293 | new changesets cd010b8cd998:5fddd98957c8 | |
284 | updating to branch default |
|
294 | updating to branch default | |
285 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
295 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
286 | $ hg pull -R clone ssh://user@dummy/repo |
|
296 | $ hg pull -R clone ssh://user@dummy/repo | |
287 | pulling from ssh://user@dummy/repo |
|
297 | pulling from ssh://user@dummy/repo | |
288 | searching for changes |
|
298 | searching for changes | |
289 | remote: remote-changegroup |
|
299 | remote: remote-changegroup | |
290 | adding changesets |
|
300 | adding changesets | |
291 | adding manifests |
|
301 | adding manifests | |
292 | adding file changes |
|
302 | adding file changes | |
293 | added 2 changesets with 2 changes to 2 files (+1 heads) |
|
303 | added 2 changesets with 2 changes to 2 files (+1 heads) | |
294 | remote: remote-changegroup |
|
304 | remote: remote-changegroup | |
295 | adding changesets |
|
305 | adding changesets | |
296 | adding manifests |
|
306 | adding manifests | |
297 | adding file changes |
|
307 | adding file changes | |
298 | added 2 changesets with 1 changes to 1 files |
|
308 | added 2 changesets with 1 changes to 1 files | |
299 | remote: changegroup |
|
309 | remote: changegroup | |
300 | adding changesets |
|
310 | adding changesets | |
301 | adding manifests |
|
311 | adding manifests | |
302 | adding file changes |
|
312 | adding file changes | |
303 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
313 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
304 | new changesets 32af7686d403:02de42196ebe |
|
314 | new changesets 32af7686d403:02de42196ebe | |
305 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
315 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
306 | $ hg -R clone log -G |
|
316 | $ hg -R clone log -G | |
307 | o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H |
|
317 | o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H | |
308 | | |
|
318 | | | |
309 | | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G |
|
319 | | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G | |
310 | |/| |
|
320 | |/| | |
311 | o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
321 | o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
312 | | | |
|
322 | | | | |
313 | | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
323 | | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
314 | |/ |
|
324 | |/ | |
315 | | o 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D |
|
325 | | o 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D | |
316 | | | |
|
326 | | | | |
317 | | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C |
|
327 | | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C | |
318 | | | |
|
328 | | | | |
319 | | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B |
|
329 | | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B | |
320 | |/ |
|
330 | |/ | |
321 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
331 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
322 |
|
332 | |||
323 | $ rm -rf clone |
|
333 | $ rm -rf clone | |
324 |
|
334 | |||
325 | Hash digest tests |
|
335 | Hash digest tests | |
326 |
|
336 | |||
327 | $ hg bundle -R repo --type v1 -a bundle6.hg |
|
337 | $ hg bundle -R repo --type v1 -a bundle6.hg | |
328 | 8 changesets found |
|
338 | 8 changesets found | |
329 |
|
339 | |||
330 | $ cat > repo/.hg/bundle2maker << EOF |
|
340 | $ cat > repo/.hg/bundle2maker << EOF | |
331 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'sha1', 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'} |
|
341 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'sha1', 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'} | |
332 | > EOF |
|
342 | > EOF | |
333 | $ hg clone ssh://user@dummy/repo clone |
|
343 | $ hg clone ssh://user@dummy/repo clone | |
334 | requesting all changes |
|
344 | requesting all changes | |
335 | remote: remote-changegroup |
|
345 | remote: remote-changegroup | |
336 | adding changesets |
|
346 | adding changesets | |
337 | adding manifests |
|
347 | adding manifests | |
338 | adding file changes |
|
348 | adding file changes | |
339 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
349 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
340 | new changesets cd010b8cd998:02de42196ebe |
|
350 | new changesets cd010b8cd998:02de42196ebe | |
341 | updating to branch default |
|
351 | updating to branch default | |
342 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
352 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
343 | $ rm -rf clone |
|
353 | $ rm -rf clone | |
344 |
|
354 | |||
345 | $ cat > repo/.hg/bundle2maker << EOF |
|
355 | $ cat > repo/.hg/bundle2maker << EOF | |
346 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394'} |
|
356 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394'} | |
347 | > EOF |
|
357 | > EOF | |
348 | $ hg clone ssh://user@dummy/repo clone |
|
358 | $ hg clone ssh://user@dummy/repo clone | |
349 | requesting all changes |
|
359 | requesting all changes | |
350 | remote: remote-changegroup |
|
360 | remote: remote-changegroup | |
351 | adding changesets |
|
361 | adding changesets | |
352 | adding manifests |
|
362 | adding manifests | |
353 | adding file changes |
|
363 | adding file changes | |
354 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
364 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
355 | new changesets cd010b8cd998:02de42196ebe |
|
365 | new changesets cd010b8cd998:02de42196ebe | |
356 | updating to branch default |
|
366 | updating to branch default | |
357 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
367 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
358 | $ rm -rf clone |
|
368 | $ rm -rf clone | |
359 |
|
369 | |||
360 | Hash digest mismatch throws an error |
|
370 | Hash digest mismatch throws an error | |
361 |
|
371 | |||
362 | $ cat > repo/.hg/bundle2maker << EOF |
|
372 | $ cat > repo/.hg/bundle2maker << EOF | |
363 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'sha1', 'digest:sha1': '0' * 40} |
|
373 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'sha1', 'digest:sha1': '0' * 40} | |
364 | > EOF |
|
374 | > EOF | |
365 | $ hg clone ssh://user@dummy/repo clone |
|
375 | $ hg clone ssh://user@dummy/repo clone | |
366 | requesting all changes |
|
376 | requesting all changes | |
367 | remote: remote-changegroup |
|
377 | remote: remote-changegroup | |
368 | adding changesets |
|
378 | adding changesets | |
369 | adding manifests |
|
379 | adding manifests | |
370 | adding file changes |
|
380 | adding file changes | |
371 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
381 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
372 | transaction abort! |
|
382 | transaction abort! | |
373 | rollback completed |
|
383 | rollback completed | |
374 | abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted: |
|
384 | abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted: | |
375 | sha1 mismatch: expected 0000000000000000000000000000000000000000, got 2c880cfec23cff7d8f80c2f12958d1563cbdaba6 |
|
385 | sha1 mismatch: expected 0000000000000000000000000000000000000000, got 2c880cfec23cff7d8f80c2f12958d1563cbdaba6 | |
376 | [255] |
|
386 | [255] | |
377 |
|
387 | |||
378 | Multiple hash digests can be given |
|
388 | Multiple hash digests can be given | |
379 |
|
389 | |||
380 | $ cat > repo/.hg/bundle2maker << EOF |
|
390 | $ cat > repo/.hg/bundle2maker << EOF | |
381 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394', 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'} |
|
391 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394', 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'} | |
382 | > EOF |
|
392 | > EOF | |
383 | $ hg clone ssh://user@dummy/repo clone |
|
393 | $ hg clone ssh://user@dummy/repo clone | |
384 | requesting all changes |
|
394 | requesting all changes | |
385 | remote: remote-changegroup |
|
395 | remote: remote-changegroup | |
386 | adding changesets |
|
396 | adding changesets | |
387 | adding manifests |
|
397 | adding manifests | |
388 | adding file changes |
|
398 | adding file changes | |
389 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
399 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
390 | new changesets cd010b8cd998:02de42196ebe |
|
400 | new changesets cd010b8cd998:02de42196ebe | |
391 | updating to branch default |
|
401 | updating to branch default | |
392 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
402 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
393 | $ rm -rf clone |
|
403 | $ rm -rf clone | |
394 |
|
404 | |||
395 | If either of the multiple hash digests mismatches, an error is thrown |
|
405 | If either of the multiple hash digests mismatches, an error is thrown | |
396 |
|
406 | |||
397 | $ cat > repo/.hg/bundle2maker << EOF |
|
407 | $ cat > repo/.hg/bundle2maker << EOF | |
398 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': '0' * 32, 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'} |
|
408 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': '0' * 32, 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'} | |
399 | > EOF |
|
409 | > EOF | |
400 | $ hg clone ssh://user@dummy/repo clone |
|
410 | $ hg clone ssh://user@dummy/repo clone | |
401 | requesting all changes |
|
411 | requesting all changes | |
402 | remote: remote-changegroup |
|
412 | remote: remote-changegroup | |
403 | adding changesets |
|
413 | adding changesets | |
404 | adding manifests |
|
414 | adding manifests | |
405 | adding file changes |
|
415 | adding file changes | |
406 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
416 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
407 | transaction abort! |
|
417 | transaction abort! | |
408 | rollback completed |
|
418 | rollback completed | |
409 | abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted: |
|
419 | abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted: | |
410 | md5 mismatch: expected 00000000000000000000000000000000, got e22172c2907ef88794b7bea6642c2394 |
|
420 | md5 mismatch: expected 00000000000000000000000000000000, got e22172c2907ef88794b7bea6642c2394 | |
411 | [255] |
|
421 | [255] | |
412 |
|
422 | |||
413 | $ cat > repo/.hg/bundle2maker << EOF |
|
423 | $ cat > repo/.hg/bundle2maker << EOF | |
414 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394', 'digest:sha1': '0' * 40} |
|
424 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394', 'digest:sha1': '0' * 40} | |
415 | > EOF |
|
425 | > EOF | |
416 | $ hg clone ssh://user@dummy/repo clone |
|
426 | $ hg clone ssh://user@dummy/repo clone | |
417 | requesting all changes |
|
427 | requesting all changes | |
418 | remote: remote-changegroup |
|
428 | remote: remote-changegroup | |
419 | adding changesets |
|
429 | adding changesets | |
420 | adding manifests |
|
430 | adding manifests | |
421 | adding file changes |
|
431 | adding file changes | |
422 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
432 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
423 | transaction abort! |
|
433 | transaction abort! | |
424 | rollback completed |
|
434 | rollback completed | |
425 | abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted: |
|
435 | abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted: | |
426 | sha1 mismatch: expected 0000000000000000000000000000000000000000, got 2c880cfec23cff7d8f80c2f12958d1563cbdaba6 |
|
436 | sha1 mismatch: expected 0000000000000000000000000000000000000000, got 2c880cfec23cff7d8f80c2f12958d1563cbdaba6 | |
427 | [255] |
|
437 | [255] | |
428 |
|
438 | |||
429 | Corruption tests |
|
439 | Corruption tests | |
430 |
|
440 | |||
431 | $ hg clone orig clone -r 2 |
|
441 | $ hg clone orig clone -r 2 | |
432 | adding changesets |
|
442 | adding changesets | |
433 | adding manifests |
|
443 | adding manifests | |
434 | adding file changes |
|
444 | adding file changes | |
435 | added 3 changesets with 3 changes to 3 files |
|
445 | added 3 changesets with 3 changes to 3 files | |
436 | new changesets cd010b8cd998:5fddd98957c8 |
|
446 | new changesets cd010b8cd998:5fddd98957c8 | |
437 | updating to branch default |
|
447 | updating to branch default | |
438 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
448 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
439 |
|
449 | |||
440 | $ cat > repo/.hg/bundle2maker << EOF |
|
450 | $ cat > repo/.hg/bundle2maker << EOF | |
441 | > remote-changegroup http://localhost:$HGPORT/bundle4.hg bundle4.hg |
|
451 | > remote-changegroup http://localhost:$HGPORT/bundle4.hg bundle4.hg | |
442 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle5.hg', 'size': 578, 'digests': 'sha1', 'digest:sha1': '0' * 40} |
|
452 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle5.hg', 'size': 578, 'digests': 'sha1', 'digest:sha1': '0' * 40} | |
443 | > changegroup 0:6 7 |
|
453 | > changegroup 0:6 7 | |
444 | > EOF |
|
454 | > EOF | |
445 | $ hg pull -R clone ssh://user@dummy/repo |
|
455 | $ hg pull -R clone ssh://user@dummy/repo | |
446 | pulling from ssh://user@dummy/repo |
|
456 | pulling from ssh://user@dummy/repo | |
447 | searching for changes |
|
457 | searching for changes | |
448 | remote: remote-changegroup |
|
458 | remote: remote-changegroup | |
449 | adding changesets |
|
459 | adding changesets | |
450 | adding manifests |
|
460 | adding manifests | |
451 | adding file changes |
|
461 | adding file changes | |
452 | added 2 changesets with 2 changes to 2 files (+1 heads) |
|
462 | added 2 changesets with 2 changes to 2 files (+1 heads) | |
453 | remote: remote-changegroup |
|
463 | remote: remote-changegroup | |
454 | adding changesets |
|
464 | adding changesets | |
455 | adding manifests |
|
465 | adding manifests | |
456 | adding file changes |
|
466 | adding file changes | |
457 | added 2 changesets with 1 changes to 1 files |
|
467 | added 2 changesets with 1 changes to 1 files | |
458 | transaction abort! |
|
468 | transaction abort! | |
459 | rollback completed |
|
469 | rollback completed | |
460 | abort: bundle at http://localhost:$HGPORT/bundle5.hg is corrupted: |
|
470 | abort: bundle at http://localhost:$HGPORT/bundle5.hg is corrupted: | |
461 | sha1 mismatch: expected 0000000000000000000000000000000000000000, got f29485d6bfd37db99983cfc95ecb52f8ca396106 |
|
471 | sha1 mismatch: expected 0000000000000000000000000000000000000000, got f29485d6bfd37db99983cfc95ecb52f8ca396106 | |
462 | [255] |
|
472 | [255] | |
463 |
|
473 | |||
464 | The entire transaction has been rolled back in the pull above |
|
474 | The entire transaction has been rolled back in the pull above | |
465 |
|
475 | |||
466 | $ hg -R clone log -G |
|
476 | $ hg -R clone log -G | |
467 | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C |
|
477 | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C | |
468 | | |
|
478 | | | |
469 | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B |
|
479 | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B | |
470 | | |
|
480 | | | |
471 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
481 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
472 |
|
482 | |||
473 |
|
483 | |||
474 | No params |
|
484 | No params | |
475 |
|
485 | |||
476 | $ cat > repo/.hg/bundle2maker << EOF |
|
486 | $ cat > repo/.hg/bundle2maker << EOF | |
477 | > raw-remote-changegroup {} |
|
487 | > raw-remote-changegroup {} | |
478 | > EOF |
|
488 | > EOF | |
479 | $ hg pull -R clone ssh://user@dummy/repo |
|
489 | $ hg pull -R clone ssh://user@dummy/repo | |
480 | pulling from ssh://user@dummy/repo |
|
490 | pulling from ssh://user@dummy/repo | |
481 | searching for changes |
|
491 | searching for changes | |
482 | remote: remote-changegroup |
|
492 | remote: remote-changegroup | |
483 | abort: remote-changegroup: missing "url" param |
|
493 | abort: remote-changegroup: missing "url" param | |
484 | [255] |
|
494 | [255] | |
485 |
|
495 | |||
486 | Missing size |
|
496 | Missing size | |
487 |
|
497 | |||
488 | $ cat > repo/.hg/bundle2maker << EOF |
|
498 | $ cat > repo/.hg/bundle2maker << EOF | |
489 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg'} |
|
499 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg'} | |
490 | > EOF |
|
500 | > EOF | |
491 | $ hg pull -R clone ssh://user@dummy/repo |
|
501 | $ hg pull -R clone ssh://user@dummy/repo | |
492 | pulling from ssh://user@dummy/repo |
|
502 | pulling from ssh://user@dummy/repo | |
493 | searching for changes |
|
503 | searching for changes | |
494 | remote: remote-changegroup |
|
504 | remote: remote-changegroup | |
495 | abort: remote-changegroup: missing "size" param |
|
505 | abort: remote-changegroup: missing "size" param | |
496 | [255] |
|
506 | [255] | |
497 |
|
507 | |||
498 | Invalid size |
|
508 | Invalid size | |
499 |
|
509 | |||
500 | $ cat > repo/.hg/bundle2maker << EOF |
|
510 | $ cat > repo/.hg/bundle2maker << EOF | |
501 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 'foo'} |
|
511 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 'foo'} | |
502 | > EOF |
|
512 | > EOF | |
503 | $ hg pull -R clone ssh://user@dummy/repo |
|
513 | $ hg pull -R clone ssh://user@dummy/repo | |
504 | pulling from ssh://user@dummy/repo |
|
514 | pulling from ssh://user@dummy/repo | |
505 | searching for changes |
|
515 | searching for changes | |
506 | remote: remote-changegroup |
|
516 | remote: remote-changegroup | |
507 | abort: remote-changegroup: invalid value for param "size" |
|
517 | abort: remote-changegroup: invalid value for param "size" | |
508 | [255] |
|
518 | [255] | |
509 |
|
519 | |||
510 | Size mismatch |
|
520 | Size mismatch | |
511 |
|
521 | |||
512 | $ cat > repo/.hg/bundle2maker << EOF |
|
522 | $ cat > repo/.hg/bundle2maker << EOF | |
513 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 42} |
|
523 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 42} | |
514 | > EOF |
|
524 | > EOF | |
515 | $ hg pull -R clone ssh://user@dummy/repo |
|
525 | $ hg pull -R clone ssh://user@dummy/repo | |
516 | pulling from ssh://user@dummy/repo |
|
526 | pulling from ssh://user@dummy/repo | |
517 | searching for changes |
|
527 | searching for changes | |
518 | remote: remote-changegroup |
|
528 | remote: remote-changegroup | |
519 | adding changesets |
|
529 | adding changesets | |
520 | adding manifests |
|
530 | adding manifests | |
521 | adding file changes |
|
531 | adding file changes | |
522 | added 2 changesets with 2 changes to 2 files (+1 heads) |
|
532 | added 2 changesets with 2 changes to 2 files (+1 heads) | |
523 | transaction abort! |
|
533 | transaction abort! | |
524 | rollback completed |
|
534 | rollback completed | |
525 | abort: bundle at http://localhost:$HGPORT/bundle4.hg is corrupted: |
|
535 | abort: bundle at http://localhost:$HGPORT/bundle4.hg is corrupted: | |
526 | size mismatch: expected 42, got 581 |
|
536 | size mismatch: expected 42, got 581 | |
527 | [255] |
|
537 | [255] | |
528 |
|
538 | |||
529 | Unknown digest |
|
539 | Unknown digest | |
530 |
|
540 | |||
531 | $ cat > repo/.hg/bundle2maker << EOF |
|
541 | $ cat > repo/.hg/bundle2maker << EOF | |
532 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 581, 'digests': 'foo', 'digest:foo': 'bar'} |
|
542 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 581, 'digests': 'foo', 'digest:foo': 'bar'} | |
533 | > EOF |
|
543 | > EOF | |
534 | $ hg pull -R clone ssh://user@dummy/repo |
|
544 | $ hg pull -R clone ssh://user@dummy/repo | |
535 | pulling from ssh://user@dummy/repo |
|
545 | pulling from ssh://user@dummy/repo | |
536 | searching for changes |
|
546 | searching for changes | |
537 | remote: remote-changegroup |
|
547 | remote: remote-changegroup | |
538 | abort: missing support for remote-changegroup - digest:foo |
|
548 | abort: missing support for remote-changegroup - digest:foo | |
539 | [255] |
|
549 | [255] | |
540 |
|
550 | |||
541 | Missing digest |
|
551 | Missing digest | |
542 |
|
552 | |||
543 | $ cat > repo/.hg/bundle2maker << EOF |
|
553 | $ cat > repo/.hg/bundle2maker << EOF | |
544 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 581, 'digests': 'sha1'} |
|
554 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 581, 'digests': 'sha1'} | |
545 | > EOF |
|
555 | > EOF | |
546 | $ hg pull -R clone ssh://user@dummy/repo |
|
556 | $ hg pull -R clone ssh://user@dummy/repo | |
547 | pulling from ssh://user@dummy/repo |
|
557 | pulling from ssh://user@dummy/repo | |
548 | searching for changes |
|
558 | searching for changes | |
549 | remote: remote-changegroup |
|
559 | remote: remote-changegroup | |
550 | abort: remote-changegroup: missing "digest:sha1" param |
|
560 | abort: remote-changegroup: missing "digest:sha1" param | |
551 | [255] |
|
561 | [255] | |
552 |
|
562 | |||
553 | Not an HTTP url |
|
563 | Not an HTTP url | |
554 |
|
564 | |||
555 | $ cat > repo/.hg/bundle2maker << EOF |
|
565 | $ cat > repo/.hg/bundle2maker << EOF | |
556 | > raw-remote-changegroup {'url': 'ssh://localhost:$HGPORT/bundle4.hg', 'size': 581} |
|
566 | > raw-remote-changegroup {'url': 'ssh://localhost:$HGPORT/bundle4.hg', 'size': 581} | |
557 | > EOF |
|
567 | > EOF | |
558 | $ hg pull -R clone ssh://user@dummy/repo |
|
568 | $ hg pull -R clone ssh://user@dummy/repo | |
559 | pulling from ssh://user@dummy/repo |
|
569 | pulling from ssh://user@dummy/repo | |
560 | searching for changes |
|
570 | searching for changes | |
561 | remote: remote-changegroup |
|
571 | remote: remote-changegroup | |
562 | abort: remote-changegroup does not support ssh urls |
|
572 | abort: remote-changegroup does not support ssh urls | |
563 | [255] |
|
573 | [255] | |
564 |
|
574 | |||
565 | Not a bundle |
|
575 | Not a bundle | |
566 |
|
576 | |||
567 | $ cat > notbundle.hg << EOF |
|
577 | $ cat > notbundle.hg << EOF | |
568 | > foo |
|
578 | > foo | |
569 | > EOF |
|
579 | > EOF | |
570 | $ cat > repo/.hg/bundle2maker << EOF |
|
580 | $ cat > repo/.hg/bundle2maker << EOF | |
571 | > remote-changegroup http://localhost:$HGPORT/notbundle.hg notbundle.hg |
|
581 | > remote-changegroup http://localhost:$HGPORT/notbundle.hg notbundle.hg | |
572 | > EOF |
|
582 | > EOF | |
573 | $ hg pull -R clone ssh://user@dummy/repo |
|
583 | $ hg pull -R clone ssh://user@dummy/repo | |
574 | pulling from ssh://user@dummy/repo |
|
584 | pulling from ssh://user@dummy/repo | |
575 | searching for changes |
|
585 | searching for changes | |
576 | remote: remote-changegroup |
|
586 | remote: remote-changegroup | |
577 | abort: http://localhost:$HGPORT/notbundle.hg: not a Mercurial bundle |
|
587 | abort: http://localhost:$HGPORT/notbundle.hg: not a Mercurial bundle | |
578 | [255] |
|
588 | [255] | |
579 |
|
589 | |||
580 | Not a bundle 1.0 |
|
590 | Not a bundle 1.0 | |
581 |
|
591 | |||
582 | $ cat > notbundle10.hg << EOF |
|
592 | $ cat > notbundle10.hg << EOF | |
583 | > HG20 |
|
593 | > HG20 | |
584 | > EOF |
|
594 | > EOF | |
585 | $ cat > repo/.hg/bundle2maker << EOF |
|
595 | $ cat > repo/.hg/bundle2maker << EOF | |
586 | > remote-changegroup http://localhost:$HGPORT/notbundle10.hg notbundle10.hg |
|
596 | > remote-changegroup http://localhost:$HGPORT/notbundle10.hg notbundle10.hg | |
587 | > EOF |
|
597 | > EOF | |
588 | $ hg pull -R clone ssh://user@dummy/repo |
|
598 | $ hg pull -R clone ssh://user@dummy/repo | |
589 | pulling from ssh://user@dummy/repo |
|
599 | pulling from ssh://user@dummy/repo | |
590 | searching for changes |
|
600 | searching for changes | |
591 | remote: remote-changegroup |
|
601 | remote: remote-changegroup | |
592 | abort: http://localhost:$HGPORT/notbundle10.hg: not a bundle version 1.0 |
|
602 | abort: http://localhost:$HGPORT/notbundle10.hg: not a bundle version 1.0 | |
593 | [255] |
|
603 | [255] | |
594 |
|
604 | |||
595 | $ hg -R clone log -G |
|
605 | $ hg -R clone log -G | |
596 | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C |
|
606 | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C | |
597 | | |
|
607 | | | |
598 | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B |
|
608 | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B | |
599 | | |
|
609 | | | |
600 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
610 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
601 |
|
611 | |||
602 | $ rm -rf clone |
|
612 | $ rm -rf clone | |
603 |
|
613 | |||
604 | $ killdaemons.py |
|
614 | $ killdaemons.py |
@@ -1,1256 +1,1271 b'' | |||||
|
1 | #testcases sshv1 sshv2 | |||
|
2 | ||||
|
3 | #if sshv2 | |||
|
4 | $ cat >> $HGRCPATH << EOF | |||
|
5 | > [experimental] | |||
|
6 | > sshpeer.advertise-v2 = true | |||
|
7 | > sshserver.support-v2 = true | |||
|
8 | > EOF | |||
|
9 | #endif | |||
|
10 | ||||
1 | Prepare repo a: |
|
11 | Prepare repo a: | |
2 |
|
12 | |||
3 | $ hg init a |
|
13 | $ hg init a | |
4 | $ cd a |
|
14 | $ cd a | |
5 | $ echo a > a |
|
15 | $ echo a > a | |
6 | $ hg add a |
|
16 | $ hg add a | |
7 | $ hg commit -m test |
|
17 | $ hg commit -m test | |
8 | $ echo first line > b |
|
18 | $ echo first line > b | |
9 | $ hg add b |
|
19 | $ hg add b | |
10 |
|
20 | |||
11 | Create a non-inlined filelog: |
|
21 | Create a non-inlined filelog: | |
12 |
|
22 | |||
13 | $ $PYTHON -c 'open("data1", "wb").write(b"".join(b"%d\n" % x for x in range(10000)))' |
|
23 | $ $PYTHON -c 'open("data1", "wb").write(b"".join(b"%d\n" % x for x in range(10000)))' | |
14 | $ for j in 0 1 2 3 4 5 6 7 8 9; do |
|
24 | $ for j in 0 1 2 3 4 5 6 7 8 9; do | |
15 | > cat data1 >> b |
|
25 | > cat data1 >> b | |
16 | > hg commit -m test |
|
26 | > hg commit -m test | |
17 | > done |
|
27 | > done | |
18 |
|
28 | |||
19 | List files in store/data (should show a 'b.d'): |
|
29 | List files in store/data (should show a 'b.d'): | |
20 |
|
30 | |||
21 | $ for i in .hg/store/data/*; do |
|
31 | $ for i in .hg/store/data/*; do | |
22 | > echo $i |
|
32 | > echo $i | |
23 | > done |
|
33 | > done | |
24 | .hg/store/data/a.i |
|
34 | .hg/store/data/a.i | |
25 | .hg/store/data/b.d |
|
35 | .hg/store/data/b.d | |
26 | .hg/store/data/b.i |
|
36 | .hg/store/data/b.i | |
27 |
|
37 | |||
28 | Trigger branchcache creation: |
|
38 | Trigger branchcache creation: | |
29 |
|
39 | |||
30 | $ hg branches |
|
40 | $ hg branches | |
31 | default 10:a7949464abda |
|
41 | default 10:a7949464abda | |
32 | $ ls .hg/cache |
|
42 | $ ls .hg/cache | |
33 | branch2-served |
|
43 | branch2-served | |
34 | checkisexec (execbit !) |
|
44 | checkisexec (execbit !) | |
35 | checklink (symlink !) |
|
45 | checklink (symlink !) | |
36 | checklink-target (symlink !) |
|
46 | checklink-target (symlink !) | |
37 | checknoexec (execbit !) |
|
47 | checknoexec (execbit !) | |
38 | rbc-names-v1 |
|
48 | rbc-names-v1 | |
39 | rbc-revs-v1 |
|
49 | rbc-revs-v1 | |
40 |
|
50 | |||
41 | Default operation: |
|
51 | Default operation: | |
42 |
|
52 | |||
43 | $ hg clone . ../b |
|
53 | $ hg clone . ../b | |
44 | updating to branch default |
|
54 | updating to branch default | |
45 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
55 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
46 | $ cd ../b |
|
56 | $ cd ../b | |
47 |
|
57 | |||
48 | Ensure branchcache got copied over: |
|
58 | Ensure branchcache got copied over: | |
49 |
|
59 | |||
50 | $ ls .hg/cache |
|
60 | $ ls .hg/cache | |
51 | branch2-served |
|
61 | branch2-served | |
52 | checkisexec (execbit !) |
|
62 | checkisexec (execbit !) | |
53 | checklink (symlink !) |
|
63 | checklink (symlink !) | |
54 | checklink-target (symlink !) |
|
64 | checklink-target (symlink !) | |
55 | rbc-names-v1 |
|
65 | rbc-names-v1 | |
56 | rbc-revs-v1 |
|
66 | rbc-revs-v1 | |
57 |
|
67 | |||
58 | $ cat a |
|
68 | $ cat a | |
59 | a |
|
69 | a | |
60 | $ hg verify |
|
70 | $ hg verify | |
61 | checking changesets |
|
71 | checking changesets | |
62 | checking manifests |
|
72 | checking manifests | |
63 | crosschecking files in changesets and manifests |
|
73 | crosschecking files in changesets and manifests | |
64 | checking files |
|
74 | checking files | |
65 | 2 files, 11 changesets, 11 total revisions |
|
75 | 2 files, 11 changesets, 11 total revisions | |
66 |
|
76 | |||
67 | Invalid dest '' must abort: |
|
77 | Invalid dest '' must abort: | |
68 |
|
78 | |||
69 | $ hg clone . '' |
|
79 | $ hg clone . '' | |
70 | abort: empty destination path is not valid |
|
80 | abort: empty destination path is not valid | |
71 | [255] |
|
81 | [255] | |
72 |
|
82 | |||
73 | No update, with debug option: |
|
83 | No update, with debug option: | |
74 |
|
84 | |||
75 | #if hardlink |
|
85 | #if hardlink | |
76 | $ hg --debug clone -U . ../c --config progress.debug=true |
|
86 | $ hg --debug clone -U . ../c --config progress.debug=true | |
77 | linking: 1 |
|
87 | linking: 1 | |
78 | linking: 2 |
|
88 | linking: 2 | |
79 | linking: 3 |
|
89 | linking: 3 | |
80 | linking: 4 |
|
90 | linking: 4 | |
81 | linking: 5 |
|
91 | linking: 5 | |
82 | linking: 6 |
|
92 | linking: 6 | |
83 | linking: 7 |
|
93 | linking: 7 | |
84 | linking: 8 |
|
94 | linking: 8 | |
85 | linked 8 files |
|
95 | linked 8 files | |
86 | #else |
|
96 | #else | |
87 | $ hg --debug clone -U . ../c --config progress.debug=true |
|
97 | $ hg --debug clone -U . ../c --config progress.debug=true | |
88 | linking: 1 |
|
98 | linking: 1 | |
89 | copying: 2 |
|
99 | copying: 2 | |
90 | copying: 3 |
|
100 | copying: 3 | |
91 | copying: 4 |
|
101 | copying: 4 | |
92 | copying: 5 |
|
102 | copying: 5 | |
93 | copying: 6 |
|
103 | copying: 6 | |
94 | copying: 7 |
|
104 | copying: 7 | |
95 | copying: 8 |
|
105 | copying: 8 | |
96 | copied 8 files |
|
106 | copied 8 files | |
97 | #endif |
|
107 | #endif | |
98 | $ cd ../c |
|
108 | $ cd ../c | |
99 |
|
109 | |||
100 | Ensure branchcache got copied over: |
|
110 | Ensure branchcache got copied over: | |
101 |
|
111 | |||
102 | $ ls .hg/cache |
|
112 | $ ls .hg/cache | |
103 | branch2-served |
|
113 | branch2-served | |
104 | rbc-names-v1 |
|
114 | rbc-names-v1 | |
105 | rbc-revs-v1 |
|
115 | rbc-revs-v1 | |
106 |
|
116 | |||
107 | $ cat a 2>/dev/null || echo "a not present" |
|
117 | $ cat a 2>/dev/null || echo "a not present" | |
108 | a not present |
|
118 | a not present | |
109 | $ hg verify |
|
119 | $ hg verify | |
110 | checking changesets |
|
120 | checking changesets | |
111 | checking manifests |
|
121 | checking manifests | |
112 | crosschecking files in changesets and manifests |
|
122 | crosschecking files in changesets and manifests | |
113 | checking files |
|
123 | checking files | |
114 | 2 files, 11 changesets, 11 total revisions |
|
124 | 2 files, 11 changesets, 11 total revisions | |
115 |
|
125 | |||
116 | Default destination: |
|
126 | Default destination: | |
117 |
|
127 | |||
118 | $ mkdir ../d |
|
128 | $ mkdir ../d | |
119 | $ cd ../d |
|
129 | $ cd ../d | |
120 | $ hg clone ../a |
|
130 | $ hg clone ../a | |
121 | destination directory: a |
|
131 | destination directory: a | |
122 | updating to branch default |
|
132 | updating to branch default | |
123 | 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 | |
124 | $ cd a |
|
134 | $ cd a | |
125 | $ hg cat a |
|
135 | $ hg cat a | |
126 | a |
|
136 | a | |
127 | $ cd ../.. |
|
137 | $ cd ../.. | |
128 |
|
138 | |||
129 | Check that we drop the 'file:' from the path before writing the .hgrc: |
|
139 | Check that we drop the 'file:' from the path before writing the .hgrc: | |
130 |
|
140 | |||
131 | $ hg clone file:a e |
|
141 | $ hg clone file:a e | |
132 | updating to branch default |
|
142 | updating to branch default | |
133 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
143 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
134 | $ grep 'file:' e/.hg/hgrc |
|
144 | $ grep 'file:' e/.hg/hgrc | |
135 | [1] |
|
145 | [1] | |
136 |
|
146 | |||
137 | Check that path aliases are expanded: |
|
147 | Check that path aliases are expanded: | |
138 |
|
148 | |||
139 | $ hg clone -q -U --config 'paths.foobar=a#0' foobar f |
|
149 | $ hg clone -q -U --config 'paths.foobar=a#0' foobar f | |
140 | $ hg -R f showconfig paths.default |
|
150 | $ hg -R f showconfig paths.default | |
141 | $TESTTMP/a#0 |
|
151 | $TESTTMP/a#0 | |
142 |
|
152 | |||
143 | Use --pull: |
|
153 | Use --pull: | |
144 |
|
154 | |||
145 | $ hg clone --pull a g |
|
155 | $ hg clone --pull a g | |
146 | requesting all changes |
|
156 | requesting all changes | |
147 | adding changesets |
|
157 | adding changesets | |
148 | adding manifests |
|
158 | adding manifests | |
149 | adding file changes |
|
159 | adding file changes | |
150 | added 11 changesets with 11 changes to 2 files |
|
160 | added 11 changesets with 11 changes to 2 files | |
151 | new changesets acb14030fe0a:a7949464abda |
|
161 | new changesets acb14030fe0a:a7949464abda | |
152 | updating to branch default |
|
162 | updating to branch default | |
153 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
163 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
154 | $ hg -R g verify |
|
164 | $ hg -R g verify | |
155 | checking changesets |
|
165 | checking changesets | |
156 | checking manifests |
|
166 | checking manifests | |
157 | crosschecking files in changesets and manifests |
|
167 | crosschecking files in changesets and manifests | |
158 | checking files |
|
168 | checking files | |
159 | 2 files, 11 changesets, 11 total revisions |
|
169 | 2 files, 11 changesets, 11 total revisions | |
160 |
|
170 | |||
161 | Invalid dest '' with --pull must abort (issue2528): |
|
171 | Invalid dest '' with --pull must abort (issue2528): | |
162 |
|
172 | |||
163 | $ hg clone --pull a '' |
|
173 | $ hg clone --pull a '' | |
164 | abort: empty destination path is not valid |
|
174 | abort: empty destination path is not valid | |
165 | [255] |
|
175 | [255] | |
166 |
|
176 | |||
167 | Clone to '.': |
|
177 | Clone to '.': | |
168 |
|
178 | |||
169 | $ mkdir h |
|
179 | $ mkdir h | |
170 | $ cd h |
|
180 | $ cd h | |
171 | $ hg clone ../a . |
|
181 | $ hg clone ../a . | |
172 | updating to branch default |
|
182 | updating to branch default | |
173 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
183 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
174 | $ cd .. |
|
184 | $ cd .. | |
175 |
|
185 | |||
176 |
|
186 | |||
177 | *** Tests for option -u *** |
|
187 | *** Tests for option -u *** | |
178 |
|
188 | |||
179 | Adding some more history to repo a: |
|
189 | Adding some more history to repo a: | |
180 |
|
190 | |||
181 | $ cd a |
|
191 | $ cd a | |
182 | $ hg tag ref1 |
|
192 | $ hg tag ref1 | |
183 | $ echo the quick brown fox >a |
|
193 | $ echo the quick brown fox >a | |
184 | $ hg ci -m "hacked default" |
|
194 | $ hg ci -m "hacked default" | |
185 | $ hg up ref1 |
|
195 | $ hg up ref1 | |
186 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
196 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
187 | $ hg branch stable |
|
197 | $ hg branch stable | |
188 | marked working directory as branch stable |
|
198 | marked working directory as branch stable | |
189 | (branches are permanent and global, did you want a bookmark?) |
|
199 | (branches are permanent and global, did you want a bookmark?) | |
190 | $ echo some text >a |
|
200 | $ echo some text >a | |
191 | $ hg ci -m "starting branch stable" |
|
201 | $ hg ci -m "starting branch stable" | |
192 | $ hg tag ref2 |
|
202 | $ hg tag ref2 | |
193 | $ echo some more text >a |
|
203 | $ echo some more text >a | |
194 | $ hg ci -m "another change for branch stable" |
|
204 | $ hg ci -m "another change for branch stable" | |
195 | $ hg up ref2 |
|
205 | $ hg up ref2 | |
196 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
206 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
197 | $ hg parents |
|
207 | $ hg parents | |
198 | changeset: 13:e8ece76546a6 |
|
208 | changeset: 13:e8ece76546a6 | |
199 | branch: stable |
|
209 | branch: stable | |
200 | tag: ref2 |
|
210 | tag: ref2 | |
201 | parent: 10:a7949464abda |
|
211 | parent: 10:a7949464abda | |
202 | user: test |
|
212 | user: test | |
203 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
213 | date: Thu Jan 01 00:00:00 1970 +0000 | |
204 | summary: starting branch stable |
|
214 | summary: starting branch stable | |
205 |
|
215 | |||
206 |
|
216 | |||
207 | Repo a has two heads: |
|
217 | Repo a has two heads: | |
208 |
|
218 | |||
209 | $ hg heads |
|
219 | $ hg heads | |
210 | changeset: 15:0aae7cf88f0d |
|
220 | changeset: 15:0aae7cf88f0d | |
211 | branch: stable |
|
221 | branch: stable | |
212 | tag: tip |
|
222 | tag: tip | |
213 | user: test |
|
223 | user: test | |
214 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
224 | date: Thu Jan 01 00:00:00 1970 +0000 | |
215 | summary: another change for branch stable |
|
225 | summary: another change for branch stable | |
216 |
|
226 | |||
217 | changeset: 12:f21241060d6a |
|
227 | changeset: 12:f21241060d6a | |
218 | user: test |
|
228 | user: test | |
219 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
229 | date: Thu Jan 01 00:00:00 1970 +0000 | |
220 | summary: hacked default |
|
230 | summary: hacked default | |
221 |
|
231 | |||
222 |
|
232 | |||
223 | $ cd .. |
|
233 | $ cd .. | |
224 |
|
234 | |||
225 |
|
235 | |||
226 | Testing --noupdate with --updaterev (must abort): |
|
236 | Testing --noupdate with --updaterev (must abort): | |
227 |
|
237 | |||
228 | $ hg clone --noupdate --updaterev 1 a ua |
|
238 | $ hg clone --noupdate --updaterev 1 a ua | |
229 | abort: cannot specify both --noupdate and --updaterev |
|
239 | abort: cannot specify both --noupdate and --updaterev | |
230 | [255] |
|
240 | [255] | |
231 |
|
241 | |||
232 |
|
242 | |||
233 | Testing clone -u: |
|
243 | Testing clone -u: | |
234 |
|
244 | |||
235 | $ hg clone -u . a ua |
|
245 | $ hg clone -u . a ua | |
236 | updating to branch stable |
|
246 | updating to branch stable | |
237 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
247 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
238 |
|
248 | |||
239 | Repo ua has both heads: |
|
249 | Repo ua has both heads: | |
240 |
|
250 | |||
241 | $ hg -R ua heads |
|
251 | $ hg -R ua heads | |
242 | changeset: 15:0aae7cf88f0d |
|
252 | changeset: 15:0aae7cf88f0d | |
243 | branch: stable |
|
253 | branch: stable | |
244 | tag: tip |
|
254 | tag: tip | |
245 | user: test |
|
255 | user: test | |
246 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
256 | date: Thu Jan 01 00:00:00 1970 +0000 | |
247 | summary: another change for branch stable |
|
257 | summary: another change for branch stable | |
248 |
|
258 | |||
249 | changeset: 12:f21241060d6a |
|
259 | changeset: 12:f21241060d6a | |
250 | user: test |
|
260 | user: test | |
251 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
261 | date: Thu Jan 01 00:00:00 1970 +0000 | |
252 | summary: hacked default |
|
262 | summary: hacked default | |
253 |
|
263 | |||
254 |
|
264 | |||
255 | Same revision checked out in repo a and ua: |
|
265 | Same revision checked out in repo a and ua: | |
256 |
|
266 | |||
257 | $ hg -R a parents --template "{node|short}\n" |
|
267 | $ hg -R a parents --template "{node|short}\n" | |
258 | e8ece76546a6 |
|
268 | e8ece76546a6 | |
259 | $ hg -R ua parents --template "{node|short}\n" |
|
269 | $ hg -R ua parents --template "{node|short}\n" | |
260 | e8ece76546a6 |
|
270 | e8ece76546a6 | |
261 |
|
271 | |||
262 | $ rm -r ua |
|
272 | $ rm -r ua | |
263 |
|
273 | |||
264 |
|
274 | |||
265 | Testing clone --pull -u: |
|
275 | Testing clone --pull -u: | |
266 |
|
276 | |||
267 | $ hg clone --pull -u . a ua |
|
277 | $ hg clone --pull -u . a ua | |
268 | requesting all changes |
|
278 | requesting all changes | |
269 | adding changesets |
|
279 | adding changesets | |
270 | adding manifests |
|
280 | adding manifests | |
271 | adding file changes |
|
281 | adding file changes | |
272 | added 16 changesets with 16 changes to 3 files (+1 heads) |
|
282 | added 16 changesets with 16 changes to 3 files (+1 heads) | |
273 | new changesets acb14030fe0a:0aae7cf88f0d |
|
283 | new changesets acb14030fe0a:0aae7cf88f0d | |
274 | updating to branch stable |
|
284 | updating to branch stable | |
275 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
285 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
276 |
|
286 | |||
277 | Repo ua has both heads: |
|
287 | Repo ua has both heads: | |
278 |
|
288 | |||
279 | $ hg -R ua heads |
|
289 | $ hg -R ua heads | |
280 | changeset: 15:0aae7cf88f0d |
|
290 | changeset: 15:0aae7cf88f0d | |
281 | branch: stable |
|
291 | branch: stable | |
282 | tag: tip |
|
292 | tag: tip | |
283 | user: test |
|
293 | user: test | |
284 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
294 | date: Thu Jan 01 00:00:00 1970 +0000 | |
285 | summary: another change for branch stable |
|
295 | summary: another change for branch stable | |
286 |
|
296 | |||
287 | changeset: 12:f21241060d6a |
|
297 | changeset: 12:f21241060d6a | |
288 | user: test |
|
298 | user: test | |
289 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
299 | date: Thu Jan 01 00:00:00 1970 +0000 | |
290 | summary: hacked default |
|
300 | summary: hacked default | |
291 |
|
301 | |||
292 |
|
302 | |||
293 | Same revision checked out in repo a and ua: |
|
303 | Same revision checked out in repo a and ua: | |
294 |
|
304 | |||
295 | $ hg -R a parents --template "{node|short}\n" |
|
305 | $ hg -R a parents --template "{node|short}\n" | |
296 | e8ece76546a6 |
|
306 | e8ece76546a6 | |
297 | $ hg -R ua parents --template "{node|short}\n" |
|
307 | $ hg -R ua parents --template "{node|short}\n" | |
298 | e8ece76546a6 |
|
308 | e8ece76546a6 | |
299 |
|
309 | |||
300 | $ rm -r ua |
|
310 | $ rm -r ua | |
301 |
|
311 | |||
302 |
|
312 | |||
303 | Testing clone -u <branch>: |
|
313 | Testing clone -u <branch>: | |
304 |
|
314 | |||
305 | $ hg clone -u stable a ua |
|
315 | $ hg clone -u stable a ua | |
306 | updating to branch stable |
|
316 | updating to branch stable | |
307 | 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 | |
308 |
|
318 | |||
309 | Repo ua has both heads: |
|
319 | Repo ua has both heads: | |
310 |
|
320 | |||
311 | $ hg -R ua heads |
|
321 | $ hg -R ua heads | |
312 | changeset: 15:0aae7cf88f0d |
|
322 | changeset: 15:0aae7cf88f0d | |
313 | branch: stable |
|
323 | branch: stable | |
314 | tag: tip |
|
324 | tag: tip | |
315 | user: test |
|
325 | user: test | |
316 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
326 | date: Thu Jan 01 00:00:00 1970 +0000 | |
317 | summary: another change for branch stable |
|
327 | summary: another change for branch stable | |
318 |
|
328 | |||
319 | changeset: 12:f21241060d6a |
|
329 | changeset: 12:f21241060d6a | |
320 | user: test |
|
330 | user: test | |
321 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
331 | date: Thu Jan 01 00:00:00 1970 +0000 | |
322 | summary: hacked default |
|
332 | summary: hacked default | |
323 |
|
333 | |||
324 |
|
334 | |||
325 | Branch 'stable' is checked out: |
|
335 | Branch 'stable' is checked out: | |
326 |
|
336 | |||
327 | $ hg -R ua parents |
|
337 | $ hg -R ua parents | |
328 | changeset: 15:0aae7cf88f0d |
|
338 | changeset: 15:0aae7cf88f0d | |
329 | branch: stable |
|
339 | branch: stable | |
330 | tag: tip |
|
340 | tag: tip | |
331 | user: test |
|
341 | user: test | |
332 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
342 | date: Thu Jan 01 00:00:00 1970 +0000 | |
333 | summary: another change for branch stable |
|
343 | summary: another change for branch stable | |
334 |
|
344 | |||
335 |
|
345 | |||
336 | $ rm -r ua |
|
346 | $ rm -r ua | |
337 |
|
347 | |||
338 |
|
348 | |||
339 | Testing default checkout: |
|
349 | Testing default checkout: | |
340 |
|
350 | |||
341 | $ hg clone a ua |
|
351 | $ hg clone a ua | |
342 | updating to branch default |
|
352 | updating to branch default | |
343 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
353 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
344 |
|
354 | |||
345 | Repo ua has both heads: |
|
355 | Repo ua has both heads: | |
346 |
|
356 | |||
347 | $ hg -R ua heads |
|
357 | $ hg -R ua heads | |
348 | changeset: 15:0aae7cf88f0d |
|
358 | changeset: 15:0aae7cf88f0d | |
349 | branch: stable |
|
359 | branch: stable | |
350 | tag: tip |
|
360 | tag: tip | |
351 | user: test |
|
361 | user: test | |
352 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
362 | date: Thu Jan 01 00:00:00 1970 +0000 | |
353 | summary: another change for branch stable |
|
363 | summary: another change for branch stable | |
354 |
|
364 | |||
355 | changeset: 12:f21241060d6a |
|
365 | changeset: 12:f21241060d6a | |
356 | user: test |
|
366 | user: test | |
357 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
367 | date: Thu Jan 01 00:00:00 1970 +0000 | |
358 | summary: hacked default |
|
368 | summary: hacked default | |
359 |
|
369 | |||
360 |
|
370 | |||
361 | Branch 'default' is checked out: |
|
371 | Branch 'default' is checked out: | |
362 |
|
372 | |||
363 | $ hg -R ua parents |
|
373 | $ hg -R ua parents | |
364 | changeset: 12:f21241060d6a |
|
374 | changeset: 12:f21241060d6a | |
365 | user: test |
|
375 | user: test | |
366 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
376 | date: Thu Jan 01 00:00:00 1970 +0000 | |
367 | summary: hacked default |
|
377 | summary: hacked default | |
368 |
|
378 | |||
369 | Test clone with a branch named "@" (issue3677) |
|
379 | Test clone with a branch named "@" (issue3677) | |
370 |
|
380 | |||
371 | $ hg -R ua branch @ |
|
381 | $ hg -R ua branch @ | |
372 | marked working directory as branch @ |
|
382 | marked working directory as branch @ | |
373 | $ hg -R ua commit -m 'created branch @' |
|
383 | $ hg -R ua commit -m 'created branch @' | |
374 | $ hg clone ua atbranch |
|
384 | $ hg clone ua atbranch | |
375 | updating to branch default |
|
385 | updating to branch default | |
376 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
386 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
377 | $ hg -R atbranch heads |
|
387 | $ hg -R atbranch heads | |
378 | changeset: 16:798b6d97153e |
|
388 | changeset: 16:798b6d97153e | |
379 | branch: @ |
|
389 | branch: @ | |
380 | tag: tip |
|
390 | tag: tip | |
381 | parent: 12:f21241060d6a |
|
391 | parent: 12:f21241060d6a | |
382 | user: test |
|
392 | user: test | |
383 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
393 | date: Thu Jan 01 00:00:00 1970 +0000 | |
384 | summary: created branch @ |
|
394 | summary: created branch @ | |
385 |
|
395 | |||
386 | changeset: 15:0aae7cf88f0d |
|
396 | changeset: 15:0aae7cf88f0d | |
387 | branch: stable |
|
397 | branch: stable | |
388 | user: test |
|
398 | user: test | |
389 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
399 | date: Thu Jan 01 00:00:00 1970 +0000 | |
390 | summary: another change for branch stable |
|
400 | summary: another change for branch stable | |
391 |
|
401 | |||
392 | changeset: 12:f21241060d6a |
|
402 | changeset: 12:f21241060d6a | |
393 | user: test |
|
403 | user: test | |
394 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
404 | date: Thu Jan 01 00:00:00 1970 +0000 | |
395 | summary: hacked default |
|
405 | summary: hacked default | |
396 |
|
406 | |||
397 | $ hg -R atbranch parents |
|
407 | $ hg -R atbranch parents | |
398 | changeset: 12:f21241060d6a |
|
408 | changeset: 12:f21241060d6a | |
399 | user: test |
|
409 | user: test | |
400 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
410 | date: Thu Jan 01 00:00:00 1970 +0000 | |
401 | summary: hacked default |
|
411 | summary: hacked default | |
402 |
|
412 | |||
403 |
|
413 | |||
404 | $ rm -r ua atbranch |
|
414 | $ rm -r ua atbranch | |
405 |
|
415 | |||
406 |
|
416 | |||
407 | Testing #<branch>: |
|
417 | Testing #<branch>: | |
408 |
|
418 | |||
409 | $ hg clone -u . a#stable ua |
|
419 | $ hg clone -u . a#stable ua | |
410 | adding changesets |
|
420 | adding changesets | |
411 | adding manifests |
|
421 | adding manifests | |
412 | adding file changes |
|
422 | adding file changes | |
413 | added 14 changesets with 14 changes to 3 files |
|
423 | added 14 changesets with 14 changes to 3 files | |
414 | new changesets acb14030fe0a:0aae7cf88f0d |
|
424 | new changesets acb14030fe0a:0aae7cf88f0d | |
415 | updating to branch stable |
|
425 | updating to branch stable | |
416 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
426 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
417 |
|
427 | |||
418 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): |
|
428 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): | |
419 |
|
429 | |||
420 | $ hg -R ua heads |
|
430 | $ hg -R ua heads | |
421 | changeset: 13:0aae7cf88f0d |
|
431 | changeset: 13:0aae7cf88f0d | |
422 | branch: stable |
|
432 | branch: stable | |
423 | tag: tip |
|
433 | tag: tip | |
424 | user: test |
|
434 | user: test | |
425 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
435 | date: Thu Jan 01 00:00:00 1970 +0000 | |
426 | summary: another change for branch stable |
|
436 | summary: another change for branch stable | |
427 |
|
437 | |||
428 | changeset: 10:a7949464abda |
|
438 | changeset: 10:a7949464abda | |
429 | user: test |
|
439 | user: test | |
430 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
440 | date: Thu Jan 01 00:00:00 1970 +0000 | |
431 | summary: test |
|
441 | summary: test | |
432 |
|
442 | |||
433 |
|
443 | |||
434 | Same revision checked out in repo a and ua: |
|
444 | Same revision checked out in repo a and ua: | |
435 |
|
445 | |||
436 | $ hg -R a parents --template "{node|short}\n" |
|
446 | $ hg -R a parents --template "{node|short}\n" | |
437 | e8ece76546a6 |
|
447 | e8ece76546a6 | |
438 | $ hg -R ua parents --template "{node|short}\n" |
|
448 | $ hg -R ua parents --template "{node|short}\n" | |
439 | e8ece76546a6 |
|
449 | e8ece76546a6 | |
440 |
|
450 | |||
441 | $ rm -r ua |
|
451 | $ rm -r ua | |
442 |
|
452 | |||
443 |
|
453 | |||
444 | Testing -u -r <branch>: |
|
454 | Testing -u -r <branch>: | |
445 |
|
455 | |||
446 | $ hg clone -u . -r stable a ua |
|
456 | $ hg clone -u . -r stable a ua | |
447 | adding changesets |
|
457 | adding changesets | |
448 | adding manifests |
|
458 | adding manifests | |
449 | adding file changes |
|
459 | adding file changes | |
450 | added 14 changesets with 14 changes to 3 files |
|
460 | added 14 changesets with 14 changes to 3 files | |
451 | new changesets acb14030fe0a:0aae7cf88f0d |
|
461 | new changesets acb14030fe0a:0aae7cf88f0d | |
452 | updating to branch stable |
|
462 | updating to branch stable | |
453 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
463 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
454 |
|
464 | |||
455 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): |
|
465 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): | |
456 |
|
466 | |||
457 | $ hg -R ua heads |
|
467 | $ hg -R ua heads | |
458 | changeset: 13:0aae7cf88f0d |
|
468 | changeset: 13:0aae7cf88f0d | |
459 | branch: stable |
|
469 | branch: stable | |
460 | tag: tip |
|
470 | tag: tip | |
461 | user: test |
|
471 | user: test | |
462 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
472 | date: Thu Jan 01 00:00:00 1970 +0000 | |
463 | summary: another change for branch stable |
|
473 | summary: another change for branch stable | |
464 |
|
474 | |||
465 | changeset: 10:a7949464abda |
|
475 | changeset: 10:a7949464abda | |
466 | user: test |
|
476 | user: test | |
467 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
477 | date: Thu Jan 01 00:00:00 1970 +0000 | |
468 | summary: test |
|
478 | summary: test | |
469 |
|
479 | |||
470 |
|
480 | |||
471 | Same revision checked out in repo a and ua: |
|
481 | Same revision checked out in repo a and ua: | |
472 |
|
482 | |||
473 | $ hg -R a parents --template "{node|short}\n" |
|
483 | $ hg -R a parents --template "{node|short}\n" | |
474 | e8ece76546a6 |
|
484 | e8ece76546a6 | |
475 | $ hg -R ua parents --template "{node|short}\n" |
|
485 | $ hg -R ua parents --template "{node|short}\n" | |
476 | e8ece76546a6 |
|
486 | e8ece76546a6 | |
477 |
|
487 | |||
478 | $ rm -r ua |
|
488 | $ rm -r ua | |
479 |
|
489 | |||
480 |
|
490 | |||
481 | Testing -r <branch>: |
|
491 | Testing -r <branch>: | |
482 |
|
492 | |||
483 | $ hg clone -r stable a ua |
|
493 | $ hg clone -r stable a ua | |
484 | adding changesets |
|
494 | adding changesets | |
485 | adding manifests |
|
495 | adding manifests | |
486 | adding file changes |
|
496 | adding file changes | |
487 | added 14 changesets with 14 changes to 3 files |
|
497 | added 14 changesets with 14 changes to 3 files | |
488 | new changesets acb14030fe0a:0aae7cf88f0d |
|
498 | new changesets acb14030fe0a:0aae7cf88f0d | |
489 | updating to branch stable |
|
499 | updating to branch stable | |
490 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
500 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
491 |
|
501 | |||
492 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): |
|
502 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): | |
493 |
|
503 | |||
494 | $ hg -R ua heads |
|
504 | $ hg -R ua heads | |
495 | changeset: 13:0aae7cf88f0d |
|
505 | changeset: 13:0aae7cf88f0d | |
496 | branch: stable |
|
506 | branch: stable | |
497 | tag: tip |
|
507 | tag: tip | |
498 | user: test |
|
508 | user: test | |
499 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
509 | date: Thu Jan 01 00:00:00 1970 +0000 | |
500 | summary: another change for branch stable |
|
510 | summary: another change for branch stable | |
501 |
|
511 | |||
502 | changeset: 10:a7949464abda |
|
512 | changeset: 10:a7949464abda | |
503 | user: test |
|
513 | user: test | |
504 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
514 | date: Thu Jan 01 00:00:00 1970 +0000 | |
505 | summary: test |
|
515 | summary: test | |
506 |
|
516 | |||
507 |
|
517 | |||
508 | Branch 'stable' is checked out: |
|
518 | Branch 'stable' is checked out: | |
509 |
|
519 | |||
510 | $ hg -R ua parents |
|
520 | $ hg -R ua parents | |
511 | changeset: 13:0aae7cf88f0d |
|
521 | changeset: 13:0aae7cf88f0d | |
512 | branch: stable |
|
522 | branch: stable | |
513 | tag: tip |
|
523 | tag: tip | |
514 | user: test |
|
524 | user: test | |
515 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
525 | date: Thu Jan 01 00:00:00 1970 +0000 | |
516 | summary: another change for branch stable |
|
526 | summary: another change for branch stable | |
517 |
|
527 | |||
518 |
|
528 | |||
519 | $ rm -r ua |
|
529 | $ rm -r ua | |
520 |
|
530 | |||
521 |
|
531 | |||
522 | Issue2267: Error in 1.6 hg.py: TypeError: 'NoneType' object is not |
|
532 | Issue2267: Error in 1.6 hg.py: TypeError: 'NoneType' object is not | |
523 | iterable in addbranchrevs() |
|
533 | iterable in addbranchrevs() | |
524 |
|
534 | |||
525 | $ cat <<EOF > simpleclone.py |
|
535 | $ cat <<EOF > simpleclone.py | |
526 | > from mercurial import ui, hg |
|
536 | > from mercurial import ui, hg | |
527 | > myui = ui.ui.load() |
|
537 | > myui = ui.ui.load() | |
528 | > repo = hg.repository(myui, 'a') |
|
538 | > repo = hg.repository(myui, 'a') | |
529 | > hg.clone(myui, {}, repo, dest="ua") |
|
539 | > hg.clone(myui, {}, repo, dest="ua") | |
530 | > EOF |
|
540 | > EOF | |
531 |
|
541 | |||
532 | $ $PYTHON simpleclone.py |
|
542 | $ $PYTHON simpleclone.py | |
533 | updating to branch default |
|
543 | updating to branch default | |
534 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
544 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
535 |
|
545 | |||
536 | $ rm -r ua |
|
546 | $ rm -r ua | |
537 |
|
547 | |||
538 | $ cat <<EOF > branchclone.py |
|
548 | $ cat <<EOF > branchclone.py | |
539 | > from mercurial import ui, hg, extensions |
|
549 | > from mercurial import ui, hg, extensions | |
540 | > myui = ui.ui.load() |
|
550 | > myui = ui.ui.load() | |
541 | > extensions.loadall(myui) |
|
551 | > extensions.loadall(myui) | |
542 | > repo = hg.repository(myui, 'a') |
|
552 | > repo = hg.repository(myui, 'a') | |
543 | > hg.clone(myui, {}, repo, dest="ua", branch=["stable",]) |
|
553 | > hg.clone(myui, {}, repo, dest="ua", branch=["stable",]) | |
544 | > EOF |
|
554 | > EOF | |
545 |
|
555 | |||
546 | $ $PYTHON branchclone.py |
|
556 | $ $PYTHON branchclone.py | |
547 | adding changesets |
|
557 | adding changesets | |
548 | adding manifests |
|
558 | adding manifests | |
549 | adding file changes |
|
559 | adding file changes | |
550 | added 14 changesets with 14 changes to 3 files |
|
560 | added 14 changesets with 14 changes to 3 files | |
551 | new changesets acb14030fe0a:0aae7cf88f0d |
|
561 | new changesets acb14030fe0a:0aae7cf88f0d | |
552 | updating to branch stable |
|
562 | updating to branch stable | |
553 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
563 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
554 | $ rm -r ua |
|
564 | $ rm -r ua | |
555 |
|
565 | |||
556 |
|
566 | |||
557 | Test clone with special '@' bookmark: |
|
567 | Test clone with special '@' bookmark: | |
558 | $ cd a |
|
568 | $ cd a | |
559 | $ hg bookmark -r a7949464abda @ # branch point of stable from default |
|
569 | $ hg bookmark -r a7949464abda @ # branch point of stable from default | |
560 | $ hg clone . ../i |
|
570 | $ hg clone . ../i | |
561 | updating to bookmark @ |
|
571 | updating to bookmark @ | |
562 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
572 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
563 | $ hg id -i ../i |
|
573 | $ hg id -i ../i | |
564 | a7949464abda |
|
574 | a7949464abda | |
565 | $ rm -r ../i |
|
575 | $ rm -r ../i | |
566 |
|
576 | |||
567 | $ hg bookmark -f -r stable @ |
|
577 | $ hg bookmark -f -r stable @ | |
568 | $ hg bookmarks |
|
578 | $ hg bookmarks | |
569 | @ 15:0aae7cf88f0d |
|
579 | @ 15:0aae7cf88f0d | |
570 | $ hg clone . ../i |
|
580 | $ hg clone . ../i | |
571 | updating to bookmark @ on branch stable |
|
581 | updating to bookmark @ on branch stable | |
572 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
582 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
573 | $ hg id -i ../i |
|
583 | $ hg id -i ../i | |
574 | 0aae7cf88f0d |
|
584 | 0aae7cf88f0d | |
575 | $ cd "$TESTTMP" |
|
585 | $ cd "$TESTTMP" | |
576 |
|
586 | |||
577 |
|
587 | |||
578 | Testing failures: |
|
588 | Testing failures: | |
579 |
|
589 | |||
580 | $ mkdir fail |
|
590 | $ mkdir fail | |
581 | $ cd fail |
|
591 | $ cd fail | |
582 |
|
592 | |||
583 | No local source |
|
593 | No local source | |
584 |
|
594 | |||
585 | $ hg clone a b |
|
595 | $ hg clone a b | |
586 | abort: repository a not found! |
|
596 | abort: repository a not found! | |
587 | [255] |
|
597 | [255] | |
588 |
|
598 | |||
589 | No remote source |
|
599 | No remote source | |
590 |
|
600 | |||
591 | #if windows |
|
601 | #if windows | |
592 | $ hg clone http://$LOCALIP:3121/a b |
|
602 | $ hg clone http://$LOCALIP:3121/a b | |
593 | abort: error: * (glob) |
|
603 | abort: error: * (glob) | |
594 | [255] |
|
604 | [255] | |
595 | #else |
|
605 | #else | |
596 | $ hg clone http://$LOCALIP:3121/a b |
|
606 | $ hg clone http://$LOCALIP:3121/a b | |
597 | abort: error: *refused* (glob) |
|
607 | abort: error: *refused* (glob) | |
598 | [255] |
|
608 | [255] | |
599 | #endif |
|
609 | #endif | |
600 | $ rm -rf b # work around bug with http clone |
|
610 | $ rm -rf b # work around bug with http clone | |
601 |
|
611 | |||
602 |
|
612 | |||
603 | #if unix-permissions no-root |
|
613 | #if unix-permissions no-root | |
604 |
|
614 | |||
605 | Inaccessible source |
|
615 | Inaccessible source | |
606 |
|
616 | |||
607 | $ mkdir a |
|
617 | $ mkdir a | |
608 | $ chmod 000 a |
|
618 | $ chmod 000 a | |
609 | $ hg clone a b |
|
619 | $ hg clone a b | |
610 | abort: repository a not found! |
|
620 | abort: repository a not found! | |
611 | [255] |
|
621 | [255] | |
612 |
|
622 | |||
613 | Inaccessible destination |
|
623 | Inaccessible destination | |
614 |
|
624 | |||
615 | $ hg init b |
|
625 | $ hg init b | |
616 | $ cd b |
|
626 | $ cd b | |
617 | $ hg clone . ../a |
|
627 | $ hg clone . ../a | |
618 | abort: Permission denied: '../a' |
|
628 | abort: Permission denied: '../a' | |
619 | [255] |
|
629 | [255] | |
620 | $ cd .. |
|
630 | $ cd .. | |
621 | $ chmod 700 a |
|
631 | $ chmod 700 a | |
622 | $ rm -r a b |
|
632 | $ rm -r a b | |
623 |
|
633 | |||
624 | #endif |
|
634 | #endif | |
625 |
|
635 | |||
626 |
|
636 | |||
627 | #if fifo |
|
637 | #if fifo | |
628 |
|
638 | |||
629 | Source of wrong type |
|
639 | Source of wrong type | |
630 |
|
640 | |||
631 | $ mkfifo a |
|
641 | $ mkfifo a | |
632 | $ hg clone a b |
|
642 | $ hg clone a b | |
633 | abort: repository a not found! |
|
643 | abort: repository a not found! | |
634 | [255] |
|
644 | [255] | |
635 | $ rm a |
|
645 | $ rm a | |
636 |
|
646 | |||
637 | #endif |
|
647 | #endif | |
638 |
|
648 | |||
639 | Default destination, same directory |
|
649 | Default destination, same directory | |
640 |
|
650 | |||
641 | $ hg init q |
|
651 | $ hg init q | |
642 | $ hg clone q |
|
652 | $ hg clone q | |
643 | destination directory: q |
|
653 | destination directory: q | |
644 | abort: destination 'q' is not empty |
|
654 | abort: destination 'q' is not empty | |
645 | [255] |
|
655 | [255] | |
646 |
|
656 | |||
647 | destination directory not empty |
|
657 | destination directory not empty | |
648 |
|
658 | |||
649 | $ mkdir a |
|
659 | $ mkdir a | |
650 | $ echo stuff > a/a |
|
660 | $ echo stuff > a/a | |
651 | $ hg clone q a |
|
661 | $ hg clone q a | |
652 | abort: destination 'a' is not empty |
|
662 | abort: destination 'a' is not empty | |
653 | [255] |
|
663 | [255] | |
654 |
|
664 | |||
655 |
|
665 | |||
656 | #if unix-permissions no-root |
|
666 | #if unix-permissions no-root | |
657 |
|
667 | |||
658 | leave existing directory in place after clone failure |
|
668 | leave existing directory in place after clone failure | |
659 |
|
669 | |||
660 | $ hg init c |
|
670 | $ hg init c | |
661 | $ cd c |
|
671 | $ cd c | |
662 | $ echo c > c |
|
672 | $ echo c > c | |
663 | $ hg commit -A -m test |
|
673 | $ hg commit -A -m test | |
664 | adding c |
|
674 | adding c | |
665 | $ chmod -rx .hg/store/data |
|
675 | $ chmod -rx .hg/store/data | |
666 | $ cd .. |
|
676 | $ cd .. | |
667 | $ mkdir d |
|
677 | $ mkdir d | |
668 | $ hg clone c d 2> err |
|
678 | $ hg clone c d 2> err | |
669 | [255] |
|
679 | [255] | |
670 | $ test -d d |
|
680 | $ test -d d | |
671 | $ test -d d/.hg |
|
681 | $ test -d d/.hg | |
672 | [1] |
|
682 | [1] | |
673 |
|
683 | |||
674 | re-enable perm to allow deletion |
|
684 | re-enable perm to allow deletion | |
675 |
|
685 | |||
676 | $ chmod +rx c/.hg/store/data |
|
686 | $ chmod +rx c/.hg/store/data | |
677 |
|
687 | |||
678 | #endif |
|
688 | #endif | |
679 |
|
689 | |||
680 | $ cd .. |
|
690 | $ cd .. | |
681 |
|
691 | |||
682 | Test clone from the repository in (emulated) revlog format 0 (issue4203): |
|
692 | Test clone from the repository in (emulated) revlog format 0 (issue4203): | |
683 |
|
693 | |||
684 | $ mkdir issue4203 |
|
694 | $ mkdir issue4203 | |
685 | $ mkdir -p src/.hg |
|
695 | $ mkdir -p src/.hg | |
686 | $ echo foo > src/foo |
|
696 | $ echo foo > src/foo | |
687 | $ hg -R src add src/foo |
|
697 | $ hg -R src add src/foo | |
688 | $ hg -R src commit -m '#0' |
|
698 | $ hg -R src commit -m '#0' | |
689 | $ hg -R src log -q |
|
699 | $ hg -R src log -q | |
690 | 0:e1bab28bca43 |
|
700 | 0:e1bab28bca43 | |
691 | $ hg clone -U -q src dst |
|
701 | $ hg clone -U -q src dst | |
692 | $ hg -R dst log -q |
|
702 | $ hg -R dst log -q | |
693 | 0:e1bab28bca43 |
|
703 | 0:e1bab28bca43 | |
694 |
|
704 | |||
695 | Create repositories to test auto sharing functionality |
|
705 | Create repositories to test auto sharing functionality | |
696 |
|
706 | |||
697 | $ cat >> $HGRCPATH << EOF |
|
707 | $ cat >> $HGRCPATH << EOF | |
698 | > [extensions] |
|
708 | > [extensions] | |
699 | > share= |
|
709 | > share= | |
700 | > EOF |
|
710 | > EOF | |
701 |
|
711 | |||
702 | $ hg init empty |
|
712 | $ hg init empty | |
703 | $ hg init source1a |
|
713 | $ hg init source1a | |
704 | $ cd source1a |
|
714 | $ cd source1a | |
705 | $ echo initial1 > foo |
|
715 | $ echo initial1 > foo | |
706 | $ hg -q commit -A -m initial |
|
716 | $ hg -q commit -A -m initial | |
707 | $ echo second > foo |
|
717 | $ echo second > foo | |
708 | $ hg commit -m second |
|
718 | $ hg commit -m second | |
709 | $ cd .. |
|
719 | $ cd .. | |
710 |
|
720 | |||
711 | $ hg init filteredrev0 |
|
721 | $ hg init filteredrev0 | |
712 | $ cd filteredrev0 |
|
722 | $ cd filteredrev0 | |
713 | $ cat >> .hg/hgrc << EOF |
|
723 | $ cat >> .hg/hgrc << EOF | |
714 | > [experimental] |
|
724 | > [experimental] | |
715 | > evolution.createmarkers=True |
|
725 | > evolution.createmarkers=True | |
716 | > EOF |
|
726 | > EOF | |
717 | $ echo initial1 > foo |
|
727 | $ echo initial1 > foo | |
718 | $ hg -q commit -A -m initial0 |
|
728 | $ hg -q commit -A -m initial0 | |
719 | $ hg -q up -r null |
|
729 | $ hg -q up -r null | |
720 | $ echo initial2 > foo |
|
730 | $ echo initial2 > foo | |
721 | $ hg -q commit -A -m initial1 |
|
731 | $ hg -q commit -A -m initial1 | |
722 | $ hg debugobsolete c05d5c47a5cf81401869999f3d05f7d699d2b29a e082c1832e09a7d1e78b7fd49a592d372de854c8 |
|
732 | $ hg debugobsolete c05d5c47a5cf81401869999f3d05f7d699d2b29a e082c1832e09a7d1e78b7fd49a592d372de854c8 | |
723 | obsoleted 1 changesets |
|
733 | obsoleted 1 changesets | |
724 | $ cd .. |
|
734 | $ cd .. | |
725 |
|
735 | |||
726 | $ hg -q clone --pull source1a source1b |
|
736 | $ hg -q clone --pull source1a source1b | |
727 | $ cd source1a |
|
737 | $ cd source1a | |
728 | $ hg bookmark bookA |
|
738 | $ hg bookmark bookA | |
729 | $ echo 1a > foo |
|
739 | $ echo 1a > foo | |
730 | $ hg commit -m 1a |
|
740 | $ hg commit -m 1a | |
731 | $ cd ../source1b |
|
741 | $ cd ../source1b | |
732 | $ hg -q up -r 0 |
|
742 | $ hg -q up -r 0 | |
733 | $ echo head1 > foo |
|
743 | $ echo head1 > foo | |
734 | $ hg commit -m head1 |
|
744 | $ hg commit -m head1 | |
735 | created new head |
|
745 | created new head | |
736 | $ hg bookmark head1 |
|
746 | $ hg bookmark head1 | |
737 | $ hg -q up -r 0 |
|
747 | $ hg -q up -r 0 | |
738 | $ echo head2 > foo |
|
748 | $ echo head2 > foo | |
739 | $ hg commit -m head2 |
|
749 | $ hg commit -m head2 | |
740 | created new head |
|
750 | created new head | |
741 | $ hg bookmark head2 |
|
751 | $ hg bookmark head2 | |
742 | $ hg -q up -r 0 |
|
752 | $ hg -q up -r 0 | |
743 | $ hg branch branch1 |
|
753 | $ hg branch branch1 | |
744 | marked working directory as branch branch1 |
|
754 | marked working directory as branch branch1 | |
745 | (branches are permanent and global, did you want a bookmark?) |
|
755 | (branches are permanent and global, did you want a bookmark?) | |
746 | $ echo branch1 > foo |
|
756 | $ echo branch1 > foo | |
747 | $ hg commit -m branch1 |
|
757 | $ hg commit -m branch1 | |
748 | $ hg -q up -r 0 |
|
758 | $ hg -q up -r 0 | |
749 | $ hg branch branch2 |
|
759 | $ hg branch branch2 | |
750 | marked working directory as branch branch2 |
|
760 | marked working directory as branch branch2 | |
751 | $ echo branch2 > foo |
|
761 | $ echo branch2 > foo | |
752 | $ hg commit -m branch2 |
|
762 | $ hg commit -m branch2 | |
753 | $ cd .. |
|
763 | $ cd .. | |
754 | $ hg init source2 |
|
764 | $ hg init source2 | |
755 | $ cd source2 |
|
765 | $ cd source2 | |
756 | $ echo initial2 > foo |
|
766 | $ echo initial2 > foo | |
757 | $ hg -q commit -A -m initial2 |
|
767 | $ hg -q commit -A -m initial2 | |
758 | $ echo second > foo |
|
768 | $ echo second > foo | |
759 | $ hg commit -m second |
|
769 | $ hg commit -m second | |
760 | $ cd .. |
|
770 | $ cd .. | |
761 |
|
771 | |||
762 | Clone with auto share from an empty repo should not result in share |
|
772 | Clone with auto share from an empty repo should not result in share | |
763 |
|
773 | |||
764 | $ mkdir share |
|
774 | $ mkdir share | |
765 | $ hg --config share.pool=share clone empty share-empty |
|
775 | $ hg --config share.pool=share clone empty share-empty | |
766 | (not using pooled storage: remote appears to be empty) |
|
776 | (not using pooled storage: remote appears to be empty) | |
767 | updating to branch default |
|
777 | updating to branch default | |
768 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
778 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
769 | $ ls share |
|
779 | $ ls share | |
770 | $ test -d share-empty/.hg/store |
|
780 | $ test -d share-empty/.hg/store | |
771 | $ test -f share-empty/.hg/sharedpath |
|
781 | $ test -f share-empty/.hg/sharedpath | |
772 | [1] |
|
782 | [1] | |
773 |
|
783 | |||
774 | Clone with auto share from a repo with filtered revision 0 should not result in share |
|
784 | Clone with auto share from a repo with filtered revision 0 should not result in share | |
775 |
|
785 | |||
776 | $ hg --config share.pool=share clone filteredrev0 share-filtered |
|
786 | $ hg --config share.pool=share clone filteredrev0 share-filtered | |
777 | (not using pooled storage: unable to resolve identity of remote) |
|
787 | (not using pooled storage: unable to resolve identity of remote) | |
778 | requesting all changes |
|
788 | requesting all changes | |
779 | adding changesets |
|
789 | adding changesets | |
780 | adding manifests |
|
790 | adding manifests | |
781 | adding file changes |
|
791 | adding file changes | |
782 | added 1 changesets with 1 changes to 1 files |
|
792 | added 1 changesets with 1 changes to 1 files | |
783 | new changesets e082c1832e09 |
|
793 | new changesets e082c1832e09 | |
784 | updating to branch default |
|
794 | updating to branch default | |
785 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
795 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
786 |
|
796 | |||
787 | Clone from repo with content should result in shared store being created |
|
797 | Clone from repo with content should result in shared store being created | |
788 |
|
798 | |||
789 | $ hg --config share.pool=share clone source1a share-dest1a |
|
799 | $ hg --config share.pool=share clone source1a share-dest1a | |
790 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
800 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
791 | requesting all changes |
|
801 | requesting all changes | |
792 | adding changesets |
|
802 | adding changesets | |
793 | adding manifests |
|
803 | adding manifests | |
794 | adding file changes |
|
804 | adding file changes | |
795 | added 3 changesets with 3 changes to 1 files |
|
805 | added 3 changesets with 3 changes to 1 files | |
796 | new changesets b5f04eac9d8f:e5bfe23c0b47 |
|
806 | new changesets b5f04eac9d8f:e5bfe23c0b47 | |
797 | searching for changes |
|
807 | searching for changes | |
798 | no changes found |
|
808 | no changes found | |
799 | adding remote bookmark bookA |
|
809 | adding remote bookmark bookA | |
800 | updating working directory |
|
810 | updating working directory | |
801 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
811 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
802 |
|
812 | |||
803 | The shared repo should have been created |
|
813 | The shared repo should have been created | |
804 |
|
814 | |||
805 | $ ls share |
|
815 | $ ls share | |
806 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 |
|
816 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 | |
807 |
|
817 | |||
808 | The destination should point to it |
|
818 | The destination should point to it | |
809 |
|
819 | |||
810 | $ cat share-dest1a/.hg/sharedpath; echo |
|
820 | $ cat share-dest1a/.hg/sharedpath; echo | |
811 | $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg |
|
821 | $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg | |
812 |
|
822 | |||
813 | The destination should have bookmarks |
|
823 | The destination should have bookmarks | |
814 |
|
824 | |||
815 | $ hg -R share-dest1a bookmarks |
|
825 | $ hg -R share-dest1a bookmarks | |
816 | bookA 2:e5bfe23c0b47 |
|
826 | bookA 2:e5bfe23c0b47 | |
817 |
|
827 | |||
818 | The default path should be the remote, not the share |
|
828 | The default path should be the remote, not the share | |
819 |
|
829 | |||
820 | $ hg -R share-dest1a config paths.default |
|
830 | $ hg -R share-dest1a config paths.default | |
821 | $TESTTMP/source1a |
|
831 | $TESTTMP/source1a | |
822 |
|
832 | |||
823 | Clone with existing share dir should result in pull + share |
|
833 | Clone with existing share dir should result in pull + share | |
824 |
|
834 | |||
825 | $ hg --config share.pool=share clone source1b share-dest1b |
|
835 | $ hg --config share.pool=share clone source1b share-dest1b | |
826 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
836 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
827 | searching for changes |
|
837 | searching for changes | |
828 | adding changesets |
|
838 | adding changesets | |
829 | adding manifests |
|
839 | adding manifests | |
830 | adding file changes |
|
840 | adding file changes | |
831 | added 4 changesets with 4 changes to 1 files (+4 heads) |
|
841 | added 4 changesets with 4 changes to 1 files (+4 heads) | |
832 | adding remote bookmark head1 |
|
842 | adding remote bookmark head1 | |
833 | adding remote bookmark head2 |
|
843 | adding remote bookmark head2 | |
834 | new changesets 4a8dc1ab4c13:6bacf4683960 |
|
844 | new changesets 4a8dc1ab4c13:6bacf4683960 | |
835 | updating working directory |
|
845 | updating working directory | |
836 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
846 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
837 |
|
847 | |||
838 | $ ls share |
|
848 | $ ls share | |
839 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 |
|
849 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 | |
840 |
|
850 | |||
841 | $ cat share-dest1b/.hg/sharedpath; echo |
|
851 | $ cat share-dest1b/.hg/sharedpath; echo | |
842 | $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg |
|
852 | $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg | |
843 |
|
853 | |||
844 | We only get bookmarks from the remote, not everything in the share |
|
854 | We only get bookmarks from the remote, not everything in the share | |
845 |
|
855 | |||
846 | $ hg -R share-dest1b bookmarks |
|
856 | $ hg -R share-dest1b bookmarks | |
847 | head1 3:4a8dc1ab4c13 |
|
857 | head1 3:4a8dc1ab4c13 | |
848 | head2 4:99f71071f117 |
|
858 | head2 4:99f71071f117 | |
849 |
|
859 | |||
850 | Default path should be source, not share. |
|
860 | Default path should be source, not share. | |
851 |
|
861 | |||
852 | $ hg -R share-dest1b config paths.default |
|
862 | $ hg -R share-dest1b config paths.default | |
853 | $TESTTMP/source1b |
|
863 | $TESTTMP/source1b | |
854 |
|
864 | |||
855 | Checked out revision should be head of default branch |
|
865 | Checked out revision should be head of default branch | |
856 |
|
866 | |||
857 | $ hg -R share-dest1b log -r . |
|
867 | $ hg -R share-dest1b log -r . | |
858 | changeset: 4:99f71071f117 |
|
868 | changeset: 4:99f71071f117 | |
859 | bookmark: head2 |
|
869 | bookmark: head2 | |
860 | parent: 0:b5f04eac9d8f |
|
870 | parent: 0:b5f04eac9d8f | |
861 | user: test |
|
871 | user: test | |
862 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
872 | date: Thu Jan 01 00:00:00 1970 +0000 | |
863 | summary: head2 |
|
873 | summary: head2 | |
864 |
|
874 | |||
865 |
|
875 | |||
866 | Clone from unrelated repo should result in new share |
|
876 | Clone from unrelated repo should result in new share | |
867 |
|
877 | |||
868 | $ hg --config share.pool=share clone source2 share-dest2 |
|
878 | $ hg --config share.pool=share clone source2 share-dest2 | |
869 | (sharing from new pooled repository 22aeff664783fd44c6d9b435618173c118c3448e) |
|
879 | (sharing from new pooled repository 22aeff664783fd44c6d9b435618173c118c3448e) | |
870 | requesting all changes |
|
880 | requesting all changes | |
871 | adding changesets |
|
881 | adding changesets | |
872 | adding manifests |
|
882 | adding manifests | |
873 | adding file changes |
|
883 | adding file changes | |
874 | added 2 changesets with 2 changes to 1 files |
|
884 | added 2 changesets with 2 changes to 1 files | |
875 | new changesets 22aeff664783:63cf6c3dba4a |
|
885 | new changesets 22aeff664783:63cf6c3dba4a | |
876 | searching for changes |
|
886 | searching for changes | |
877 | no changes found |
|
887 | no changes found | |
878 | updating working directory |
|
888 | updating working directory | |
879 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
889 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
880 |
|
890 | |||
881 | $ ls share |
|
891 | $ ls share | |
882 | 22aeff664783fd44c6d9b435618173c118c3448e |
|
892 | 22aeff664783fd44c6d9b435618173c118c3448e | |
883 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 |
|
893 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 | |
884 |
|
894 | |||
885 | remote naming mode works as advertised |
|
895 | remote naming mode works as advertised | |
886 |
|
896 | |||
887 | $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1a share-remote1a |
|
897 | $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1a share-remote1a | |
888 | (sharing from new pooled repository 195bb1fcdb595c14a6c13e0269129ed78f6debde) |
|
898 | (sharing from new pooled repository 195bb1fcdb595c14a6c13e0269129ed78f6debde) | |
889 | requesting all changes |
|
899 | requesting all changes | |
890 | adding changesets |
|
900 | adding changesets | |
891 | adding manifests |
|
901 | adding manifests | |
892 | adding file changes |
|
902 | adding file changes | |
893 | added 3 changesets with 3 changes to 1 files |
|
903 | added 3 changesets with 3 changes to 1 files | |
894 | new changesets b5f04eac9d8f:e5bfe23c0b47 |
|
904 | new changesets b5f04eac9d8f:e5bfe23c0b47 | |
895 | searching for changes |
|
905 | searching for changes | |
896 | no changes found |
|
906 | no changes found | |
897 | adding remote bookmark bookA |
|
907 | adding remote bookmark bookA | |
898 | updating working directory |
|
908 | updating working directory | |
899 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
909 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
900 |
|
910 | |||
901 | $ ls shareremote |
|
911 | $ ls shareremote | |
902 | 195bb1fcdb595c14a6c13e0269129ed78f6debde |
|
912 | 195bb1fcdb595c14a6c13e0269129ed78f6debde | |
903 |
|
913 | |||
904 | $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1b share-remote1b |
|
914 | $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1b share-remote1b | |
905 | (sharing from new pooled repository c0d4f83847ca2a873741feb7048a45085fd47c46) |
|
915 | (sharing from new pooled repository c0d4f83847ca2a873741feb7048a45085fd47c46) | |
906 | requesting all changes |
|
916 | requesting all changes | |
907 | adding changesets |
|
917 | adding changesets | |
908 | adding manifests |
|
918 | adding manifests | |
909 | adding file changes |
|
919 | adding file changes | |
910 | added 6 changesets with 6 changes to 1 files (+4 heads) |
|
920 | added 6 changesets with 6 changes to 1 files (+4 heads) | |
911 | new changesets b5f04eac9d8f:6bacf4683960 |
|
921 | new changesets b5f04eac9d8f:6bacf4683960 | |
912 | searching for changes |
|
922 | searching for changes | |
913 | no changes found |
|
923 | no changes found | |
914 | adding remote bookmark head1 |
|
924 | adding remote bookmark head1 | |
915 | adding remote bookmark head2 |
|
925 | adding remote bookmark head2 | |
916 | updating working directory |
|
926 | updating working directory | |
917 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
927 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
918 |
|
928 | |||
919 | $ ls shareremote |
|
929 | $ ls shareremote | |
920 | 195bb1fcdb595c14a6c13e0269129ed78f6debde |
|
930 | 195bb1fcdb595c14a6c13e0269129ed78f6debde | |
921 | c0d4f83847ca2a873741feb7048a45085fd47c46 |
|
931 | c0d4f83847ca2a873741feb7048a45085fd47c46 | |
922 |
|
932 | |||
923 | request to clone a single revision is respected in sharing mode |
|
933 | request to clone a single revision is respected in sharing mode | |
924 |
|
934 | |||
925 | $ hg --config share.pool=sharerevs clone -r 4a8dc1ab4c13 source1b share-1arev |
|
935 | $ hg --config share.pool=sharerevs clone -r 4a8dc1ab4c13 source1b share-1arev | |
926 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
936 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
927 | adding changesets |
|
937 | adding changesets | |
928 | adding manifests |
|
938 | adding manifests | |
929 | adding file changes |
|
939 | adding file changes | |
930 | added 2 changesets with 2 changes to 1 files |
|
940 | added 2 changesets with 2 changes to 1 files | |
931 | new changesets b5f04eac9d8f:4a8dc1ab4c13 |
|
941 | new changesets b5f04eac9d8f:4a8dc1ab4c13 | |
932 | no changes found |
|
942 | no changes found | |
933 | adding remote bookmark head1 |
|
943 | adding remote bookmark head1 | |
934 | updating working directory |
|
944 | updating working directory | |
935 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
945 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
936 |
|
946 | |||
937 | $ hg -R share-1arev log -G |
|
947 | $ hg -R share-1arev log -G | |
938 | @ changeset: 1:4a8dc1ab4c13 |
|
948 | @ changeset: 1:4a8dc1ab4c13 | |
939 | | bookmark: head1 |
|
949 | | bookmark: head1 | |
940 | | tag: tip |
|
950 | | tag: tip | |
941 | | user: test |
|
951 | | user: test | |
942 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
952 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
943 | | summary: head1 |
|
953 | | summary: head1 | |
944 | | |
|
954 | | | |
945 | o changeset: 0:b5f04eac9d8f |
|
955 | o changeset: 0:b5f04eac9d8f | |
946 | user: test |
|
956 | user: test | |
947 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
957 | date: Thu Jan 01 00:00:00 1970 +0000 | |
948 | summary: initial |
|
958 | summary: initial | |
949 |
|
959 | |||
950 |
|
960 | |||
951 | making another clone should only pull down requested rev |
|
961 | making another clone should only pull down requested rev | |
952 |
|
962 | |||
953 | $ hg --config share.pool=sharerevs clone -r 99f71071f117 source1b share-1brev |
|
963 | $ hg --config share.pool=sharerevs clone -r 99f71071f117 source1b share-1brev | |
954 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
964 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
955 | searching for changes |
|
965 | searching for changes | |
956 | adding changesets |
|
966 | adding changesets | |
957 | adding manifests |
|
967 | adding manifests | |
958 | adding file changes |
|
968 | adding file changes | |
959 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
969 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
960 | adding remote bookmark head1 |
|
970 | adding remote bookmark head1 | |
961 | adding remote bookmark head2 |
|
971 | adding remote bookmark head2 | |
962 | new changesets 99f71071f117 |
|
972 | new changesets 99f71071f117 | |
963 | updating working directory |
|
973 | updating working directory | |
964 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
974 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
965 |
|
975 | |||
966 | $ hg -R share-1brev log -G |
|
976 | $ hg -R share-1brev log -G | |
967 | @ changeset: 2:99f71071f117 |
|
977 | @ changeset: 2:99f71071f117 | |
968 | | bookmark: head2 |
|
978 | | bookmark: head2 | |
969 | | tag: tip |
|
979 | | tag: tip | |
970 | | parent: 0:b5f04eac9d8f |
|
980 | | parent: 0:b5f04eac9d8f | |
971 | | user: test |
|
981 | | user: test | |
972 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
982 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
973 | | summary: head2 |
|
983 | | summary: head2 | |
974 | | |
|
984 | | | |
975 | | o changeset: 1:4a8dc1ab4c13 |
|
985 | | o changeset: 1:4a8dc1ab4c13 | |
976 | |/ bookmark: head1 |
|
986 | |/ bookmark: head1 | |
977 | | user: test |
|
987 | | user: test | |
978 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
988 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
979 | | summary: head1 |
|
989 | | summary: head1 | |
980 | | |
|
990 | | | |
981 | o changeset: 0:b5f04eac9d8f |
|
991 | o changeset: 0:b5f04eac9d8f | |
982 | user: test |
|
992 | user: test | |
983 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
993 | date: Thu Jan 01 00:00:00 1970 +0000 | |
984 | summary: initial |
|
994 | summary: initial | |
985 |
|
995 | |||
986 |
|
996 | |||
987 | Request to clone a single branch is respected in sharing mode |
|
997 | Request to clone a single branch is respected in sharing mode | |
988 |
|
998 | |||
989 | $ hg --config share.pool=sharebranch clone -b branch1 source1b share-1bbranch1 |
|
999 | $ hg --config share.pool=sharebranch clone -b branch1 source1b share-1bbranch1 | |
990 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
1000 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
991 | adding changesets |
|
1001 | adding changesets | |
992 | adding manifests |
|
1002 | adding manifests | |
993 | adding file changes |
|
1003 | adding file changes | |
994 | added 2 changesets with 2 changes to 1 files |
|
1004 | added 2 changesets with 2 changes to 1 files | |
995 | new changesets b5f04eac9d8f:5f92a6c1a1b1 |
|
1005 | new changesets b5f04eac9d8f:5f92a6c1a1b1 | |
996 | no changes found |
|
1006 | no changes found | |
997 | updating working directory |
|
1007 | updating working directory | |
998 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1008 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
999 |
|
1009 | |||
1000 | $ hg -R share-1bbranch1 log -G |
|
1010 | $ hg -R share-1bbranch1 log -G | |
1001 | o changeset: 1:5f92a6c1a1b1 |
|
1011 | o changeset: 1:5f92a6c1a1b1 | |
1002 | | branch: branch1 |
|
1012 | | branch: branch1 | |
1003 | | tag: tip |
|
1013 | | tag: tip | |
1004 | | user: test |
|
1014 | | user: test | |
1005 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1015 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1006 | | summary: branch1 |
|
1016 | | summary: branch1 | |
1007 | | |
|
1017 | | | |
1008 | @ changeset: 0:b5f04eac9d8f |
|
1018 | @ changeset: 0:b5f04eac9d8f | |
1009 | user: test |
|
1019 | user: test | |
1010 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1020 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1011 | summary: initial |
|
1021 | summary: initial | |
1012 |
|
1022 | |||
1013 |
|
1023 | |||
1014 | $ hg --config share.pool=sharebranch clone -b branch2 source1b share-1bbranch2 |
|
1024 | $ hg --config share.pool=sharebranch clone -b branch2 source1b share-1bbranch2 | |
1015 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
1025 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
1016 | searching for changes |
|
1026 | searching for changes | |
1017 | adding changesets |
|
1027 | adding changesets | |
1018 | adding manifests |
|
1028 | adding manifests | |
1019 | adding file changes |
|
1029 | adding file changes | |
1020 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
1030 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
1021 | new changesets 6bacf4683960 |
|
1031 | new changesets 6bacf4683960 | |
1022 | updating working directory |
|
1032 | updating working directory | |
1023 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1033 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1024 |
|
1034 | |||
1025 | $ hg -R share-1bbranch2 log -G |
|
1035 | $ hg -R share-1bbranch2 log -G | |
1026 | o changeset: 2:6bacf4683960 |
|
1036 | o changeset: 2:6bacf4683960 | |
1027 | | branch: branch2 |
|
1037 | | branch: branch2 | |
1028 | | tag: tip |
|
1038 | | tag: tip | |
1029 | | parent: 0:b5f04eac9d8f |
|
1039 | | parent: 0:b5f04eac9d8f | |
1030 | | user: test |
|
1040 | | user: test | |
1031 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1041 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1032 | | summary: branch2 |
|
1042 | | summary: branch2 | |
1033 | | |
|
1043 | | | |
1034 | | o changeset: 1:5f92a6c1a1b1 |
|
1044 | | o changeset: 1:5f92a6c1a1b1 | |
1035 | |/ branch: branch1 |
|
1045 | |/ branch: branch1 | |
1036 | | user: test |
|
1046 | | user: test | |
1037 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1047 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1038 | | summary: branch1 |
|
1048 | | summary: branch1 | |
1039 | | |
|
1049 | | | |
1040 | @ changeset: 0:b5f04eac9d8f |
|
1050 | @ changeset: 0:b5f04eac9d8f | |
1041 | user: test |
|
1051 | user: test | |
1042 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1052 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1043 | summary: initial |
|
1053 | summary: initial | |
1044 |
|
1054 | |||
1045 |
|
1055 | |||
1046 | -U is respected in share clone mode |
|
1056 | -U is respected in share clone mode | |
1047 |
|
1057 | |||
1048 | $ hg --config share.pool=share clone -U source1a share-1anowc |
|
1058 | $ hg --config share.pool=share clone -U source1a share-1anowc | |
1049 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
1059 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
1050 | searching for changes |
|
1060 | searching for changes | |
1051 | no changes found |
|
1061 | no changes found | |
1052 | adding remote bookmark bookA |
|
1062 | adding remote bookmark bookA | |
1053 |
|
1063 | |||
1054 | $ ls share-1anowc |
|
1064 | $ ls share-1anowc | |
1055 |
|
1065 | |||
1056 | Test that auto sharing doesn't cause failure of "hg clone local remote" |
|
1066 | Test that auto sharing doesn't cause failure of "hg clone local remote" | |
1057 |
|
1067 | |||
1058 | $ cd $TESTTMP |
|
1068 | $ cd $TESTTMP | |
1059 | $ hg -R a id -r 0 |
|
1069 | $ hg -R a id -r 0 | |
1060 | acb14030fe0a |
|
1070 | acb14030fe0a | |
1061 | $ hg id -R remote -r 0 |
|
1071 | $ hg id -R remote -r 0 | |
1062 | abort: repository remote not found! |
|
1072 | abort: repository remote not found! | |
1063 | [255] |
|
1073 | [255] | |
1064 | $ hg --config share.pool=share -q clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" a ssh://user@dummy/remote |
|
1074 | $ hg --config share.pool=share -q clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" a ssh://user@dummy/remote | |
1065 | $ hg -R remote id -r 0 |
|
1075 | $ hg -R remote id -r 0 | |
1066 | acb14030fe0a |
|
1076 | acb14030fe0a | |
1067 |
|
1077 | |||
1068 | Cloning into pooled storage doesn't race (issue5104) |
|
1078 | Cloning into pooled storage doesn't race (issue5104) | |
1069 |
|
1079 | |||
1070 | $ HGPOSTLOCKDELAY=2.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace1 > race1.log 2>&1 & |
|
1080 | $ HGPOSTLOCKDELAY=2.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace1 > race1.log 2>&1 & | |
1071 | $ HGPRELOCKDELAY=1.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace2 > race2.log 2>&1 |
|
1081 | $ HGPRELOCKDELAY=1.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace2 > race2.log 2>&1 | |
1072 | $ wait |
|
1082 | $ wait | |
1073 |
|
1083 | |||
1074 | $ hg -R share-destrace1 log -r tip |
|
1084 | $ hg -R share-destrace1 log -r tip | |
1075 | changeset: 2:e5bfe23c0b47 |
|
1085 | changeset: 2:e5bfe23c0b47 | |
1076 | bookmark: bookA |
|
1086 | bookmark: bookA | |
1077 | tag: tip |
|
1087 | tag: tip | |
1078 | user: test |
|
1088 | user: test | |
1079 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1089 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1080 | summary: 1a |
|
1090 | summary: 1a | |
1081 |
|
1091 | |||
1082 |
|
1092 | |||
1083 | $ hg -R share-destrace2 log -r tip |
|
1093 | $ hg -R share-destrace2 log -r tip | |
1084 | changeset: 2:e5bfe23c0b47 |
|
1094 | changeset: 2:e5bfe23c0b47 | |
1085 | bookmark: bookA |
|
1095 | bookmark: bookA | |
1086 | tag: tip |
|
1096 | tag: tip | |
1087 | user: test |
|
1097 | user: test | |
1088 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1098 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1089 | summary: 1a |
|
1099 | summary: 1a | |
1090 |
|
1100 | |||
1091 | One repo should be new, the other should be shared from the pool. We |
|
1101 | One repo should be new, the other should be shared from the pool. We | |
1092 | don't care which is which, so we just make sure we always print the |
|
1102 | don't care which is which, so we just make sure we always print the | |
1093 | one containing "new pooled" first, then one one containing "existing |
|
1103 | one containing "new pooled" first, then one one containing "existing | |
1094 | pooled". |
|
1104 | pooled". | |
1095 |
|
1105 | |||
1096 | $ (grep 'new pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock |
|
1106 | $ (grep 'new pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock | |
1097 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
1107 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
1098 | requesting all changes |
|
1108 | requesting all changes | |
1099 | adding changesets |
|
1109 | adding changesets | |
1100 | adding manifests |
|
1110 | adding manifests | |
1101 | adding file changes |
|
1111 | adding file changes | |
1102 | added 3 changesets with 3 changes to 1 files |
|
1112 | added 3 changesets with 3 changes to 1 files | |
1103 | new changesets b5f04eac9d8f:e5bfe23c0b47 |
|
1113 | new changesets b5f04eac9d8f:e5bfe23c0b47 | |
1104 | searching for changes |
|
1114 | searching for changes | |
1105 | no changes found |
|
1115 | no changes found | |
1106 | adding remote bookmark bookA |
|
1116 | adding remote bookmark bookA | |
1107 | updating working directory |
|
1117 | updating working directory | |
1108 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1118 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1109 |
|
1119 | |||
1110 | $ (grep 'existing pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock |
|
1120 | $ (grep 'existing pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock | |
1111 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
1121 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
1112 | searching for changes |
|
1122 | searching for changes | |
1113 | no changes found |
|
1123 | no changes found | |
1114 | adding remote bookmark bookA |
|
1124 | adding remote bookmark bookA | |
1115 | updating working directory |
|
1125 | updating working directory | |
1116 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1126 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1117 |
|
1127 | |||
1118 | SEC: check for unsafe ssh url |
|
1128 | SEC: check for unsafe ssh url | |
1119 |
|
1129 | |||
1120 | $ cat >> $HGRCPATH << EOF |
|
1130 | $ cat >> $HGRCPATH << EOF | |
1121 | > [ui] |
|
1131 | > [ui] | |
1122 | > ssh = sh -c "read l; read l; read l" |
|
1132 | > ssh = sh -c "read l; read l; read l" | |
1123 | > EOF |
|
1133 | > EOF | |
1124 |
|
1134 | |||
1125 | $ hg clone 'ssh://-oProxyCommand=touch${IFS}owned/path' |
|
1135 | $ hg clone 'ssh://-oProxyCommand=touch${IFS}owned/path' | |
1126 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' |
|
1136 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' | |
1127 | [255] |
|
1137 | [255] | |
1128 | $ hg clone 'ssh://%2DoProxyCommand=touch${IFS}owned/path' |
|
1138 | $ hg clone 'ssh://%2DoProxyCommand=touch${IFS}owned/path' | |
1129 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' |
|
1139 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' | |
1130 | [255] |
|
1140 | [255] | |
1131 | $ hg clone 'ssh://fakehost|touch%20owned/path' |
|
1141 | $ hg clone 'ssh://fakehost|touch%20owned/path' | |
1132 | abort: no suitable response from remote hg! |
|
1142 | abort: no suitable response from remote hg! | |
1133 | [255] |
|
1143 | [255] | |
1134 | $ hg clone 'ssh://fakehost%7Ctouch%20owned/path' |
|
1144 | $ hg clone 'ssh://fakehost%7Ctouch%20owned/path' | |
1135 | abort: no suitable response from remote hg! |
|
1145 | abort: no suitable response from remote hg! | |
1136 | [255] |
|
1146 | [255] | |
1137 |
|
1147 | |||
1138 | $ hg clone 'ssh://-oProxyCommand=touch owned%20foo@example.com/nonexistent/path' |
|
1148 | $ hg clone 'ssh://-oProxyCommand=touch owned%20foo@example.com/nonexistent/path' | |
1139 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch owned foo@example.com/nonexistent/path' |
|
1149 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch owned foo@example.com/nonexistent/path' | |
1140 | [255] |
|
1150 | [255] | |
1141 |
|
1151 | |||
1142 | #if windows |
|
1152 | #if windows | |
1143 | $ hg clone "ssh://%26touch%20owned%20/" --debug |
|
1153 | $ hg clone "ssh://%26touch%20owned%20/" --debug | |
1144 | running sh -c "read l; read l; read l" "&touch owned " "hg -R . serve --stdio" |
|
1154 | running sh -c "read l; read l; read l" "&touch owned " "hg -R . serve --stdio" | |
|
1155 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) | |||
1145 | sending hello command |
|
1156 | sending hello command | |
1146 | sending between command |
|
1157 | sending between command | |
1147 | abort: no suitable response from remote hg! |
|
1158 | abort: no suitable response from remote hg! | |
1148 | [255] |
|
1159 | [255] | |
1149 | $ hg clone "ssh://example.com:%26touch%20owned%20/" --debug |
|
1160 | $ hg clone "ssh://example.com:%26touch%20owned%20/" --debug | |
1150 | running sh -c "read l; read l; read l" -p "&touch owned " example.com "hg -R . serve --stdio" |
|
1161 | running sh -c "read l; read l; read l" -p "&touch owned " example.com "hg -R . serve --stdio" | |
|
1162 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) | |||
1151 | sending hello command |
|
1163 | sending hello command | |
1152 | sending between command |
|
1164 | sending between command | |
1153 | abort: no suitable response from remote hg! |
|
1165 | abort: no suitable response from remote hg! | |
1154 | [255] |
|
1166 | [255] | |
1155 | #else |
|
1167 | #else | |
1156 | $ hg clone "ssh://%3btouch%20owned%20/" --debug |
|
1168 | $ hg clone "ssh://%3btouch%20owned%20/" --debug | |
1157 | running sh -c "read l; read l; read l" ';touch owned ' 'hg -R . serve --stdio' |
|
1169 | running sh -c "read l; read l; read l" ';touch owned ' 'hg -R . serve --stdio' | |
|
1170 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) | |||
1158 | sending hello command |
|
1171 | sending hello command | |
1159 | sending between command |
|
1172 | sending between command | |
1160 | abort: no suitable response from remote hg! |
|
1173 | abort: no suitable response from remote hg! | |
1161 | [255] |
|
1174 | [255] | |
1162 | $ hg clone "ssh://example.com:%3btouch%20owned%20/" --debug |
|
1175 | $ hg clone "ssh://example.com:%3btouch%20owned%20/" --debug | |
1163 | running sh -c "read l; read l; read l" -p ';touch owned ' example.com 'hg -R . serve --stdio' |
|
1176 | running sh -c "read l; read l; read l" -p ';touch owned ' example.com 'hg -R . serve --stdio' | |
|
1177 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) | |||
1164 | sending hello command |
|
1178 | sending hello command | |
1165 | sending between command |
|
1179 | sending between command | |
1166 | abort: no suitable response from remote hg! |
|
1180 | abort: no suitable response from remote hg! | |
1167 | [255] |
|
1181 | [255] | |
1168 | #endif |
|
1182 | #endif | |
1169 |
|
1183 | |||
1170 | $ hg clone "ssh://v-alid.example.com/" --debug |
|
1184 | $ hg clone "ssh://v-alid.example.com/" --debug | |
1171 | running sh -c "read l; read l; read l" v-alid\.example\.com ['"]hg -R \. serve --stdio['"] (re) |
|
1185 | running sh -c "read l; read l; read l" v-alid\.example\.com ['"]hg -R \. serve --stdio['"] (re) | |
|
1186 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) | |||
1172 | sending hello command |
|
1187 | sending hello command | |
1173 | sending between command |
|
1188 | sending between command | |
1174 | abort: no suitable response from remote hg! |
|
1189 | abort: no suitable response from remote hg! | |
1175 | [255] |
|
1190 | [255] | |
1176 |
|
1191 | |||
1177 | We should not have created a file named owned - if it exists, the |
|
1192 | We should not have created a file named owned - if it exists, the | |
1178 | attack succeeded. |
|
1193 | attack succeeded. | |
1179 | $ if test -f owned; then echo 'you got owned'; fi |
|
1194 | $ if test -f owned; then echo 'you got owned'; fi | |
1180 |
|
1195 | |||
1181 | Cloning without fsmonitor enabled does not print a warning for small repos |
|
1196 | Cloning without fsmonitor enabled does not print a warning for small repos | |
1182 |
|
1197 | |||
1183 | $ hg clone a fsmonitor-default |
|
1198 | $ hg clone a fsmonitor-default | |
1184 | updating to bookmark @ on branch stable |
|
1199 | updating to bookmark @ on branch stable | |
1185 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1200 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1186 |
|
1201 | |||
1187 | Lower the warning threshold to simulate a large repo |
|
1202 | Lower the warning threshold to simulate a large repo | |
1188 |
|
1203 | |||
1189 | $ cat >> $HGRCPATH << EOF |
|
1204 | $ cat >> $HGRCPATH << EOF | |
1190 | > [fsmonitor] |
|
1205 | > [fsmonitor] | |
1191 | > warn_update_file_count = 2 |
|
1206 | > warn_update_file_count = 2 | |
1192 | > EOF |
|
1207 | > EOF | |
1193 |
|
1208 | |||
1194 | We should see a warning about no fsmonitor on supported platforms |
|
1209 | We should see a warning about no fsmonitor on supported platforms | |
1195 |
|
1210 | |||
1196 | #if linuxormacos no-fsmonitor |
|
1211 | #if linuxormacos no-fsmonitor | |
1197 | $ hg clone a nofsmonitor |
|
1212 | $ hg clone a nofsmonitor | |
1198 | updating to bookmark @ on branch stable |
|
1213 | updating to bookmark @ on branch stable | |
1199 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") |
|
1214 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") | |
1200 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1215 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1201 | #else |
|
1216 | #else | |
1202 | $ hg clone a nofsmonitor |
|
1217 | $ hg clone a nofsmonitor | |
1203 | updating to bookmark @ on branch stable |
|
1218 | updating to bookmark @ on branch stable | |
1204 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1219 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1205 | #endif |
|
1220 | #endif | |
1206 |
|
1221 | |||
1207 | We should not see warning about fsmonitor when it is enabled |
|
1222 | We should not see warning about fsmonitor when it is enabled | |
1208 |
|
1223 | |||
1209 | #if fsmonitor |
|
1224 | #if fsmonitor | |
1210 | $ hg clone a fsmonitor-enabled |
|
1225 | $ hg clone a fsmonitor-enabled | |
1211 | updating to bookmark @ on branch stable |
|
1226 | updating to bookmark @ on branch stable | |
1212 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1227 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1213 | #endif |
|
1228 | #endif | |
1214 |
|
1229 | |||
1215 | We can disable the fsmonitor warning |
|
1230 | We can disable the fsmonitor warning | |
1216 |
|
1231 | |||
1217 | $ hg --config fsmonitor.warn_when_unused=false clone a fsmonitor-disable-warning |
|
1232 | $ hg --config fsmonitor.warn_when_unused=false clone a fsmonitor-disable-warning | |
1218 | updating to bookmark @ on branch stable |
|
1233 | updating to bookmark @ on branch stable | |
1219 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1234 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1220 |
|
1235 | |||
1221 | Loaded fsmonitor but disabled in config should still print warning |
|
1236 | Loaded fsmonitor but disabled in config should still print warning | |
1222 |
|
1237 | |||
1223 | #if linuxormacos fsmonitor |
|
1238 | #if linuxormacos fsmonitor | |
1224 | $ hg --config fsmonitor.mode=off clone a fsmonitor-mode-off |
|
1239 | $ hg --config fsmonitor.mode=off clone a fsmonitor-mode-off | |
1225 | updating to bookmark @ on branch stable |
|
1240 | updating to bookmark @ on branch stable | |
1226 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") (fsmonitor !) |
|
1241 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") (fsmonitor !) | |
1227 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1242 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1228 | #endif |
|
1243 | #endif | |
1229 |
|
1244 | |||
1230 | Warning not printed if working directory isn't empty |
|
1245 | Warning not printed if working directory isn't empty | |
1231 |
|
1246 | |||
1232 | $ hg -q clone a fsmonitor-update |
|
1247 | $ hg -q clone a fsmonitor-update | |
1233 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") (?) |
|
1248 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") (?) | |
1234 | $ cd fsmonitor-update |
|
1249 | $ cd fsmonitor-update | |
1235 | $ hg up acb14030fe0a |
|
1250 | $ hg up acb14030fe0a | |
1236 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1251 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1237 | (leaving bookmark @) |
|
1252 | (leaving bookmark @) | |
1238 | $ hg up cf0fe1914066 |
|
1253 | $ hg up cf0fe1914066 | |
1239 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1254 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1240 |
|
1255 | |||
1241 | `hg update` from null revision also prints |
|
1256 | `hg update` from null revision also prints | |
1242 |
|
1257 | |||
1243 | $ hg up null |
|
1258 | $ hg up null | |
1244 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1259 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1245 |
|
1260 | |||
1246 | #if linuxormacos no-fsmonitor |
|
1261 | #if linuxormacos no-fsmonitor | |
1247 | $ hg up cf0fe1914066 |
|
1262 | $ hg up cf0fe1914066 | |
1248 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") |
|
1263 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") | |
1249 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1264 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1250 | #else |
|
1265 | #else | |
1251 | $ hg up cf0fe1914066 |
|
1266 | $ hg up cf0fe1914066 | |
1252 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1267 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1253 | #endif |
|
1268 | #endif | |
1254 |
|
1269 | |||
1255 | $ cd .. |
|
1270 | $ cd .. | |
1256 |
|
1271 |
@@ -1,454 +1,464 b'' | |||||
|
1 | #testcases sshv1 sshv2 | |||
|
2 | ||||
|
3 | #if sshv2 | |||
|
4 | $ cat >> $HGRCPATH << EOF | |||
|
5 | > [experimental] | |||
|
6 | > sshpeer.advertise-v2 = true | |||
|
7 | > sshserver.support-v2 = true | |||
|
8 | > EOF | |||
|
9 | #endif | |||
|
10 | ||||
1 | This file contains testcases that tend to be related to the wire protocol part |
|
11 | This file contains testcases that tend to be related to the wire protocol part | |
2 | of largefiles. |
|
12 | of largefiles. | |
3 |
|
13 | |||
4 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE |
|
14 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE | |
5 | $ mkdir "${USERCACHE}" |
|
15 | $ mkdir "${USERCACHE}" | |
6 | $ cat >> $HGRCPATH <<EOF |
|
16 | $ cat >> $HGRCPATH <<EOF | |
7 | > [extensions] |
|
17 | > [extensions] | |
8 | > largefiles= |
|
18 | > largefiles= | |
9 | > purge= |
|
19 | > purge= | |
10 | > rebase= |
|
20 | > rebase= | |
11 | > transplant= |
|
21 | > transplant= | |
12 | > [phases] |
|
22 | > [phases] | |
13 | > publish=False |
|
23 | > publish=False | |
14 | > [largefiles] |
|
24 | > [largefiles] | |
15 | > minsize=2 |
|
25 | > minsize=2 | |
16 | > patterns=glob:**.dat |
|
26 | > patterns=glob:**.dat | |
17 | > usercache=${USERCACHE} |
|
27 | > usercache=${USERCACHE} | |
18 | > [web] |
|
28 | > [web] | |
19 | > allow_archive = zip |
|
29 | > allow_archive = zip | |
20 | > [hooks] |
|
30 | > [hooks] | |
21 | > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" |
|
31 | > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" | |
22 | > EOF |
|
32 | > EOF | |
23 |
|
33 | |||
24 |
|
34 | |||
25 | #if serve |
|
35 | #if serve | |
26 | vanilla clients not locked out from largefiles servers on vanilla repos |
|
36 | vanilla clients not locked out from largefiles servers on vanilla repos | |
27 | $ mkdir r1 |
|
37 | $ mkdir r1 | |
28 | $ cd r1 |
|
38 | $ cd r1 | |
29 | $ hg init |
|
39 | $ hg init | |
30 | $ echo c1 > f1 |
|
40 | $ echo c1 > f1 | |
31 | $ hg add f1 |
|
41 | $ hg add f1 | |
32 | $ hg commit -m "m1" |
|
42 | $ hg commit -m "m1" | |
33 | Invoking status precommit hook |
|
43 | Invoking status precommit hook | |
34 | A f1 |
|
44 | A f1 | |
35 | $ cd .. |
|
45 | $ cd .. | |
36 | $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid |
|
46 | $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid | |
37 | $ cat hg.pid >> $DAEMON_PIDS |
|
47 | $ cat hg.pid >> $DAEMON_PIDS | |
38 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2 |
|
48 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2 | |
39 | requesting all changes |
|
49 | requesting all changes | |
40 | adding changesets |
|
50 | adding changesets | |
41 | adding manifests |
|
51 | adding manifests | |
42 | adding file changes |
|
52 | adding file changes | |
43 | added 1 changesets with 1 changes to 1 files |
|
53 | added 1 changesets with 1 changes to 1 files | |
44 | new changesets b6eb3a2e2efe |
|
54 | new changesets b6eb3a2e2efe | |
45 | updating to branch default |
|
55 | updating to branch default | |
46 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
56 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
47 |
|
57 | |||
48 | largefiles clients still work with vanilla servers |
|
58 | largefiles clients still work with vanilla servers | |
49 | $ hg serve --config extensions.largefiles=! -R r1 -d -p $HGPORT1 --pid-file hg.pid |
|
59 | $ hg serve --config extensions.largefiles=! -R r1 -d -p $HGPORT1 --pid-file hg.pid | |
50 | $ cat hg.pid >> $DAEMON_PIDS |
|
60 | $ cat hg.pid >> $DAEMON_PIDS | |
51 | $ hg clone http://localhost:$HGPORT1 r3 |
|
61 | $ hg clone http://localhost:$HGPORT1 r3 | |
52 | requesting all changes |
|
62 | requesting all changes | |
53 | adding changesets |
|
63 | adding changesets | |
54 | adding manifests |
|
64 | adding manifests | |
55 | adding file changes |
|
65 | adding file changes | |
56 | added 1 changesets with 1 changes to 1 files |
|
66 | added 1 changesets with 1 changes to 1 files | |
57 | new changesets b6eb3a2e2efe |
|
67 | new changesets b6eb3a2e2efe | |
58 | updating to branch default |
|
68 | updating to branch default | |
59 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
69 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
60 | #endif |
|
70 | #endif | |
61 |
|
71 | |||
62 | vanilla clients locked out from largefiles http repos |
|
72 | vanilla clients locked out from largefiles http repos | |
63 | $ mkdir r4 |
|
73 | $ mkdir r4 | |
64 | $ cd r4 |
|
74 | $ cd r4 | |
65 | $ hg init |
|
75 | $ hg init | |
66 | $ echo c1 > f1 |
|
76 | $ echo c1 > f1 | |
67 | $ hg add --large f1 |
|
77 | $ hg add --large f1 | |
68 | $ hg commit -m "m1" |
|
78 | $ hg commit -m "m1" | |
69 | Invoking status precommit hook |
|
79 | Invoking status precommit hook | |
70 | A f1 |
|
80 | A f1 | |
71 | $ cd .. |
|
81 | $ cd .. | |
72 |
|
82 | |||
73 | largefiles can be pushed locally (issue3583) |
|
83 | largefiles can be pushed locally (issue3583) | |
74 | $ hg init dest |
|
84 | $ hg init dest | |
75 | $ cd r4 |
|
85 | $ cd r4 | |
76 | $ hg outgoing ../dest |
|
86 | $ hg outgoing ../dest | |
77 | comparing with ../dest |
|
87 | comparing with ../dest | |
78 | searching for changes |
|
88 | searching for changes | |
79 | changeset: 0:639881c12b4c |
|
89 | changeset: 0:639881c12b4c | |
80 | tag: tip |
|
90 | tag: tip | |
81 | user: test |
|
91 | user: test | |
82 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
92 | date: Thu Jan 01 00:00:00 1970 +0000 | |
83 | summary: m1 |
|
93 | summary: m1 | |
84 |
|
94 | |||
85 | $ hg push ../dest |
|
95 | $ hg push ../dest | |
86 | pushing to ../dest |
|
96 | pushing to ../dest | |
87 | searching for changes |
|
97 | searching for changes | |
88 | adding changesets |
|
98 | adding changesets | |
89 | adding manifests |
|
99 | adding manifests | |
90 | adding file changes |
|
100 | adding file changes | |
91 | added 1 changesets with 1 changes to 1 files |
|
101 | added 1 changesets with 1 changes to 1 files | |
92 |
|
102 | |||
93 | exit code with nothing outgoing (issue3611) |
|
103 | exit code with nothing outgoing (issue3611) | |
94 | $ hg outgoing ../dest |
|
104 | $ hg outgoing ../dest | |
95 | comparing with ../dest |
|
105 | comparing with ../dest | |
96 | searching for changes |
|
106 | searching for changes | |
97 | no changes found |
|
107 | no changes found | |
98 | [1] |
|
108 | [1] | |
99 | $ cd .. |
|
109 | $ cd .. | |
100 |
|
110 | |||
101 | #if serve |
|
111 | #if serve | |
102 | $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid |
|
112 | $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid | |
103 | $ cat hg.pid >> $DAEMON_PIDS |
|
113 | $ cat hg.pid >> $DAEMON_PIDS | |
104 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5 |
|
114 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5 | |
105 | abort: remote error: |
|
115 | abort: remote error: | |
106 |
|
116 | |||
107 | This repository uses the largefiles extension. |
|
117 | This repository uses the largefiles extension. | |
108 |
|
118 | |||
109 | Please enable it in your Mercurial config file. |
|
119 | Please enable it in your Mercurial config file. | |
110 | [255] |
|
120 | [255] | |
111 |
|
121 | |||
112 | used all HGPORTs, kill all daemons |
|
122 | used all HGPORTs, kill all daemons | |
113 | $ killdaemons.py |
|
123 | $ killdaemons.py | |
114 | #endif |
|
124 | #endif | |
115 |
|
125 | |||
116 | vanilla clients locked out from largefiles ssh repos |
|
126 | vanilla clients locked out from largefiles ssh repos | |
117 | $ hg --config extensions.largefiles=! clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5 |
|
127 | $ hg --config extensions.largefiles=! clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5 | |
118 | remote: |
|
128 | remote: | |
119 | remote: This repository uses the largefiles extension. |
|
129 | remote: This repository uses the largefiles extension. | |
120 | remote: |
|
130 | remote: | |
121 | remote: Please enable it in your Mercurial config file. |
|
131 | remote: Please enable it in your Mercurial config file. | |
122 | remote: |
|
132 | remote: | |
123 | remote: - |
|
133 | remote: - | |
124 | abort: remote error |
|
134 | abort: remote error | |
125 | (check previous remote output) |
|
135 | (check previous remote output) | |
126 | [255] |
|
136 | [255] | |
127 |
|
137 | |||
128 | #if serve |
|
138 | #if serve | |
129 |
|
139 | |||
130 | largefiles clients refuse to push largefiles repos to vanilla servers |
|
140 | largefiles clients refuse to push largefiles repos to vanilla servers | |
131 | $ mkdir r6 |
|
141 | $ mkdir r6 | |
132 | $ cd r6 |
|
142 | $ cd r6 | |
133 | $ hg init |
|
143 | $ hg init | |
134 | $ echo c1 > f1 |
|
144 | $ echo c1 > f1 | |
135 | $ hg add f1 |
|
145 | $ hg add f1 | |
136 | $ hg commit -m "m1" |
|
146 | $ hg commit -m "m1" | |
137 | Invoking status precommit hook |
|
147 | Invoking status precommit hook | |
138 | A f1 |
|
148 | A f1 | |
139 | $ cat >> .hg/hgrc <<! |
|
149 | $ cat >> .hg/hgrc <<! | |
140 | > [web] |
|
150 | > [web] | |
141 | > push_ssl = false |
|
151 | > push_ssl = false | |
142 | > allow_push = * |
|
152 | > allow_push = * | |
143 | > ! |
|
153 | > ! | |
144 | $ cd .. |
|
154 | $ cd .. | |
145 | $ hg clone r6 r7 |
|
155 | $ hg clone r6 r7 | |
146 | updating to branch default |
|
156 | updating to branch default | |
147 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
157 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
148 | $ cd r7 |
|
158 | $ cd r7 | |
149 | $ echo c2 > f2 |
|
159 | $ echo c2 > f2 | |
150 | $ hg add --large f2 |
|
160 | $ hg add --large f2 | |
151 | $ hg commit -m "m2" |
|
161 | $ hg commit -m "m2" | |
152 | Invoking status precommit hook |
|
162 | Invoking status precommit hook | |
153 | A f2 |
|
163 | A f2 | |
154 | $ hg verify --large |
|
164 | $ hg verify --large | |
155 | checking changesets |
|
165 | checking changesets | |
156 | checking manifests |
|
166 | checking manifests | |
157 | crosschecking files in changesets and manifests |
|
167 | crosschecking files in changesets and manifests | |
158 | checking files |
|
168 | checking files | |
159 | 2 files, 2 changesets, 2 total revisions |
|
169 | 2 files, 2 changesets, 2 total revisions | |
160 | searching 1 changesets for largefiles |
|
170 | searching 1 changesets for largefiles | |
161 | verified existence of 1 revisions of 1 largefiles |
|
171 | verified existence of 1 revisions of 1 largefiles | |
162 | $ hg serve --config extensions.largefiles=! -R ../r6 -d -p $HGPORT --pid-file ../hg.pid |
|
172 | $ hg serve --config extensions.largefiles=! -R ../r6 -d -p $HGPORT --pid-file ../hg.pid | |
163 | $ cat ../hg.pid >> $DAEMON_PIDS |
|
173 | $ cat ../hg.pid >> $DAEMON_PIDS | |
164 | $ hg push http://localhost:$HGPORT |
|
174 | $ hg push http://localhost:$HGPORT | |
165 | pushing to http://localhost:$HGPORT/ |
|
175 | pushing to http://localhost:$HGPORT/ | |
166 | searching for changes |
|
176 | searching for changes | |
167 | abort: http://localhost:$HGPORT/ does not appear to be a largefile store |
|
177 | abort: http://localhost:$HGPORT/ does not appear to be a largefile store | |
168 | [255] |
|
178 | [255] | |
169 | $ cd .. |
|
179 | $ cd .. | |
170 |
|
180 | |||
171 | putlfile errors are shown (issue3123) |
|
181 | putlfile errors are shown (issue3123) | |
172 | Corrupt the cached largefile in r7 and move it out of the servers usercache |
|
182 | Corrupt the cached largefile in r7 and move it out of the servers usercache | |
173 | $ mv r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 . |
|
183 | $ mv r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 . | |
174 | $ echo 'client side corruption' > r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
184 | $ echo 'client side corruption' > r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
175 | $ rm "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8" |
|
185 | $ rm "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8" | |
176 | $ hg init empty |
|
186 | $ hg init empty | |
177 | $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \ |
|
187 | $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \ | |
178 | > --config 'web.allow_push=*' --config web.push_ssl=False |
|
188 | > --config 'web.allow_push=*' --config web.push_ssl=False | |
179 | $ cat hg.pid >> $DAEMON_PIDS |
|
189 | $ cat hg.pid >> $DAEMON_PIDS | |
180 | $ hg push -R r7 http://localhost:$HGPORT1 |
|
190 | $ hg push -R r7 http://localhost:$HGPORT1 | |
181 | pushing to http://localhost:$HGPORT1/ |
|
191 | pushing to http://localhost:$HGPORT1/ | |
182 | searching for changes |
|
192 | searching for changes | |
183 | remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash |
|
193 | remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash | |
184 | abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ |
|
194 | abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ | |
185 | [255] |
|
195 | [255] | |
186 | $ mv 4cdac4d8b084d0b599525cf732437fb337d422a8 r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
196 | $ mv 4cdac4d8b084d0b599525cf732437fb337d422a8 r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
187 | Push of file that exists on server but is corrupted - magic healing would be nice ... but too magic |
|
197 | Push of file that exists on server but is corrupted - magic healing would be nice ... but too magic | |
188 | $ echo "server side corruption" > empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
198 | $ echo "server side corruption" > empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
189 | $ hg push -R r7 http://localhost:$HGPORT1 |
|
199 | $ hg push -R r7 http://localhost:$HGPORT1 | |
190 | pushing to http://localhost:$HGPORT1/ |
|
200 | pushing to http://localhost:$HGPORT1/ | |
191 | searching for changes |
|
201 | searching for changes | |
192 | remote: adding changesets |
|
202 | remote: adding changesets | |
193 | remote: adding manifests |
|
203 | remote: adding manifests | |
194 | remote: adding file changes |
|
204 | remote: adding file changes | |
195 | remote: added 2 changesets with 2 changes to 2 files |
|
205 | remote: added 2 changesets with 2 changes to 2 files | |
196 | $ cat empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
206 | $ cat empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
197 | server side corruption |
|
207 | server side corruption | |
198 | $ rm -rf empty |
|
208 | $ rm -rf empty | |
199 |
|
209 | |||
200 | Push a largefiles repository to a served empty repository |
|
210 | Push a largefiles repository to a served empty repository | |
201 | $ hg init r8 |
|
211 | $ hg init r8 | |
202 | $ echo c3 > r8/f1 |
|
212 | $ echo c3 > r8/f1 | |
203 | $ hg add --large r8/f1 -R r8 |
|
213 | $ hg add --large r8/f1 -R r8 | |
204 | $ hg commit -m "m1" -R r8 |
|
214 | $ hg commit -m "m1" -R r8 | |
205 | Invoking status precommit hook |
|
215 | Invoking status precommit hook | |
206 | A f1 |
|
216 | A f1 | |
207 | $ hg init empty |
|
217 | $ hg init empty | |
208 | $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \ |
|
218 | $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \ | |
209 | > --config 'web.allow_push=*' --config web.push_ssl=False |
|
219 | > --config 'web.allow_push=*' --config web.push_ssl=False | |
210 | $ cat hg.pid >> $DAEMON_PIDS |
|
220 | $ cat hg.pid >> $DAEMON_PIDS | |
211 | $ rm "${USERCACHE}"/* |
|
221 | $ rm "${USERCACHE}"/* | |
212 | $ hg push -R r8 http://localhost:$HGPORT2/#default |
|
222 | $ hg push -R r8 http://localhost:$HGPORT2/#default | |
213 | pushing to http://localhost:$HGPORT2/ |
|
223 | pushing to http://localhost:$HGPORT2/ | |
214 | searching for changes |
|
224 | searching for changes | |
215 | remote: adding changesets |
|
225 | remote: adding changesets | |
216 | remote: adding manifests |
|
226 | remote: adding manifests | |
217 | remote: adding file changes |
|
227 | remote: adding file changes | |
218 | remote: added 1 changesets with 1 changes to 1 files |
|
228 | remote: added 1 changesets with 1 changes to 1 files | |
219 | $ [ -f "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] |
|
229 | $ [ -f "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] | |
220 | $ [ -f empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] |
|
230 | $ [ -f empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] | |
221 |
|
231 | |||
222 | Clone over http, no largefiles pulled on clone. |
|
232 | Clone over http, no largefiles pulled on clone. | |
223 |
|
233 | |||
224 | $ hg clone http://localhost:$HGPORT2/#default http-clone -U |
|
234 | $ hg clone http://localhost:$HGPORT2/#default http-clone -U | |
225 | adding changesets |
|
235 | adding changesets | |
226 | adding manifests |
|
236 | adding manifests | |
227 | adding file changes |
|
237 | adding file changes | |
228 | added 1 changesets with 1 changes to 1 files |
|
238 | added 1 changesets with 1 changes to 1 files | |
229 | new changesets cf03e5bb9936 |
|
239 | new changesets cf03e5bb9936 | |
230 |
|
240 | |||
231 | Archive contains largefiles |
|
241 | Archive contains largefiles | |
232 | >>> import os |
|
242 | >>> import os | |
233 | >>> import urllib2 |
|
243 | >>> import urllib2 | |
234 | >>> u = 'http://localhost:%s/archive/default.zip' % os.environ['HGPORT2'] |
|
244 | >>> u = 'http://localhost:%s/archive/default.zip' % os.environ['HGPORT2'] | |
235 | >>> with open('archive.zip', 'w') as f: |
|
245 | >>> with open('archive.zip', 'w') as f: | |
236 | ... f.write(urllib2.urlopen(u).read()) |
|
246 | ... f.write(urllib2.urlopen(u).read()) | |
237 | $ unzip -t archive.zip |
|
247 | $ unzip -t archive.zip | |
238 | Archive: archive.zip |
|
248 | Archive: archive.zip | |
239 | testing: empty-default/.hg_archival.txt*OK (glob) |
|
249 | testing: empty-default/.hg_archival.txt*OK (glob) | |
240 | testing: empty-default/f1*OK (glob) |
|
250 | testing: empty-default/f1*OK (glob) | |
241 | No errors detected in compressed data of archive.zip. |
|
251 | No errors detected in compressed data of archive.zip. | |
242 |
|
252 | |||
243 | test 'verify' with remotestore: |
|
253 | test 'verify' with remotestore: | |
244 |
|
254 | |||
245 | $ rm "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
255 | $ rm "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
246 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . |
|
256 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . | |
247 | $ hg -R http-clone verify --large --lfa |
|
257 | $ hg -R http-clone verify --large --lfa | |
248 | checking changesets |
|
258 | checking changesets | |
249 | checking manifests |
|
259 | checking manifests | |
250 | crosschecking files in changesets and manifests |
|
260 | crosschecking files in changesets and manifests | |
251 | checking files |
|
261 | checking files | |
252 | 1 files, 1 changesets, 1 total revisions |
|
262 | 1 files, 1 changesets, 1 total revisions | |
253 | searching 1 changesets for largefiles |
|
263 | searching 1 changesets for largefiles | |
254 | changeset 0:cf03e5bb9936: f1 missing |
|
264 | changeset 0:cf03e5bb9936: f1 missing | |
255 | verified existence of 1 revisions of 1 largefiles |
|
265 | verified existence of 1 revisions of 1 largefiles | |
256 | [1] |
|
266 | [1] | |
257 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ |
|
267 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ | |
258 | $ hg -R http-clone -q verify --large --lfa |
|
268 | $ hg -R http-clone -q verify --large --lfa | |
259 |
|
269 | |||
260 | largefiles pulled on update - a largefile missing on the server: |
|
270 | largefiles pulled on update - a largefile missing on the server: | |
261 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . |
|
271 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . | |
262 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache |
|
272 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache | |
263 | getting changed largefiles |
|
273 | getting changed largefiles | |
264 | f1: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 not available from http://localhost:$HGPORT2/ |
|
274 | f1: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 not available from http://localhost:$HGPORT2/ | |
265 | 0 largefiles updated, 0 removed |
|
275 | 0 largefiles updated, 0 removed | |
266 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
276 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
267 | $ hg -R http-clone st |
|
277 | $ hg -R http-clone st | |
268 | ! f1 |
|
278 | ! f1 | |
269 | $ hg -R http-clone up -Cqr null |
|
279 | $ hg -R http-clone up -Cqr null | |
270 |
|
280 | |||
271 | largefiles pulled on update - a largefile corrupted on the server: |
|
281 | largefiles pulled on update - a largefile corrupted on the server: | |
272 | $ echo corruption > empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
282 | $ echo corruption > empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
273 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache |
|
283 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache | |
274 | getting changed largefiles |
|
284 | getting changed largefiles | |
275 | f1: data corruption (expected 02a439e5c31c526465ab1a0ca1f431f76b827b90, got 6a7bb2556144babe3899b25e5428123735bb1e27) |
|
285 | f1: data corruption (expected 02a439e5c31c526465ab1a0ca1f431f76b827b90, got 6a7bb2556144babe3899b25e5428123735bb1e27) | |
276 | 0 largefiles updated, 0 removed |
|
286 | 0 largefiles updated, 0 removed | |
277 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
287 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
278 | $ hg -R http-clone st |
|
288 | $ hg -R http-clone st | |
279 | ! f1 |
|
289 | ! f1 | |
280 | $ [ ! -f http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] |
|
290 | $ [ ! -f http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] | |
281 | $ [ ! -f http-clone/f1 ] |
|
291 | $ [ ! -f http-clone/f1 ] | |
282 | $ [ ! -f http-clone-usercache ] |
|
292 | $ [ ! -f http-clone-usercache ] | |
283 | $ hg -R http-clone verify --large --lfc |
|
293 | $ hg -R http-clone verify --large --lfc | |
284 | checking changesets |
|
294 | checking changesets | |
285 | checking manifests |
|
295 | checking manifests | |
286 | crosschecking files in changesets and manifests |
|
296 | crosschecking files in changesets and manifests | |
287 | checking files |
|
297 | checking files | |
288 | 1 files, 1 changesets, 1 total revisions |
|
298 | 1 files, 1 changesets, 1 total revisions | |
289 | searching 1 changesets for largefiles |
|
299 | searching 1 changesets for largefiles | |
290 | verified contents of 1 revisions of 1 largefiles |
|
300 | verified contents of 1 revisions of 1 largefiles | |
291 | $ hg -R http-clone up -Cqr null |
|
301 | $ hg -R http-clone up -Cqr null | |
292 |
|
302 | |||
293 | largefiles pulled on update - no server side problems: |
|
303 | largefiles pulled on update - no server side problems: | |
294 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ |
|
304 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ | |
295 | $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache --config progress.debug=true |
|
305 | $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache --config progress.debug=true | |
296 | resolving manifests |
|
306 | resolving manifests | |
297 | branchmerge: False, force: False, partial: False |
|
307 | branchmerge: False, force: False, partial: False | |
298 | ancestor: 000000000000, local: 000000000000+, remote: cf03e5bb9936 |
|
308 | ancestor: 000000000000, local: 000000000000+, remote: cf03e5bb9936 | |
299 | .hglf/f1: remote created -> g |
|
309 | .hglf/f1: remote created -> g | |
300 | getting .hglf/f1 |
|
310 | getting .hglf/f1 | |
301 | updating: .hglf/f1 1/1 files (100.00%) |
|
311 | updating: .hglf/f1 1/1 files (100.00%) | |
302 | getting changed largefiles |
|
312 | getting changed largefiles | |
303 | using http://localhost:$HGPORT2/ |
|
313 | using http://localhost:$HGPORT2/ | |
304 | sending capabilities command |
|
314 | sending capabilities command | |
305 | sending batch command |
|
315 | sending batch command | |
306 | getting largefiles: 0/1 files (0.00%) |
|
316 | getting largefiles: 0/1 files (0.00%) | |
307 | getting f1:02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
317 | getting f1:02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
308 | sending getlfile command |
|
318 | sending getlfile command | |
309 | found 02a439e5c31c526465ab1a0ca1f431f76b827b90 in store |
|
319 | found 02a439e5c31c526465ab1a0ca1f431f76b827b90 in store | |
310 | 1 largefiles updated, 0 removed |
|
320 | 1 largefiles updated, 0 removed | |
311 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
321 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
312 |
|
322 | |||
313 | $ ls http-clone-usercache/* |
|
323 | $ ls http-clone-usercache/* | |
314 | http-clone-usercache/02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
324 | http-clone-usercache/02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
315 |
|
325 | |||
316 | $ rm -rf empty http-clone* |
|
326 | $ rm -rf empty http-clone* | |
317 |
|
327 | |||
318 | used all HGPORTs, kill all daemons |
|
328 | used all HGPORTs, kill all daemons | |
319 | $ killdaemons.py |
|
329 | $ killdaemons.py | |
320 |
|
330 | |||
321 | largefiles should batch verify remote calls |
|
331 | largefiles should batch verify remote calls | |
322 |
|
332 | |||
323 | $ hg init batchverifymain |
|
333 | $ hg init batchverifymain | |
324 | $ cd batchverifymain |
|
334 | $ cd batchverifymain | |
325 | $ echo "aaa" >> a |
|
335 | $ echo "aaa" >> a | |
326 | $ hg add --large a |
|
336 | $ hg add --large a | |
327 | $ hg commit -m "a" |
|
337 | $ hg commit -m "a" | |
328 | Invoking status precommit hook |
|
338 | Invoking status precommit hook | |
329 | A a |
|
339 | A a | |
330 | $ echo "bbb" >> b |
|
340 | $ echo "bbb" >> b | |
331 | $ hg add --large b |
|
341 | $ hg add --large b | |
332 | $ hg commit -m "b" |
|
342 | $ hg commit -m "b" | |
333 | Invoking status precommit hook |
|
343 | Invoking status precommit hook | |
334 | A b |
|
344 | A b | |
335 | $ cd .. |
|
345 | $ cd .. | |
336 | $ hg serve -R batchverifymain -d -p $HGPORT --pid-file hg.pid \ |
|
346 | $ hg serve -R batchverifymain -d -p $HGPORT --pid-file hg.pid \ | |
337 | > -A access.log |
|
347 | > -A access.log | |
338 | $ cat hg.pid >> $DAEMON_PIDS |
|
348 | $ cat hg.pid >> $DAEMON_PIDS | |
339 | $ hg clone --noupdate http://localhost:$HGPORT batchverifyclone |
|
349 | $ hg clone --noupdate http://localhost:$HGPORT batchverifyclone | |
340 | requesting all changes |
|
350 | requesting all changes | |
341 | adding changesets |
|
351 | adding changesets | |
342 | adding manifests |
|
352 | adding manifests | |
343 | adding file changes |
|
353 | adding file changes | |
344 | added 2 changesets with 2 changes to 2 files |
|
354 | added 2 changesets with 2 changes to 2 files | |
345 | new changesets 567253b0f523:04d19c27a332 |
|
355 | new changesets 567253b0f523:04d19c27a332 | |
346 | $ hg -R batchverifyclone verify --large --lfa |
|
356 | $ hg -R batchverifyclone verify --large --lfa | |
347 | checking changesets |
|
357 | checking changesets | |
348 | checking manifests |
|
358 | checking manifests | |
349 | crosschecking files in changesets and manifests |
|
359 | crosschecking files in changesets and manifests | |
350 | checking files |
|
360 | checking files | |
351 | 2 files, 2 changesets, 2 total revisions |
|
361 | 2 files, 2 changesets, 2 total revisions | |
352 | searching 2 changesets for largefiles |
|
362 | searching 2 changesets for largefiles | |
353 | verified existence of 2 revisions of 2 largefiles |
|
363 | verified existence of 2 revisions of 2 largefiles | |
354 | $ tail -1 access.log |
|
364 | $ tail -1 access.log | |
355 | $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ (glob) |
|
365 | $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ (glob) | |
356 | $ hg -R batchverifyclone update |
|
366 | $ hg -R batchverifyclone update | |
357 | getting changed largefiles |
|
367 | getting changed largefiles | |
358 | 2 largefiles updated, 0 removed |
|
368 | 2 largefiles updated, 0 removed | |
359 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
369 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
360 |
|
370 | |||
361 | Clear log file before next test |
|
371 | Clear log file before next test | |
362 |
|
372 | |||
363 | $ printf "" > access.log |
|
373 | $ printf "" > access.log | |
364 |
|
374 | |||
365 | Verify should check file on remote server only when file is not |
|
375 | Verify should check file on remote server only when file is not | |
366 | available locally. |
|
376 | available locally. | |
367 |
|
377 | |||
368 | $ echo "ccc" >> batchverifymain/c |
|
378 | $ echo "ccc" >> batchverifymain/c | |
369 | $ hg -R batchverifymain status |
|
379 | $ hg -R batchverifymain status | |
370 | ? c |
|
380 | ? c | |
371 | $ hg -R batchverifymain add --large batchverifymain/c |
|
381 | $ hg -R batchverifymain add --large batchverifymain/c | |
372 | $ hg -R batchverifymain commit -m "c" |
|
382 | $ hg -R batchverifymain commit -m "c" | |
373 | Invoking status precommit hook |
|
383 | Invoking status precommit hook | |
374 | A c |
|
384 | A c | |
375 | $ hg -R batchverifyclone pull |
|
385 | $ hg -R batchverifyclone pull | |
376 | pulling from http://localhost:$HGPORT/ |
|
386 | pulling from http://localhost:$HGPORT/ | |
377 | searching for changes |
|
387 | searching for changes | |
378 | adding changesets |
|
388 | adding changesets | |
379 | adding manifests |
|
389 | adding manifests | |
380 | adding file changes |
|
390 | adding file changes | |
381 | added 1 changesets with 1 changes to 1 files |
|
391 | added 1 changesets with 1 changes to 1 files | |
382 | new changesets 6bba8cb6935d |
|
392 | new changesets 6bba8cb6935d | |
383 | (run 'hg update' to get a working copy) |
|
393 | (run 'hg update' to get a working copy) | |
384 | $ hg -R batchverifyclone verify --lfa |
|
394 | $ hg -R batchverifyclone verify --lfa | |
385 | checking changesets |
|
395 | checking changesets | |
386 | checking manifests |
|
396 | checking manifests | |
387 | crosschecking files in changesets and manifests |
|
397 | crosschecking files in changesets and manifests | |
388 | checking files |
|
398 | checking files | |
389 | 3 files, 3 changesets, 3 total revisions |
|
399 | 3 files, 3 changesets, 3 total revisions | |
390 | searching 3 changesets for largefiles |
|
400 | searching 3 changesets for largefiles | |
391 | verified existence of 3 revisions of 3 largefiles |
|
401 | verified existence of 3 revisions of 3 largefiles | |
392 | $ tail -1 access.log |
|
402 | $ tail -1 access.log | |
393 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=statlfile+sha%3Dc8559c3c9cfb42131794b7d8009230403b9b454c x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
403 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=statlfile+sha%3Dc8559c3c9cfb42131794b7d8009230403b9b454c x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
394 |
|
404 | |||
395 | $ killdaemons.py |
|
405 | $ killdaemons.py | |
396 |
|
406 | |||
397 | largefiles should not ask for password again after successful authorization |
|
407 | largefiles should not ask for password again after successful authorization | |
398 |
|
408 | |||
399 | $ hg init credentialmain |
|
409 | $ hg init credentialmain | |
400 | $ cd credentialmain |
|
410 | $ cd credentialmain | |
401 | $ echo "aaa" >> a |
|
411 | $ echo "aaa" >> a | |
402 | $ hg add --large a |
|
412 | $ hg add --large a | |
403 | $ hg commit -m "a" |
|
413 | $ hg commit -m "a" | |
404 | Invoking status precommit hook |
|
414 | Invoking status precommit hook | |
405 | A a |
|
415 | A a | |
406 |
|
416 | |||
407 | Before running server clear the user cache to force clone to download |
|
417 | Before running server clear the user cache to force clone to download | |
408 | a large file from the server rather than to get it from the cache |
|
418 | a large file from the server rather than to get it from the cache | |
409 |
|
419 | |||
410 | $ rm "${USERCACHE}"/* |
|
420 | $ rm "${USERCACHE}"/* | |
411 |
|
421 | |||
412 | $ cd .. |
|
422 | $ cd .. | |
413 | $ cat << EOT > userpass.py |
|
423 | $ cat << EOT > userpass.py | |
414 | > import base64 |
|
424 | > import base64 | |
415 | > from mercurial.hgweb import common |
|
425 | > from mercurial.hgweb import common | |
416 | > def perform_authentication(hgweb, req, op): |
|
426 | > def perform_authentication(hgweb, req, op): | |
417 | > auth = req.env.get('HTTP_AUTHORIZATION') |
|
427 | > auth = req.env.get('HTTP_AUTHORIZATION') | |
418 | > if not auth: |
|
428 | > if not auth: | |
419 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', |
|
429 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', | |
420 | > [('WWW-Authenticate', 'Basic Realm="mercurial"')]) |
|
430 | > [('WWW-Authenticate', 'Basic Realm="mercurial"')]) | |
421 | > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']: |
|
431 | > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']: | |
422 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') |
|
432 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') | |
423 | > def extsetup(): |
|
433 | > def extsetup(): | |
424 | > common.permhooks.insert(0, perform_authentication) |
|
434 | > common.permhooks.insert(0, perform_authentication) | |
425 | > EOT |
|
435 | > EOT | |
426 | $ hg serve --config extensions.x=userpass.py -R credentialmain \ |
|
436 | $ hg serve --config extensions.x=userpass.py -R credentialmain \ | |
427 | > -d -p $HGPORT --pid-file hg.pid -A access.log |
|
437 | > -d -p $HGPORT --pid-file hg.pid -A access.log | |
428 | $ cat hg.pid >> $DAEMON_PIDS |
|
438 | $ cat hg.pid >> $DAEMON_PIDS | |
429 | $ cat << EOF > get_pass.py |
|
439 | $ cat << EOF > get_pass.py | |
430 | > import getpass |
|
440 | > import getpass | |
431 | > def newgetpass(arg): |
|
441 | > def newgetpass(arg): | |
432 | > return "pass" |
|
442 | > return "pass" | |
433 | > getpass.getpass = newgetpass |
|
443 | > getpass.getpass = newgetpass | |
434 | > EOF |
|
444 | > EOF | |
435 | $ hg clone --config ui.interactive=true --config extensions.getpass=get_pass.py \ |
|
445 | $ hg clone --config ui.interactive=true --config extensions.getpass=get_pass.py \ | |
436 | > http://user@localhost:$HGPORT credentialclone |
|
446 | > http://user@localhost:$HGPORT credentialclone | |
437 | requesting all changes |
|
447 | requesting all changes | |
438 | http authorization required for http://localhost:$HGPORT/ |
|
448 | http authorization required for http://localhost:$HGPORT/ | |
439 | realm: mercurial |
|
449 | realm: mercurial | |
440 | user: user |
|
450 | user: user | |
441 | password: adding changesets |
|
451 | password: adding changesets | |
442 | adding manifests |
|
452 | adding manifests | |
443 | adding file changes |
|
453 | adding file changes | |
444 | added 1 changesets with 1 changes to 1 files |
|
454 | added 1 changesets with 1 changes to 1 files | |
445 | new changesets 567253b0f523 |
|
455 | new changesets 567253b0f523 | |
446 | updating to branch default |
|
456 | updating to branch default | |
447 | getting changed largefiles |
|
457 | getting changed largefiles | |
448 | 1 largefiles updated, 0 removed |
|
458 | 1 largefiles updated, 0 removed | |
449 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
459 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
450 |
|
460 | |||
451 | $ killdaemons.py |
|
461 | $ killdaemons.py | |
452 | $ rm hg.pid access.log |
|
462 | $ rm hg.pid access.log | |
453 |
|
463 | |||
454 | #endif |
|
464 | #endif |
@@ -1,136 +1,146 b'' | |||||
1 | #require serve |
|
1 | #require serve | |
2 |
|
2 | |||
|
3 | #testcases sshv1 sshv2 | |||
|
4 | ||||
|
5 | #if sshv2 | |||
|
6 | $ cat >> $HGRCPATH << EOF | |||
|
7 | > [experimental] | |||
|
8 | > sshpeer.advertise-v2 = true | |||
|
9 | > sshserver.support-v2 = true | |||
|
10 | > EOF | |||
|
11 | #endif | |||
|
12 | ||||
3 | $ hg init test |
|
13 | $ hg init test | |
4 | $ cd test |
|
14 | $ cd test | |
5 |
|
15 | |||
6 | $ echo foo>foo |
|
16 | $ echo foo>foo | |
7 | $ hg addremove |
|
17 | $ hg addremove | |
8 | adding foo |
|
18 | adding foo | |
9 | $ hg commit -m 1 |
|
19 | $ hg commit -m 1 | |
10 |
|
20 | |||
11 | $ hg verify |
|
21 | $ hg verify | |
12 | checking changesets |
|
22 | checking changesets | |
13 | checking manifests |
|
23 | checking manifests | |
14 | crosschecking files in changesets and manifests |
|
24 | crosschecking files in changesets and manifests | |
15 | checking files |
|
25 | checking files | |
16 | 1 files, 1 changesets, 1 total revisions |
|
26 | 1 files, 1 changesets, 1 total revisions | |
17 |
|
27 | |||
18 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
28 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
19 | $ cat hg.pid >> $DAEMON_PIDS |
|
29 | $ cat hg.pid >> $DAEMON_PIDS | |
20 | $ cd .. |
|
30 | $ cd .. | |
21 |
|
31 | |||
22 | $ hg clone --pull http://foo:bar@localhost:$HGPORT/ copy |
|
32 | $ hg clone --pull http://foo:bar@localhost:$HGPORT/ copy | |
23 | requesting all changes |
|
33 | requesting all changes | |
24 | adding changesets |
|
34 | adding changesets | |
25 | adding manifests |
|
35 | adding manifests | |
26 | adding file changes |
|
36 | adding file changes | |
27 | added 1 changesets with 1 changes to 1 files |
|
37 | added 1 changesets with 1 changes to 1 files | |
28 | new changesets 340e38bdcde4 |
|
38 | new changesets 340e38bdcde4 | |
29 | updating to branch default |
|
39 | updating to branch default | |
30 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
40 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
31 |
|
41 | |||
32 | $ cd copy |
|
42 | $ cd copy | |
33 | $ hg verify |
|
43 | $ hg verify | |
34 | checking changesets |
|
44 | checking changesets | |
35 | checking manifests |
|
45 | checking manifests | |
36 | crosschecking files in changesets and manifests |
|
46 | crosschecking files in changesets and manifests | |
37 | checking files |
|
47 | checking files | |
38 | 1 files, 1 changesets, 1 total revisions |
|
48 | 1 files, 1 changesets, 1 total revisions | |
39 |
|
49 | |||
40 | $ hg co |
|
50 | $ hg co | |
41 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
51 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
42 | $ cat foo |
|
52 | $ cat foo | |
43 | foo |
|
53 | foo | |
44 |
|
54 | |||
45 | $ hg manifest --debug |
|
55 | $ hg manifest --debug | |
46 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 foo |
|
56 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 foo | |
47 |
|
57 | |||
48 | $ hg pull |
|
58 | $ hg pull | |
49 | pulling from http://foo@localhost:$HGPORT/ |
|
59 | pulling from http://foo@localhost:$HGPORT/ | |
50 | searching for changes |
|
60 | searching for changes | |
51 | no changes found |
|
61 | no changes found | |
52 |
|
62 | |||
53 | $ hg rollback --dry-run --verbose |
|
63 | $ hg rollback --dry-run --verbose | |
54 | repository tip rolled back to revision -1 (undo pull: http://foo:***@localhost:$HGPORT/) |
|
64 | repository tip rolled back to revision -1 (undo pull: http://foo:***@localhost:$HGPORT/) | |
55 |
|
65 | |||
56 | Test pull of non-existing 20 character revision specification, making sure plain ascii identifiers |
|
66 | Test pull of non-existing 20 character revision specification, making sure plain ascii identifiers | |
57 | not are encoded like a node: |
|
67 | not are encoded like a node: | |
58 |
|
68 | |||
59 | $ hg pull -r 'xxxxxxxxxxxxxxxxxxxy' |
|
69 | $ hg pull -r 'xxxxxxxxxxxxxxxxxxxy' | |
60 | pulling from http://foo@localhost:$HGPORT/ |
|
70 | pulling from http://foo@localhost:$HGPORT/ | |
61 | abort: unknown revision 'xxxxxxxxxxxxxxxxxxxy'! |
|
71 | abort: unknown revision 'xxxxxxxxxxxxxxxxxxxy'! | |
62 | [255] |
|
72 | [255] | |
63 | $ hg pull -r 'xxxxxxxxxxxxxxxxxx y' |
|
73 | $ hg pull -r 'xxxxxxxxxxxxxxxxxx y' | |
64 | pulling from http://foo@localhost:$HGPORT/ |
|
74 | pulling from http://foo@localhost:$HGPORT/ | |
65 | abort: unknown revision '7878787878787878787878787878787878782079'! |
|
75 | abort: unknown revision '7878787878787878787878787878787878782079'! | |
66 | [255] |
|
76 | [255] | |
67 |
|
77 | |||
68 | Issue622: hg init && hg pull -u URL doesn't checkout default branch |
|
78 | Issue622: hg init && hg pull -u URL doesn't checkout default branch | |
69 |
|
79 | |||
70 | $ cd .. |
|
80 | $ cd .. | |
71 | $ hg init empty |
|
81 | $ hg init empty | |
72 | $ cd empty |
|
82 | $ cd empty | |
73 | $ hg pull -u ../test |
|
83 | $ hg pull -u ../test | |
74 | pulling from ../test |
|
84 | pulling from ../test | |
75 | requesting all changes |
|
85 | requesting all changes | |
76 | adding changesets |
|
86 | adding changesets | |
77 | adding manifests |
|
87 | adding manifests | |
78 | adding file changes |
|
88 | adding file changes | |
79 | added 1 changesets with 1 changes to 1 files |
|
89 | added 1 changesets with 1 changes to 1 files | |
80 | new changesets 340e38bdcde4 |
|
90 | new changesets 340e38bdcde4 | |
81 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
91 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
82 |
|
92 | |||
83 | Test 'file:' uri handling: |
|
93 | Test 'file:' uri handling: | |
84 |
|
94 | |||
85 | $ hg pull -q file://../test-does-not-exist |
|
95 | $ hg pull -q file://../test-does-not-exist | |
86 | abort: file:// URLs can only refer to localhost |
|
96 | abort: file:// URLs can only refer to localhost | |
87 | [255] |
|
97 | [255] | |
88 |
|
98 | |||
89 | $ hg pull -q file://../test |
|
99 | $ hg pull -q file://../test | |
90 | abort: file:// URLs can only refer to localhost |
|
100 | abort: file:// URLs can only refer to localhost | |
91 | [255] |
|
101 | [255] | |
92 |
|
102 | |||
93 | MSYS changes 'file:' into 'file;' |
|
103 | MSYS changes 'file:' into 'file;' | |
94 |
|
104 | |||
95 | #if no-msys |
|
105 | #if no-msys | |
96 | $ hg pull -q file:../test # no-msys |
|
106 | $ hg pull -q file:../test # no-msys | |
97 | #endif |
|
107 | #endif | |
98 |
|
108 | |||
99 | It's tricky to make file:// URLs working on every platform with |
|
109 | It's tricky to make file:// URLs working on every platform with | |
100 | regular shell commands. |
|
110 | regular shell commands. | |
101 |
|
111 | |||
102 | $ URL=`$PYTHON -c "import os; print 'file://foobar' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"` |
|
112 | $ URL=`$PYTHON -c "import os; print 'file://foobar' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"` | |
103 | $ hg pull -q "$URL" |
|
113 | $ hg pull -q "$URL" | |
104 | abort: file:// URLs can only refer to localhost |
|
114 | abort: file:// URLs can only refer to localhost | |
105 | [255] |
|
115 | [255] | |
106 |
|
116 | |||
107 | $ URL=`$PYTHON -c "import os; print 'file://localhost' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"` |
|
117 | $ URL=`$PYTHON -c "import os; print 'file://localhost' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"` | |
108 | $ hg pull -q "$URL" |
|
118 | $ hg pull -q "$URL" | |
109 |
|
119 | |||
110 | SEC: check for unsafe ssh url |
|
120 | SEC: check for unsafe ssh url | |
111 |
|
121 | |||
112 | $ cat >> $HGRCPATH << EOF |
|
122 | $ cat >> $HGRCPATH << EOF | |
113 | > [ui] |
|
123 | > [ui] | |
114 | > ssh = sh -c "read l; read l; read l" |
|
124 | > ssh = sh -c "read l; read l; read l" | |
115 | > EOF |
|
125 | > EOF | |
116 |
|
126 | |||
117 | $ hg pull 'ssh://-oProxyCommand=touch${IFS}owned/path' |
|
127 | $ hg pull 'ssh://-oProxyCommand=touch${IFS}owned/path' | |
118 | pulling from ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path |
|
128 | pulling from ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path | |
119 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' |
|
129 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' | |
120 | [255] |
|
130 | [255] | |
121 | $ hg pull 'ssh://%2DoProxyCommand=touch${IFS}owned/path' |
|
131 | $ hg pull 'ssh://%2DoProxyCommand=touch${IFS}owned/path' | |
122 | pulling from ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path |
|
132 | pulling from ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path | |
123 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' |
|
133 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' | |
124 | [255] |
|
134 | [255] | |
125 | $ hg pull 'ssh://fakehost|touch${IFS}owned/path' |
|
135 | $ hg pull 'ssh://fakehost|touch${IFS}owned/path' | |
126 | pulling from ssh://fakehost%7Ctouch%24%7BIFS%7Downed/path |
|
136 | pulling from ssh://fakehost%7Ctouch%24%7BIFS%7Downed/path | |
127 | abort: no suitable response from remote hg! |
|
137 | abort: no suitable response from remote hg! | |
128 | [255] |
|
138 | [255] | |
129 | $ hg pull 'ssh://fakehost%7Ctouch%20owned/path' |
|
139 | $ hg pull 'ssh://fakehost%7Ctouch%20owned/path' | |
130 | pulling from ssh://fakehost%7Ctouch%20owned/path |
|
140 | pulling from ssh://fakehost%7Ctouch%20owned/path | |
131 | abort: no suitable response from remote hg! |
|
141 | abort: no suitable response from remote hg! | |
132 | [255] |
|
142 | [255] | |
133 |
|
143 | |||
134 | $ [ ! -f owned ] || echo 'you got owned' |
|
144 | $ [ ! -f owned ] || echo 'you got owned' | |
135 |
|
145 | |||
136 | $ cd .. |
|
146 | $ cd .. |
@@ -1,565 +1,577 b'' | |||||
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 | #testcases sshv1 sshv2 | |||
|
5 | ||||
|
6 | #if sshv2 | |||
|
7 | $ cat >> $HGRCPATH << EOF | |||
|
8 | > [experimental] | |||
|
9 | > sshpeer.advertise-v2 = true | |||
|
10 | > sshserver.support-v2 = true | |||
|
11 | > EOF | |||
|
12 | #endif | |||
|
13 | ||||
4 | $ cat << EOF >> $HGRCPATH |
|
14 | $ cat << EOF >> $HGRCPATH | |
5 | > [devel] |
|
15 | > [devel] | |
6 | > # This test is dedicated to interaction through old bundle |
|
16 | > # This test is dedicated to interaction through old bundle | |
7 | > legacy.exchange = bundle1 |
|
17 | > legacy.exchange = bundle1 | |
8 | > [format] # temporary settings |
|
18 | > [format] # temporary settings | |
9 | > usegeneraldelta=yes |
|
19 | > usegeneraldelta=yes | |
10 | > EOF |
|
20 | > EOF | |
11 |
|
21 | |||
12 |
|
22 | |||
13 | This test tries to exercise the ssh functionality with a dummy script |
|
23 | This test tries to exercise the ssh functionality with a dummy script | |
14 |
|
24 | |||
15 | creating 'remote' repo |
|
25 | creating 'remote' repo | |
16 |
|
26 | |||
17 | $ hg init remote |
|
27 | $ hg init remote | |
18 | $ cd remote |
|
28 | $ cd remote | |
19 | $ echo this > foo |
|
29 | $ echo this > foo | |
20 | $ echo this > fooO |
|
30 | $ echo this > fooO | |
21 | $ hg ci -A -m "init" foo fooO |
|
31 | $ hg ci -A -m "init" foo fooO | |
22 |
|
32 | |||
23 | insert a closed branch (issue4428) |
|
33 | insert a closed branch (issue4428) | |
24 |
|
34 | |||
25 | $ hg up null |
|
35 | $ hg up null | |
26 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
36 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
27 | $ hg branch closed |
|
37 | $ hg branch closed | |
28 | marked working directory as branch closed |
|
38 | marked working directory as branch closed | |
29 | (branches are permanent and global, did you want a bookmark?) |
|
39 | (branches are permanent and global, did you want a bookmark?) | |
30 | $ hg ci -mc0 |
|
40 | $ hg ci -mc0 | |
31 | $ hg ci --close-branch -mc1 |
|
41 | $ hg ci --close-branch -mc1 | |
32 | $ hg up -q default |
|
42 | $ hg up -q default | |
33 |
|
43 | |||
34 | configure for serving |
|
44 | configure for serving | |
35 |
|
45 | |||
36 | $ cat <<EOF > .hg/hgrc |
|
46 | $ cat <<EOF > .hg/hgrc | |
37 | > [server] |
|
47 | > [server] | |
38 | > uncompressed = True |
|
48 | > uncompressed = True | |
39 | > |
|
49 | > | |
40 | > [hooks] |
|
50 | > [hooks] | |
41 | > changegroup = sh -c "printenv.py changegroup-in-remote 0 ../dummylog" |
|
51 | > changegroup = sh -c "printenv.py changegroup-in-remote 0 ../dummylog" | |
42 | > EOF |
|
52 | > EOF | |
43 | $ cd .. |
|
53 | $ cd .. | |
44 |
|
54 | |||
45 | repo not found error |
|
55 | repo not found error | |
46 |
|
56 | |||
47 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local |
|
57 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local | |
48 | remote: abort: repository nonexistent not found! |
|
58 | remote: abort: repository nonexistent not found! | |
49 | abort: no suitable response from remote hg! |
|
59 | abort: no suitable response from remote hg! | |
50 | [255] |
|
60 | [255] | |
51 |
|
61 | |||
52 | non-existent absolute path |
|
62 | non-existent absolute path | |
53 |
|
63 | |||
54 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy//`pwd`/nonexistent local |
|
64 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy//`pwd`/nonexistent local | |
55 | remote: abort: repository /$TESTTMP/nonexistent not found! |
|
65 | remote: abort: repository /$TESTTMP/nonexistent not found! | |
56 | abort: no suitable response from remote hg! |
|
66 | abort: no suitable response from remote hg! | |
57 | [255] |
|
67 | [255] | |
58 |
|
68 | |||
59 | clone remote via stream |
|
69 | clone remote via stream | |
60 |
|
70 | |||
61 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/remote local-stream |
|
71 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/remote local-stream | |
62 | streaming all changes |
|
72 | streaming all changes | |
63 | 4 files to transfer, 602 bytes of data |
|
73 | 4 files to transfer, 602 bytes of data | |
64 | transferred 602 bytes in * seconds (*) (glob) |
|
74 | transferred 602 bytes in * seconds (*) (glob) | |
65 | searching for changes |
|
75 | searching for changes | |
66 | no changes found |
|
76 | no changes found | |
67 | updating to branch default |
|
77 | updating to branch default | |
68 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
78 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
69 | $ cd local-stream |
|
79 | $ cd local-stream | |
70 | $ hg verify |
|
80 | $ hg verify | |
71 | checking changesets |
|
81 | checking changesets | |
72 | checking manifests |
|
82 | checking manifests | |
73 | crosschecking files in changesets and manifests |
|
83 | crosschecking files in changesets and manifests | |
74 | checking files |
|
84 | checking files | |
75 | 2 files, 3 changesets, 2 total revisions |
|
85 | 2 files, 3 changesets, 2 total revisions | |
76 | $ hg branches |
|
86 | $ hg branches | |
77 | default 0:1160648e36ce |
|
87 | default 0:1160648e36ce | |
78 | $ cd .. |
|
88 | $ cd .. | |
79 |
|
89 | |||
80 | clone bookmarks via stream |
|
90 | clone bookmarks via stream | |
81 |
|
91 | |||
82 | $ hg -R local-stream book mybook |
|
92 | $ hg -R local-stream book mybook | |
83 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2 |
|
93 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2 | |
84 | streaming all changes |
|
94 | streaming all changes | |
85 | 4 files to transfer, 602 bytes of data |
|
95 | 4 files to transfer, 602 bytes of data | |
86 | transferred 602 bytes in * seconds (*) (glob) |
|
96 | transferred 602 bytes in * seconds (*) (glob) | |
87 | searching for changes |
|
97 | searching for changes | |
88 | no changes found |
|
98 | no changes found | |
89 | updating to branch default |
|
99 | updating to branch default | |
90 | 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 | |
91 | $ cd stream2 |
|
101 | $ cd stream2 | |
92 | $ hg book |
|
102 | $ hg book | |
93 | mybook 0:1160648e36ce |
|
103 | mybook 0:1160648e36ce | |
94 | $ cd .. |
|
104 | $ cd .. | |
95 | $ rm -rf local-stream stream2 |
|
105 | $ rm -rf local-stream stream2 | |
96 |
|
106 | |||
97 | clone remote via pull |
|
107 | clone remote via pull | |
98 |
|
108 | |||
99 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local |
|
109 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local | |
100 | requesting all changes |
|
110 | requesting all changes | |
101 | adding changesets |
|
111 | adding changesets | |
102 | adding manifests |
|
112 | adding manifests | |
103 | adding file changes |
|
113 | adding file changes | |
104 | added 3 changesets with 2 changes to 2 files |
|
114 | added 3 changesets with 2 changes to 2 files | |
105 | new changesets 1160648e36ce:ad076bfb429d |
|
115 | new changesets 1160648e36ce:ad076bfb429d | |
106 | updating to branch default |
|
116 | updating to branch default | |
107 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
117 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
108 |
|
118 | |||
109 | verify |
|
119 | verify | |
110 |
|
120 | |||
111 | $ cd local |
|
121 | $ cd local | |
112 | $ hg verify |
|
122 | $ hg verify | |
113 | checking changesets |
|
123 | checking changesets | |
114 | checking manifests |
|
124 | checking manifests | |
115 | crosschecking files in changesets and manifests |
|
125 | crosschecking files in changesets and manifests | |
116 | checking files |
|
126 | checking files | |
117 | 2 files, 3 changesets, 2 total revisions |
|
127 | 2 files, 3 changesets, 2 total revisions | |
118 | $ cat >> .hg/hgrc <<EOF |
|
128 | $ cat >> .hg/hgrc <<EOF | |
119 | > [hooks] |
|
129 | > [hooks] | |
120 | > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog" |
|
130 | > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog" | |
121 | > EOF |
|
131 | > EOF | |
122 |
|
132 | |||
123 | empty default pull |
|
133 | empty default pull | |
124 |
|
134 | |||
125 | $ hg paths |
|
135 | $ hg paths | |
126 | default = ssh://user@dummy/remote |
|
136 | default = ssh://user@dummy/remote | |
127 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" |
|
137 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" | |
128 | pulling from ssh://user@dummy/remote |
|
138 | pulling from ssh://user@dummy/remote | |
129 | searching for changes |
|
139 | searching for changes | |
130 | no changes found |
|
140 | no changes found | |
131 |
|
141 | |||
132 | pull from wrong ssh URL |
|
142 | pull from wrong ssh URL | |
133 |
|
143 | |||
134 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist |
|
144 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist | |
135 | pulling from ssh://user@dummy/doesnotexist |
|
145 | pulling from ssh://user@dummy/doesnotexist | |
136 | remote: abort: repository doesnotexist not found! |
|
146 | remote: abort: repository doesnotexist not found! | |
137 | abort: no suitable response from remote hg! |
|
147 | abort: no suitable response from remote hg! | |
138 | [255] |
|
148 | [255] | |
139 |
|
149 | |||
140 | local change |
|
150 | local change | |
141 |
|
151 | |||
142 | $ echo bleah > foo |
|
152 | $ echo bleah > foo | |
143 | $ hg ci -m "add" |
|
153 | $ hg ci -m "add" | |
144 |
|
154 | |||
145 | updating rc |
|
155 | updating rc | |
146 |
|
156 | |||
147 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
157 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc | |
148 | $ echo "[ui]" >> .hg/hgrc |
|
158 | $ echo "[ui]" >> .hg/hgrc | |
149 | $ echo "ssh = \"$PYTHON\" \"$TESTDIR/dummyssh\"" >> .hg/hgrc |
|
159 | $ echo "ssh = \"$PYTHON\" \"$TESTDIR/dummyssh\"" >> .hg/hgrc | |
150 |
|
160 | |||
151 | find outgoing |
|
161 | find outgoing | |
152 |
|
162 | |||
153 | $ hg out ssh://user@dummy/remote |
|
163 | $ hg out ssh://user@dummy/remote | |
154 | comparing with ssh://user@dummy/remote |
|
164 | comparing with ssh://user@dummy/remote | |
155 | searching for changes |
|
165 | searching for changes | |
156 | changeset: 3:a28a9d1a809c |
|
166 | changeset: 3:a28a9d1a809c | |
157 | tag: tip |
|
167 | tag: tip | |
158 | parent: 0:1160648e36ce |
|
168 | parent: 0:1160648e36ce | |
159 | user: test |
|
169 | user: test | |
160 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
170 | date: Thu Jan 01 00:00:00 1970 +0000 | |
161 | summary: add |
|
171 | summary: add | |
162 |
|
172 | |||
163 |
|
173 | |||
164 | find incoming on the remote side |
|
174 | find incoming on the remote side | |
165 |
|
175 | |||
166 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/local |
|
176 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/local | |
167 | comparing with ssh://user@dummy/local |
|
177 | comparing with ssh://user@dummy/local | |
168 | searching for changes |
|
178 | searching for changes | |
169 | changeset: 3:a28a9d1a809c |
|
179 | changeset: 3:a28a9d1a809c | |
170 | tag: tip |
|
180 | tag: tip | |
171 | parent: 0:1160648e36ce |
|
181 | parent: 0:1160648e36ce | |
172 | user: test |
|
182 | user: test | |
173 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
183 | date: Thu Jan 01 00:00:00 1970 +0000 | |
174 | summary: add |
|
184 | summary: add | |
175 |
|
185 | |||
176 |
|
186 | |||
177 | find incoming on the remote side (using absolute path) |
|
187 | find incoming on the remote side (using absolute path) | |
178 |
|
188 | |||
179 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" |
|
189 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" | |
180 | comparing with ssh://user@dummy/$TESTTMP/local |
|
190 | comparing with ssh://user@dummy/$TESTTMP/local | |
181 | searching for changes |
|
191 | searching for changes | |
182 | changeset: 3:a28a9d1a809c |
|
192 | changeset: 3:a28a9d1a809c | |
183 | tag: tip |
|
193 | tag: tip | |
184 | parent: 0:1160648e36ce |
|
194 | parent: 0:1160648e36ce | |
185 | user: test |
|
195 | user: test | |
186 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
196 | date: Thu Jan 01 00:00:00 1970 +0000 | |
187 | summary: add |
|
197 | summary: add | |
188 |
|
198 | |||
189 |
|
199 | |||
190 | push |
|
200 | push | |
191 |
|
201 | |||
192 | $ hg push |
|
202 | $ hg push | |
193 | pushing to ssh://user@dummy/remote |
|
203 | pushing to ssh://user@dummy/remote | |
194 | searching for changes |
|
204 | searching for changes | |
195 | remote: adding changesets |
|
205 | remote: adding changesets | |
196 | remote: adding manifests |
|
206 | remote: adding manifests | |
197 | remote: adding file changes |
|
207 | remote: adding file changes | |
198 | remote: added 1 changesets with 1 changes to 1 files |
|
208 | remote: added 1 changesets with 1 changes to 1 files | |
199 | $ cd ../remote |
|
209 | $ cd ../remote | |
200 |
|
210 | |||
201 | check remote tip |
|
211 | check remote tip | |
202 |
|
212 | |||
203 | $ hg tip |
|
213 | $ hg tip | |
204 | changeset: 3:a28a9d1a809c |
|
214 | changeset: 3:a28a9d1a809c | |
205 | tag: tip |
|
215 | tag: tip | |
206 | parent: 0:1160648e36ce |
|
216 | parent: 0:1160648e36ce | |
207 | user: test |
|
217 | user: test | |
208 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
218 | date: Thu Jan 01 00:00:00 1970 +0000 | |
209 | summary: add |
|
219 | summary: add | |
210 |
|
220 | |||
211 | $ hg verify |
|
221 | $ hg verify | |
212 | checking changesets |
|
222 | checking changesets | |
213 | checking manifests |
|
223 | checking manifests | |
214 | crosschecking files in changesets and manifests |
|
224 | crosschecking files in changesets and manifests | |
215 | checking files |
|
225 | checking files | |
216 | 2 files, 4 changesets, 3 total revisions |
|
226 | 2 files, 4 changesets, 3 total revisions | |
217 | $ hg cat -r tip foo |
|
227 | $ hg cat -r tip foo | |
218 | bleah |
|
228 | bleah | |
219 | $ echo z > z |
|
229 | $ echo z > z | |
220 | $ hg ci -A -m z z |
|
230 | $ hg ci -A -m z z | |
221 | created new head |
|
231 | created new head | |
222 |
|
232 | |||
223 | test pushkeys and bookmarks |
|
233 | test pushkeys and bookmarks | |
224 |
|
234 | |||
225 | $ cd ../local |
|
235 | $ cd ../local | |
226 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces |
|
236 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces | |
227 | bookmarks |
|
237 | bookmarks | |
228 | namespaces |
|
238 | namespaces | |
229 | phases |
|
239 | phases | |
230 | $ hg book foo -r 0 |
|
240 | $ hg book foo -r 0 | |
231 | $ hg out -B |
|
241 | $ hg out -B | |
232 | comparing with ssh://user@dummy/remote |
|
242 | comparing with ssh://user@dummy/remote | |
233 | searching for changed bookmarks |
|
243 | searching for changed bookmarks | |
234 | foo 1160648e36ce |
|
244 | foo 1160648e36ce | |
235 | $ hg push -B foo |
|
245 | $ hg push -B foo | |
236 | pushing to ssh://user@dummy/remote |
|
246 | pushing to ssh://user@dummy/remote | |
237 | searching for changes |
|
247 | searching for changes | |
238 | no changes found |
|
248 | no changes found | |
239 | exporting bookmark foo |
|
249 | exporting bookmark foo | |
240 | [1] |
|
250 | [1] | |
241 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks |
|
251 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks | |
242 | foo 1160648e36cec0054048a7edc4110c6f84fde594 |
|
252 | foo 1160648e36cec0054048a7edc4110c6f84fde594 | |
243 | $ hg book -f foo |
|
253 | $ hg book -f foo | |
244 | $ hg push --traceback |
|
254 | $ hg push --traceback | |
245 | pushing to ssh://user@dummy/remote |
|
255 | pushing to ssh://user@dummy/remote | |
246 | searching for changes |
|
256 | searching for changes | |
247 | no changes found |
|
257 | no changes found | |
248 | updating bookmark foo |
|
258 | updating bookmark foo | |
249 | [1] |
|
259 | [1] | |
250 | $ hg book -d foo |
|
260 | $ hg book -d foo | |
251 | $ hg in -B |
|
261 | $ hg in -B | |
252 | comparing with ssh://user@dummy/remote |
|
262 | comparing with ssh://user@dummy/remote | |
253 | searching for changed bookmarks |
|
263 | searching for changed bookmarks | |
254 | foo a28a9d1a809c |
|
264 | foo a28a9d1a809c | |
255 | $ hg book -f -r 0 foo |
|
265 | $ hg book -f -r 0 foo | |
256 | $ hg pull -B foo |
|
266 | $ hg pull -B foo | |
257 | pulling from ssh://user@dummy/remote |
|
267 | pulling from ssh://user@dummy/remote | |
258 | no changes found |
|
268 | no changes found | |
259 | updating bookmark foo |
|
269 | updating bookmark foo | |
260 | $ hg book -d foo |
|
270 | $ hg book -d foo | |
261 | $ hg push -B foo |
|
271 | $ hg push -B foo | |
262 | pushing to ssh://user@dummy/remote |
|
272 | pushing to ssh://user@dummy/remote | |
263 | searching for changes |
|
273 | searching for changes | |
264 | no changes found |
|
274 | no changes found | |
265 | deleting remote bookmark foo |
|
275 | deleting remote bookmark foo | |
266 | [1] |
|
276 | [1] | |
267 |
|
277 | |||
268 | a bad, evil hook that prints to stdout |
|
278 | a bad, evil hook that prints to stdout | |
269 |
|
279 | |||
270 | $ cat <<EOF > $TESTTMP/badhook |
|
280 | $ cat <<EOF > $TESTTMP/badhook | |
271 | > import sys |
|
281 | > import sys | |
272 | > sys.stdout.write("KABOOM\n") |
|
282 | > sys.stdout.write("KABOOM\n") | |
273 | > EOF |
|
283 | > EOF | |
274 |
|
284 | |||
275 | $ echo '[hooks]' >> ../remote/.hg/hgrc |
|
285 | $ echo '[hooks]' >> ../remote/.hg/hgrc | |
276 | $ echo "changegroup.stdout = \"$PYTHON\" $TESTTMP/badhook" >> ../remote/.hg/hgrc |
|
286 | $ echo "changegroup.stdout = \"$PYTHON\" $TESTTMP/badhook" >> ../remote/.hg/hgrc | |
277 | $ echo r > r |
|
287 | $ echo r > r | |
278 | $ hg ci -A -m z r |
|
288 | $ hg ci -A -m z r | |
279 |
|
289 | |||
280 | push should succeed even though it has an unexpected response |
|
290 | push should succeed even though it has an unexpected response | |
281 |
|
291 | |||
282 | $ hg push |
|
292 | $ hg push | |
283 | pushing to ssh://user@dummy/remote |
|
293 | pushing to ssh://user@dummy/remote | |
284 | searching for changes |
|
294 | searching for changes | |
285 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 |
|
295 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 | |
286 | remote: adding changesets |
|
296 | remote: adding changesets | |
287 | remote: adding manifests |
|
297 | remote: adding manifests | |
288 | remote: adding file changes |
|
298 | remote: adding file changes | |
289 | remote: added 1 changesets with 1 changes to 1 files |
|
299 | remote: added 1 changesets with 1 changes to 1 files | |
290 | remote: KABOOM |
|
300 | remote: KABOOM | |
291 | $ hg -R ../remote heads |
|
301 | $ hg -R ../remote heads | |
292 | changeset: 5:1383141674ec |
|
302 | changeset: 5:1383141674ec | |
293 | tag: tip |
|
303 | tag: tip | |
294 | parent: 3:a28a9d1a809c |
|
304 | parent: 3:a28a9d1a809c | |
295 | user: test |
|
305 | user: test | |
296 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
306 | date: Thu Jan 01 00:00:00 1970 +0000 | |
297 | summary: z |
|
307 | summary: z | |
298 |
|
308 | |||
299 | changeset: 4:6c0482d977a3 |
|
309 | changeset: 4:6c0482d977a3 | |
300 | parent: 0:1160648e36ce |
|
310 | parent: 0:1160648e36ce | |
301 | user: test |
|
311 | user: test | |
302 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
312 | date: Thu Jan 01 00:00:00 1970 +0000 | |
303 | summary: z |
|
313 | summary: z | |
304 |
|
314 | |||
305 |
|
315 | |||
306 | clone bookmarks |
|
316 | clone bookmarks | |
307 |
|
317 | |||
308 | $ hg -R ../remote bookmark test |
|
318 | $ hg -R ../remote bookmark test | |
309 | $ hg -R ../remote bookmarks |
|
319 | $ hg -R ../remote bookmarks | |
310 | * test 4:6c0482d977a3 |
|
320 | * test 4:6c0482d977a3 | |
311 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks |
|
321 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks | |
312 | requesting all changes |
|
322 | requesting all changes | |
313 | adding changesets |
|
323 | adding changesets | |
314 | adding manifests |
|
324 | adding manifests | |
315 | adding file changes |
|
325 | adding file changes | |
316 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
326 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
317 | new changesets 1160648e36ce:1383141674ec |
|
327 | new changesets 1160648e36ce:1383141674ec | |
318 | updating to branch default |
|
328 | updating to branch default | |
319 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
329 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
320 | $ hg -R local-bookmarks bookmarks |
|
330 | $ hg -R local-bookmarks bookmarks | |
321 | test 4:6c0482d977a3 |
|
331 | test 4:6c0482d977a3 | |
322 |
|
332 | |||
323 | passwords in ssh urls are not supported |
|
333 | passwords in ssh urls are not supported | |
324 | (we use a glob here because different Python versions give different |
|
334 | (we use a glob here because different Python versions give different | |
325 | results here) |
|
335 | results here) | |
326 |
|
336 | |||
327 | $ hg push ssh://user:erroneouspwd@dummy/remote |
|
337 | $ hg push ssh://user:erroneouspwd@dummy/remote | |
328 | pushing to ssh://user:*@dummy/remote (glob) |
|
338 | pushing to ssh://user:*@dummy/remote (glob) | |
329 | abort: password in URL not supported! |
|
339 | abort: password in URL not supported! | |
330 | [255] |
|
340 | [255] | |
331 |
|
341 | |||
332 | $ cd .. |
|
342 | $ cd .. | |
333 |
|
343 | |||
334 | hide outer repo |
|
344 | hide outer repo | |
335 | $ hg init |
|
345 | $ hg init | |
336 |
|
346 | |||
337 | Test remote paths with spaces (issue2983): |
|
347 | Test remote paths with spaces (issue2983): | |
338 |
|
348 | |||
339 | $ hg init --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
349 | $ hg init --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
340 | $ touch "$TESTTMP/a repo/test" |
|
350 | $ touch "$TESTTMP/a repo/test" | |
341 | $ hg -R 'a repo' commit -A -m "test" |
|
351 | $ hg -R 'a repo' commit -A -m "test" | |
342 | adding test |
|
352 | adding test | |
343 | $ hg -R 'a repo' tag tag |
|
353 | $ hg -R 'a repo' tag tag | |
344 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
354 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
345 | 73649e48688a |
|
355 | 73649e48688a | |
346 |
|
356 | |||
347 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO" |
|
357 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO" | |
348 | abort: unknown revision 'noNoNO'! |
|
358 | abort: unknown revision 'noNoNO'! | |
349 | [255] |
|
359 | [255] | |
350 |
|
360 | |||
351 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): |
|
361 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): | |
352 |
|
362 | |||
353 | $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
363 | $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
354 | destination directory: a repo |
|
364 | destination directory: a repo | |
355 | abort: destination 'a repo' is not empty |
|
365 | abort: destination 'a repo' is not empty | |
356 | [255] |
|
366 | [255] | |
357 |
|
367 | |||
358 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might |
|
368 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might | |
359 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right |
|
369 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right | |
360 | parameters: |
|
370 | parameters: | |
361 |
|
371 | |||
362 | $ cat > ssh.sh << EOF |
|
372 | $ cat > ssh.sh << EOF | |
363 | > userhost="\$1" |
|
373 | > userhost="\$1" | |
364 | > SSH_ORIGINAL_COMMAND="\$2" |
|
374 | > SSH_ORIGINAL_COMMAND="\$2" | |
365 | > export SSH_ORIGINAL_COMMAND |
|
375 | > export SSH_ORIGINAL_COMMAND | |
366 | > PYTHONPATH="$PYTHONPATH" |
|
376 | > PYTHONPATH="$PYTHONPATH" | |
367 | > export PYTHONPATH |
|
377 | > export PYTHONPATH | |
368 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" |
|
378 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" | |
369 | > EOF |
|
379 | > EOF | |
370 |
|
380 | |||
371 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" |
|
381 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" | |
372 | 73649e48688a |
|
382 | 73649e48688a | |
373 |
|
383 | |||
374 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" |
|
384 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" | |
375 | remote: Illegal repository "$TESTTMP/a'repo" |
|
385 | remote: Illegal repository "$TESTTMP/a'repo" | |
376 | abort: no suitable response from remote hg! |
|
386 | abort: no suitable response from remote hg! | |
377 | [255] |
|
387 | [255] | |
378 |
|
388 | |||
379 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" |
|
389 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" | |
380 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" |
|
390 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" | |
381 | abort: no suitable response from remote hg! |
|
391 | abort: no suitable response from remote hg! | |
382 | [255] |
|
392 | [255] | |
383 |
|
393 | |||
384 | $ SSH_ORIGINAL_COMMAND="'hg' serve -R 'a'repo' --stdio" $PYTHON "$TESTDIR/../contrib/hg-ssh" |
|
394 | $ SSH_ORIGINAL_COMMAND="'hg' serve -R 'a'repo' --stdio" $PYTHON "$TESTDIR/../contrib/hg-ssh" | |
385 | Illegal command "'hg' serve -R 'a'repo' --stdio": No closing quotation |
|
395 | Illegal command "'hg' serve -R 'a'repo' --stdio": No closing quotation | |
386 | [255] |
|
396 | [255] | |
387 |
|
397 | |||
388 | Test hg-ssh in read-only mode: |
|
398 | Test hg-ssh in read-only mode: | |
389 |
|
399 | |||
390 | $ cat > ssh.sh << EOF |
|
400 | $ cat > ssh.sh << EOF | |
391 | > userhost="\$1" |
|
401 | > userhost="\$1" | |
392 | > SSH_ORIGINAL_COMMAND="\$2" |
|
402 | > SSH_ORIGINAL_COMMAND="\$2" | |
393 | > export SSH_ORIGINAL_COMMAND |
|
403 | > export SSH_ORIGINAL_COMMAND | |
394 | > PYTHONPATH="$PYTHONPATH" |
|
404 | > PYTHONPATH="$PYTHONPATH" | |
395 | > export PYTHONPATH |
|
405 | > export PYTHONPATH | |
396 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" |
|
406 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" | |
397 | > EOF |
|
407 | > EOF | |
398 |
|
408 | |||
399 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local |
|
409 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local | |
400 | requesting all changes |
|
410 | requesting all changes | |
401 | adding changesets |
|
411 | adding changesets | |
402 | adding manifests |
|
412 | adding manifests | |
403 | adding file changes |
|
413 | adding file changes | |
404 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
414 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
405 | new changesets 1160648e36ce:1383141674ec |
|
415 | new changesets 1160648e36ce:1383141674ec | |
406 | updating to branch default |
|
416 | updating to branch default | |
407 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
417 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
408 |
|
418 | |||
409 | $ cd read-only-local |
|
419 | $ cd read-only-local | |
410 | $ echo "baz" > bar |
|
420 | $ echo "baz" > bar | |
411 | $ hg ci -A -m "unpushable commit" bar |
|
421 | $ hg ci -A -m "unpushable commit" bar | |
412 | $ hg push --ssh "sh ../ssh.sh" |
|
422 | $ hg push --ssh "sh ../ssh.sh" | |
413 | pushing to ssh://user@dummy/*/remote (glob) |
|
423 | pushing to ssh://user@dummy/*/remote (glob) | |
414 | searching for changes |
|
424 | searching for changes | |
415 | remote: Permission denied |
|
425 | remote: Permission denied | |
416 | remote: abort: pretxnopen.hg-ssh hook failed |
|
426 | remote: abort: pretxnopen.hg-ssh hook failed | |
417 | remote: Permission denied |
|
427 | remote: Permission denied | |
418 | remote: pushkey-abort: prepushkey.hg-ssh hook failed |
|
428 | remote: pushkey-abort: prepushkey.hg-ssh hook failed | |
419 | updating 6c0482d977a3 to public failed! |
|
429 | updating 6c0482d977a3 to public failed! | |
420 | [1] |
|
430 | [1] | |
421 |
|
431 | |||
422 | $ cd .. |
|
432 | $ cd .. | |
423 |
|
433 | |||
424 | stderr from remote commands should be printed before stdout from local code (issue4336) |
|
434 | stderr from remote commands should be printed before stdout from local code (issue4336) | |
425 |
|
435 | |||
426 | $ hg clone remote stderr-ordering |
|
436 | $ hg clone remote stderr-ordering | |
427 | updating to branch default |
|
437 | updating to branch default | |
428 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
438 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
429 | $ cd stderr-ordering |
|
439 | $ cd stderr-ordering | |
430 | $ cat >> localwrite.py << EOF |
|
440 | $ cat >> localwrite.py << EOF | |
431 | > from mercurial import exchange, extensions |
|
441 | > from mercurial import exchange, extensions | |
432 | > |
|
442 | > | |
433 | > def wrappedpush(orig, repo, *args, **kwargs): |
|
443 | > def wrappedpush(orig, repo, *args, **kwargs): | |
434 | > res = orig(repo, *args, **kwargs) |
|
444 | > res = orig(repo, *args, **kwargs) | |
435 | > repo.ui.write('local stdout\n') |
|
445 | > repo.ui.write('local stdout\n') | |
436 | > return res |
|
446 | > return res | |
437 | > |
|
447 | > | |
438 | > def extsetup(ui): |
|
448 | > def extsetup(ui): | |
439 | > extensions.wrapfunction(exchange, 'push', wrappedpush) |
|
449 | > extensions.wrapfunction(exchange, 'push', wrappedpush) | |
440 | > EOF |
|
450 | > EOF | |
441 |
|
451 | |||
442 | $ cat >> .hg/hgrc << EOF |
|
452 | $ cat >> .hg/hgrc << EOF | |
443 | > [paths] |
|
453 | > [paths] | |
444 | > default-push = ssh://user@dummy/remote |
|
454 | > default-push = ssh://user@dummy/remote | |
445 | > [ui] |
|
455 | > [ui] | |
446 | > ssh = "$PYTHON" "$TESTDIR/dummyssh" |
|
456 | > ssh = "$PYTHON" "$TESTDIR/dummyssh" | |
447 | > [extensions] |
|
457 | > [extensions] | |
448 | > localwrite = localwrite.py |
|
458 | > localwrite = localwrite.py | |
449 | > EOF |
|
459 | > EOF | |
450 |
|
460 | |||
451 | $ echo localwrite > foo |
|
461 | $ echo localwrite > foo | |
452 | $ hg commit -m 'testing localwrite' |
|
462 | $ hg commit -m 'testing localwrite' | |
453 | $ hg push |
|
463 | $ hg push | |
454 | pushing to ssh://user@dummy/remote |
|
464 | pushing to ssh://user@dummy/remote | |
455 | searching for changes |
|
465 | searching for changes | |
456 | remote: adding changesets |
|
466 | remote: adding changesets | |
457 | remote: adding manifests |
|
467 | remote: adding manifests | |
458 | remote: adding file changes |
|
468 | remote: adding file changes | |
459 | remote: added 1 changesets with 1 changes to 1 files |
|
469 | remote: added 1 changesets with 1 changes to 1 files | |
460 | remote: KABOOM |
|
470 | remote: KABOOM | |
461 | local stdout |
|
471 | local stdout | |
462 |
|
472 | |||
463 | debug output |
|
473 | debug output | |
464 |
|
474 | |||
465 | $ hg pull --debug ssh://user@dummy/remote |
|
475 | $ hg pull --debug ssh://user@dummy/remote | |
466 | pulling from ssh://user@dummy/remote |
|
476 | pulling from ssh://user@dummy/remote | |
467 | running .* ".*/dummyssh" ['"]user@dummy['"] ('|")hg -R remote serve --stdio('|") (re) |
|
477 | running .* ".*/dummyssh" ['"]user@dummy['"] ('|")hg -R remote serve --stdio('|") (re) | |
|
478 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) | |||
468 | sending hello command |
|
479 | sending hello command | |
469 | sending between command |
|
480 | sending between command | |
470 | remote: 384 |
|
481 | protocol upgraded to exp-ssh-v2-0001 (sshv2 !) | |
|
482 | remote: 384 (sshv1 !) | |||
471 | remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
|
483 | remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN | |
472 | remote: 1 |
|
484 | remote: 1 (sshv1 !) | |
473 | preparing listkeys for "bookmarks" |
|
485 | preparing listkeys for "bookmarks" | |
474 | sending listkeys command |
|
486 | sending listkeys command | |
475 | received listkey for "bookmarks": 45 bytes |
|
487 | received listkey for "bookmarks": 45 bytes | |
476 | query 1; heads |
|
488 | query 1; heads | |
477 | sending batch command |
|
489 | sending batch command | |
478 | searching for changes |
|
490 | searching for changes | |
479 | all remote heads known locally |
|
491 | all remote heads known locally | |
480 | no changes found |
|
492 | no changes found | |
481 | preparing listkeys for "phases" |
|
493 | preparing listkeys for "phases" | |
482 | sending listkeys command |
|
494 | sending listkeys command | |
483 | received listkey for "phases": 15 bytes |
|
495 | received listkey for "phases": 15 bytes | |
484 | checking for updated bookmarks |
|
496 | checking for updated bookmarks | |
485 |
|
497 | |||
486 | $ cd .. |
|
498 | $ cd .. | |
487 |
|
499 | |||
488 | $ cat dummylog |
|
500 | $ cat dummylog | |
489 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
501 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
490 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio |
|
502 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio | |
491 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
503 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
492 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio |
|
504 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio | |
493 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
505 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
494 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
506 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
495 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio |
|
507 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio | |
496 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
508 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
497 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
509 | Got arguments 1:user@dummy 2:hg -R local serve --stdio | |
498 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio |
|
510 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio | |
499 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
511 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
500 | 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 |
|
512 | 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 | |
501 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
513 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
502 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
514 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
503 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
515 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
504 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
516 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
505 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
517 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
506 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
518 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
507 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
519 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
508 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
520 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
509 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
521 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
510 | 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 |
|
522 | 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 | |
511 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
523 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
512 | Got arguments 1:user@dummy 2:hg init 'a repo' |
|
524 | Got arguments 1:user@dummy 2:hg init 'a repo' | |
513 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
525 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
514 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
526 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
515 | 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 | |
516 | 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 | |
517 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
529 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
518 | 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 |
|
530 | 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 | |
519 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
531 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
520 |
|
532 | |||
521 | remote hook failure is attributed to remote |
|
533 | remote hook failure is attributed to remote | |
522 |
|
534 | |||
523 | $ cat > $TESTTMP/failhook << EOF |
|
535 | $ cat > $TESTTMP/failhook << EOF | |
524 | > def hook(ui, repo, **kwargs): |
|
536 | > def hook(ui, repo, **kwargs): | |
525 | > ui.write('hook failure!\n') |
|
537 | > ui.write('hook failure!\n') | |
526 | > ui.flush() |
|
538 | > ui.flush() | |
527 | > return 1 |
|
539 | > return 1 | |
528 | > EOF |
|
540 | > EOF | |
529 |
|
541 | |||
530 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc |
|
542 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc | |
531 |
|
543 | |||
532 | $ hg -q --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout |
|
544 | $ hg -q --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout | |
533 | $ cd hookout |
|
545 | $ cd hookout | |
534 | $ touch hookfailure |
|
546 | $ touch hookfailure | |
535 | $ hg -q commit -A -m 'remote hook failure' |
|
547 | $ hg -q commit -A -m 'remote hook failure' | |
536 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" push |
|
548 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" push | |
537 | pushing to ssh://user@dummy/remote |
|
549 | pushing to ssh://user@dummy/remote | |
538 | searching for changes |
|
550 | searching for changes | |
539 | remote: adding changesets |
|
551 | remote: adding changesets | |
540 | remote: adding manifests |
|
552 | remote: adding manifests | |
541 | remote: adding file changes |
|
553 | remote: adding file changes | |
542 | remote: added 1 changesets with 1 changes to 1 files |
|
554 | remote: added 1 changesets with 1 changes to 1 files | |
543 | remote: hook failure! |
|
555 | remote: hook failure! | |
544 | remote: transaction abort! |
|
556 | remote: transaction abort! | |
545 | remote: rollback completed |
|
557 | remote: rollback completed | |
546 | remote: abort: pretxnchangegroup.fail hook failed |
|
558 | remote: abort: pretxnchangegroup.fail hook failed | |
547 | [1] |
|
559 | [1] | |
548 |
|
560 | |||
549 | abort during pull is properly reported as such |
|
561 | abort during pull is properly reported as such | |
550 |
|
562 | |||
551 | $ echo morefoo >> ../remote/foo |
|
563 | $ echo morefoo >> ../remote/foo | |
552 | $ hg -R ../remote commit --message "more foo to be pulled" |
|
564 | $ hg -R ../remote commit --message "more foo to be pulled" | |
553 | $ cat >> ../remote/.hg/hgrc << EOF |
|
565 | $ cat >> ../remote/.hg/hgrc << EOF | |
554 | > [extensions] |
|
566 | > [extensions] | |
555 | > crash = ${TESTDIR}/crashgetbundler.py |
|
567 | > crash = ${TESTDIR}/crashgetbundler.py | |
556 | > EOF |
|
568 | > EOF | |
557 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" pull |
|
569 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" pull | |
558 | pulling from ssh://user@dummy/remote |
|
570 | pulling from ssh://user@dummy/remote | |
559 | searching for changes |
|
571 | searching for changes | |
560 | adding changesets |
|
572 | adding changesets | |
561 | remote: abort: this is an exercise |
|
573 | remote: abort: this is an exercise | |
562 | transaction abort! |
|
574 | transaction abort! | |
563 | rollback completed |
|
575 | rollback completed | |
564 | abort: stream ended unexpectedly (got 0 bytes, expected 4) |
|
576 | abort: stream ended unexpectedly (got 0 bytes, expected 4) | |
565 | [255] |
|
577 | [255] |
@@ -1,210 +1,220 b'' | |||||
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 | #testcases sshv1 sshv2 | |||
|
4 | ||||
|
5 | #if sshv2 | |||
|
6 | $ cat >> $HGRCPATH << EOF | |||
|
7 | > [experimental] | |||
|
8 | > sshpeer.advertise-v2 = true | |||
|
9 | > sshserver.support-v2 = true | |||
|
10 | > EOF | |||
|
11 | #endif | |||
|
12 | ||||
3 | creating 'remote' repo |
|
13 | creating 'remote' repo | |
4 |
|
14 | |||
5 | $ hg init remote |
|
15 | $ hg init remote | |
6 | $ cd remote |
|
16 | $ cd remote | |
7 | $ hg unbundle "$TESTDIR/bundles/remote.hg" |
|
17 | $ hg unbundle "$TESTDIR/bundles/remote.hg" | |
8 | adding changesets |
|
18 | adding changesets | |
9 | adding manifests |
|
19 | adding manifests | |
10 | adding file changes |
|
20 | adding file changes | |
11 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
21 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
12 | new changesets bfaf4b5cbf01:916f1afdef90 |
|
22 | new changesets bfaf4b5cbf01:916f1afdef90 | |
13 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
23 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
14 | $ hg up tip |
|
24 | $ hg up tip | |
15 | 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 | |
16 | $ cd .. |
|
26 | $ cd .. | |
17 |
|
27 | |||
18 | clone remote via stream |
|
28 | clone remote via stream | |
19 |
|
29 | |||
20 | $ for i in 0 1 2 3 4 5 6 7 8; do |
|
30 | $ for i in 0 1 2 3 4 5 6 7 8; do | |
21 | > hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream -r "$i" ssh://user@dummy/remote test-"$i" |
|
31 | > hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream -r "$i" ssh://user@dummy/remote test-"$i" | |
22 | > if cd test-"$i"; then |
|
32 | > if cd test-"$i"; then | |
23 | > hg verify |
|
33 | > hg verify | |
24 | > cd .. |
|
34 | > cd .. | |
25 | > fi |
|
35 | > fi | |
26 | > done |
|
36 | > done | |
27 | adding changesets |
|
37 | adding changesets | |
28 | adding manifests |
|
38 | adding manifests | |
29 | adding file changes |
|
39 | adding file changes | |
30 | added 1 changesets with 1 changes to 1 files |
|
40 | added 1 changesets with 1 changes to 1 files | |
31 | new changesets bfaf4b5cbf01 |
|
41 | new changesets bfaf4b5cbf01 | |
32 | updating to branch default |
|
42 | updating to branch default | |
33 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
43 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
34 | checking changesets |
|
44 | checking changesets | |
35 | checking manifests |
|
45 | checking manifests | |
36 | crosschecking files in changesets and manifests |
|
46 | crosschecking files in changesets and manifests | |
37 | checking files |
|
47 | checking files | |
38 | 1 files, 1 changesets, 1 total revisions |
|
48 | 1 files, 1 changesets, 1 total revisions | |
39 | adding changesets |
|
49 | adding changesets | |
40 | adding manifests |
|
50 | adding manifests | |
41 | adding file changes |
|
51 | adding file changes | |
42 | added 2 changesets with 2 changes to 1 files |
|
52 | added 2 changesets with 2 changes to 1 files | |
43 | new changesets bfaf4b5cbf01:21f32785131f |
|
53 | new changesets bfaf4b5cbf01:21f32785131f | |
44 | updating to branch default |
|
54 | updating to branch default | |
45 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
55 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
46 | checking changesets |
|
56 | checking changesets | |
47 | checking manifests |
|
57 | checking manifests | |
48 | crosschecking files in changesets and manifests |
|
58 | crosschecking files in changesets and manifests | |
49 | checking files |
|
59 | checking files | |
50 | 1 files, 2 changesets, 2 total revisions |
|
60 | 1 files, 2 changesets, 2 total revisions | |
51 | adding changesets |
|
61 | adding changesets | |
52 | adding manifests |
|
62 | adding manifests | |
53 | adding file changes |
|
63 | adding file changes | |
54 | added 3 changesets with 3 changes to 1 files |
|
64 | added 3 changesets with 3 changes to 1 files | |
55 | new changesets bfaf4b5cbf01:4ce51a113780 |
|
65 | new changesets bfaf4b5cbf01:4ce51a113780 | |
56 | updating to branch default |
|
66 | updating to branch default | |
57 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
67 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
58 | checking changesets |
|
68 | checking changesets | |
59 | checking manifests |
|
69 | checking manifests | |
60 | crosschecking files in changesets and manifests |
|
70 | crosschecking files in changesets and manifests | |
61 | checking files |
|
71 | checking files | |
62 | 1 files, 3 changesets, 3 total revisions |
|
72 | 1 files, 3 changesets, 3 total revisions | |
63 | adding changesets |
|
73 | adding changesets | |
64 | adding manifests |
|
74 | adding manifests | |
65 | adding file changes |
|
75 | adding file changes | |
66 | added 4 changesets with 4 changes to 1 files |
|
76 | added 4 changesets with 4 changes to 1 files | |
67 | new changesets bfaf4b5cbf01:93ee6ab32777 |
|
77 | new changesets bfaf4b5cbf01:93ee6ab32777 | |
68 | updating to branch default |
|
78 | updating to branch default | |
69 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
79 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
70 | checking changesets |
|
80 | checking changesets | |
71 | checking manifests |
|
81 | checking manifests | |
72 | crosschecking files in changesets and manifests |
|
82 | crosschecking files in changesets and manifests | |
73 | checking files |
|
83 | checking files | |
74 | 1 files, 4 changesets, 4 total revisions |
|
84 | 1 files, 4 changesets, 4 total revisions | |
75 | adding changesets |
|
85 | adding changesets | |
76 | adding manifests |
|
86 | adding manifests | |
77 | adding file changes |
|
87 | adding file changes | |
78 | added 2 changesets with 2 changes to 1 files |
|
88 | added 2 changesets with 2 changes to 1 files | |
79 | new changesets bfaf4b5cbf01:c70afb1ee985 |
|
89 | new changesets bfaf4b5cbf01:c70afb1ee985 | |
80 | updating to branch default |
|
90 | updating to branch default | |
81 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
91 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
82 | checking changesets |
|
92 | checking changesets | |
83 | checking manifests |
|
93 | checking manifests | |
84 | crosschecking files in changesets and manifests |
|
94 | crosschecking files in changesets and manifests | |
85 | checking files |
|
95 | checking files | |
86 | 1 files, 2 changesets, 2 total revisions |
|
96 | 1 files, 2 changesets, 2 total revisions | |
87 | adding changesets |
|
97 | adding changesets | |
88 | adding manifests |
|
98 | adding manifests | |
89 | adding file changes |
|
99 | adding file changes | |
90 | added 3 changesets with 3 changes to 1 files |
|
100 | added 3 changesets with 3 changes to 1 files | |
91 | new changesets bfaf4b5cbf01:f03ae5a9b979 |
|
101 | new changesets bfaf4b5cbf01:f03ae5a9b979 | |
92 | updating to branch default |
|
102 | updating to branch default | |
93 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
103 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
94 | checking changesets |
|
104 | checking changesets | |
95 | checking manifests |
|
105 | checking manifests | |
96 | crosschecking files in changesets and manifests |
|
106 | crosschecking files in changesets and manifests | |
97 | checking files |
|
107 | checking files | |
98 | 1 files, 3 changesets, 3 total revisions |
|
108 | 1 files, 3 changesets, 3 total revisions | |
99 | adding changesets |
|
109 | adding changesets | |
100 | adding manifests |
|
110 | adding manifests | |
101 | adding file changes |
|
111 | adding file changes | |
102 | added 4 changesets with 5 changes to 2 files |
|
112 | added 4 changesets with 5 changes to 2 files | |
103 | new changesets bfaf4b5cbf01:095cb14b1b4d |
|
113 | new changesets bfaf4b5cbf01:095cb14b1b4d | |
104 | updating to branch default |
|
114 | updating to branch default | |
105 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
115 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
106 | checking changesets |
|
116 | checking changesets | |
107 | checking manifests |
|
117 | checking manifests | |
108 | crosschecking files in changesets and manifests |
|
118 | crosschecking files in changesets and manifests | |
109 | checking files |
|
119 | checking files | |
110 | 2 files, 4 changesets, 5 total revisions |
|
120 | 2 files, 4 changesets, 5 total revisions | |
111 | adding changesets |
|
121 | adding changesets | |
112 | adding manifests |
|
122 | adding manifests | |
113 | adding file changes |
|
123 | adding file changes | |
114 | added 5 changesets with 6 changes to 3 files |
|
124 | added 5 changesets with 6 changes to 3 files | |
115 | new changesets bfaf4b5cbf01:faa2e4234c7a |
|
125 | new changesets bfaf4b5cbf01:faa2e4234c7a | |
116 | updating to branch default |
|
126 | updating to branch default | |
117 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
127 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
118 | checking changesets |
|
128 | checking changesets | |
119 | checking manifests |
|
129 | checking manifests | |
120 | crosschecking files in changesets and manifests |
|
130 | crosschecking files in changesets and manifests | |
121 | checking files |
|
131 | checking files | |
122 | 3 files, 5 changesets, 6 total revisions |
|
132 | 3 files, 5 changesets, 6 total revisions | |
123 | adding changesets |
|
133 | adding changesets | |
124 | adding manifests |
|
134 | adding manifests | |
125 | adding file changes |
|
135 | adding file changes | |
126 | added 5 changesets with 5 changes to 2 files |
|
136 | added 5 changesets with 5 changes to 2 files | |
127 | new changesets bfaf4b5cbf01:916f1afdef90 |
|
137 | new changesets bfaf4b5cbf01:916f1afdef90 | |
128 | updating to branch default |
|
138 | updating to branch default | |
129 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
139 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
130 | checking changesets |
|
140 | checking changesets | |
131 | checking manifests |
|
141 | checking manifests | |
132 | crosschecking files in changesets and manifests |
|
142 | crosschecking files in changesets and manifests | |
133 | checking files |
|
143 | checking files | |
134 | 2 files, 5 changesets, 5 total revisions |
|
144 | 2 files, 5 changesets, 5 total revisions | |
135 | $ cd test-8 |
|
145 | $ cd test-8 | |
136 | $ hg pull ../test-7 |
|
146 | $ hg pull ../test-7 | |
137 | pulling from ../test-7 |
|
147 | pulling from ../test-7 | |
138 | searching for changes |
|
148 | searching for changes | |
139 | adding changesets |
|
149 | adding changesets | |
140 | adding manifests |
|
150 | adding manifests | |
141 | adding file changes |
|
151 | adding file changes | |
142 | added 4 changesets with 2 changes to 3 files (+1 heads) |
|
152 | added 4 changesets with 2 changes to 3 files (+1 heads) | |
143 | new changesets c70afb1ee985:faa2e4234c7a |
|
153 | new changesets c70afb1ee985:faa2e4234c7a | |
144 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
154 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
145 | $ hg verify |
|
155 | $ hg verify | |
146 | checking changesets |
|
156 | checking changesets | |
147 | checking manifests |
|
157 | checking manifests | |
148 | crosschecking files in changesets and manifests |
|
158 | crosschecking files in changesets and manifests | |
149 | checking files |
|
159 | checking files | |
150 | 4 files, 9 changesets, 7 total revisions |
|
160 | 4 files, 9 changesets, 7 total revisions | |
151 | $ cd .. |
|
161 | $ cd .. | |
152 | $ cd test-1 |
|
162 | $ cd test-1 | |
153 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" -r 4 ssh://user@dummy/remote |
|
163 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" -r 4 ssh://user@dummy/remote | |
154 | pulling from ssh://user@dummy/remote |
|
164 | pulling from ssh://user@dummy/remote | |
155 | searching for changes |
|
165 | searching for changes | |
156 | adding changesets |
|
166 | adding changesets | |
157 | adding manifests |
|
167 | adding manifests | |
158 | adding file changes |
|
168 | adding file changes | |
159 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
169 | added 1 changesets with 0 changes to 0 files (+1 heads) | |
160 | new changesets c70afb1ee985 |
|
170 | new changesets c70afb1ee985 | |
161 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
171 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
162 | $ hg verify |
|
172 | $ hg verify | |
163 | checking changesets |
|
173 | checking changesets | |
164 | checking manifests |
|
174 | checking manifests | |
165 | crosschecking files in changesets and manifests |
|
175 | crosschecking files in changesets and manifests | |
166 | checking files |
|
176 | checking files | |
167 | 1 files, 3 changesets, 2 total revisions |
|
177 | 1 files, 3 changesets, 2 total revisions | |
168 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote |
|
178 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote | |
169 | pulling from ssh://user@dummy/remote |
|
179 | pulling from ssh://user@dummy/remote | |
170 | searching for changes |
|
180 | searching for changes | |
171 | adding changesets |
|
181 | adding changesets | |
172 | adding manifests |
|
182 | adding manifests | |
173 | adding file changes |
|
183 | adding file changes | |
174 | added 6 changesets with 5 changes to 4 files |
|
184 | added 6 changesets with 5 changes to 4 files | |
175 | new changesets 4ce51a113780:916f1afdef90 |
|
185 | new changesets 4ce51a113780:916f1afdef90 | |
176 | (run 'hg update' to get a working copy) |
|
186 | (run 'hg update' to get a working copy) | |
177 | $ cd .. |
|
187 | $ cd .. | |
178 | $ cd test-2 |
|
188 | $ cd test-2 | |
179 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" -r 5 ssh://user@dummy/remote |
|
189 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" -r 5 ssh://user@dummy/remote | |
180 | pulling from ssh://user@dummy/remote |
|
190 | pulling from ssh://user@dummy/remote | |
181 | searching for changes |
|
191 | searching for changes | |
182 | adding changesets |
|
192 | adding changesets | |
183 | adding manifests |
|
193 | adding manifests | |
184 | adding file changes |
|
194 | adding file changes | |
185 | added 2 changesets with 0 changes to 0 files (+1 heads) |
|
195 | added 2 changesets with 0 changes to 0 files (+1 heads) | |
186 | new changesets c70afb1ee985:f03ae5a9b979 |
|
196 | new changesets c70afb1ee985:f03ae5a9b979 | |
187 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
197 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
188 | $ hg verify |
|
198 | $ hg verify | |
189 | checking changesets |
|
199 | checking changesets | |
190 | checking manifests |
|
200 | checking manifests | |
191 | crosschecking files in changesets and manifests |
|
201 | crosschecking files in changesets and manifests | |
192 | checking files |
|
202 | checking files | |
193 | 1 files, 5 changesets, 3 total revisions |
|
203 | 1 files, 5 changesets, 3 total revisions | |
194 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote |
|
204 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote | |
195 | pulling from ssh://user@dummy/remote |
|
205 | pulling from ssh://user@dummy/remote | |
196 | searching for changes |
|
206 | searching for changes | |
197 | adding changesets |
|
207 | adding changesets | |
198 | adding manifests |
|
208 | adding manifests | |
199 | adding file changes |
|
209 | adding file changes | |
200 | added 4 changesets with 4 changes to 4 files |
|
210 | added 4 changesets with 4 changes to 4 files | |
201 | new changesets 93ee6ab32777:916f1afdef90 |
|
211 | new changesets 93ee6ab32777:916f1afdef90 | |
202 | (run 'hg update' to get a working copy) |
|
212 | (run 'hg update' to get a working copy) | |
203 | $ hg verify |
|
213 | $ hg verify | |
204 | checking changesets |
|
214 | checking changesets | |
205 | checking manifests |
|
215 | checking manifests | |
206 | crosschecking files in changesets and manifests |
|
216 | crosschecking files in changesets and manifests | |
207 | checking files |
|
217 | checking files | |
208 | 4 files, 9 changesets, 7 total revisions |
|
218 | 4 files, 9 changesets, 7 total revisions | |
209 |
|
219 | |||
210 | $ cd .. |
|
220 | $ cd .. |
@@ -1,629 +1,640 b'' | |||||
|
1 | #testcases sshv1 sshv2 | |||
|
2 | ||||
|
3 | #if sshv2 | |||
|
4 | $ cat >> $HGRCPATH << EOF | |||
|
5 | > [experimental] | |||
|
6 | > sshpeer.advertise-v2 = true | |||
|
7 | > sshserver.support-v2 = true | |||
|
8 | > EOF | |||
|
9 | #endif | |||
1 |
|
10 | |||
2 |
|
|
11 | This test tries to exercise the ssh functionality with a dummy script | |
3 |
|
12 | |||
4 | $ cat <<EOF >> $HGRCPATH |
|
13 | $ cat <<EOF >> $HGRCPATH | |
5 | > [format] |
|
14 | > [format] | |
6 | > usegeneraldelta=yes |
|
15 | > usegeneraldelta=yes | |
7 | > EOF |
|
16 | > EOF | |
8 |
|
17 | |||
9 | creating 'remote' repo |
|
18 | creating 'remote' repo | |
10 |
|
19 | |||
11 | $ hg init remote |
|
20 | $ hg init remote | |
12 | $ cd remote |
|
21 | $ cd remote | |
13 | $ echo this > foo |
|
22 | $ echo this > foo | |
14 | $ echo this > fooO |
|
23 | $ echo this > fooO | |
15 | $ hg ci -A -m "init" foo fooO |
|
24 | $ hg ci -A -m "init" foo fooO | |
16 |
|
25 | |||
17 | insert a closed branch (issue4428) |
|
26 | insert a closed branch (issue4428) | |
18 |
|
27 | |||
19 | $ hg up null |
|
28 | $ hg up null | |
20 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
29 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
21 | $ hg branch closed |
|
30 | $ hg branch closed | |
22 | marked working directory as branch closed |
|
31 | marked working directory as branch closed | |
23 | (branches are permanent and global, did you want a bookmark?) |
|
32 | (branches are permanent and global, did you want a bookmark?) | |
24 | $ hg ci -mc0 |
|
33 | $ hg ci -mc0 | |
25 | $ hg ci --close-branch -mc1 |
|
34 | $ hg ci --close-branch -mc1 | |
26 | $ hg up -q default |
|
35 | $ hg up -q default | |
27 |
|
36 | |||
28 | configure for serving |
|
37 | configure for serving | |
29 |
|
38 | |||
30 | $ cat <<EOF > .hg/hgrc |
|
39 | $ cat <<EOF > .hg/hgrc | |
31 | > [server] |
|
40 | > [server] | |
32 | > uncompressed = True |
|
41 | > uncompressed = True | |
33 | > |
|
42 | > | |
34 | > [hooks] |
|
43 | > [hooks] | |
35 | > changegroup = sh -c "printenv.py changegroup-in-remote 0 ../dummylog" |
|
44 | > changegroup = sh -c "printenv.py changegroup-in-remote 0 ../dummylog" | |
36 | > EOF |
|
45 | > EOF | |
37 | $ cd .. |
|
46 | $ cd .. | |
38 |
|
47 | |||
39 | repo not found error |
|
48 | repo not found error | |
40 |
|
49 | |||
41 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local |
|
50 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local | |
42 | remote: abort: repository nonexistent not found! |
|
51 | remote: abort: repository nonexistent not found! | |
43 | abort: no suitable response from remote hg! |
|
52 | abort: no suitable response from remote hg! | |
44 | [255] |
|
53 | [255] | |
45 |
|
54 | |||
46 | non-existent absolute path |
|
55 | non-existent absolute path | |
47 |
|
56 | |||
48 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/nonexistent local |
|
57 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/nonexistent local | |
49 | remote: abort: repository $TESTTMP/nonexistent not found! |
|
58 | remote: abort: repository $TESTTMP/nonexistent not found! | |
50 | abort: no suitable response from remote hg! |
|
59 | abort: no suitable response from remote hg! | |
51 | [255] |
|
60 | [255] | |
52 |
|
61 | |||
53 | clone remote via stream |
|
62 | clone remote via stream | |
54 |
|
63 | |||
55 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/remote local-stream |
|
64 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/remote local-stream | |
56 | streaming all changes |
|
65 | streaming all changes | |
57 | 4 files to transfer, 602 bytes of data |
|
66 | 4 files to transfer, 602 bytes of data | |
58 | transferred 602 bytes in * seconds (*) (glob) |
|
67 | transferred 602 bytes in * seconds (*) (glob) | |
59 | searching for changes |
|
68 | searching for changes | |
60 | no changes found |
|
69 | no changes found | |
61 | updating to branch default |
|
70 | updating to branch default | |
62 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
71 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
63 | $ cd local-stream |
|
72 | $ cd local-stream | |
64 | $ hg verify |
|
73 | $ hg verify | |
65 | checking changesets |
|
74 | checking changesets | |
66 | checking manifests |
|
75 | checking manifests | |
67 | crosschecking files in changesets and manifests |
|
76 | crosschecking files in changesets and manifests | |
68 | checking files |
|
77 | checking files | |
69 | 2 files, 3 changesets, 2 total revisions |
|
78 | 2 files, 3 changesets, 2 total revisions | |
70 | $ hg branches |
|
79 | $ hg branches | |
71 | default 0:1160648e36ce |
|
80 | default 0:1160648e36ce | |
72 | $ cd .. |
|
81 | $ cd .. | |
73 |
|
82 | |||
74 | clone bookmarks via stream |
|
83 | clone bookmarks via stream | |
75 |
|
84 | |||
76 | $ hg -R local-stream book mybook |
|
85 | $ hg -R local-stream book mybook | |
77 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2 |
|
86 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2 | |
78 | streaming all changes |
|
87 | streaming all changes | |
79 | 4 files to transfer, 602 bytes of data |
|
88 | 4 files to transfer, 602 bytes of data | |
80 | transferred 602 bytes in * seconds (*) (glob) |
|
89 | transferred 602 bytes in * seconds (*) (glob) | |
81 | searching for changes |
|
90 | searching for changes | |
82 | no changes found |
|
91 | no changes found | |
83 | updating to branch default |
|
92 | updating to branch default | |
84 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
93 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
85 | $ cd stream2 |
|
94 | $ cd stream2 | |
86 | $ hg book |
|
95 | $ hg book | |
87 | mybook 0:1160648e36ce |
|
96 | mybook 0:1160648e36ce | |
88 | $ cd .. |
|
97 | $ cd .. | |
89 | $ rm -rf local-stream stream2 |
|
98 | $ rm -rf local-stream stream2 | |
90 |
|
99 | |||
91 | clone remote via pull |
|
100 | clone remote via pull | |
92 |
|
101 | |||
93 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local |
|
102 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local | |
94 | requesting all changes |
|
103 | requesting all changes | |
95 | adding changesets |
|
104 | adding changesets | |
96 | adding manifests |
|
105 | adding manifests | |
97 | adding file changes |
|
106 | adding file changes | |
98 | added 3 changesets with 2 changes to 2 files |
|
107 | added 3 changesets with 2 changes to 2 files | |
99 | new changesets 1160648e36ce:ad076bfb429d |
|
108 | new changesets 1160648e36ce:ad076bfb429d | |
100 | updating to branch default |
|
109 | updating to branch default | |
101 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
110 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
102 |
|
111 | |||
103 | verify |
|
112 | verify | |
104 |
|
113 | |||
105 | $ cd local |
|
114 | $ cd local | |
106 | $ hg verify |
|
115 | $ hg verify | |
107 | checking changesets |
|
116 | checking changesets | |
108 | checking manifests |
|
117 | checking manifests | |
109 | crosschecking files in changesets and manifests |
|
118 | crosschecking files in changesets and manifests | |
110 | checking files |
|
119 | checking files | |
111 | 2 files, 3 changesets, 2 total revisions |
|
120 | 2 files, 3 changesets, 2 total revisions | |
112 | $ cat >> .hg/hgrc <<EOF |
|
121 | $ cat >> .hg/hgrc <<EOF | |
113 | > [hooks] |
|
122 | > [hooks] | |
114 | > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog" |
|
123 | > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog" | |
115 | > EOF |
|
124 | > EOF | |
116 |
|
125 | |||
117 | empty default pull |
|
126 | empty default pull | |
118 |
|
127 | |||
119 | $ hg paths |
|
128 | $ hg paths | |
120 | default = ssh://user@dummy/remote |
|
129 | default = ssh://user@dummy/remote | |
121 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" |
|
130 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" | |
122 | pulling from ssh://user@dummy/remote |
|
131 | pulling from ssh://user@dummy/remote | |
123 | searching for changes |
|
132 | searching for changes | |
124 | no changes found |
|
133 | no changes found | |
125 |
|
134 | |||
126 | pull from wrong ssh URL |
|
135 | pull from wrong ssh URL | |
127 |
|
136 | |||
128 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist |
|
137 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist | |
129 | pulling from ssh://user@dummy/doesnotexist |
|
138 | pulling from ssh://user@dummy/doesnotexist | |
130 | remote: abort: repository doesnotexist not found! |
|
139 | remote: abort: repository doesnotexist not found! | |
131 | abort: no suitable response from remote hg! |
|
140 | abort: no suitable response from remote hg! | |
132 | [255] |
|
141 | [255] | |
133 |
|
142 | |||
134 | local change |
|
143 | local change | |
135 |
|
144 | |||
136 | $ echo bleah > foo |
|
145 | $ echo bleah > foo | |
137 | $ hg ci -m "add" |
|
146 | $ hg ci -m "add" | |
138 |
|
147 | |||
139 | updating rc |
|
148 | updating rc | |
140 |
|
149 | |||
141 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
150 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc | |
142 | $ echo "[ui]" >> .hg/hgrc |
|
151 | $ echo "[ui]" >> .hg/hgrc | |
143 | $ echo "ssh = \"$PYTHON\" \"$TESTDIR/dummyssh\"" >> .hg/hgrc |
|
152 | $ echo "ssh = \"$PYTHON\" \"$TESTDIR/dummyssh\"" >> .hg/hgrc | |
144 |
|
153 | |||
145 | find outgoing |
|
154 | find outgoing | |
146 |
|
155 | |||
147 | $ hg out ssh://user@dummy/remote |
|
156 | $ hg out ssh://user@dummy/remote | |
148 | comparing with ssh://user@dummy/remote |
|
157 | comparing with ssh://user@dummy/remote | |
149 | searching for changes |
|
158 | searching for changes | |
150 | changeset: 3:a28a9d1a809c |
|
159 | changeset: 3:a28a9d1a809c | |
151 | tag: tip |
|
160 | tag: tip | |
152 | parent: 0:1160648e36ce |
|
161 | parent: 0:1160648e36ce | |
153 | user: test |
|
162 | user: test | |
154 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
163 | date: Thu Jan 01 00:00:00 1970 +0000 | |
155 | summary: add |
|
164 | summary: add | |
156 |
|
165 | |||
157 |
|
166 | |||
158 | find incoming on the remote side |
|
167 | find incoming on the remote side | |
159 |
|
168 | |||
160 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/local |
|
169 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/local | |
161 | comparing with ssh://user@dummy/local |
|
170 | comparing with ssh://user@dummy/local | |
162 | searching for changes |
|
171 | searching for changes | |
163 | changeset: 3:a28a9d1a809c |
|
172 | changeset: 3:a28a9d1a809c | |
164 | tag: tip |
|
173 | tag: tip | |
165 | parent: 0:1160648e36ce |
|
174 | parent: 0:1160648e36ce | |
166 | user: test |
|
175 | user: test | |
167 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
176 | date: Thu Jan 01 00:00:00 1970 +0000 | |
168 | summary: add |
|
177 | summary: add | |
169 |
|
178 | |||
170 |
|
179 | |||
171 | find incoming on the remote side (using absolute path) |
|
180 | find incoming on the remote side (using absolute path) | |
172 |
|
181 | |||
173 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" |
|
182 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" | |
174 | comparing with ssh://user@dummy/$TESTTMP/local |
|
183 | comparing with ssh://user@dummy/$TESTTMP/local | |
175 | searching for changes |
|
184 | searching for changes | |
176 | changeset: 3:a28a9d1a809c |
|
185 | changeset: 3:a28a9d1a809c | |
177 | tag: tip |
|
186 | tag: tip | |
178 | parent: 0:1160648e36ce |
|
187 | parent: 0:1160648e36ce | |
179 | user: test |
|
188 | user: test | |
180 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
189 | date: Thu Jan 01 00:00:00 1970 +0000 | |
181 | summary: add |
|
190 | summary: add | |
182 |
|
191 | |||
183 |
|
192 | |||
184 | push |
|
193 | push | |
185 |
|
194 | |||
186 | $ hg push |
|
195 | $ hg push | |
187 | pushing to ssh://user@dummy/remote |
|
196 | pushing to ssh://user@dummy/remote | |
188 | searching for changes |
|
197 | searching for changes | |
189 | remote: adding changesets |
|
198 | remote: adding changesets | |
190 | remote: adding manifests |
|
199 | remote: adding manifests | |
191 | remote: adding file changes |
|
200 | remote: adding file changes | |
192 | remote: added 1 changesets with 1 changes to 1 files |
|
201 | remote: added 1 changesets with 1 changes to 1 files | |
193 | $ cd ../remote |
|
202 | $ cd ../remote | |
194 |
|
203 | |||
195 | check remote tip |
|
204 | check remote tip | |
196 |
|
205 | |||
197 | $ hg tip |
|
206 | $ hg tip | |
198 | changeset: 3:a28a9d1a809c |
|
207 | changeset: 3:a28a9d1a809c | |
199 | tag: tip |
|
208 | tag: tip | |
200 | parent: 0:1160648e36ce |
|
209 | parent: 0:1160648e36ce | |
201 | user: test |
|
210 | user: test | |
202 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
211 | date: Thu Jan 01 00:00:00 1970 +0000 | |
203 | summary: add |
|
212 | summary: add | |
204 |
|
213 | |||
205 | $ hg verify |
|
214 | $ hg verify | |
206 | checking changesets |
|
215 | checking changesets | |
207 | checking manifests |
|
216 | checking manifests | |
208 | crosschecking files in changesets and manifests |
|
217 | crosschecking files in changesets and manifests | |
209 | checking files |
|
218 | checking files | |
210 | 2 files, 4 changesets, 3 total revisions |
|
219 | 2 files, 4 changesets, 3 total revisions | |
211 | $ hg cat -r tip foo |
|
220 | $ hg cat -r tip foo | |
212 | bleah |
|
221 | bleah | |
213 | $ echo z > z |
|
222 | $ echo z > z | |
214 | $ hg ci -A -m z z |
|
223 | $ hg ci -A -m z z | |
215 | created new head |
|
224 | created new head | |
216 |
|
225 | |||
217 | test pushkeys and bookmarks |
|
226 | test pushkeys and bookmarks | |
218 |
|
227 | |||
219 | $ cd ../local |
|
228 | $ cd ../local | |
220 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces |
|
229 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces | |
221 | bookmarks |
|
230 | bookmarks | |
222 | namespaces |
|
231 | namespaces | |
223 | phases |
|
232 | phases | |
224 | $ hg book foo -r 0 |
|
233 | $ hg book foo -r 0 | |
225 | $ hg out -B |
|
234 | $ hg out -B | |
226 | comparing with ssh://user@dummy/remote |
|
235 | comparing with ssh://user@dummy/remote | |
227 | searching for changed bookmarks |
|
236 | searching for changed bookmarks | |
228 | foo 1160648e36ce |
|
237 | foo 1160648e36ce | |
229 | $ hg push -B foo |
|
238 | $ hg push -B foo | |
230 | pushing to ssh://user@dummy/remote |
|
239 | pushing to ssh://user@dummy/remote | |
231 | searching for changes |
|
240 | searching for changes | |
232 | no changes found |
|
241 | no changes found | |
233 | exporting bookmark foo |
|
242 | exporting bookmark foo | |
234 | [1] |
|
243 | [1] | |
235 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks |
|
244 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks | |
236 | foo 1160648e36cec0054048a7edc4110c6f84fde594 |
|
245 | foo 1160648e36cec0054048a7edc4110c6f84fde594 | |
237 | $ hg book -f foo |
|
246 | $ hg book -f foo | |
238 | $ hg push --traceback |
|
247 | $ hg push --traceback | |
239 | pushing to ssh://user@dummy/remote |
|
248 | pushing to ssh://user@dummy/remote | |
240 | searching for changes |
|
249 | searching for changes | |
241 | no changes found |
|
250 | no changes found | |
242 | updating bookmark foo |
|
251 | updating bookmark foo | |
243 | [1] |
|
252 | [1] | |
244 | $ hg book -d foo |
|
253 | $ hg book -d foo | |
245 | $ hg in -B |
|
254 | $ hg in -B | |
246 | comparing with ssh://user@dummy/remote |
|
255 | comparing with ssh://user@dummy/remote | |
247 | searching for changed bookmarks |
|
256 | searching for changed bookmarks | |
248 | foo a28a9d1a809c |
|
257 | foo a28a9d1a809c | |
249 | $ hg book -f -r 0 foo |
|
258 | $ hg book -f -r 0 foo | |
250 | $ hg pull -B foo |
|
259 | $ hg pull -B foo | |
251 | pulling from ssh://user@dummy/remote |
|
260 | pulling from ssh://user@dummy/remote | |
252 | no changes found |
|
261 | no changes found | |
253 | updating bookmark foo |
|
262 | updating bookmark foo | |
254 | $ hg book -d foo |
|
263 | $ hg book -d foo | |
255 | $ hg push -B foo |
|
264 | $ hg push -B foo | |
256 | pushing to ssh://user@dummy/remote |
|
265 | pushing to ssh://user@dummy/remote | |
257 | searching for changes |
|
266 | searching for changes | |
258 | no changes found |
|
267 | no changes found | |
259 | deleting remote bookmark foo |
|
268 | deleting remote bookmark foo | |
260 | [1] |
|
269 | [1] | |
261 |
|
270 | |||
262 | a bad, evil hook that prints to stdout |
|
271 | a bad, evil hook that prints to stdout | |
263 |
|
272 | |||
264 | $ cat <<EOF > $TESTTMP/badhook |
|
273 | $ cat <<EOF > $TESTTMP/badhook | |
265 | > import sys |
|
274 | > import sys | |
266 | > sys.stdout.write("KABOOM\n") |
|
275 | > sys.stdout.write("KABOOM\n") | |
267 | > EOF |
|
276 | > EOF | |
268 |
|
277 | |||
269 | $ cat <<EOF > $TESTTMP/badpyhook.py |
|
278 | $ cat <<EOF > $TESTTMP/badpyhook.py | |
270 | > import sys |
|
279 | > import sys | |
271 | > def hook(ui, repo, hooktype, **kwargs): |
|
280 | > def hook(ui, repo, hooktype, **kwargs): | |
272 | > sys.stdout.write("KABOOM IN PROCESS\n") |
|
281 | > sys.stdout.write("KABOOM IN PROCESS\n") | |
273 | > EOF |
|
282 | > EOF | |
274 |
|
283 | |||
275 | $ cat <<EOF >> ../remote/.hg/hgrc |
|
284 | $ cat <<EOF >> ../remote/.hg/hgrc | |
276 | > [hooks] |
|
285 | > [hooks] | |
277 | > changegroup.stdout = $PYTHON $TESTTMP/badhook |
|
286 | > changegroup.stdout = $PYTHON $TESTTMP/badhook | |
278 | > changegroup.pystdout = python:$TESTTMP/badpyhook.py:hook |
|
287 | > changegroup.pystdout = python:$TESTTMP/badpyhook.py:hook | |
279 | > EOF |
|
288 | > EOF | |
280 | $ echo r > r |
|
289 | $ echo r > r | |
281 | $ hg ci -A -m z r |
|
290 | $ hg ci -A -m z r | |
282 |
|
291 | |||
283 | push should succeed even though it has an unexpected response |
|
292 | push should succeed even though it has an unexpected response | |
284 |
|
293 | |||
285 | $ hg push |
|
294 | $ hg push | |
286 | pushing to ssh://user@dummy/remote |
|
295 | pushing to ssh://user@dummy/remote | |
287 | searching for changes |
|
296 | searching for changes | |
288 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 |
|
297 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 | |
289 | remote: adding changesets |
|
298 | remote: adding changesets | |
290 | remote: adding manifests |
|
299 | remote: adding manifests | |
291 | remote: adding file changes |
|
300 | remote: adding file changes | |
292 | remote: added 1 changesets with 1 changes to 1 files |
|
301 | remote: added 1 changesets with 1 changes to 1 files | |
293 | remote: KABOOM |
|
302 | remote: KABOOM | |
294 | remote: KABOOM IN PROCESS |
|
303 | remote: KABOOM IN PROCESS | |
295 | $ hg -R ../remote heads |
|
304 | $ hg -R ../remote heads | |
296 | changeset: 5:1383141674ec |
|
305 | changeset: 5:1383141674ec | |
297 | tag: tip |
|
306 | tag: tip | |
298 | parent: 3:a28a9d1a809c |
|
307 | parent: 3:a28a9d1a809c | |
299 | user: test |
|
308 | user: test | |
300 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
309 | date: Thu Jan 01 00:00:00 1970 +0000 | |
301 | summary: z |
|
310 | summary: z | |
302 |
|
311 | |||
303 | changeset: 4:6c0482d977a3 |
|
312 | changeset: 4:6c0482d977a3 | |
304 | parent: 0:1160648e36ce |
|
313 | parent: 0:1160648e36ce | |
305 | user: test |
|
314 | user: test | |
306 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
315 | date: Thu Jan 01 00:00:00 1970 +0000 | |
307 | summary: z |
|
316 | summary: z | |
308 |
|
317 | |||
309 |
|
318 | |||
310 | clone bookmarks |
|
319 | clone bookmarks | |
311 |
|
320 | |||
312 | $ hg -R ../remote bookmark test |
|
321 | $ hg -R ../remote bookmark test | |
313 | $ hg -R ../remote bookmarks |
|
322 | $ hg -R ../remote bookmarks | |
314 | * test 4:6c0482d977a3 |
|
323 | * test 4:6c0482d977a3 | |
315 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks |
|
324 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks | |
316 | requesting all changes |
|
325 | requesting all changes | |
317 | adding changesets |
|
326 | adding changesets | |
318 | adding manifests |
|
327 | adding manifests | |
319 | adding file changes |
|
328 | adding file changes | |
320 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
329 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
321 | new changesets 1160648e36ce:1383141674ec |
|
330 | new changesets 1160648e36ce:1383141674ec | |
322 | updating to branch default |
|
331 | updating to branch default | |
323 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
332 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
324 | $ hg -R local-bookmarks bookmarks |
|
333 | $ hg -R local-bookmarks bookmarks | |
325 | test 4:6c0482d977a3 |
|
334 | test 4:6c0482d977a3 | |
326 |
|
335 | |||
327 | passwords in ssh urls are not supported |
|
336 | passwords in ssh urls are not supported | |
328 | (we use a glob here because different Python versions give different |
|
337 | (we use a glob here because different Python versions give different | |
329 | results here) |
|
338 | results here) | |
330 |
|
339 | |||
331 | $ hg push ssh://user:erroneouspwd@dummy/remote |
|
340 | $ hg push ssh://user:erroneouspwd@dummy/remote | |
332 | pushing to ssh://user:*@dummy/remote (glob) |
|
341 | pushing to ssh://user:*@dummy/remote (glob) | |
333 | abort: password in URL not supported! |
|
342 | abort: password in URL not supported! | |
334 | [255] |
|
343 | [255] | |
335 |
|
344 | |||
336 | $ cd .. |
|
345 | $ cd .. | |
337 |
|
346 | |||
338 | hide outer repo |
|
347 | hide outer repo | |
339 | $ hg init |
|
348 | $ hg init | |
340 |
|
349 | |||
341 | Test remote paths with spaces (issue2983): |
|
350 | Test remote paths with spaces (issue2983): | |
342 |
|
351 | |||
343 | $ hg init --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
352 | $ hg init --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
344 | $ touch "$TESTTMP/a repo/test" |
|
353 | $ touch "$TESTTMP/a repo/test" | |
345 | $ hg -R 'a repo' commit -A -m "test" |
|
354 | $ hg -R 'a repo' commit -A -m "test" | |
346 | adding test |
|
355 | adding test | |
347 | $ hg -R 'a repo' tag tag |
|
356 | $ hg -R 'a repo' tag tag | |
348 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
357 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
349 | 73649e48688a |
|
358 | 73649e48688a | |
350 |
|
359 | |||
351 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO" |
|
360 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO" | |
352 | abort: unknown revision 'noNoNO'! |
|
361 | abort: unknown revision 'noNoNO'! | |
353 | [255] |
|
362 | [255] | |
354 |
|
363 | |||
355 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): |
|
364 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): | |
356 |
|
365 | |||
357 | $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
366 | $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
358 | destination directory: a repo |
|
367 | destination directory: a repo | |
359 | abort: destination 'a repo' is not empty |
|
368 | abort: destination 'a repo' is not empty | |
360 | [255] |
|
369 | [255] | |
361 |
|
370 | |||
362 | Make sure hg is really paranoid in serve --stdio mode. It used to be |
|
371 | Make sure hg is really paranoid in serve --stdio mode. It used to be | |
363 | possible to get a debugger REPL by specifying a repo named --debugger. |
|
372 | possible to get a debugger REPL by specifying a repo named --debugger. | |
364 | $ hg -R --debugger serve --stdio |
|
373 | $ hg -R --debugger serve --stdio | |
365 | abort: potentially unsafe serve --stdio invocation: ['-R', '--debugger', 'serve', '--stdio'] |
|
374 | abort: potentially unsafe serve --stdio invocation: ['-R', '--debugger', 'serve', '--stdio'] | |
366 | [255] |
|
375 | [255] | |
367 | $ hg -R --config=ui.debugger=yes serve --stdio |
|
376 | $ hg -R --config=ui.debugger=yes serve --stdio | |
368 | abort: potentially unsafe serve --stdio invocation: ['-R', '--config=ui.debugger=yes', 'serve', '--stdio'] |
|
377 | abort: potentially unsafe serve --stdio invocation: ['-R', '--config=ui.debugger=yes', 'serve', '--stdio'] | |
369 | [255] |
|
378 | [255] | |
370 | Abbreviations of 'serve' also don't work, to avoid shenanigans. |
|
379 | Abbreviations of 'serve' also don't work, to avoid shenanigans. | |
371 | $ hg -R narf serv --stdio |
|
380 | $ hg -R narf serv --stdio | |
372 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] |
|
381 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] | |
373 | [255] |
|
382 | [255] | |
374 |
|
383 | |||
375 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might |
|
384 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might | |
376 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right |
|
385 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right | |
377 | parameters: |
|
386 | parameters: | |
378 |
|
387 | |||
379 | $ cat > ssh.sh << EOF |
|
388 | $ cat > ssh.sh << EOF | |
380 | > userhost="\$1" |
|
389 | > userhost="\$1" | |
381 | > SSH_ORIGINAL_COMMAND="\$2" |
|
390 | > SSH_ORIGINAL_COMMAND="\$2" | |
382 | > export SSH_ORIGINAL_COMMAND |
|
391 | > export SSH_ORIGINAL_COMMAND | |
383 | > PYTHONPATH="$PYTHONPATH" |
|
392 | > PYTHONPATH="$PYTHONPATH" | |
384 | > export PYTHONPATH |
|
393 | > export PYTHONPATH | |
385 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" |
|
394 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" | |
386 | > EOF |
|
395 | > EOF | |
387 |
|
396 | |||
388 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" |
|
397 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" | |
389 | 73649e48688a |
|
398 | 73649e48688a | |
390 |
|
399 | |||
391 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" |
|
400 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" | |
392 | remote: Illegal repository "$TESTTMP/a'repo" |
|
401 | remote: Illegal repository "$TESTTMP/a'repo" | |
393 | abort: no suitable response from remote hg! |
|
402 | abort: no suitable response from remote hg! | |
394 | [255] |
|
403 | [255] | |
395 |
|
404 | |||
396 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" |
|
405 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" | |
397 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" |
|
406 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" | |
398 | abort: no suitable response from remote hg! |
|
407 | abort: no suitable response from remote hg! | |
399 | [255] |
|
408 | [255] | |
400 |
|
409 | |||
401 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" $PYTHON "$TESTDIR/../contrib/hg-ssh" |
|
410 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" $PYTHON "$TESTDIR/../contrib/hg-ssh" | |
402 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation |
|
411 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation | |
403 | [255] |
|
412 | [255] | |
404 |
|
413 | |||
405 | Test hg-ssh in read-only mode: |
|
414 | Test hg-ssh in read-only mode: | |
406 |
|
415 | |||
407 | $ cat > ssh.sh << EOF |
|
416 | $ cat > ssh.sh << EOF | |
408 | > userhost="\$1" |
|
417 | > userhost="\$1" | |
409 | > SSH_ORIGINAL_COMMAND="\$2" |
|
418 | > SSH_ORIGINAL_COMMAND="\$2" | |
410 | > export SSH_ORIGINAL_COMMAND |
|
419 | > export SSH_ORIGINAL_COMMAND | |
411 | > PYTHONPATH="$PYTHONPATH" |
|
420 | > PYTHONPATH="$PYTHONPATH" | |
412 | > export PYTHONPATH |
|
421 | > export PYTHONPATH | |
413 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" |
|
422 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" | |
414 | > EOF |
|
423 | > EOF | |
415 |
|
424 | |||
416 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local |
|
425 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local | |
417 | requesting all changes |
|
426 | requesting all changes | |
418 | adding changesets |
|
427 | adding changesets | |
419 | adding manifests |
|
428 | adding manifests | |
420 | adding file changes |
|
429 | adding file changes | |
421 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
430 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
422 | new changesets 1160648e36ce:1383141674ec |
|
431 | new changesets 1160648e36ce:1383141674ec | |
423 | updating to branch default |
|
432 | updating to branch default | |
424 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
433 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
425 |
|
434 | |||
426 | $ cd read-only-local |
|
435 | $ cd read-only-local | |
427 | $ echo "baz" > bar |
|
436 | $ echo "baz" > bar | |
428 | $ hg ci -A -m "unpushable commit" bar |
|
437 | $ hg ci -A -m "unpushable commit" bar | |
429 | $ hg push --ssh "sh ../ssh.sh" |
|
438 | $ hg push --ssh "sh ../ssh.sh" | |
430 | pushing to ssh://user@dummy/*/remote (glob) |
|
439 | pushing to ssh://user@dummy/*/remote (glob) | |
431 | searching for changes |
|
440 | searching for changes | |
432 | remote: Permission denied |
|
441 | remote: Permission denied | |
433 | remote: pretxnopen.hg-ssh hook failed |
|
442 | remote: pretxnopen.hg-ssh hook failed | |
434 | abort: push failed on remote |
|
443 | abort: push failed on remote | |
435 | [255] |
|
444 | [255] | |
436 |
|
445 | |||
437 | $ cd .. |
|
446 | $ cd .. | |
438 |
|
447 | |||
439 | stderr from remote commands should be printed before stdout from local code (issue4336) |
|
448 | stderr from remote commands should be printed before stdout from local code (issue4336) | |
440 |
|
449 | |||
441 | $ hg clone remote stderr-ordering |
|
450 | $ hg clone remote stderr-ordering | |
442 | updating to branch default |
|
451 | updating to branch default | |
443 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
452 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
444 | $ cd stderr-ordering |
|
453 | $ cd stderr-ordering | |
445 | $ cat >> localwrite.py << EOF |
|
454 | $ cat >> localwrite.py << EOF | |
446 | > from mercurial import exchange, extensions |
|
455 | > from mercurial import exchange, extensions | |
447 | > |
|
456 | > | |
448 | > def wrappedpush(orig, repo, *args, **kwargs): |
|
457 | > def wrappedpush(orig, repo, *args, **kwargs): | |
449 | > res = orig(repo, *args, **kwargs) |
|
458 | > res = orig(repo, *args, **kwargs) | |
450 | > repo.ui.write('local stdout\n') |
|
459 | > repo.ui.write('local stdout\n') | |
451 | > return res |
|
460 | > return res | |
452 | > |
|
461 | > | |
453 | > def extsetup(ui): |
|
462 | > def extsetup(ui): | |
454 | > extensions.wrapfunction(exchange, 'push', wrappedpush) |
|
463 | > extensions.wrapfunction(exchange, 'push', wrappedpush) | |
455 | > EOF |
|
464 | > EOF | |
456 |
|
465 | |||
457 | $ cat >> .hg/hgrc << EOF |
|
466 | $ cat >> .hg/hgrc << EOF | |
458 | > [paths] |
|
467 | > [paths] | |
459 | > default-push = ssh://user@dummy/remote |
|
468 | > default-push = ssh://user@dummy/remote | |
460 | > [ui] |
|
469 | > [ui] | |
461 | > ssh = "$PYTHON" "$TESTDIR/dummyssh" |
|
470 | > ssh = "$PYTHON" "$TESTDIR/dummyssh" | |
462 | > [extensions] |
|
471 | > [extensions] | |
463 | > localwrite = localwrite.py |
|
472 | > localwrite = localwrite.py | |
464 | > EOF |
|
473 | > EOF | |
465 |
|
474 | |||
466 | $ echo localwrite > foo |
|
475 | $ echo localwrite > foo | |
467 | $ hg commit -m 'testing localwrite' |
|
476 | $ hg commit -m 'testing localwrite' | |
468 | $ hg push |
|
477 | $ hg push | |
469 | pushing to ssh://user@dummy/remote |
|
478 | pushing to ssh://user@dummy/remote | |
470 | searching for changes |
|
479 | searching for changes | |
471 | remote: adding changesets |
|
480 | remote: adding changesets | |
472 | remote: adding manifests |
|
481 | remote: adding manifests | |
473 | remote: adding file changes |
|
482 | remote: adding file changes | |
474 | remote: added 1 changesets with 1 changes to 1 files |
|
483 | remote: added 1 changesets with 1 changes to 1 files | |
475 | remote: KABOOM |
|
484 | remote: KABOOM | |
476 | remote: KABOOM IN PROCESS |
|
485 | remote: KABOOM IN PROCESS | |
477 | local stdout |
|
486 | local stdout | |
478 |
|
487 | |||
479 | debug output |
|
488 | debug output | |
480 |
|
489 | |||
481 | $ hg pull --debug ssh://user@dummy/remote --config devel.debug.peer-request=yes |
|
490 | $ hg pull --debug ssh://user@dummy/remote --config devel.debug.peer-request=yes | |
482 | pulling from ssh://user@dummy/remote |
|
491 | pulling from ssh://user@dummy/remote | |
483 | running .* ".*/dummyssh" ['"]user@dummy['"] ('|")hg -R remote serve --stdio('|") (re) |
|
492 | running .* ".*/dummyssh" ['"]user@dummy['"] ('|")hg -R remote serve --stdio('|") (re) | |
|
493 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) | |||
484 | devel-peer-request: hello |
|
494 | devel-peer-request: hello | |
485 | sending hello command |
|
495 | sending hello command | |
486 | devel-peer-request: between |
|
496 | devel-peer-request: between | |
487 | devel-peer-request: pairs: 81 bytes |
|
497 | devel-peer-request: pairs: 81 bytes | |
488 | sending between command |
|
498 | sending between command | |
489 | remote: 384 |
|
499 | remote: 384 (sshv1 !) | |
|
500 | protocol upgraded to exp-ssh-v2-0001 (sshv2 !) | |||
490 | remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
|
501 | remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN | |
491 | remote: 1 |
|
502 | remote: 1 (sshv1 !) | |
492 | query 1; heads |
|
503 | query 1; heads | |
493 | devel-peer-request: batch |
|
504 | devel-peer-request: batch | |
494 | devel-peer-request: cmds: 141 bytes |
|
505 | devel-peer-request: cmds: 141 bytes | |
495 | sending batch command |
|
506 | sending batch command | |
496 | searching for changes |
|
507 | searching for changes | |
497 | all remote heads known locally |
|
508 | all remote heads known locally | |
498 | no changes found |
|
509 | no changes found | |
499 | devel-peer-request: getbundle |
|
510 | devel-peer-request: getbundle | |
500 | devel-peer-request: bookmarks: 1 bytes |
|
511 | devel-peer-request: bookmarks: 1 bytes | |
501 | devel-peer-request: bundlecaps: 247 bytes |
|
512 | devel-peer-request: bundlecaps: 247 bytes | |
502 | devel-peer-request: cg: 1 bytes |
|
513 | devel-peer-request: cg: 1 bytes | |
503 | devel-peer-request: common: 122 bytes |
|
514 | devel-peer-request: common: 122 bytes | |
504 | devel-peer-request: heads: 122 bytes |
|
515 | devel-peer-request: heads: 122 bytes | |
505 | devel-peer-request: listkeys: 9 bytes |
|
516 | devel-peer-request: listkeys: 9 bytes | |
506 | devel-peer-request: phases: 1 bytes |
|
517 | devel-peer-request: phases: 1 bytes | |
507 | sending getbundle command |
|
518 | sending getbundle command | |
508 | bundle2-input-bundle: with-transaction |
|
519 | bundle2-input-bundle: with-transaction | |
509 | bundle2-input-part: "bookmarks" supported |
|
520 | bundle2-input-part: "bookmarks" supported | |
510 | bundle2-input-part: total payload size 26 |
|
521 | bundle2-input-part: total payload size 26 | |
511 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
522 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
512 | bundle2-input-part: total payload size 45 |
|
523 | bundle2-input-part: total payload size 45 | |
513 | bundle2-input-part: "phase-heads" supported |
|
524 | bundle2-input-part: "phase-heads" supported | |
514 | bundle2-input-part: total payload size 72 |
|
525 | bundle2-input-part: total payload size 72 | |
515 | bundle2-input-bundle: 2 parts total |
|
526 | bundle2-input-bundle: 2 parts total | |
516 | checking for updated bookmarks |
|
527 | checking for updated bookmarks | |
517 |
|
528 | |||
518 | $ cd .. |
|
529 | $ cd .. | |
519 |
|
530 | |||
520 | $ cat dummylog |
|
531 | $ cat dummylog | |
521 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
532 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
522 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/nonexistent serve --stdio |
|
533 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/nonexistent serve --stdio | |
523 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
534 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
524 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio |
|
535 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio | |
525 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
536 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
526 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
537 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
527 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio |
|
538 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio | |
528 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
539 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
529 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
540 | Got arguments 1:user@dummy 2:hg -R local serve --stdio | |
530 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio |
|
541 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio | |
531 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
542 | 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=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP |
|
543 | 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 | |
533 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
544 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
534 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
545 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
535 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
546 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
536 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
547 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
537 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
548 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
538 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
549 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
539 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
550 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
540 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
551 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
541 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
552 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
542 | 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 |
|
553 | 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 | |
543 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
554 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
544 | Got arguments 1:user@dummy 2:hg init 'a repo' |
|
555 | Got arguments 1:user@dummy 2:hg init 'a repo' | |
545 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
556 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
546 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
557 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
547 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
558 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
548 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
559 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
549 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
560 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
550 | 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 |
|
561 | 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 | |
551 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
562 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
552 |
|
563 | |||
553 | remote hook failure is attributed to remote |
|
564 | remote hook failure is attributed to remote | |
554 |
|
565 | |||
555 | $ cat > $TESTTMP/failhook << EOF |
|
566 | $ cat > $TESTTMP/failhook << EOF | |
556 | > def hook(ui, repo, **kwargs): |
|
567 | > def hook(ui, repo, **kwargs): | |
557 | > ui.write('hook failure!\n') |
|
568 | > ui.write('hook failure!\n') | |
558 | > ui.flush() |
|
569 | > ui.flush() | |
559 | > return 1 |
|
570 | > return 1 | |
560 | > EOF |
|
571 | > EOF | |
561 |
|
572 | |||
562 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc |
|
573 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc | |
563 |
|
574 | |||
564 | $ hg -q --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout |
|
575 | $ hg -q --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout | |
565 | $ cd hookout |
|
576 | $ cd hookout | |
566 | $ touch hookfailure |
|
577 | $ touch hookfailure | |
567 | $ hg -q commit -A -m 'remote hook failure' |
|
578 | $ hg -q commit -A -m 'remote hook failure' | |
568 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" push |
|
579 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" push | |
569 | pushing to ssh://user@dummy/remote |
|
580 | pushing to ssh://user@dummy/remote | |
570 | searching for changes |
|
581 | searching for changes | |
571 | remote: adding changesets |
|
582 | remote: adding changesets | |
572 | remote: adding manifests |
|
583 | remote: adding manifests | |
573 | remote: adding file changes |
|
584 | remote: adding file changes | |
574 | remote: added 1 changesets with 1 changes to 1 files |
|
585 | remote: added 1 changesets with 1 changes to 1 files | |
575 | remote: hook failure! |
|
586 | remote: hook failure! | |
576 | remote: transaction abort! |
|
587 | remote: transaction abort! | |
577 | remote: rollback completed |
|
588 | remote: rollback completed | |
578 | remote: pretxnchangegroup.fail hook failed |
|
589 | remote: pretxnchangegroup.fail hook failed | |
579 | abort: push failed on remote |
|
590 | abort: push failed on remote | |
580 | [255] |
|
591 | [255] | |
581 |
|
592 | |||
582 | abort during pull is properly reported as such |
|
593 | abort during pull is properly reported as such | |
583 |
|
594 | |||
584 | $ echo morefoo >> ../remote/foo |
|
595 | $ echo morefoo >> ../remote/foo | |
585 | $ hg -R ../remote commit --message "more foo to be pulled" |
|
596 | $ hg -R ../remote commit --message "more foo to be pulled" | |
586 | $ cat >> ../remote/.hg/hgrc << EOF |
|
597 | $ cat >> ../remote/.hg/hgrc << EOF | |
587 | > [extensions] |
|
598 | > [extensions] | |
588 | > crash = ${TESTDIR}/crashgetbundler.py |
|
599 | > crash = ${TESTDIR}/crashgetbundler.py | |
589 | > EOF |
|
600 | > EOF | |
590 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" pull |
|
601 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" pull | |
591 | pulling from ssh://user@dummy/remote |
|
602 | pulling from ssh://user@dummy/remote | |
592 | searching for changes |
|
603 | searching for changes | |
593 | remote: abort: this is an exercise |
|
604 | remote: abort: this is an exercise | |
594 | abort: pull failed on remote |
|
605 | abort: pull failed on remote | |
595 | [255] |
|
606 | [255] | |
596 |
|
607 | |||
597 | abort with no error hint when there is a ssh problem when pulling |
|
608 | abort with no error hint when there is a ssh problem when pulling | |
598 |
|
609 | |||
599 | $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" |
|
610 | $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" | |
600 | pulling from ssh://brokenrepository/ |
|
611 | pulling from ssh://brokenrepository/ | |
601 | abort: no suitable response from remote hg! |
|
612 | abort: no suitable response from remote hg! | |
602 | [255] |
|
613 | [255] | |
603 |
|
614 | |||
604 | abort with configured error hint when there is a ssh problem when pulling |
|
615 | abort with configured error hint when there is a ssh problem when pulling | |
605 |
|
616 | |||
606 | $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" \ |
|
617 | $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" \ | |
607 | > --config ui.ssherrorhint="Please see http://company/internalwiki/ssh.html" |
|
618 | > --config ui.ssherrorhint="Please see http://company/internalwiki/ssh.html" | |
608 | pulling from ssh://brokenrepository/ |
|
619 | pulling from ssh://brokenrepository/ | |
609 | abort: no suitable response from remote hg! |
|
620 | abort: no suitable response from remote hg! | |
610 | (Please see http://company/internalwiki/ssh.html) |
|
621 | (Please see http://company/internalwiki/ssh.html) | |
611 | [255] |
|
622 | [255] | |
612 |
|
623 | |||
613 | test that custom environment is passed down to ssh executable |
|
624 | test that custom environment is passed down to ssh executable | |
614 | $ cat >>dumpenv <<EOF |
|
625 | $ cat >>dumpenv <<EOF | |
615 | > #! /bin/sh |
|
626 | > #! /bin/sh | |
616 | > echo \$VAR >&2 |
|
627 | > echo \$VAR >&2 | |
617 | > EOF |
|
628 | > EOF | |
618 | $ chmod +x dumpenv |
|
629 | $ chmod +x dumpenv | |
619 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" |
|
630 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" | |
620 | pulling from ssh://something/ |
|
631 | pulling from ssh://something/ | |
621 | remote: |
|
632 | remote: | |
622 | abort: no suitable response from remote hg! |
|
633 | abort: no suitable response from remote hg! | |
623 | [255] |
|
634 | [255] | |
624 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" --config sshenv.VAR=17 |
|
635 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" --config sshenv.VAR=17 | |
625 | pulling from ssh://something/ |
|
636 | pulling from ssh://something/ | |
626 | remote: 17 |
|
637 | remote: 17 | |
627 | abort: no suitable response from remote hg! |
|
638 | abort: no suitable response from remote hg! | |
628 | [255] |
|
639 | [255] | |
629 |
|
640 |
General Comments 0
You need to be logged in to leave comments.
Login now