Show More
@@ -1,1138 +1,1136 b'' | |||||
1 | Test exchange of common information using bundle2 |
|
1 | Test exchange of common information using bundle2 | |
2 |
|
2 | |||
3 |
|
3 | |||
4 | $ getmainid() { |
|
4 | $ getmainid() { | |
5 | > hg -R main log --template '{node}\n' --rev "$1" |
|
5 | > hg -R main log --template '{node}\n' --rev "$1" | |
6 | > } |
|
6 | > } | |
7 |
|
7 | |||
8 | enable obsolescence |
|
8 | enable obsolescence | |
9 |
|
9 | |||
10 | $ cp $HGRCPATH $TESTTMP/hgrc.orig |
|
10 | $ cp $HGRCPATH $TESTTMP/hgrc.orig | |
11 | $ cat > $TESTTMP/bundle2-pushkey-hook.sh << EOF |
|
11 | $ cat > $TESTTMP/bundle2-pushkey-hook.sh << EOF | |
12 | > echo pushkey: lock state after \"\$HG_NAMESPACE\" |
|
12 | > echo pushkey: lock state after \"\$HG_NAMESPACE\" | |
13 | > hg debuglock |
|
13 | > hg debuglock | |
14 | > EOF |
|
14 | > EOF | |
15 |
|
15 | |||
16 | $ cat >> $HGRCPATH << EOF |
|
16 | $ cat >> $HGRCPATH << EOF | |
17 | > [experimental] |
|
17 | > [experimental] | |
18 | > evolution.createmarkers=True |
|
18 | > evolution.createmarkers=True | |
19 | > evolution.exchange=True |
|
19 | > evolution.exchange=True | |
20 | > bundle2-output-capture=True |
|
20 | > bundle2-output-capture=True | |
21 | > [command-templates] |
|
21 | > [command-templates] | |
22 | > log={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} |
|
22 | > log={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} | |
23 | > [web] |
|
23 | > [web] | |
24 | > push_ssl = false |
|
24 | > push_ssl = false | |
25 | > allow_push = * |
|
25 | > allow_push = * | |
26 | > [phases] |
|
26 | > [phases] | |
27 | > publish=False |
|
27 | > publish=False | |
28 | > [hooks] |
|
28 | > [hooks] | |
29 | > pretxnclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n" |
|
29 | > pretxnclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n" | |
30 | > txnclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n" |
|
30 | > txnclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n" | |
31 | > txnclose.env = sh -c "HG_LOCAL= printenv.py txnclose" |
|
31 | > txnclose.env = sh -c "HG_LOCAL= printenv.py txnclose" | |
32 | > pushkey= sh "$TESTTMP/bundle2-pushkey-hook.sh" |
|
32 | > pushkey= sh "$TESTTMP/bundle2-pushkey-hook.sh" | |
33 | > EOF |
|
33 | > EOF | |
34 |
|
34 | |||
35 | The extension requires a repo (currently unused) |
|
35 | The extension requires a repo (currently unused) | |
36 |
|
36 | |||
37 | $ hg init main |
|
37 | $ hg init main | |
38 | $ cd main |
|
38 | $ cd main | |
39 | $ touch a |
|
39 | $ touch a | |
40 | $ hg add a |
|
40 | $ hg add a | |
41 | $ hg commit -m 'a' |
|
41 | $ hg commit -m 'a' | |
42 | pre-close-tip:3903775176ed draft |
|
42 | pre-close-tip:3903775176ed draft | |
43 | postclose-tip:3903775176ed draft |
|
43 | postclose-tip:3903775176ed draft | |
44 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=commit |
|
44 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=commit | |
45 |
|
45 | |||
46 | $ hg unbundle $TESTDIR/bundles/rebase.hg |
|
46 | $ hg unbundle $TESTDIR/bundles/rebase.hg | |
47 | adding changesets |
|
47 | adding changesets | |
48 | adding manifests |
|
48 | adding manifests | |
49 | adding file changes |
|
49 | adding file changes | |
50 | pre-close-tip:02de42196ebe draft |
|
50 | pre-close-tip:02de42196ebe draft | |
51 | added 8 changesets with 7 changes to 7 files (+3 heads) |
|
51 | added 8 changesets with 7 changes to 7 files (+3 heads) | |
52 | new changesets cd010b8cd998:02de42196ebe (8 drafts) |
|
52 | new changesets cd010b8cd998:02de42196ebe (8 drafts) | |
53 | postclose-tip:02de42196ebe draft |
|
53 | postclose-tip:02de42196ebe draft | |
54 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=unbundle HG_TXNID=TXN:$ID$ HG_TXNNAME=unbundle |
|
54 | 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 | |
55 | bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob) |
|
55 | bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob) | |
56 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
56 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
57 |
|
57 | |||
58 | $ cd .. |
|
58 | $ cd .. | |
59 |
|
59 | |||
60 | Real world exchange |
|
60 | Real world exchange | |
61 | ===================== |
|
61 | ===================== | |
62 |
|
62 | |||
63 | Add more obsolescence information |
|
63 | Add more obsolescence information | |
64 |
|
64 | |||
65 | $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc` |
|
65 | $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc` | |
66 | pre-close-tip:02de42196ebe draft |
|
66 | pre-close-tip:02de42196ebe draft | |
67 | 1 new obsolescence markers |
|
67 | 1 new obsolescence markers | |
68 | postclose-tip:02de42196ebe draft |
|
68 | 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 |
|
69 | 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` |
|
70 | $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c` | |
71 | pre-close-tip:02de42196ebe draft |
|
71 | pre-close-tip:02de42196ebe draft | |
72 | 1 new obsolescence markers |
|
72 | 1 new obsolescence markers | |
73 | postclose-tip:02de42196ebe draft |
|
73 | postclose-tip:02de42196ebe draft | |
74 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
74 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
75 |
|
75 | |||
76 | clone --pull |
|
76 | clone --pull | |
77 |
|
77 | |||
78 | $ hg -R main phase --public cd010b8cd998 |
|
78 | $ hg -R main phase --public cd010b8cd998 | |
79 | pre-close-tip:02de42196ebe draft |
|
79 | pre-close-tip:02de42196ebe draft | |
80 | postclose-tip:02de42196ebe draft |
|
80 | postclose-tip:02de42196ebe draft | |
81 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase |
|
81 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase | |
82 | $ hg clone main other --pull --rev 9520eea781bc |
|
82 | $ hg clone main other --pull --rev 9520eea781bc | |
83 | adding changesets |
|
83 | adding changesets | |
84 | adding manifests |
|
84 | adding manifests | |
85 | adding file changes |
|
85 | adding file changes | |
86 | pre-close-tip:9520eea781bc draft |
|
86 | pre-close-tip:9520eea781bc draft | |
87 | added 2 changesets with 2 changes to 2 files |
|
87 | added 2 changesets with 2 changes to 2 files | |
88 | 1 new obsolescence markers |
|
88 | 1 new obsolescence markers | |
89 | new changesets cd010b8cd998:9520eea781bc (1 drafts) |
|
89 | new changesets cd010b8cd998:9520eea781bc (1 drafts) | |
90 | postclose-tip:9520eea781bc draft |
|
90 | postclose-tip:9520eea781bc draft | |
91 | 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 | 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 | |
92 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
92 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
93 | updating to branch default |
|
93 | updating to branch default | |
94 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
94 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
95 | $ hg -R other log -G |
|
95 | $ hg -R other log -G | |
96 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
96 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
97 | | |
|
97 | | | |
98 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
98 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
99 |
|
99 | |||
100 | $ hg -R other debugobsolete |
|
100 | $ hg -R other debugobsolete | |
101 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
101 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
102 |
|
102 | |||
103 | pull |
|
103 | pull | |
104 |
|
104 | |||
105 | $ hg -R main phase --public 9520eea781bc |
|
105 | $ hg -R main phase --public 9520eea781bc | |
106 | pre-close-tip:02de42196ebe draft |
|
106 | pre-close-tip:02de42196ebe draft | |
107 | postclose-tip:02de42196ebe draft |
|
107 | postclose-tip:02de42196ebe draft | |
108 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase |
|
108 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase | |
109 | $ hg -R other pull -r 24b6387c8c8c |
|
109 | $ hg -R other pull -r 24b6387c8c8c | |
110 | pulling from $TESTTMP/main |
|
110 | pulling from $TESTTMP/main | |
111 | searching for changes |
|
111 | searching for changes | |
112 | adding changesets |
|
112 | adding changesets | |
113 | adding manifests |
|
113 | adding manifests | |
114 | adding file changes |
|
114 | adding file changes | |
115 | pre-close-tip:24b6387c8c8c draft |
|
115 | pre-close-tip:24b6387c8c8c draft | |
116 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
116 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
117 | 1 new obsolescence markers |
|
117 | 1 new obsolescence markers | |
118 | new changesets 24b6387c8c8c (1 drafts) |
|
118 | new changesets 24b6387c8c8c (1 drafts) | |
119 | postclose-tip:24b6387c8c8c draft |
|
119 | postclose-tip:24b6387c8c8c draft | |
120 | 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 | 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 | |
121 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
121 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
122 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
122 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
123 | $ hg -R other log -G |
|
123 | $ hg -R other log -G | |
124 | o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
124 | o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
125 | | |
|
125 | | | |
126 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
126 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
127 | |/ |
|
127 | |/ | |
128 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
128 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
129 |
|
129 | |||
130 | $ hg -R other debugobsolete |
|
130 | $ hg -R other debugobsolete | |
131 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
131 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
132 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
132 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
133 |
|
133 | |||
134 | pull empty (with phase movement) |
|
134 | pull empty (with phase movement) | |
135 |
|
135 | |||
136 | $ hg -R main phase --public 24b6387c8c8c |
|
136 | $ hg -R main phase --public 24b6387c8c8c | |
137 | pre-close-tip:02de42196ebe draft |
|
137 | pre-close-tip:02de42196ebe draft | |
138 | postclose-tip:02de42196ebe draft |
|
138 | postclose-tip:02de42196ebe draft | |
139 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase |
|
139 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase | |
140 | $ hg -R other pull -r 24b6387c8c8c |
|
140 | $ hg -R other pull -r 24b6387c8c8c | |
141 | pulling from $TESTTMP/main |
|
141 | pulling from $TESTTMP/main | |
142 | no changes found |
|
142 | no changes found | |
143 | pre-close-tip:24b6387c8c8c public |
|
143 | pre-close-tip:24b6387c8c8c public | |
144 | 1 local changesets published |
|
144 | 1 local changesets published | |
145 | postclose-tip:24b6387c8c8c public |
|
145 | postclose-tip:24b6387c8c8c public | |
146 | 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 |
|
146 | 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 | |
147 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
147 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
148 | $ hg -R other log -G |
|
148 | $ hg -R other log -G | |
149 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
149 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
150 | | |
|
150 | | | |
151 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
151 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
152 | |/ |
|
152 | |/ | |
153 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
153 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
154 |
|
154 | |||
155 | $ hg -R other debugobsolete |
|
155 | $ hg -R other debugobsolete | |
156 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
156 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
157 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
157 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
158 |
|
158 | |||
159 | pull empty |
|
159 | pull empty | |
160 |
|
160 | |||
161 | $ hg -R other pull -r 24b6387c8c8c |
|
161 | $ hg -R other pull -r 24b6387c8c8c | |
162 | pulling from $TESTTMP/main |
|
162 | pulling from $TESTTMP/main | |
163 | no changes found |
|
163 | no changes found | |
164 | pre-close-tip:24b6387c8c8c public |
|
164 | pre-close-tip:24b6387c8c8c public | |
165 | postclose-tip:24b6387c8c8c public |
|
165 | postclose-tip:24b6387c8c8c public | |
166 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull |
|
166 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull | |
167 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
167 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
168 | $ hg -R other log -G |
|
168 | $ hg -R other log -G | |
169 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
169 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
170 | | |
|
170 | | | |
171 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
171 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
172 | |/ |
|
172 | |/ | |
173 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
173 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
174 |
|
174 | |||
175 | $ hg -R other debugobsolete |
|
175 | $ hg -R other debugobsolete | |
176 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
176 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
177 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
177 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
178 |
|
178 | |||
179 | add extra data to test their exchange during push |
|
179 | add extra data to test their exchange during push | |
180 |
|
180 | |||
181 | $ hg -R main bookmark --rev eea13746799a book_eea1 |
|
181 | $ hg -R main bookmark --rev eea13746799a book_eea1 | |
182 | pre-close-tip:02de42196ebe draft |
|
182 | pre-close-tip:02de42196ebe draft | |
183 | postclose-tip:02de42196ebe draft |
|
183 | postclose-tip:02de42196ebe draft | |
184 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
184 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
185 | $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a` |
|
185 | $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a` | |
186 | pre-close-tip:02de42196ebe draft |
|
186 | pre-close-tip:02de42196ebe draft | |
187 | 1 new obsolescence markers |
|
187 | 1 new obsolescence markers | |
188 | postclose-tip:02de42196ebe draft |
|
188 | postclose-tip:02de42196ebe draft | |
189 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
189 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
190 | $ hg -R main bookmark --rev 02de42196ebe book_02de |
|
190 | $ hg -R main bookmark --rev 02de42196ebe book_02de | |
191 | pre-close-tip:02de42196ebe draft book_02de |
|
191 | pre-close-tip:02de42196ebe draft book_02de | |
192 | postclose-tip:02de42196ebe draft book_02de |
|
192 | postclose-tip:02de42196ebe draft book_02de | |
193 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
193 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
194 | $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe` |
|
194 | $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe` | |
195 | pre-close-tip:02de42196ebe draft book_02de |
|
195 | pre-close-tip:02de42196ebe draft book_02de | |
196 | 1 new obsolescence markers |
|
196 | 1 new obsolescence markers | |
197 | postclose-tip:02de42196ebe draft book_02de |
|
197 | postclose-tip:02de42196ebe draft book_02de | |
198 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
198 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
199 | $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc |
|
199 | $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc | |
200 | pre-close-tip:02de42196ebe draft book_02de |
|
200 | pre-close-tip:02de42196ebe draft book_02de | |
201 | postclose-tip:02de42196ebe draft book_02de |
|
201 | postclose-tip:02de42196ebe draft book_02de | |
202 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
202 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
203 | $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16` |
|
203 | $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16` | |
204 | pre-close-tip:02de42196ebe draft book_02de |
|
204 | pre-close-tip:02de42196ebe draft book_02de | |
205 | 1 new obsolescence markers |
|
205 | 1 new obsolescence markers | |
206 | postclose-tip:02de42196ebe draft book_02de |
|
206 | postclose-tip:02de42196ebe draft book_02de | |
207 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
207 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
208 | $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd |
|
208 | $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd | |
209 | pre-close-tip:02de42196ebe draft book_02de |
|
209 | pre-close-tip:02de42196ebe draft book_02de | |
210 | postclose-tip:02de42196ebe draft book_02de |
|
210 | postclose-tip:02de42196ebe draft book_02de | |
211 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
211 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
212 | $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8` |
|
212 | $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8` | |
213 | pre-close-tip:02de42196ebe draft book_02de |
|
213 | pre-close-tip:02de42196ebe draft book_02de | |
214 | 1 new obsolescence markers |
|
214 | 1 new obsolescence markers | |
215 | postclose-tip:02de42196ebe draft book_02de |
|
215 | postclose-tip:02de42196ebe draft book_02de | |
216 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
216 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
217 | $ hg -R main bookmark --rev 32af7686d403 book_32af |
|
217 | $ hg -R main bookmark --rev 32af7686d403 book_32af | |
218 | pre-close-tip:02de42196ebe draft book_02de |
|
218 | pre-close-tip:02de42196ebe draft book_02de | |
219 | postclose-tip:02de42196ebe draft book_02de |
|
219 | postclose-tip:02de42196ebe draft book_02de | |
220 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
220 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
221 | $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403` |
|
221 | $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403` | |
222 | pre-close-tip:02de42196ebe draft book_02de |
|
222 | pre-close-tip:02de42196ebe draft book_02de | |
223 | 1 new obsolescence markers |
|
223 | 1 new obsolescence markers | |
224 | postclose-tip:02de42196ebe draft book_02de |
|
224 | postclose-tip:02de42196ebe draft book_02de | |
225 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
225 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
226 |
|
226 | |||
227 | $ hg -R other bookmark --rev cd010b8cd998 book_eea1 |
|
227 | $ hg -R other bookmark --rev cd010b8cd998 book_eea1 | |
228 | pre-close-tip:24b6387c8c8c public |
|
228 | pre-close-tip:24b6387c8c8c public | |
229 | postclose-tip:24b6387c8c8c public |
|
229 | postclose-tip:24b6387c8c8c public | |
230 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
230 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
231 | $ hg -R other bookmark --rev cd010b8cd998 book_02de |
|
231 | $ hg -R other bookmark --rev cd010b8cd998 book_02de | |
232 | pre-close-tip:24b6387c8c8c public |
|
232 | pre-close-tip:24b6387c8c8c public | |
233 | postclose-tip:24b6387c8c8c public |
|
233 | postclose-tip:24b6387c8c8c public | |
234 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
234 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
235 | $ hg -R other bookmark --rev cd010b8cd998 book_42cc |
|
235 | $ hg -R other bookmark --rev cd010b8cd998 book_42cc | |
236 | pre-close-tip:24b6387c8c8c public |
|
236 | pre-close-tip:24b6387c8c8c public | |
237 | postclose-tip:24b6387c8c8c public |
|
237 | postclose-tip:24b6387c8c8c public | |
238 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
238 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
239 | $ hg -R other bookmark --rev cd010b8cd998 book_5fdd |
|
239 | $ hg -R other bookmark --rev cd010b8cd998 book_5fdd | |
240 | pre-close-tip:24b6387c8c8c public |
|
240 | pre-close-tip:24b6387c8c8c public | |
241 | postclose-tip:24b6387c8c8c public |
|
241 | postclose-tip:24b6387c8c8c public | |
242 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
242 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
243 | $ hg -R other bookmark --rev cd010b8cd998 book_32af |
|
243 | $ hg -R other bookmark --rev cd010b8cd998 book_32af | |
244 | pre-close-tip:24b6387c8c8c public |
|
244 | pre-close-tip:24b6387c8c8c public | |
245 | postclose-tip:24b6387c8c8c public |
|
245 | postclose-tip:24b6387c8c8c public | |
246 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
246 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
247 |
|
247 | |||
248 | $ hg -R main phase --public eea13746799a |
|
248 | $ hg -R main phase --public eea13746799a | |
249 | pre-close-tip:02de42196ebe draft book_02de |
|
249 | pre-close-tip:02de42196ebe draft book_02de | |
250 | postclose-tip:02de42196ebe draft book_02de |
|
250 | postclose-tip:02de42196ebe draft book_02de | |
251 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase |
|
251 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase | |
252 |
|
252 | |||
253 | push |
|
253 | push | |
254 | $ hg -R main push other --rev eea13746799a --bookmark book_eea1 |
|
254 | $ hg -R main push other --rev eea13746799a --bookmark book_eea1 | |
255 | pushing to other |
|
255 | pushing to other | |
256 | searching for changes |
|
256 | searching for changes | |
257 | remote: adding changesets |
|
257 | remote: adding changesets | |
258 | remote: adding manifests |
|
258 | remote: adding manifests | |
259 | remote: adding file changes |
|
259 | remote: adding file changes | |
260 | remote: pre-close-tip:eea13746799a public book_eea1 |
|
260 | remote: pre-close-tip:eea13746799a public book_eea1 | |
261 | remote: added 1 changesets with 0 changes to 0 files (-1 heads) |
|
261 | remote: added 1 changesets with 0 changes to 0 files (-1 heads) | |
262 | remote: 1 new obsolescence markers |
|
262 | remote: 1 new obsolescence markers | |
263 | remote: pushkey: lock state after "bookmarks" |
|
263 | remote: pushkey: lock state after "bookmarks" | |
264 | remote: lock: free |
|
264 | remote: lock: free | |
265 | remote: wlock: free |
|
265 | remote: wlock: free | |
266 | remote: postclose-tip:eea13746799a public book_eea1 |
|
266 | remote: postclose-tip:eea13746799a public book_eea1 | |
267 | 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 |
|
267 | 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 | |
268 | updating bookmark book_eea1 |
|
268 | updating bookmark book_eea1 | |
269 | pre-close-tip:02de42196ebe draft book_02de |
|
269 | pre-close-tip:02de42196ebe draft book_02de | |
270 | postclose-tip:02de42196ebe draft book_02de |
|
270 | postclose-tip:02de42196ebe draft book_02de | |
271 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response |
|
271 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response | |
272 | file:/*/$TESTTMP/other HG_URL=file:$TESTTMP/other (glob) |
|
272 | file:/*/$TESTTMP/other HG_URL=file:$TESTTMP/other (glob) | |
273 | $ hg -R other log -G |
|
273 | $ hg -R other log -G | |
274 | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |
|
274 | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G | |
275 | |\ |
|
275 | |\ | |
276 | | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
276 | | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
277 | | | |
|
277 | | | | |
278 | @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
278 | @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
279 | |/ |
|
279 | |/ | |
280 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A |
|
280 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A | |
281 |
|
281 | |||
282 | $ hg -R other debugobsolete |
|
282 | $ hg -R other debugobsolete | |
283 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
283 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
284 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
284 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
285 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
285 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
286 |
|
286 | |||
287 | pull over ssh |
|
287 | pull over ssh | |
288 |
|
288 | |||
289 | $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de |
|
289 | $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de | |
290 | pulling from ssh://user@dummy/main |
|
290 | pulling from ssh://user@dummy/main | |
291 | searching for changes |
|
291 | searching for changes | |
292 | adding changesets |
|
292 | adding changesets | |
293 | adding manifests |
|
293 | adding manifests | |
294 | adding file changes |
|
294 | adding file changes | |
295 | updating bookmark book_02de |
|
295 | updating bookmark book_02de | |
296 | pre-close-tip:02de42196ebe draft book_02de |
|
296 | pre-close-tip:02de42196ebe draft book_02de | |
297 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
297 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
298 | 1 new obsolescence markers |
|
298 | 1 new obsolescence markers | |
299 | new changesets 02de42196ebe (1 drafts) |
|
299 | new changesets 02de42196ebe (1 drafts) | |
300 | postclose-tip:02de42196ebe draft book_02de |
|
300 | postclose-tip:02de42196ebe draft book_02de | |
301 | 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 |
|
301 | 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 | |
302 | ssh://user@dummy/main HG_URL=ssh://user@dummy/main |
|
302 | ssh://user@dummy/main HG_URL=ssh://user@dummy/main | |
303 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
303 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
304 | $ hg -R other debugobsolete |
|
304 | $ hg -R other debugobsolete | |
305 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
305 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
306 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
306 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
307 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
307 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
308 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
308 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
309 |
|
309 | |||
310 | pull over http |
|
310 | pull over http | |
311 |
|
311 | |||
312 | $ hg serve -R main -p $HGPORT -d --pid-file=main.pid -E main-error.log |
|
312 | $ hg serve -R main -p $HGPORT -d --pid-file=main.pid -E main-error.log | |
313 | $ cat main.pid >> $DAEMON_PIDS |
|
313 | $ cat main.pid >> $DAEMON_PIDS | |
314 |
|
314 | |||
315 | $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc |
|
315 | $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc | |
316 | pulling from http://localhost:$HGPORT/ |
|
316 | pulling from http://localhost:$HGPORT/ | |
317 | searching for changes |
|
317 | searching for changes | |
318 | adding changesets |
|
318 | adding changesets | |
319 | adding manifests |
|
319 | adding manifests | |
320 | adding file changes |
|
320 | adding file changes | |
321 | updating bookmark book_42cc |
|
321 | updating bookmark book_42cc | |
322 | pre-close-tip:42ccdea3bb16 draft book_42cc |
|
322 | pre-close-tip:42ccdea3bb16 draft book_42cc | |
323 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
323 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
324 | 1 new obsolescence markers |
|
324 | 1 new obsolescence markers | |
325 | new changesets 42ccdea3bb16 (1 drafts) |
|
325 | new changesets 42ccdea3bb16 (1 drafts) | |
326 | postclose-tip:42ccdea3bb16 draft book_42cc |
|
326 | postclose-tip:42ccdea3bb16 draft book_42cc | |
327 | 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 |
|
327 | 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 | |
328 | http://localhost:$HGPORT/ HG_URL=http://localhost:$HGPORT/ |
|
328 | http://localhost:$HGPORT/ HG_URL=http://localhost:$HGPORT/ | |
329 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
329 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
330 | $ cat main-error.log |
|
330 | $ cat main-error.log | |
331 | $ hg -R other debugobsolete |
|
331 | $ hg -R other debugobsolete | |
332 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
332 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
333 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
333 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
334 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
334 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
335 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
335 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
336 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
336 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
337 |
|
337 | |||
338 | push over ssh |
|
338 | push over ssh | |
339 |
|
339 | |||
340 | $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd |
|
340 | $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd | |
341 | pushing to ssh://user@dummy/other |
|
341 | pushing to ssh://user@dummy/other | |
342 | searching for changes |
|
342 | searching for changes | |
343 | remote: adding changesets |
|
343 | remote: adding changesets | |
344 | remote: adding manifests |
|
344 | remote: adding manifests | |
345 | remote: adding file changes |
|
345 | remote: adding file changes | |
346 | remote: pre-close-tip:5fddd98957c8 draft book_5fdd |
|
346 | remote: pre-close-tip:5fddd98957c8 draft book_5fdd | |
347 | remote: added 1 changesets with 1 changes to 1 files |
|
347 | remote: added 1 changesets with 1 changes to 1 files | |
348 | remote: 1 new obsolescence markers |
|
348 | remote: 1 new obsolescence markers | |
349 | remote: pushkey: lock state after "bookmarks" |
|
349 | remote: pushkey: lock state after "bookmarks" | |
350 | remote: lock: free |
|
350 | remote: lock: free | |
351 | remote: wlock: free |
|
351 | remote: wlock: free | |
352 | remote: postclose-tip:5fddd98957c8 draft book_5fdd |
|
352 | remote: postclose-tip:5fddd98957c8 draft book_5fdd | |
353 | 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 |
|
353 | 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 | |
354 | updating bookmark book_5fdd |
|
354 | updating bookmark book_5fdd | |
355 | pre-close-tip:02de42196ebe draft book_02de |
|
355 | pre-close-tip:02de42196ebe draft book_02de | |
356 | postclose-tip:02de42196ebe draft book_02de |
|
356 | postclose-tip:02de42196ebe draft book_02de | |
357 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response |
|
357 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response | |
358 | ssh://user@dummy/other HG_URL=ssh://user@dummy/other |
|
358 | ssh://user@dummy/other HG_URL=ssh://user@dummy/other | |
359 | $ hg -R other log -G |
|
359 | $ hg -R other log -G | |
360 | o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C |
|
360 | o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C | |
361 | | |
|
361 | | | |
362 | o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B |
|
362 | o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B | |
363 | | |
|
363 | | | |
364 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H |
|
364 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H | |
365 | | | |
|
365 | | | | |
366 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |
|
366 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G | |
367 | | |/| |
|
367 | | |/| | |
368 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
368 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
369 | |/ / |
|
369 | |/ / | |
370 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
370 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
371 | |/ |
|
371 | |/ | |
372 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A |
|
372 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A | |
373 |
|
373 | |||
374 | $ hg -R other debugobsolete |
|
374 | $ hg -R other debugobsolete | |
375 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
375 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
376 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
376 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
377 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
377 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
378 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
378 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
379 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
379 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
380 | 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
380 | 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
381 |
|
381 | |||
382 | push over http |
|
382 | push over http | |
383 |
|
383 | |||
384 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
384 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
385 | $ cat other.pid >> $DAEMON_PIDS |
|
385 | $ cat other.pid >> $DAEMON_PIDS | |
386 |
|
386 | |||
387 | $ hg -R main phase --public 32af7686d403 |
|
387 | $ hg -R main phase --public 32af7686d403 | |
388 | pre-close-tip:02de42196ebe draft book_02de |
|
388 | pre-close-tip:02de42196ebe draft book_02de | |
389 | postclose-tip:02de42196ebe draft book_02de |
|
389 | postclose-tip:02de42196ebe draft book_02de | |
390 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase |
|
390 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase | |
391 | $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af |
|
391 | $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af | |
392 | pushing to http://localhost:$HGPORT2/ |
|
392 | pushing to http://localhost:$HGPORT2/ | |
393 | searching for changes |
|
393 | searching for changes | |
394 | remote: adding changesets |
|
394 | remote: adding changesets | |
395 | remote: adding manifests |
|
395 | remote: adding manifests | |
396 | remote: adding file changes |
|
396 | remote: adding file changes | |
397 | remote: pre-close-tip:32af7686d403 public book_32af |
|
397 | remote: pre-close-tip:32af7686d403 public book_32af | |
398 | remote: added 1 changesets with 1 changes to 1 files |
|
398 | remote: added 1 changesets with 1 changes to 1 files | |
399 | remote: 1 new obsolescence markers |
|
399 | remote: 1 new obsolescence markers | |
400 | remote: pushkey: lock state after "bookmarks" |
|
400 | remote: pushkey: lock state after "bookmarks" | |
401 | remote: lock: free |
|
401 | remote: lock: free | |
402 | remote: wlock: free |
|
402 | remote: wlock: free | |
403 | remote: postclose-tip:32af7686d403 public book_32af |
|
403 | remote: postclose-tip:32af7686d403 public book_32af | |
404 | 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) |
|
404 | 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) | |
405 | updating bookmark book_32af |
|
405 | updating bookmark book_32af | |
406 | pre-close-tip:02de42196ebe draft book_02de |
|
406 | pre-close-tip:02de42196ebe draft book_02de | |
407 | postclose-tip:02de42196ebe draft book_02de |
|
407 | postclose-tip:02de42196ebe draft book_02de | |
408 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response |
|
408 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response | |
409 | http://localhost:$HGPORT2/ HG_URL=http://localhost:$HGPORT2/ |
|
409 | http://localhost:$HGPORT2/ HG_URL=http://localhost:$HGPORT2/ | |
410 | $ cat other-error.log |
|
410 | $ cat other-error.log | |
411 |
|
411 | |||
412 | Check final content. |
|
412 | Check final content. | |
413 |
|
413 | |||
414 | $ hg -R other log -G |
|
414 | $ hg -R other log -G | |
415 | o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D |
|
415 | o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D | |
416 | | |
|
416 | | | |
417 | o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C |
|
417 | o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C | |
418 | | |
|
418 | | | |
419 | o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B |
|
419 | o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B | |
420 | | |
|
420 | | | |
421 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H |
|
421 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H | |
422 | | | |
|
422 | | | | |
423 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |
|
423 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G | |
424 | | |/| |
|
424 | | |/| | |
425 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
425 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
426 | |/ / |
|
426 | |/ / | |
427 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
427 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
428 | |/ |
|
428 | |/ | |
429 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
429 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
430 |
|
430 | |||
431 | $ hg -R other debugobsolete |
|
431 | $ hg -R other debugobsolete | |
432 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
432 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
433 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
433 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
434 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
434 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
435 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
435 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
436 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
436 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
437 | 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
437 | 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
438 | 7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
438 | 7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
439 |
|
439 | |||
440 | (check that no 'pending' files remain) |
|
440 | (check that no 'pending' files remain) | |
441 |
|
441 | |||
442 | $ ls -1 other/.hg/bookmarks* |
|
442 | $ ls -1 other/.hg/bookmarks* | |
443 | other/.hg/bookmarks |
|
443 | other/.hg/bookmarks | |
444 | $ ls -1 other/.hg/store/phaseroots* |
|
444 | $ ls -1 other/.hg/store/phaseroots* | |
445 | other/.hg/store/phaseroots |
|
445 | other/.hg/store/phaseroots | |
446 | $ ls -1 other/.hg/store/00changelog.i* |
|
446 | $ ls -1 other/.hg/store/00changelog.i* | |
447 | other/.hg/store/00changelog.i |
|
447 | other/.hg/store/00changelog.i | |
448 |
|
448 | |||
449 | Error Handling |
|
449 | Error Handling | |
450 | ============== |
|
450 | ============== | |
451 |
|
451 | |||
452 | Check that errors are properly returned to the client during push. |
|
452 | Check that errors are properly returned to the client during push. | |
453 |
|
453 | |||
454 | Setting up |
|
454 | Setting up | |
455 |
|
455 | |||
456 | $ cat > failpush.py << EOF |
|
456 | $ cat > failpush.py << EOF | |
457 | > """A small extension that makes push fails when using bundle2 |
|
457 | > """A small extension that makes push fails when using bundle2 | |
458 | > |
|
458 | > | |
459 | > used to test error handling in bundle2 |
|
459 | > used to test error handling in bundle2 | |
460 | > """ |
|
460 | > """ | |
461 | > |
|
461 | > | |
462 | > from mercurial import error |
|
462 | > from mercurial import error | |
463 | > from mercurial import bundle2 |
|
463 | > from mercurial import bundle2 | |
464 | > from mercurial import exchange |
|
464 | > from mercurial import exchange | |
465 | > from mercurial import extensions |
|
465 | > from mercurial import extensions | |
466 | > from mercurial import registrar |
|
466 | > from mercurial import registrar | |
467 | > cmdtable = {} |
|
467 | > cmdtable = {} | |
468 | > command = registrar.command(cmdtable) |
|
468 | > command = registrar.command(cmdtable) | |
469 | > |
|
469 | > | |
470 | > configtable = {} |
|
470 | > configtable = {} | |
471 | > configitem = registrar.configitem(configtable) |
|
471 | > configitem = registrar.configitem(configtable) | |
472 | > configitem(b'failpush', b'reason', |
|
472 | > configitem(b'failpush', b'reason', | |
473 | > default=None, |
|
473 | > default=None, | |
474 | > ) |
|
474 | > ) | |
475 | > |
|
475 | > | |
476 | > def _pushbundle2failpart(pushop, bundler): |
|
476 | > def _pushbundle2failpart(pushop, bundler): | |
477 | > reason = pushop.ui.config(b'failpush', b'reason') |
|
477 | > reason = pushop.ui.config(b'failpush', b'reason') | |
478 | > part = None |
|
478 | > part = None | |
479 | > if reason == b'abort': |
|
479 | > if reason == b'abort': | |
480 | > bundler.newpart(b'test:abort') |
|
480 | > bundler.newpart(b'test:abort') | |
481 | > if reason == b'unknown': |
|
481 | > if reason == b'unknown': | |
482 | > bundler.newpart(b'test:unknown') |
|
482 | > bundler.newpart(b'test:unknown') | |
483 | > if reason == b'race': |
|
483 | > if reason == b'race': | |
484 | > # 20 Bytes of crap |
|
484 | > # 20 Bytes of crap | |
485 | > bundler.newpart(b'check:heads', data=b'01234567890123456789') |
|
485 | > bundler.newpart(b'check:heads', data=b'01234567890123456789') | |
486 | > |
|
486 | > | |
487 | > @bundle2.parthandler(b"test:abort") |
|
487 | > @bundle2.parthandler(b"test:abort") | |
488 | > def handleabort(op, part): |
|
488 | > def handleabort(op, part): | |
489 | > raise error.Abort(b'Abandon ship!', hint=b"don't panic") |
|
489 | > raise error.Abort(b'Abandon ship!', hint=b"don't panic") | |
490 | > |
|
490 | > | |
491 | > def uisetup(ui): |
|
491 | > def uisetup(ui): | |
492 | > exchange.b2partsgenmapping[b'failpart'] = _pushbundle2failpart |
|
492 | > exchange.b2partsgenmapping[b'failpart'] = _pushbundle2failpart | |
493 | > exchange.b2partsgenorder.insert(0, b'failpart') |
|
493 | > exchange.b2partsgenorder.insert(0, b'failpart') | |
494 | > |
|
494 | > | |
495 | > EOF |
|
495 | > EOF | |
496 |
|
496 | |||
497 | $ cd main |
|
497 | $ cd main | |
498 | $ hg up tip |
|
498 | $ hg up tip | |
499 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
499 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
500 | $ echo 'I' > I |
|
500 | $ echo 'I' > I | |
501 | $ hg add I |
|
501 | $ hg add I | |
502 | $ hg ci -m 'I' |
|
502 | $ hg ci -m 'I' | |
503 | pre-close-tip:e7ec4e813ba6 draft |
|
503 | pre-close-tip:e7ec4e813ba6 draft | |
504 | postclose-tip:e7ec4e813ba6 draft |
|
504 | postclose-tip:e7ec4e813ba6 draft | |
505 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit |
|
505 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit | |
506 | $ hg id |
|
506 | $ hg id | |
507 | e7ec4e813ba6 tip |
|
507 | e7ec4e813ba6 tip | |
508 | $ cd .. |
|
508 | $ cd .. | |
509 |
|
509 | |||
510 | $ cat << EOF >> $HGRCPATH |
|
510 | $ cat << EOF >> $HGRCPATH | |
511 | > [extensions] |
|
511 | > [extensions] | |
512 | > failpush=$TESTTMP/failpush.py |
|
512 | > failpush=$TESTTMP/failpush.py | |
513 | > EOF |
|
513 | > EOF | |
514 |
|
514 | |||
515 | $ killdaemons.py |
|
515 | $ killdaemons.py | |
516 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
516 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
517 | $ cat other.pid >> $DAEMON_PIDS |
|
517 | $ cat other.pid >> $DAEMON_PIDS | |
518 |
|
518 | |||
519 | Doing the actual push: Abort error |
|
519 | Doing the actual push: Abort error | |
520 |
|
520 | |||
521 | $ cat << EOF >> $HGRCPATH |
|
521 | $ cat << EOF >> $HGRCPATH | |
522 | > [failpush] |
|
522 | > [failpush] | |
523 | > reason = abort |
|
523 | > reason = abort | |
524 | > EOF |
|
524 | > EOF | |
525 |
|
525 | |||
526 | $ hg -R main push other -r e7ec4e813ba6 |
|
526 | $ hg -R main push other -r e7ec4e813ba6 | |
527 | pushing to other |
|
527 | pushing to other | |
528 | searching for changes |
|
528 | searching for changes | |
529 | abort: Abandon ship! |
|
529 | abort: Abandon ship! | |
530 | (don't panic) |
|
530 | (don't panic) | |
531 | [255] |
|
531 | [255] | |
532 |
|
532 | |||
533 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
533 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
534 | pushing to ssh://user@dummy/other |
|
534 | pushing to ssh://user@dummy/other | |
535 | searching for changes |
|
535 | searching for changes | |
536 | remote: Abandon ship! |
|
536 | remote: Abandon ship! | |
537 | remote: (don't panic) |
|
537 | remote: (don't panic) | |
538 | abort: push failed on remote |
|
538 | abort: push failed on remote | |
539 | [100] |
|
539 | [100] | |
540 |
|
540 | |||
541 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
541 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
542 | pushing to http://localhost:$HGPORT2/ |
|
542 | pushing to http://localhost:$HGPORT2/ | |
543 | searching for changes |
|
543 | searching for changes | |
544 | remote: Abandon ship! |
|
544 | remote: Abandon ship! | |
545 | remote: (don't panic) |
|
545 | remote: (don't panic) | |
546 | abort: push failed on remote |
|
546 | abort: push failed on remote | |
547 | [100] |
|
547 | [100] | |
548 |
|
548 | |||
549 |
|
549 | |||
550 | Doing the actual push: unknown mandatory parts |
|
550 | Doing the actual push: unknown mandatory parts | |
551 |
|
551 | |||
552 | $ cat << EOF >> $HGRCPATH |
|
552 | $ cat << EOF >> $HGRCPATH | |
553 | > [failpush] |
|
553 | > [failpush] | |
554 | > reason = unknown |
|
554 | > reason = unknown | |
555 | > EOF |
|
555 | > EOF | |
556 |
|
556 | |||
557 | $ hg -R main push other -r e7ec4e813ba6 |
|
557 | $ hg -R main push other -r e7ec4e813ba6 | |
558 | pushing to other |
|
558 | pushing to other | |
559 | searching for changes |
|
559 | searching for changes | |
560 | abort: missing support for test:unknown |
|
560 | abort: missing support for test:unknown | |
561 | [100] |
|
561 | [100] | |
562 |
|
562 | |||
563 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
563 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
564 | pushing to ssh://user@dummy/other |
|
564 | pushing to ssh://user@dummy/other | |
565 | searching for changes |
|
565 | searching for changes | |
566 | abort: missing support for test:unknown |
|
566 | abort: missing support for test:unknown | |
567 | [100] |
|
567 | [100] | |
568 |
|
568 | |||
569 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
569 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
570 | pushing to http://localhost:$HGPORT2/ |
|
570 | pushing to http://localhost:$HGPORT2/ | |
571 | searching for changes |
|
571 | searching for changes | |
572 | abort: missing support for test:unknown |
|
572 | abort: missing support for test:unknown | |
573 | [100] |
|
573 | [100] | |
574 |
|
574 | |||
575 | Doing the actual push: race |
|
575 | Doing the actual push: race | |
576 |
|
576 | |||
577 | $ cat << EOF >> $HGRCPATH |
|
577 | $ cat << EOF >> $HGRCPATH | |
578 | > [failpush] |
|
578 | > [failpush] | |
579 | > reason = race |
|
579 | > reason = race | |
580 | > EOF |
|
580 | > EOF | |
581 |
|
581 | |||
582 | $ hg -R main push other -r e7ec4e813ba6 |
|
582 | $ hg -R main push other -r e7ec4e813ba6 | |
583 | pushing to other |
|
583 | pushing to other | |
584 | searching for changes |
|
584 | searching for changes | |
585 | abort: push failed: |
|
585 | abort: push failed: | |
586 | 'remote repository changed while pushing - please try again' |
|
586 | 'remote repository changed while pushing - please try again' | |
587 | [255] |
|
587 | [255] | |
588 |
|
588 | |||
589 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
589 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
590 | pushing to ssh://user@dummy/other |
|
590 | pushing to ssh://user@dummy/other | |
591 | searching for changes |
|
591 | searching for changes | |
592 | abort: push failed: |
|
592 | abort: push failed: | |
593 | 'remote repository changed while pushing - please try again' |
|
593 | 'remote repository changed while pushing - please try again' | |
594 | [255] |
|
594 | [255] | |
595 |
|
595 | |||
596 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
596 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
597 | pushing to http://localhost:$HGPORT2/ |
|
597 | pushing to http://localhost:$HGPORT2/ | |
598 | searching for changes |
|
598 | searching for changes | |
599 | abort: push failed: |
|
599 | abort: push failed: | |
600 | 'remote repository changed while pushing - please try again' |
|
600 | 'remote repository changed while pushing - please try again' | |
601 | [255] |
|
601 | [255] | |
602 |
|
602 | |||
603 | Doing the actual push: hook abort |
|
603 | Doing the actual push: hook abort | |
604 |
|
604 | |||
605 | $ cat << EOF >> $HGRCPATH |
|
605 | $ cat << EOF >> $HGRCPATH | |
606 | > [failpush] |
|
606 | > [failpush] | |
607 | > reason = |
|
607 | > reason = | |
608 | > [hooks] |
|
608 | > [hooks] | |
609 | > pretxnclose.failpush = sh -c "echo 'You shall not pass!'; false" |
|
609 | > pretxnclose.failpush = sh -c "echo 'You shall not pass!'; false" | |
610 | > txnabort.failpush = sh -c "echo 'Cleaning up the mess...'" |
|
610 | > txnabort.failpush = sh -c "echo 'Cleaning up the mess...'" | |
611 | > EOF |
|
611 | > EOF | |
612 |
|
612 | |||
613 | $ killdaemons.py |
|
613 | $ killdaemons.py | |
614 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
614 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
615 | $ cat other.pid >> $DAEMON_PIDS |
|
615 | $ cat other.pid >> $DAEMON_PIDS | |
616 |
|
616 | |||
617 | $ hg -R main push other -r e7ec4e813ba6 |
|
617 | $ hg -R main push other -r e7ec4e813ba6 | |
618 | pushing to other |
|
618 | pushing to other | |
619 | searching for changes |
|
619 | searching for changes | |
620 | remote: adding changesets |
|
620 | remote: adding changesets | |
621 | remote: adding manifests |
|
621 | remote: adding manifests | |
622 | remote: adding file changes |
|
622 | remote: adding file changes | |
623 | remote: pre-close-tip:e7ec4e813ba6 draft |
|
623 | remote: pre-close-tip:e7ec4e813ba6 draft | |
624 | remote: You shall not pass! |
|
624 | remote: You shall not pass! | |
625 | remote: transaction abort! |
|
625 | remote: transaction abort! | |
626 | remote: Cleaning up the mess... |
|
626 | remote: Cleaning up the mess... | |
627 | remote: rollback completed |
|
627 | remote: rollback completed | |
628 | abort: pretxnclose.failpush hook exited with status 1 |
|
628 | abort: pretxnclose.failpush hook exited with status 1 | |
629 | [40] |
|
629 | [40] | |
630 |
|
630 | |||
631 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
631 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
632 | pushing to ssh://user@dummy/other |
|
632 | pushing to ssh://user@dummy/other | |
633 | searching for changes |
|
633 | searching for changes | |
634 | remote: adding changesets |
|
634 | remote: adding changesets | |
635 | remote: adding manifests |
|
635 | remote: adding manifests | |
636 | remote: adding file changes |
|
636 | remote: adding file changes | |
637 | remote: pre-close-tip:e7ec4e813ba6 draft |
|
637 | remote: pre-close-tip:e7ec4e813ba6 draft | |
638 | remote: You shall not pass! |
|
638 | remote: You shall not pass! | |
639 | remote: transaction abort! |
|
639 | remote: transaction abort! | |
640 | remote: Cleaning up the mess... |
|
640 | remote: Cleaning up the mess... | |
641 | remote: rollback completed |
|
641 | remote: rollback completed | |
642 | remote: pretxnclose.failpush hook exited with status 1 |
|
642 | remote: pretxnclose.failpush hook exited with status 1 | |
643 | abort: push failed on remote |
|
643 | abort: push failed on remote | |
644 | [100] |
|
644 | [100] | |
645 |
|
645 | |||
646 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
646 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
647 | pushing to http://localhost:$HGPORT2/ |
|
647 | pushing to http://localhost:$HGPORT2/ | |
648 | searching for changes |
|
648 | searching for changes | |
649 | remote: adding changesets |
|
649 | remote: adding changesets | |
650 | remote: adding manifests |
|
650 | remote: adding manifests | |
651 | remote: adding file changes |
|
651 | remote: adding file changes | |
652 | remote: pre-close-tip:e7ec4e813ba6 draft |
|
652 | remote: pre-close-tip:e7ec4e813ba6 draft | |
653 | remote: You shall not pass! |
|
653 | remote: You shall not pass! | |
654 | remote: transaction abort! |
|
654 | remote: transaction abort! | |
655 | remote: Cleaning up the mess... |
|
655 | remote: Cleaning up the mess... | |
656 | remote: rollback completed |
|
656 | remote: rollback completed | |
657 | remote: pretxnclose.failpush hook exited with status 1 |
|
657 | remote: pretxnclose.failpush hook exited with status 1 | |
658 | abort: push failed on remote |
|
658 | abort: push failed on remote | |
659 | [100] |
|
659 | [100] | |
660 |
|
660 | |||
661 | (check that no 'pending' files remain) |
|
661 | (check that no 'pending' files remain) | |
662 |
|
662 | |||
663 | $ ls -1 other/.hg/bookmarks* |
|
663 | $ ls -1 other/.hg/bookmarks* | |
664 | other/.hg/bookmarks |
|
664 | other/.hg/bookmarks | |
665 | $ ls -1 other/.hg/store/phaseroots* |
|
665 | $ ls -1 other/.hg/store/phaseroots* | |
666 | other/.hg/store/phaseroots |
|
666 | other/.hg/store/phaseroots | |
667 | $ ls -1 other/.hg/store/00changelog.i* |
|
667 | $ ls -1 other/.hg/store/00changelog.i* | |
668 | other/.hg/store/00changelog.i |
|
668 | other/.hg/store/00changelog.i | |
669 |
|
669 | |||
670 | Check error from hook during the unbundling process itself |
|
670 | Check error from hook during the unbundling process itself | |
671 |
|
671 | |||
672 | $ cat << EOF >> $HGRCPATH |
|
672 | $ cat << EOF >> $HGRCPATH | |
673 | > pretxnchangegroup = sh -c "echo 'Fail early!'; false" |
|
673 | > pretxnchangegroup = sh -c "echo 'Fail early!'; false" | |
674 | > EOF |
|
674 | > EOF | |
675 | $ killdaemons.py # reload http config |
|
675 | $ killdaemons.py # reload http config | |
676 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
676 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
677 | $ cat other.pid >> $DAEMON_PIDS |
|
677 | $ cat other.pid >> $DAEMON_PIDS | |
678 |
|
678 | |||
679 | $ hg -R main push other -r e7ec4e813ba6 |
|
679 | $ hg -R main push other -r e7ec4e813ba6 | |
680 | pushing to other |
|
680 | pushing to other | |
681 | searching for changes |
|
681 | searching for changes | |
682 | remote: adding changesets |
|
682 | remote: adding changesets | |
683 | remote: adding manifests |
|
683 | remote: adding manifests | |
684 | remote: adding file changes |
|
684 | remote: adding file changes | |
685 | remote: Fail early! |
|
685 | remote: Fail early! | |
686 | remote: transaction abort! |
|
686 | remote: transaction abort! | |
687 | remote: Cleaning up the mess... |
|
687 | remote: Cleaning up the mess... | |
688 | remote: rollback completed |
|
688 | remote: rollback completed | |
689 | abort: pretxnchangegroup hook exited with status 1 |
|
689 | abort: pretxnchangegroup hook exited with status 1 | |
690 | [40] |
|
690 | [40] | |
691 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
691 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
692 | pushing to ssh://user@dummy/other |
|
692 | pushing to ssh://user@dummy/other | |
693 | searching for changes |
|
693 | searching for changes | |
694 | remote: adding changesets |
|
694 | remote: adding changesets | |
695 | remote: adding manifests |
|
695 | remote: adding manifests | |
696 | remote: adding file changes |
|
696 | remote: adding file changes | |
697 | remote: Fail early! |
|
697 | remote: Fail early! | |
698 | remote: transaction abort! |
|
698 | remote: transaction abort! | |
699 | remote: Cleaning up the mess... |
|
699 | remote: Cleaning up the mess... | |
700 | remote: rollback completed |
|
700 | remote: rollback completed | |
701 | remote: pretxnchangegroup hook exited with status 1 |
|
701 | remote: pretxnchangegroup hook exited with status 1 | |
702 | abort: push failed on remote |
|
702 | abort: push failed on remote | |
703 | [100] |
|
703 | [100] | |
704 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
704 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
705 | pushing to http://localhost:$HGPORT2/ |
|
705 | pushing to http://localhost:$HGPORT2/ | |
706 | searching for changes |
|
706 | searching for changes | |
707 | remote: adding changesets |
|
707 | remote: adding changesets | |
708 | remote: adding manifests |
|
708 | remote: adding manifests | |
709 | remote: adding file changes |
|
709 | remote: adding file changes | |
710 | remote: Fail early! |
|
710 | remote: Fail early! | |
711 | remote: transaction abort! |
|
711 | remote: transaction abort! | |
712 | remote: Cleaning up the mess... |
|
712 | remote: Cleaning up the mess... | |
713 | remote: rollback completed |
|
713 | remote: rollback completed | |
714 | remote: pretxnchangegroup hook exited with status 1 |
|
714 | remote: pretxnchangegroup hook exited with status 1 | |
715 | abort: push failed on remote |
|
715 | abort: push failed on remote | |
716 | [100] |
|
716 | [100] | |
717 |
|
717 | |||
718 | Check output capture control. |
|
718 | Check output capture control. | |
719 |
|
719 | |||
720 | (should be still forced for http, disabled for local and ssh) |
|
720 | (should be still forced for http, disabled for local and ssh) | |
721 |
|
721 | |||
722 | $ cat >> $HGRCPATH << EOF |
|
722 | $ cat >> $HGRCPATH << EOF | |
723 | > [experimental] |
|
723 | > [experimental] | |
724 | > bundle2-output-capture=False |
|
724 | > bundle2-output-capture=False | |
725 | > EOF |
|
725 | > EOF | |
726 |
|
726 | |||
727 | $ hg -R main push other -r e7ec4e813ba6 |
|
727 | $ hg -R main push other -r e7ec4e813ba6 | |
728 | pushing to other |
|
728 | pushing to other | |
729 | searching for changes |
|
729 | searching for changes | |
730 | adding changesets |
|
730 | adding changesets | |
731 | adding manifests |
|
731 | adding manifests | |
732 | adding file changes |
|
732 | adding file changes | |
733 | Fail early! |
|
733 | Fail early! | |
734 | transaction abort! |
|
734 | transaction abort! | |
735 | Cleaning up the mess... |
|
735 | Cleaning up the mess... | |
736 | rollback completed |
|
736 | rollback completed | |
737 | abort: pretxnchangegroup hook exited with status 1 |
|
737 | abort: pretxnchangegroup hook exited with status 1 | |
738 | [40] |
|
738 | [40] | |
739 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
739 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
740 | pushing to ssh://user@dummy/other |
|
740 | pushing to ssh://user@dummy/other | |
741 | searching for changes |
|
741 | searching for changes | |
742 | remote: Fail early! (no-py3 chg !) |
|
|||
743 | remote: adding changesets |
|
742 | remote: adding changesets | |
744 | remote: adding manifests |
|
743 | remote: adding manifests | |
745 | remote: adding file changes |
|
744 | remote: adding file changes | |
746 | remote: Fail early! (py3 !) |
|
745 | remote: Fail early! (py3 !) | |
747 | remote: Fail early! (no-py3 no-chg !) |
|
|||
748 | remote: transaction abort! |
|
746 | remote: transaction abort! | |
749 | remote: Cleaning up the mess... |
|
747 | remote: Cleaning up the mess... | |
750 | remote: rollback completed |
|
748 | remote: rollback completed | |
751 | remote: pretxnchangegroup hook exited with status 1 |
|
749 | remote: pretxnchangegroup hook exited with status 1 | |
752 | abort: push failed on remote |
|
750 | abort: push failed on remote | |
753 | [100] |
|
751 | [100] | |
754 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
752 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
755 | pushing to http://localhost:$HGPORT2/ |
|
753 | pushing to http://localhost:$HGPORT2/ | |
756 | searching for changes |
|
754 | searching for changes | |
757 | remote: adding changesets |
|
755 | remote: adding changesets | |
758 | remote: adding manifests |
|
756 | remote: adding manifests | |
759 | remote: adding file changes |
|
757 | remote: adding file changes | |
760 | remote: Fail early! |
|
758 | remote: Fail early! | |
761 | remote: transaction abort! |
|
759 | remote: transaction abort! | |
762 | remote: Cleaning up the mess... |
|
760 | remote: Cleaning up the mess... | |
763 | remote: rollback completed |
|
761 | remote: rollback completed | |
764 | remote: pretxnchangegroup hook exited with status 1 |
|
762 | remote: pretxnchangegroup hook exited with status 1 | |
765 | abort: push failed on remote |
|
763 | abort: push failed on remote | |
766 | [100] |
|
764 | [100] | |
767 |
|
765 | |||
768 | Check abort from mandatory pushkey |
|
766 | Check abort from mandatory pushkey | |
769 |
|
767 | |||
770 | $ cat > mandatorypart.py << EOF |
|
768 | $ cat > mandatorypart.py << EOF | |
771 | > from mercurial import exchange |
|
769 | > from mercurial import exchange | |
772 | > from mercurial import pushkey |
|
770 | > from mercurial import pushkey | |
773 | > from mercurial import node |
|
771 | > from mercurial import node | |
774 | > from mercurial import error |
|
772 | > from mercurial import error | |
775 | > @exchange.b2partsgenerator(b'failingpuskey') |
|
773 | > @exchange.b2partsgenerator(b'failingpuskey') | |
776 | > def addfailingpushey(pushop, bundler): |
|
774 | > def addfailingpushey(pushop, bundler): | |
777 | > enc = pushkey.encode |
|
775 | > enc = pushkey.encode | |
778 | > part = bundler.newpart(b'pushkey') |
|
776 | > part = bundler.newpart(b'pushkey') | |
779 | > part.addparam(b'namespace', enc(b'phases')) |
|
777 | > part.addparam(b'namespace', enc(b'phases')) | |
780 | > part.addparam(b'key', enc(b'cd010b8cd998f3981a5a8115f94f8da4ab506089')) |
|
778 | > part.addparam(b'key', enc(b'cd010b8cd998f3981a5a8115f94f8da4ab506089')) | |
781 | > part.addparam(b'old', enc(b'0')) # successful update |
|
779 | > part.addparam(b'old', enc(b'0')) # successful update | |
782 | > part.addparam(b'new', enc(b'0')) |
|
780 | > part.addparam(b'new', enc(b'0')) | |
783 | > def fail(pushop, exc): |
|
781 | > def fail(pushop, exc): | |
784 | > raise error.Abort(b'Correct phase push failed (because hooks)') |
|
782 | > raise error.Abort(b'Correct phase push failed (because hooks)') | |
785 | > pushop.pkfailcb[part.id] = fail |
|
783 | > pushop.pkfailcb[part.id] = fail | |
786 | > EOF |
|
784 | > EOF | |
787 | $ cat >> $HGRCPATH << EOF |
|
785 | $ cat >> $HGRCPATH << EOF | |
788 | > [hooks] |
|
786 | > [hooks] | |
789 | > pretxnchangegroup= |
|
787 | > pretxnchangegroup= | |
790 | > pretxnclose.failpush= |
|
788 | > pretxnclose.failpush= | |
791 | > prepushkey.failpush = sh -c "echo 'do not push the key !'; false" |
|
789 | > prepushkey.failpush = sh -c "echo 'do not push the key !'; false" | |
792 | > [extensions] |
|
790 | > [extensions] | |
793 | > mandatorypart=$TESTTMP/mandatorypart.py |
|
791 | > mandatorypart=$TESTTMP/mandatorypart.py | |
794 | > EOF |
|
792 | > EOF | |
795 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config |
|
793 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config | |
796 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
794 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
797 | $ cat other.pid >> $DAEMON_PIDS |
|
795 | $ cat other.pid >> $DAEMON_PIDS | |
798 |
|
796 | |||
799 | (Failure from a hook) |
|
797 | (Failure from a hook) | |
800 |
|
798 | |||
801 | $ hg -R main push other -r e7ec4e813ba6 |
|
799 | $ hg -R main push other -r e7ec4e813ba6 | |
802 | pushing to other |
|
800 | pushing to other | |
803 | searching for changes |
|
801 | searching for changes | |
804 | adding changesets |
|
802 | adding changesets | |
805 | adding manifests |
|
803 | adding manifests | |
806 | adding file changes |
|
804 | adding file changes | |
807 | do not push the key ! |
|
805 | do not push the key ! | |
808 | pushkey-abort: prepushkey.failpush hook exited with status 1 |
|
806 | pushkey-abort: prepushkey.failpush hook exited with status 1 | |
809 | transaction abort! |
|
807 | transaction abort! | |
810 | Cleaning up the mess... |
|
808 | Cleaning up the mess... | |
811 | rollback completed |
|
809 | rollback completed | |
812 | abort: Correct phase push failed (because hooks) |
|
810 | abort: Correct phase push failed (because hooks) | |
813 | [255] |
|
811 | [255] | |
814 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
812 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
815 | pushing to ssh://user@dummy/other |
|
813 | pushing to ssh://user@dummy/other | |
816 | searching for changes |
|
814 | searching for changes | |
817 | remote: adding changesets |
|
815 | remote: adding changesets | |
818 | remote: adding manifests |
|
816 | remote: adding manifests | |
819 | remote: adding file changes |
|
817 | remote: adding file changes | |
820 | remote: do not push the key ! |
|
818 | remote: do not push the key ! | |
821 | remote: pushkey-abort: prepushkey.failpush hook exited with status 1 |
|
819 | remote: pushkey-abort: prepushkey.failpush hook exited with status 1 | |
822 | remote: transaction abort! |
|
820 | remote: transaction abort! | |
823 | remote: Cleaning up the mess... |
|
821 | remote: Cleaning up the mess... | |
824 | remote: rollback completed |
|
822 | remote: rollback completed | |
825 | abort: Correct phase push failed (because hooks) |
|
823 | abort: Correct phase push failed (because hooks) | |
826 | [255] |
|
824 | [255] | |
827 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
825 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
828 | pushing to http://localhost:$HGPORT2/ |
|
826 | pushing to http://localhost:$HGPORT2/ | |
829 | searching for changes |
|
827 | searching for changes | |
830 | remote: adding changesets |
|
828 | remote: adding changesets | |
831 | remote: adding manifests |
|
829 | remote: adding manifests | |
832 | remote: adding file changes |
|
830 | remote: adding file changes | |
833 | remote: do not push the key ! |
|
831 | remote: do not push the key ! | |
834 | remote: pushkey-abort: prepushkey.failpush hook exited with status 1 |
|
832 | remote: pushkey-abort: prepushkey.failpush hook exited with status 1 | |
835 | remote: transaction abort! |
|
833 | remote: transaction abort! | |
836 | remote: Cleaning up the mess... |
|
834 | remote: Cleaning up the mess... | |
837 | remote: rollback completed |
|
835 | remote: rollback completed | |
838 | abort: Correct phase push failed (because hooks) |
|
836 | abort: Correct phase push failed (because hooks) | |
839 | [255] |
|
837 | [255] | |
840 |
|
838 | |||
841 | (Failure from a the pushkey) |
|
839 | (Failure from a the pushkey) | |
842 |
|
840 | |||
843 | $ cat > mandatorypart.py << EOF |
|
841 | $ cat > mandatorypart.py << EOF | |
844 | > from mercurial import exchange |
|
842 | > from mercurial import exchange | |
845 | > from mercurial import pushkey |
|
843 | > from mercurial import pushkey | |
846 | > from mercurial import node |
|
844 | > from mercurial import node | |
847 | > from mercurial import error |
|
845 | > from mercurial import error | |
848 | > @exchange.b2partsgenerator(b'failingpuskey') |
|
846 | > @exchange.b2partsgenerator(b'failingpuskey') | |
849 | > def addfailingpushey(pushop, bundler): |
|
847 | > def addfailingpushey(pushop, bundler): | |
850 | > enc = pushkey.encode |
|
848 | > enc = pushkey.encode | |
851 | > part = bundler.newpart(b'pushkey') |
|
849 | > part = bundler.newpart(b'pushkey') | |
852 | > part.addparam(b'namespace', enc(b'phases')) |
|
850 | > part.addparam(b'namespace', enc(b'phases')) | |
853 | > part.addparam(b'key', enc(b'cd010b8cd998f3981a5a8115f94f8da4ab506089')) |
|
851 | > part.addparam(b'key', enc(b'cd010b8cd998f3981a5a8115f94f8da4ab506089')) | |
854 | > part.addparam(b'old', enc(b'4')) # will fail |
|
852 | > part.addparam(b'old', enc(b'4')) # will fail | |
855 | > part.addparam(b'new', enc(b'3')) |
|
853 | > part.addparam(b'new', enc(b'3')) | |
856 | > def fail(pushop, exc): |
|
854 | > def fail(pushop, exc): | |
857 | > raise error.Abort(b'Clown phase push failed') |
|
855 | > raise error.Abort(b'Clown phase push failed') | |
858 | > pushop.pkfailcb[part.id] = fail |
|
856 | > pushop.pkfailcb[part.id] = fail | |
859 | > EOF |
|
857 | > EOF | |
860 | $ cat >> $HGRCPATH << EOF |
|
858 | $ cat >> $HGRCPATH << EOF | |
861 | > [hooks] |
|
859 | > [hooks] | |
862 | > prepushkey.failpush = |
|
860 | > prepushkey.failpush = | |
863 | > EOF |
|
861 | > EOF | |
864 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config |
|
862 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config | |
865 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
863 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
866 | $ cat other.pid >> $DAEMON_PIDS |
|
864 | $ cat other.pid >> $DAEMON_PIDS | |
867 |
|
865 | |||
868 | $ hg -R main push other -r e7ec4e813ba6 |
|
866 | $ hg -R main push other -r e7ec4e813ba6 | |
869 | pushing to other |
|
867 | pushing to other | |
870 | searching for changes |
|
868 | searching for changes | |
871 | adding changesets |
|
869 | adding changesets | |
872 | adding manifests |
|
870 | adding manifests | |
873 | adding file changes |
|
871 | adding file changes | |
874 | transaction abort! |
|
872 | transaction abort! | |
875 | Cleaning up the mess... |
|
873 | Cleaning up the mess... | |
876 | rollback completed |
|
874 | rollback completed | |
877 | pushkey: lock state after "phases" |
|
875 | pushkey: lock state after "phases" | |
878 | lock: free |
|
876 | lock: free | |
879 | wlock: free |
|
877 | wlock: free | |
880 | abort: Clown phase push failed |
|
878 | abort: Clown phase push failed | |
881 | [255] |
|
879 | [255] | |
882 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
880 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
883 | pushing to ssh://user@dummy/other |
|
881 | pushing to ssh://user@dummy/other | |
884 | searching for changes |
|
882 | searching for changes | |
885 | remote: adding changesets |
|
883 | remote: adding changesets | |
886 | remote: adding manifests |
|
884 | remote: adding manifests | |
887 | remote: adding file changes |
|
885 | remote: adding file changes | |
888 | remote: transaction abort! |
|
886 | remote: transaction abort! | |
889 | remote: Cleaning up the mess... |
|
887 | remote: Cleaning up the mess... | |
890 | remote: rollback completed |
|
888 | remote: rollback completed | |
891 | remote: pushkey: lock state after "phases" |
|
889 | remote: pushkey: lock state after "phases" | |
892 | remote: lock: free |
|
890 | remote: lock: free | |
893 | remote: wlock: free |
|
891 | remote: wlock: free | |
894 | abort: Clown phase push failed |
|
892 | abort: Clown phase push failed | |
895 | [255] |
|
893 | [255] | |
896 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
894 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
897 | pushing to http://localhost:$HGPORT2/ |
|
895 | pushing to http://localhost:$HGPORT2/ | |
898 | searching for changes |
|
896 | searching for changes | |
899 | remote: adding changesets |
|
897 | remote: adding changesets | |
900 | remote: adding manifests |
|
898 | remote: adding manifests | |
901 | remote: adding file changes |
|
899 | remote: adding file changes | |
902 | remote: transaction abort! |
|
900 | remote: transaction abort! | |
903 | remote: Cleaning up the mess... |
|
901 | remote: Cleaning up the mess... | |
904 | remote: rollback completed |
|
902 | remote: rollback completed | |
905 | remote: pushkey: lock state after "phases" |
|
903 | remote: pushkey: lock state after "phases" | |
906 | remote: lock: free |
|
904 | remote: lock: free | |
907 | remote: wlock: free |
|
905 | remote: wlock: free | |
908 | abort: Clown phase push failed |
|
906 | abort: Clown phase push failed | |
909 | [255] |
|
907 | [255] | |
910 |
|
908 | |||
911 | Test lazily acquiring the lock during unbundle |
|
909 | Test lazily acquiring the lock during unbundle | |
912 | $ cp $TESTTMP/hgrc.orig $HGRCPATH |
|
910 | $ cp $TESTTMP/hgrc.orig $HGRCPATH | |
913 |
|
911 | |||
914 | $ cat >> $TESTTMP/locktester.py <<EOF |
|
912 | $ cat >> $TESTTMP/locktester.py <<EOF | |
915 | > import os |
|
913 | > import os | |
916 | > from mercurial import bundle2, error, extensions |
|
914 | > from mercurial import bundle2, error, extensions | |
917 | > def checklock(orig, repo, *args, **kwargs): |
|
915 | > def checklock(orig, repo, *args, **kwargs): | |
918 | > if repo.svfs.lexists(b"lock"): |
|
916 | > if repo.svfs.lexists(b"lock"): | |
919 | > raise error.Abort(b"Lock should not be taken") |
|
917 | > raise error.Abort(b"Lock should not be taken") | |
920 | > return orig(repo, *args, **kwargs) |
|
918 | > return orig(repo, *args, **kwargs) | |
921 | > def extsetup(ui): |
|
919 | > def extsetup(ui): | |
922 | > extensions.wrapfunction(bundle2, b'processbundle', checklock) |
|
920 | > extensions.wrapfunction(bundle2, b'processbundle', checklock) | |
923 | > EOF |
|
921 | > EOF | |
924 |
|
922 | |||
925 | $ hg init lazylock |
|
923 | $ hg init lazylock | |
926 | $ cat >> lazylock/.hg/hgrc <<EOF |
|
924 | $ cat >> lazylock/.hg/hgrc <<EOF | |
927 | > [extensions] |
|
925 | > [extensions] | |
928 | > locktester=$TESTTMP/locktester.py |
|
926 | > locktester=$TESTTMP/locktester.py | |
929 | > EOF |
|
927 | > EOF | |
930 |
|
928 | |||
931 | $ hg clone -q ssh://user@dummy/lazylock lazylockclient |
|
929 | $ hg clone -q ssh://user@dummy/lazylock lazylockclient | |
932 | $ cd lazylockclient |
|
930 | $ cd lazylockclient | |
933 | $ touch a && hg ci -Aqm a |
|
931 | $ touch a && hg ci -Aqm a | |
934 | $ hg push |
|
932 | $ hg push | |
935 | pushing to ssh://user@dummy/lazylock |
|
933 | pushing to ssh://user@dummy/lazylock | |
936 | searching for changes |
|
934 | searching for changes | |
937 | remote: Lock should not be taken |
|
935 | remote: Lock should not be taken | |
938 | abort: push failed on remote |
|
936 | abort: push failed on remote | |
939 | [100] |
|
937 | [100] | |
940 |
|
938 | |||
941 | $ cat >> ../lazylock/.hg/hgrc <<EOF |
|
939 | $ cat >> ../lazylock/.hg/hgrc <<EOF | |
942 | > [experimental] |
|
940 | > [experimental] | |
943 | > bundle2lazylocking=True |
|
941 | > bundle2lazylocking=True | |
944 | > EOF |
|
942 | > EOF | |
945 | $ hg push |
|
943 | $ hg push | |
946 | pushing to ssh://user@dummy/lazylock |
|
944 | pushing to ssh://user@dummy/lazylock | |
947 | searching for changes |
|
945 | searching for changes | |
948 | remote: adding changesets |
|
946 | remote: adding changesets | |
949 | remote: adding manifests |
|
947 | remote: adding manifests | |
950 | remote: adding file changes |
|
948 | remote: adding file changes | |
951 | remote: added 1 changesets with 1 changes to 1 files |
|
949 | remote: added 1 changesets with 1 changes to 1 files | |
952 |
|
950 | |||
953 | $ cd .. |
|
951 | $ cd .. | |
954 |
|
952 | |||
955 | Servers can disable bundle1 for clone/pull operations |
|
953 | Servers can disable bundle1 for clone/pull operations | |
956 |
|
954 | |||
957 | $ killdaemons.py |
|
955 | $ killdaemons.py | |
958 | $ hg init bundle2onlyserver |
|
956 | $ hg init bundle2onlyserver | |
959 | $ cd bundle2onlyserver |
|
957 | $ cd bundle2onlyserver | |
960 | $ cat > .hg/hgrc << EOF |
|
958 | $ cat > .hg/hgrc << EOF | |
961 | > [server] |
|
959 | > [server] | |
962 | > bundle1.pull = false |
|
960 | > bundle1.pull = false | |
963 | > EOF |
|
961 | > EOF | |
964 |
|
962 | |||
965 | $ touch foo |
|
963 | $ touch foo | |
966 | $ hg -q commit -A -m initial |
|
964 | $ hg -q commit -A -m initial | |
967 |
|
965 | |||
968 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
966 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
969 | $ cat hg.pid >> $DAEMON_PIDS |
|
967 | $ cat hg.pid >> $DAEMON_PIDS | |
970 |
|
968 | |||
971 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2 |
|
969 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2 | |
972 | requesting all changes |
|
970 | requesting all changes | |
973 | abort: remote error: |
|
971 | abort: remote error: | |
974 | incompatible Mercurial client; bundle2 required |
|
972 | incompatible Mercurial client; bundle2 required | |
975 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
973 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
976 | [100] |
|
974 | [100] | |
977 | $ killdaemons.py |
|
975 | $ killdaemons.py | |
978 | $ cd .. |
|
976 | $ cd .. | |
979 |
|
977 | |||
980 | bundle1 can still pull non-generaldelta repos when generaldelta bundle1 disabled |
|
978 | bundle1 can still pull non-generaldelta repos when generaldelta bundle1 disabled | |
981 |
|
979 | |||
982 | $ hg --config format.usegeneraldelta=false init notgdserver |
|
980 | $ hg --config format.usegeneraldelta=false init notgdserver | |
983 | $ cd notgdserver |
|
981 | $ cd notgdserver | |
984 | $ cat > .hg/hgrc << EOF |
|
982 | $ cat > .hg/hgrc << EOF | |
985 | > [server] |
|
983 | > [server] | |
986 | > bundle1gd.pull = false |
|
984 | > bundle1gd.pull = false | |
987 | > EOF |
|
985 | > EOF | |
988 |
|
986 | |||
989 | $ touch foo |
|
987 | $ touch foo | |
990 | $ hg -q commit -A -m initial |
|
988 | $ hg -q commit -A -m initial | |
991 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
989 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
992 | $ cat hg.pid >> $DAEMON_PIDS |
|
990 | $ cat hg.pid >> $DAEMON_PIDS | |
993 |
|
991 | |||
994 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-1 |
|
992 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-1 | |
995 | requesting all changes |
|
993 | requesting all changes | |
996 | adding changesets |
|
994 | adding changesets | |
997 | adding manifests |
|
995 | adding manifests | |
998 | adding file changes |
|
996 | adding file changes | |
999 | added 1 changesets with 1 changes to 1 files |
|
997 | added 1 changesets with 1 changes to 1 files | |
1000 | new changesets 96ee1d7354c4 |
|
998 | new changesets 96ee1d7354c4 | |
1001 | updating to branch default |
|
999 | updating to branch default | |
1002 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1000 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1003 |
|
1001 | |||
1004 | $ killdaemons.py |
|
1002 | $ killdaemons.py | |
1005 | $ cd ../bundle2onlyserver |
|
1003 | $ cd ../bundle2onlyserver | |
1006 |
|
1004 | |||
1007 | bundle1 pull can be disabled for generaldelta repos only |
|
1005 | bundle1 pull can be disabled for generaldelta repos only | |
1008 |
|
1006 | |||
1009 | $ cat > .hg/hgrc << EOF |
|
1007 | $ cat > .hg/hgrc << EOF | |
1010 | > [server] |
|
1008 | > [server] | |
1011 | > bundle1gd.pull = false |
|
1009 | > bundle1gd.pull = false | |
1012 | > EOF |
|
1010 | > EOF | |
1013 |
|
1011 | |||
1014 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
1012 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
1015 | $ cat hg.pid >> $DAEMON_PIDS |
|
1013 | $ cat hg.pid >> $DAEMON_PIDS | |
1016 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2 |
|
1014 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2 | |
1017 | requesting all changes |
|
1015 | requesting all changes | |
1018 | abort: remote error: |
|
1016 | abort: remote error: | |
1019 | incompatible Mercurial client; bundle2 required |
|
1017 | incompatible Mercurial client; bundle2 required | |
1020 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
1018 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
1021 | [100] |
|
1019 | [100] | |
1022 |
|
1020 | |||
1023 | $ killdaemons.py |
|
1021 | $ killdaemons.py | |
1024 |
|
1022 | |||
1025 | Verify the global server.bundle1 option works |
|
1023 | Verify the global server.bundle1 option works | |
1026 |
|
1024 | |||
1027 | $ cd .. |
|
1025 | $ cd .. | |
1028 | $ cat > bundle2onlyserver/.hg/hgrc << EOF |
|
1026 | $ cat > bundle2onlyserver/.hg/hgrc << EOF | |
1029 | > [server] |
|
1027 | > [server] | |
1030 | > bundle1 = false |
|
1028 | > bundle1 = false | |
1031 | > EOF |
|
1029 | > EOF | |
1032 | $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid |
|
1030 | $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid | |
1033 | $ cat hg.pid >> $DAEMON_PIDS |
|
1031 | $ cat hg.pid >> $DAEMON_PIDS | |
1034 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT not-bundle2 |
|
1032 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT not-bundle2 | |
1035 | requesting all changes |
|
1033 | requesting all changes | |
1036 | abort: remote error: |
|
1034 | abort: remote error: | |
1037 | incompatible Mercurial client; bundle2 required |
|
1035 | incompatible Mercurial client; bundle2 required | |
1038 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
1036 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
1039 | [100] |
|
1037 | [100] | |
1040 | $ killdaemons.py |
|
1038 | $ killdaemons.py | |
1041 |
|
1039 | |||
1042 | $ hg --config devel.legacy.exchange=bundle1 clone ssh://user@dummy/bundle2onlyserver not-bundle2-ssh |
|
1040 | $ hg --config devel.legacy.exchange=bundle1 clone ssh://user@dummy/bundle2onlyserver not-bundle2-ssh | |
1043 | requesting all changes |
|
1041 | requesting all changes | |
1044 | adding changesets |
|
1042 | adding changesets | |
1045 | remote: abort: incompatible Mercurial client; bundle2 required |
|
1043 | remote: abort: incompatible Mercurial client; bundle2 required | |
1046 | remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
1044 | remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
1047 | transaction abort! |
|
1045 | transaction abort! | |
1048 | rollback completed |
|
1046 | rollback completed | |
1049 | abort: stream ended unexpectedly (got 0 bytes, expected 4) |
|
1047 | abort: stream ended unexpectedly (got 0 bytes, expected 4) | |
1050 | [255] |
|
1048 | [255] | |
1051 |
|
1049 | |||
1052 | $ cat > bundle2onlyserver/.hg/hgrc << EOF |
|
1050 | $ cat > bundle2onlyserver/.hg/hgrc << EOF | |
1053 | > [server] |
|
1051 | > [server] | |
1054 | > bundle1gd = false |
|
1052 | > bundle1gd = false | |
1055 | > EOF |
|
1053 | > EOF | |
1056 | $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid |
|
1054 | $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid | |
1057 | $ cat hg.pid >> $DAEMON_PIDS |
|
1055 | $ cat hg.pid >> $DAEMON_PIDS | |
1058 |
|
1056 | |||
1059 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2 |
|
1057 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2 | |
1060 | requesting all changes |
|
1058 | requesting all changes | |
1061 | abort: remote error: |
|
1059 | abort: remote error: | |
1062 | incompatible Mercurial client; bundle2 required |
|
1060 | incompatible Mercurial client; bundle2 required | |
1063 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
1061 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
1064 | [100] |
|
1062 | [100] | |
1065 |
|
1063 | |||
1066 | $ killdaemons.py |
|
1064 | $ killdaemons.py | |
1067 |
|
1065 | |||
1068 | $ cd notgdserver |
|
1066 | $ cd notgdserver | |
1069 | $ cat > .hg/hgrc << EOF |
|
1067 | $ cat > .hg/hgrc << EOF | |
1070 | > [server] |
|
1068 | > [server] | |
1071 | > bundle1gd = false |
|
1069 | > bundle1gd = false | |
1072 | > EOF |
|
1070 | > EOF | |
1073 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
1071 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
1074 | $ cat hg.pid >> $DAEMON_PIDS |
|
1072 | $ cat hg.pid >> $DAEMON_PIDS | |
1075 |
|
1073 | |||
1076 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-2 |
|
1074 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-2 | |
1077 | requesting all changes |
|
1075 | requesting all changes | |
1078 | adding changesets |
|
1076 | adding changesets | |
1079 | adding manifests |
|
1077 | adding manifests | |
1080 | adding file changes |
|
1078 | adding file changes | |
1081 | added 1 changesets with 1 changes to 1 files |
|
1079 | added 1 changesets with 1 changes to 1 files | |
1082 | new changesets 96ee1d7354c4 |
|
1080 | new changesets 96ee1d7354c4 | |
1083 | updating to branch default |
|
1081 | updating to branch default | |
1084 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1082 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1085 |
|
1083 | |||
1086 | $ killdaemons.py |
|
1084 | $ killdaemons.py | |
1087 | $ cd ../bundle2onlyserver |
|
1085 | $ cd ../bundle2onlyserver | |
1088 |
|
1086 | |||
1089 | Verify bundle1 pushes can be disabled |
|
1087 | Verify bundle1 pushes can be disabled | |
1090 |
|
1088 | |||
1091 | $ cat > .hg/hgrc << EOF |
|
1089 | $ cat > .hg/hgrc << EOF | |
1092 | > [server] |
|
1090 | > [server] | |
1093 | > bundle1.push = false |
|
1091 | > bundle1.push = false | |
1094 | > [web] |
|
1092 | > [web] | |
1095 | > allow_push = * |
|
1093 | > allow_push = * | |
1096 | > push_ssl = false |
|
1094 | > push_ssl = false | |
1097 | > EOF |
|
1095 | > EOF | |
1098 |
|
1096 | |||
1099 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
1097 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -E error.log | |
1100 | $ cat hg.pid >> $DAEMON_PIDS |
|
1098 | $ cat hg.pid >> $DAEMON_PIDS | |
1101 | $ cd .. |
|
1099 | $ cd .. | |
1102 |
|
1100 | |||
1103 | $ hg clone http://localhost:$HGPORT bundle2-only |
|
1101 | $ hg clone http://localhost:$HGPORT bundle2-only | |
1104 | requesting all changes |
|
1102 | requesting all changes | |
1105 | adding changesets |
|
1103 | adding changesets | |
1106 | adding manifests |
|
1104 | adding manifests | |
1107 | adding file changes |
|
1105 | adding file changes | |
1108 | added 1 changesets with 1 changes to 1 files |
|
1106 | added 1 changesets with 1 changes to 1 files | |
1109 | new changesets 96ee1d7354c4 |
|
1107 | new changesets 96ee1d7354c4 | |
1110 | updating to branch default |
|
1108 | updating to branch default | |
1111 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1109 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1112 | $ cd bundle2-only |
|
1110 | $ cd bundle2-only | |
1113 | $ echo commit > foo |
|
1111 | $ echo commit > foo | |
1114 | $ hg commit -m commit |
|
1112 | $ hg commit -m commit | |
1115 | $ hg --config devel.legacy.exchange=bundle1 push |
|
1113 | $ hg --config devel.legacy.exchange=bundle1 push | |
1116 | pushing to http://localhost:$HGPORT/ |
|
1114 | pushing to http://localhost:$HGPORT/ | |
1117 | searching for changes |
|
1115 | searching for changes | |
1118 | abort: remote error: |
|
1116 | abort: remote error: | |
1119 | incompatible Mercurial client; bundle2 required |
|
1117 | incompatible Mercurial client; bundle2 required | |
1120 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
1118 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
1121 | [100] |
|
1119 | [100] | |
1122 |
|
1120 | |||
1123 | (also check with ssh) |
|
1121 | (also check with ssh) | |
1124 |
|
1122 | |||
1125 | $ hg --config devel.legacy.exchange=bundle1 push ssh://user@dummy/bundle2onlyserver |
|
1123 | $ hg --config devel.legacy.exchange=bundle1 push ssh://user@dummy/bundle2onlyserver | |
1126 | pushing to ssh://user@dummy/bundle2onlyserver |
|
1124 | pushing to ssh://user@dummy/bundle2onlyserver | |
1127 | searching for changes |
|
1125 | searching for changes | |
1128 | remote: abort: incompatible Mercurial client; bundle2 required |
|
1126 | remote: abort: incompatible Mercurial client; bundle2 required | |
1129 | remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
1127 | remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
1130 | [1] |
|
1128 | [1] | |
1131 |
|
1129 | |||
1132 | $ hg push |
|
1130 | $ hg push | |
1133 | pushing to http://localhost:$HGPORT/ |
|
1131 | pushing to http://localhost:$HGPORT/ | |
1134 | searching for changes |
|
1132 | searching for changes | |
1135 | remote: adding changesets |
|
1133 | remote: adding changesets | |
1136 | remote: adding manifests |
|
1134 | remote: adding manifests | |
1137 | remote: adding file changes |
|
1135 | remote: adding file changes | |
1138 | remote: added 1 changesets with 1 changes to 1 files |
|
1136 | remote: added 1 changesets with 1 changes to 1 files |
@@ -1,274 +1,235 b'' | |||||
1 | hg debuginstall |
|
1 | hg debuginstall | |
2 | $ hg debuginstall |
|
2 | $ hg debuginstall | |
3 | checking encoding (ascii)... |
|
3 | checking encoding (ascii)... | |
4 | checking Python executable (*) (glob) |
|
4 | checking Python executable (*) (glob) | |
5 | checking Python implementation (*) (glob) |
|
5 | checking Python implementation (*) (glob) | |
6 | checking Python version (3.*) (glob) (py3 !) |
|
6 | checking Python version (3.*) (glob) (py3 !) | |
7 | checking Python lib (.*[Ll]ib.*)... (re) (no-pyoxidizer !) |
|
7 | checking Python lib (.*[Ll]ib.*)... (re) (no-pyoxidizer !) | |
8 | checking Python lib (.*pyoxidizer.*)... (re) (pyoxidizer !) |
|
8 | checking Python lib (.*pyoxidizer.*)... (re) (pyoxidizer !) | |
9 | checking Python security support (*) (glob) |
|
9 | checking Python security support (*) (glob) | |
10 | TLS 1.2 not supported by Python install; network connections lack modern security (?) |
|
10 | TLS 1.2 not supported by Python install; network connections lack modern security (?) | |
11 | SNI not supported by Python install; may have connectivity issues with some servers (?) |
|
11 | SNI not supported by Python install; may have connectivity issues with some servers (?) | |
12 | checking Rust extensions \((installed|missing)\) (re) |
|
12 | checking Rust extensions \((installed|missing)\) (re) | |
13 | checking Mercurial version (*) (glob) |
|
13 | checking Mercurial version (*) (glob) | |
14 | checking Mercurial custom build (*) (glob) |
|
14 | checking Mercurial custom build (*) (glob) | |
15 | checking module policy (*) (glob) |
|
15 | checking module policy (*) (glob) | |
16 | checking installed modules (*mercurial)... (glob) |
|
16 | checking installed modules (*mercurial)... (glob) | |
17 | checking registered compression engines (*zlib*) (glob) |
|
17 | checking registered compression engines (*zlib*) (glob) | |
18 | checking available compression engines (*zlib*) (glob) |
|
18 | checking available compression engines (*zlib*) (glob) | |
19 | checking available compression engines for wire protocol (*zlib*) (glob) |
|
19 | checking available compression engines for wire protocol (*zlib*) (glob) | |
20 | checking "re2" regexp engine \((available|missing)\) (re) |
|
20 | checking "re2" regexp engine \((available|missing)\) (re) | |
21 | checking templates (*mercurial?templates)... (glob) (no-pyoxidizer !) |
|
21 | checking templates (*mercurial?templates)... (glob) (no-pyoxidizer !) | |
22 | checking templates (*app?templates)... (glob) (pyoxidizer !) |
|
22 | checking templates (*app?templates)... (glob) (pyoxidizer !) | |
23 | checking default template (*mercurial?templates?map-cmdline.default) (glob) (no-pyoxidizer !) |
|
23 | checking default template (*mercurial?templates?map-cmdline.default) (glob) (no-pyoxidizer !) | |
24 | checking default template (*app?templates?map-cmdline.default) (glob) (pyoxidizer !) |
|
24 | checking default template (*app?templates?map-cmdline.default) (glob) (pyoxidizer !) | |
25 | checking commit editor... (*) (glob) |
|
25 | checking commit editor... (*) (glob) | |
26 | checking username (test) |
|
26 | checking username (test) | |
27 | no problems detected |
|
27 | no problems detected | |
28 |
|
28 | |||
29 | hg debuginstall JSON |
|
29 | hg debuginstall JSON | |
30 | $ hg debuginstall -Tjson | sed 's|\\\\|\\|g' |
|
30 | $ hg debuginstall -Tjson | sed 's|\\\\|\\|g' | |
31 | [ |
|
31 | [ | |
32 | { |
|
32 | { | |
33 | "compengines": ["bz2", "bz2truncated", "none", "zlib"*], (glob) |
|
33 | "compengines": ["bz2", "bz2truncated", "none", "zlib"*], (glob) | |
34 | "compenginesavail": ["bz2", "bz2truncated", "none", "zlib"*], (glob) |
|
34 | "compenginesavail": ["bz2", "bz2truncated", "none", "zlib"*], (glob) | |
35 | "compenginesserver": [*"zlib"*], (glob) |
|
35 | "compenginesserver": [*"zlib"*], (glob) | |
36 | "defaulttemplate": "*mercurial?templates?map-cmdline.default", (glob) (no-pyoxidizer !) |
|
36 | "defaulttemplate": "*mercurial?templates?map-cmdline.default", (glob) (no-pyoxidizer !) | |
37 | "defaulttemplate": "*app?templates?map-cmdline.default", (glob) (pyoxidizer !) |
|
37 | "defaulttemplate": "*app?templates?map-cmdline.default", (glob) (pyoxidizer !) | |
38 | "defaulttemplateerror": null, |
|
38 | "defaulttemplateerror": null, | |
39 | "defaulttemplatenotfound": "default", |
|
39 | "defaulttemplatenotfound": "default", | |
40 | "editor": "*", (glob) |
|
40 | "editor": "*", (glob) | |
41 | "editornotfound": false, |
|
41 | "editornotfound": false, | |
42 | "encoding": "ascii", |
|
42 | "encoding": "ascii", | |
43 | "encodingerror": null, |
|
43 | "encodingerror": null, | |
44 | "extensionserror": null, (no-pure !) |
|
44 | "extensionserror": null, (no-pure !) | |
45 | "hgmodulepolicy": "*", (glob) |
|
45 | "hgmodulepolicy": "*", (glob) | |
46 | "hgmodules": "*mercurial", (glob) |
|
46 | "hgmodules": "*mercurial", (glob) | |
47 | "hgver": "*", (glob) |
|
47 | "hgver": "*", (glob) | |
48 | "hgverextra": "*", (glob) |
|
48 | "hgverextra": "*", (glob) | |
49 | "problems": 0, |
|
49 | "problems": 0, | |
50 | "pythonexe": "*", (glob) |
|
50 | "pythonexe": "*", (glob) | |
51 | "pythonimplementation": "*", (glob) |
|
51 | "pythonimplementation": "*", (glob) | |
52 | "pythonlib": "*", (glob) |
|
52 | "pythonlib": "*", (glob) | |
53 | "pythonsecurity": [*], (glob) |
|
53 | "pythonsecurity": [*], (glob) | |
54 | "pythonver": "*.*.*", (glob) |
|
54 | "pythonver": "*.*.*", (glob) | |
55 | "re2": (true|false), (re) |
|
55 | "re2": (true|false), (re) | |
56 | "templatedirs": "*mercurial?templates", (glob) (no-pyoxidizer !) |
|
56 | "templatedirs": "*mercurial?templates", (glob) (no-pyoxidizer !) | |
57 | "templatedirs": "*app?templates", (glob) (pyoxidizer !) |
|
57 | "templatedirs": "*app?templates", (glob) (pyoxidizer !) | |
58 | "username": "test", |
|
58 | "username": "test", | |
59 | "usernameerror": null, |
|
59 | "usernameerror": null, | |
60 | "vinotfound": false |
|
60 | "vinotfound": false | |
61 | } |
|
61 | } | |
62 | ] |
|
62 | ] | |
63 |
|
63 | |||
64 | hg debuginstall with no username |
|
64 | hg debuginstall with no username | |
65 | $ HGUSER= hg debuginstall |
|
65 | $ HGUSER= hg debuginstall | |
66 | checking encoding (ascii)... |
|
66 | checking encoding (ascii)... | |
67 | checking Python executable (*) (glob) |
|
67 | checking Python executable (*) (glob) | |
68 | checking Python implementation (*) (glob) |
|
68 | checking Python implementation (*) (glob) | |
69 | checking Python version (3.*) (glob) (py3 !) |
|
69 | checking Python version (3.*) (glob) (py3 !) | |
70 | checking Python lib (.*[Ll]ib.*)... (re) (no-pyoxidizer !) |
|
70 | checking Python lib (.*[Ll]ib.*)... (re) (no-pyoxidizer !) | |
71 | checking Python lib (.*pyoxidizer.*)... (re) (pyoxidizer !) |
|
71 | checking Python lib (.*pyoxidizer.*)... (re) (pyoxidizer !) | |
72 | checking Python security support (*) (glob) |
|
72 | checking Python security support (*) (glob) | |
73 | TLS 1.2 not supported by Python install; network connections lack modern security (?) |
|
73 | TLS 1.2 not supported by Python install; network connections lack modern security (?) | |
74 | SNI not supported by Python install; may have connectivity issues with some servers (?) |
|
74 | SNI not supported by Python install; may have connectivity issues with some servers (?) | |
75 | checking Rust extensions \((installed|missing)\) (re) |
|
75 | checking Rust extensions \((installed|missing)\) (re) | |
76 | checking Mercurial version (*) (glob) |
|
76 | checking Mercurial version (*) (glob) | |
77 | checking Mercurial custom build (*) (glob) |
|
77 | checking Mercurial custom build (*) (glob) | |
78 | checking module policy (*) (glob) |
|
78 | checking module policy (*) (glob) | |
79 | checking installed modules (*mercurial)... (glob) |
|
79 | checking installed modules (*mercurial)... (glob) | |
80 | checking registered compression engines (*zlib*) (glob) |
|
80 | checking registered compression engines (*zlib*) (glob) | |
81 | checking available compression engines (*zlib*) (glob) |
|
81 | checking available compression engines (*zlib*) (glob) | |
82 | checking available compression engines for wire protocol (*zlib*) (glob) |
|
82 | checking available compression engines for wire protocol (*zlib*) (glob) | |
83 | checking "re2" regexp engine \((available|missing)\) (re) |
|
83 | checking "re2" regexp engine \((available|missing)\) (re) | |
84 | checking templates (*mercurial?templates)... (glob) (no-pyoxidizer !) |
|
84 | checking templates (*mercurial?templates)... (glob) (no-pyoxidizer !) | |
85 | checking templates (*app?templates)... (glob) (pyoxidizer !) |
|
85 | checking templates (*app?templates)... (glob) (pyoxidizer !) | |
86 | checking default template (*mercurial?templates?map-cmdline.default) (glob) (no-pyoxidizer !) |
|
86 | checking default template (*mercurial?templates?map-cmdline.default) (glob) (no-pyoxidizer !) | |
87 | checking default template (*app?templates?map-cmdline.default) (glob) (pyoxidizer !) |
|
87 | checking default template (*app?templates?map-cmdline.default) (glob) (pyoxidizer !) | |
88 | checking commit editor... (*) (glob) |
|
88 | checking commit editor... (*) (glob) | |
89 | checking username... |
|
89 | checking username... | |
90 | no username supplied |
|
90 | no username supplied | |
91 | (specify a username in your configuration file) |
|
91 | (specify a username in your configuration file) | |
92 | 1 problems detected, please check your install! |
|
92 | 1 problems detected, please check your install! | |
93 | [1] |
|
93 | [1] | |
94 |
|
94 | |||
95 | hg debuginstall with invalid encoding |
|
95 | hg debuginstall with invalid encoding | |
96 | $ HGENCODING=invalidenc hg debuginstall | grep encoding |
|
96 | $ HGENCODING=invalidenc hg debuginstall | grep encoding | |
97 | checking encoding (invalidenc)... |
|
97 | checking encoding (invalidenc)... | |
98 | unknown encoding: invalidenc |
|
98 | unknown encoding: invalidenc | |
99 |
|
99 | |||
100 | exception message in JSON |
|
100 | exception message in JSON | |
101 |
|
101 | |||
102 | $ HGENCODING=invalidenc HGUSER= hg debuginstall -Tjson | grep error |
|
102 | $ HGENCODING=invalidenc HGUSER= hg debuginstall -Tjson | grep error | |
103 | "defaulttemplateerror": null, |
|
103 | "defaulttemplateerror": null, | |
104 | "encodingerror": "unknown encoding: invalidenc", |
|
104 | "encodingerror": "unknown encoding: invalidenc", | |
105 | "extensionserror": null, (no-pure !) |
|
105 | "extensionserror": null, (no-pure !) | |
106 | "usernameerror": "no username supplied", |
|
106 | "usernameerror": "no username supplied", | |
107 |
|
107 | |||
108 | path variables are expanded (~ is the same as $TESTTMP) |
|
108 | path variables are expanded (~ is the same as $TESTTMP) | |
109 | $ mkdir tools |
|
109 | $ mkdir tools | |
110 | $ touch tools/testeditor.exe |
|
110 | $ touch tools/testeditor.exe | |
111 | #if execbit |
|
111 | #if execbit | |
112 | $ chmod 755 tools/testeditor.exe |
|
112 | $ chmod 755 tools/testeditor.exe | |
113 | #endif |
|
113 | #endif | |
114 | $ HGEDITOR="~/tools/testeditor.exe" hg debuginstall |
|
114 | $ HGEDITOR="~/tools/testeditor.exe" hg debuginstall | |
115 | checking encoding (ascii)... |
|
115 | checking encoding (ascii)... | |
116 | checking Python executable (*) (glob) |
|
116 | checking Python executable (*) (glob) | |
117 | checking Python implementation (*) (glob) |
|
117 | checking Python implementation (*) (glob) | |
118 | checking Python version (3.*) (glob) (py3 !) |
|
118 | checking Python version (3.*) (glob) (py3 !) | |
119 | checking Python lib (.*[Ll]ib.*)... (re) (no-pyoxidizer !) |
|
119 | checking Python lib (.*[Ll]ib.*)... (re) (no-pyoxidizer !) | |
120 | checking Python lib (.*pyoxidizer.*)... (re) (pyoxidizer !) |
|
120 | checking Python lib (.*pyoxidizer.*)... (re) (pyoxidizer !) | |
121 | checking Python security support (*) (glob) |
|
121 | checking Python security support (*) (glob) | |
122 | TLS 1.2 not supported by Python install; network connections lack modern security (?) |
|
122 | TLS 1.2 not supported by Python install; network connections lack modern security (?) | |
123 | SNI not supported by Python install; may have connectivity issues with some servers (?) |
|
123 | SNI not supported by Python install; may have connectivity issues with some servers (?) | |
124 | checking Rust extensions \((installed|missing)\) (re) |
|
124 | checking Rust extensions \((installed|missing)\) (re) | |
125 | checking Mercurial version (*) (glob) |
|
125 | checking Mercurial version (*) (glob) | |
126 | checking Mercurial custom build (*) (glob) |
|
126 | checking Mercurial custom build (*) (glob) | |
127 | checking module policy (*) (glob) |
|
127 | checking module policy (*) (glob) | |
128 | checking installed modules (*mercurial)... (glob) |
|
128 | checking installed modules (*mercurial)... (glob) | |
129 | checking registered compression engines (*zlib*) (glob) |
|
129 | checking registered compression engines (*zlib*) (glob) | |
130 | checking available compression engines (*zlib*) (glob) |
|
130 | checking available compression engines (*zlib*) (glob) | |
131 | checking available compression engines for wire protocol (*zlib*) (glob) |
|
131 | checking available compression engines for wire protocol (*zlib*) (glob) | |
132 | checking "re2" regexp engine \((available|missing)\) (re) |
|
132 | checking "re2" regexp engine \((available|missing)\) (re) | |
133 | checking templates (*mercurial?templates)... (glob) (no-pyoxidizer !) |
|
133 | checking templates (*mercurial?templates)... (glob) (no-pyoxidizer !) | |
134 | checking templates (*app?templates)... (glob) (pyoxidizer !) |
|
134 | checking templates (*app?templates)... (glob) (pyoxidizer !) | |
135 | checking default template (*mercurial?templates?map-cmdline.default) (glob) (no-pyoxidizer !) |
|
135 | checking default template (*mercurial?templates?map-cmdline.default) (glob) (no-pyoxidizer !) | |
136 | checking default template (*app?templates?map-cmdline.default) (glob) (pyoxidizer !) |
|
136 | checking default template (*app?templates?map-cmdline.default) (glob) (pyoxidizer !) | |
137 | checking commit editor... ($TESTTMP/tools/testeditor.exe) |
|
137 | checking commit editor... ($TESTTMP/tools/testeditor.exe) | |
138 | checking username (test) |
|
138 | checking username (test) | |
139 | no problems detected |
|
139 | no problems detected | |
140 |
|
140 | |||
141 | print out the binary post-shlexsplit in the error message when commit editor is |
|
141 | print out the binary post-shlexsplit in the error message when commit editor is | |
142 | not found (this is intentionally using backslashes to mimic a windows usecase). |
|
142 | not found (this is intentionally using backslashes to mimic a windows usecase). | |
143 | $ HGEDITOR="c:\foo\bar\baz.exe -y -z" hg debuginstall |
|
143 | $ HGEDITOR="c:\foo\bar\baz.exe -y -z" hg debuginstall | |
144 | checking encoding (ascii)... |
|
144 | checking encoding (ascii)... | |
145 | checking Python executable (*) (glob) |
|
145 | checking Python executable (*) (glob) | |
146 | checking Python implementation (*) (glob) |
|
146 | checking Python implementation (*) (glob) | |
147 | checking Python version (3.*) (glob) (py3 !) |
|
147 | checking Python version (3.*) (glob) (py3 !) | |
148 | checking Python lib (.*[Ll]ib.*)... (re) (no-pyoxidizer !) |
|
148 | checking Python lib (.*[Ll]ib.*)... (re) (no-pyoxidizer !) | |
149 | checking Python lib (.*pyoxidizer.*)... (re) (pyoxidizer !) |
|
149 | checking Python lib (.*pyoxidizer.*)... (re) (pyoxidizer !) | |
150 | checking Python security support (*) (glob) |
|
150 | checking Python security support (*) (glob) | |
151 | TLS 1.2 not supported by Python install; network connections lack modern security (?) |
|
151 | TLS 1.2 not supported by Python install; network connections lack modern security (?) | |
152 | SNI not supported by Python install; may have connectivity issues with some servers (?) |
|
152 | SNI not supported by Python install; may have connectivity issues with some servers (?) | |
153 | checking Rust extensions \((installed|missing)\) (re) |
|
153 | checking Rust extensions \((installed|missing)\) (re) | |
154 | checking Mercurial version (*) (glob) |
|
154 | checking Mercurial version (*) (glob) | |
155 | checking Mercurial custom build (*) (glob) |
|
155 | checking Mercurial custom build (*) (glob) | |
156 | checking module policy (*) (glob) |
|
156 | checking module policy (*) (glob) | |
157 | checking installed modules (*mercurial)... (glob) |
|
157 | checking installed modules (*mercurial)... (glob) | |
158 | checking registered compression engines (*zlib*) (glob) |
|
158 | checking registered compression engines (*zlib*) (glob) | |
159 | checking available compression engines (*zlib*) (glob) |
|
159 | checking available compression engines (*zlib*) (glob) | |
160 | checking available compression engines for wire protocol (*zlib*) (glob) |
|
160 | checking available compression engines for wire protocol (*zlib*) (glob) | |
161 | checking "re2" regexp engine \((available|missing)\) (re) |
|
161 | checking "re2" regexp engine \((available|missing)\) (re) | |
162 | checking templates (*mercurial?templates)... (glob) (no-pyoxidizer !) |
|
162 | checking templates (*mercurial?templates)... (glob) (no-pyoxidizer !) | |
163 | checking templates (*app?templates)... (glob) (pyoxidizer !) |
|
163 | checking templates (*app?templates)... (glob) (pyoxidizer !) | |
164 | checking default template (*mercurial?templates?map-cmdline.default) (glob) (no-pyoxidizer !) |
|
164 | checking default template (*mercurial?templates?map-cmdline.default) (glob) (no-pyoxidizer !) | |
165 | checking default template (*app?templates?map-cmdline.default) (glob) (pyoxidizer !) |
|
165 | checking default template (*app?templates?map-cmdline.default) (glob) (pyoxidizer !) | |
166 | checking commit editor... (c:\foo\bar\baz.exe) (windows !) |
|
166 | checking commit editor... (c:\foo\bar\baz.exe) (windows !) | |
167 | Can't find editor 'c:\foo\bar\baz.exe' in PATH (windows !) |
|
167 | Can't find editor 'c:\foo\bar\baz.exe' in PATH (windows !) | |
168 | checking commit editor... (c:foobarbaz.exe) (no-windows !) |
|
168 | checking commit editor... (c:foobarbaz.exe) (no-windows !) | |
169 | Can't find editor 'c:foobarbaz.exe' in PATH (no-windows !) |
|
169 | Can't find editor 'c:foobarbaz.exe' in PATH (no-windows !) | |
170 | (specify a commit editor in your configuration file) |
|
170 | (specify a commit editor in your configuration file) | |
171 | checking username (test) |
|
171 | checking username (test) | |
172 | 1 problems detected, please check your install! |
|
172 | 1 problems detected, please check your install! | |
173 | [1] |
|
173 | [1] | |
174 |
|
174 | |||
175 | debuginstall extension support |
|
175 | debuginstall extension support | |
176 | $ hg debuginstall --config extensions.fsmonitor= --config fsmonitor.watchman_exe=false | grep atchman |
|
176 | $ hg debuginstall --config extensions.fsmonitor= --config fsmonitor.watchman_exe=false | grep atchman | |
177 | fsmonitor checking for watchman binary... (false) |
|
177 | fsmonitor checking for watchman binary... (false) | |
178 | watchman binary missing or broken: warning: Watchman unavailable: watchman exited with code 1 |
|
178 | watchman binary missing or broken: warning: Watchman unavailable: watchman exited with code 1 | |
179 | Verify the json works too: |
|
179 | Verify the json works too: | |
180 | $ hg debuginstall --config extensions.fsmonitor= --config fsmonitor.watchman_exe=false -Tjson | grep atchman |
|
180 | $ hg debuginstall --config extensions.fsmonitor= --config fsmonitor.watchman_exe=false -Tjson | grep atchman | |
181 | "fsmonitor-watchman": "false", |
|
181 | "fsmonitor-watchman": "false", | |
182 | "fsmonitor-watchman-error": "warning: Watchman unavailable: watchman exited with code 1", |
|
182 | "fsmonitor-watchman-error": "warning: Watchman unavailable: watchman exited with code 1", | |
183 |
|
183 | |||
184 | Verify that Mercurial is installable with pip. Note that this MUST be |
|
184 | Verify that Mercurial is installable with pip. Note that this MUST be | |
185 | the last test in this file, because we do some nasty things to the |
|
185 | the last test in this file, because we do some nasty things to the | |
186 | shell environment in order to make the virtualenv work reliably. |
|
186 | shell environment in order to make the virtualenv work reliably. | |
187 |
|
187 | |||
188 | On Python 3, we use the venv module, which is part of the standard library. |
|
188 | On Python 3, we use the venv module, which is part of the standard library. | |
189 | But some Linux distros strip out this module's functionality involving pip, |
|
189 | But some Linux distros strip out this module's functionality involving pip, | |
190 | so we have to look for the ensurepip module, which these distros strip out |
|
190 | so we have to look for the ensurepip module, which these distros strip out | |
191 | completely. |
|
191 | completely. | |
192 | On Python 2, we use the 3rd party virtualenv module, if available. |
|
192 | On Python 2, we use the 3rd party virtualenv module, if available. | |
193 |
|
193 | |||
194 | $ cd $TESTTMP |
|
194 | $ cd $TESTTMP | |
195 | $ unset PYTHONPATH |
|
195 | $ unset PYTHONPATH | |
196 |
|
196 | |||
197 | #if py3 ensurepip network-io no-pyoxidizer |
|
197 | #if py3 ensurepip network-io no-pyoxidizer | |
198 | $ "$PYTHON" -m venv installenv >> pip.log |
|
198 | $ "$PYTHON" -m venv installenv >> pip.log | |
199 |
|
199 | |||
200 | Hack: Debian does something a bit different in ensurepip.bootstrap. This makes |
|
200 | Hack: Debian does something a bit different in ensurepip.bootstrap. This makes | |
201 | it so that pip thinks the 'wheel' wheel is installed so it can build wheels; |
|
201 | it so that pip thinks the 'wheel' wheel is installed so it can build wheels; | |
202 | when it goes to try, however, it shells out to run `python3 -u <setup.py>`, |
|
202 | when it goes to try, however, it shells out to run `python3 -u <setup.py>`, | |
203 | that *doesn't* get the 'wheel' wheel, and it fails with an invalid command |
|
203 | that *doesn't* get the 'wheel' wheel, and it fails with an invalid command | |
204 | 'bdist_wheel'. To fix this, we just delete the wheel from where Debian put it in |
|
204 | 'bdist_wheel'. To fix this, we just delete the wheel from where Debian put it in | |
205 | our virtual env. Then pip doesn't think it's installed and doesn't try to build. |
|
205 | our virtual env. Then pip doesn't think it's installed and doesn't try to build. | |
206 | $ rm installenv/share/python-wheels/wheel-*.whl >/dev/null 2>&1 || true |
|
206 | $ rm installenv/share/python-wheels/wheel-*.whl >/dev/null 2>&1 || true | |
207 |
|
207 | |||
208 | Note: we use this weird path to run pip and hg to avoid platform differences, |
|
208 | Note: we use this weird path to run pip and hg to avoid platform differences, | |
209 | since it's bin on most platforms but Scripts on Windows. |
|
209 | since it's bin on most platforms but Scripts on Windows. | |
210 | $ ./installenv/*/pip install $TESTDIR/.. >> pip.log |
|
210 | $ ./installenv/*/pip install $TESTDIR/.. >> pip.log | |
211 | Failed building wheel for mercurial (?) |
|
211 | Failed building wheel for mercurial (?) | |
212 | WARNING: You are using pip version *; however, version * is available. (glob) (?) |
|
212 | WARNING: You are using pip version *; however, version * is available. (glob) (?) | |
213 | You should consider upgrading via the '$TESTTMP/installenv/bin/python* -m pip install --upgrade pip' command. (glob) (?) |
|
213 | You should consider upgrading via the '$TESTTMP/installenv/bin/python* -m pip install --upgrade pip' command. (glob) (?) | |
214 | $ ./installenv/*/hg debuginstall || cat pip.log |
|
214 | $ ./installenv/*/hg debuginstall || cat pip.log | |
215 | checking encoding (ascii)... |
|
215 | checking encoding (ascii)... | |
216 | checking Python executable (*) (glob) |
|
216 | checking Python executable (*) (glob) | |
217 | checking Python implementation (*) (glob) |
|
217 | checking Python implementation (*) (glob) | |
218 | checking Python version (3.*) (glob) |
|
218 | checking Python version (3.*) (glob) | |
219 | checking Python lib (*)... (glob) |
|
219 | checking Python lib (*)... (glob) | |
220 | checking Python security support (*) (glob) |
|
220 | checking Python security support (*) (glob) | |
221 | checking Rust extensions \((installed|missing)\) (re) |
|
221 | checking Rust extensions \((installed|missing)\) (re) | |
222 | checking Mercurial version (*) (glob) |
|
222 | checking Mercurial version (*) (glob) | |
223 | checking Mercurial custom build (*) (glob) |
|
223 | checking Mercurial custom build (*) (glob) | |
224 | checking module policy (*) (glob) |
|
224 | checking module policy (*) (glob) | |
225 | checking installed modules (*/mercurial)... (glob) |
|
225 | checking installed modules (*/mercurial)... (glob) | |
226 | checking registered compression engines (*) (glob) |
|
226 | checking registered compression engines (*) (glob) | |
227 | checking available compression engines (*) (glob) |
|
227 | checking available compression engines (*) (glob) | |
228 | checking available compression engines for wire protocol (*) (glob) |
|
228 | checking available compression engines for wire protocol (*) (glob) | |
229 | checking "re2" regexp engine \((available|missing)\) (re) |
|
229 | checking "re2" regexp engine \((available|missing)\) (re) | |
230 | checking templates ($TESTTMP/installenv/*/site-packages/mercurial/templates)... (glob) |
|
230 | checking templates ($TESTTMP/installenv/*/site-packages/mercurial/templates)... (glob) | |
231 | checking default template ($TESTTMP/installenv/*/site-packages/mercurial/templates/map-cmdline.default) (glob) |
|
231 | checking default template ($TESTTMP/installenv/*/site-packages/mercurial/templates/map-cmdline.default) (glob) | |
232 | checking commit editor... (*) (glob) |
|
232 | checking commit editor... (*) (glob) | |
233 | checking username (test) |
|
233 | checking username (test) | |
234 | no problems detected |
|
234 | no problems detected | |
235 | #endif |
|
235 | #endif | |
236 |
|
||||
237 | #if virtualenv no-py3 network-io no-pyoxidizer |
|
|||
238 |
|
||||
239 | Note: --no-site-packages is the default for all versions enabled by hghave |
|
|||
240 |
|
||||
241 | $ "$PYTHON" -m virtualenv installenv >> pip.log |
|
|||
242 | DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. (?) |
|
|||
243 | DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support (?) |
|
|||
244 |
|
||||
245 | Note: we use this weird path to run pip and hg to avoid platform differences, |
|
|||
246 | since it's bin on most platforms but Scripts on Windows. |
|
|||
247 | $ ./installenv/*/pip install $TESTDIR/.. >> pip.log |
|
|||
248 | DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. (?) |
|
|||
249 | DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support (?) |
|
|||
250 | DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. (?) |
|
|||
251 | $ ./installenv/*/hg debuginstall || cat pip.log |
|
|||
252 | checking encoding (ascii)... |
|
|||
253 | checking Python executable (*) (glob) |
|
|||
254 | checking Python implementation (*) (glob) |
|
|||
255 | checking Python version (2.*) (glob) |
|
|||
256 | checking Python lib (*)... (glob) |
|
|||
257 | checking Python security support (*) (glob) |
|
|||
258 | TLS 1.2 not supported by Python install; network connections lack modern security (?) |
|
|||
259 | SNI not supported by Python install; may have connectivity issues with some servers (?) |
|
|||
260 | checking Rust extensions \((installed|missing)\) (re) |
|
|||
261 | checking Mercurial version (*) (glob) |
|
|||
262 | checking Mercurial custom build (*) (glob) |
|
|||
263 | checking module policy (*) (glob) |
|
|||
264 | checking installed modules (*/mercurial)... (glob) |
|
|||
265 | checking registered compression engines (*) (glob) |
|
|||
266 | checking available compression engines (*) (glob) |
|
|||
267 | checking available compression engines for wire protocol (*) (glob) |
|
|||
268 | checking "re2" regexp engine \((available|missing)\) (re) |
|
|||
269 | checking templates ($TESTTMP/installenv/*/site-packages/mercurial/templates)... (glob) |
|
|||
270 | checking default template ($TESTTMP/installenv/*/site-packages/mercurial/templates/map-cmdline.default) (glob) |
|
|||
271 | checking commit editor... (*) (glob) |
|
|||
272 | checking username (test) |
|
|||
273 | no problems detected |
|
|||
274 | #endif |
|
@@ -1,600 +1,596 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 | $ cat << EOF >> $HGRCPATH |
|
4 | $ cat << EOF >> $HGRCPATH | |
5 | > [devel] |
|
5 | > [devel] | |
6 | > # This test is dedicated to interaction through old bundle |
|
6 | > # This test is dedicated to interaction through old bundle | |
7 | > legacy.exchange = bundle1 |
|
7 | > legacy.exchange = bundle1 | |
8 | > EOF |
|
8 | > EOF | |
9 |
|
9 | |||
10 |
|
10 | |||
11 | This test tries to exercise the ssh functionality with a dummy script |
|
11 | This test tries to exercise the ssh functionality with a dummy script | |
12 |
|
12 | |||
13 | creating 'remote' repo |
|
13 | creating 'remote' repo | |
14 |
|
14 | |||
15 | $ hg init remote |
|
15 | $ hg init remote | |
16 | $ cd remote |
|
16 | $ cd remote | |
17 | $ echo this > foo |
|
17 | $ echo this > foo | |
18 | $ echo this > fooO |
|
18 | $ echo this > fooO | |
19 | $ hg ci -A -m "init" foo fooO |
|
19 | $ hg ci -A -m "init" foo fooO | |
20 |
|
20 | |||
21 | insert a closed branch (issue4428) |
|
21 | insert a closed branch (issue4428) | |
22 |
|
22 | |||
23 | $ hg up null |
|
23 | $ hg up null | |
24 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
24 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
25 | $ hg branch closed |
|
25 | $ hg branch closed | |
26 | marked working directory as branch closed |
|
26 | marked working directory as branch closed | |
27 | (branches are permanent and global, did you want a bookmark?) |
|
27 | (branches are permanent and global, did you want a bookmark?) | |
28 | $ hg ci -mc0 |
|
28 | $ hg ci -mc0 | |
29 | $ hg ci --close-branch -mc1 |
|
29 | $ hg ci --close-branch -mc1 | |
30 | $ hg up -q default |
|
30 | $ hg up -q default | |
31 |
|
31 | |||
32 | configure for serving |
|
32 | configure for serving | |
33 |
|
33 | |||
34 | $ cat <<EOF > .hg/hgrc |
|
34 | $ cat <<EOF > .hg/hgrc | |
35 | > [server] |
|
35 | > [server] | |
36 | > uncompressed = True |
|
36 | > uncompressed = True | |
37 | > |
|
37 | > | |
38 | > [hooks] |
|
38 | > [hooks] | |
39 | > changegroup = sh -c "printenv.py --line changegroup-in-remote 0 ../dummylog" |
|
39 | > changegroup = sh -c "printenv.py --line changegroup-in-remote 0 ../dummylog" | |
40 | > EOF |
|
40 | > EOF | |
41 | $ cd $TESTTMP |
|
41 | $ cd $TESTTMP | |
42 |
|
42 | |||
43 | repo not found error |
|
43 | repo not found error | |
44 |
|
44 | |||
45 | $ hg clone ssh://user@dummy/nonexistent local |
|
45 | $ hg clone ssh://user@dummy/nonexistent local | |
46 | remote: abort: repository nonexistent not found |
|
46 | remote: abort: repository nonexistent not found | |
47 | abort: no suitable response from remote hg |
|
47 | abort: no suitable response from remote hg | |
48 | [255] |
|
48 | [255] | |
49 |
|
49 | |||
50 | non-existent absolute path |
|
50 | non-existent absolute path | |
51 |
|
51 | |||
52 | #if no-msys |
|
52 | #if no-msys | |
53 | $ hg clone ssh://user@dummy//`pwd`/nonexistent local |
|
53 | $ hg clone ssh://user@dummy//`pwd`/nonexistent local | |
54 | remote: abort: repository /$TESTTMP/nonexistent not found |
|
54 | remote: abort: repository /$TESTTMP/nonexistent not found | |
55 | abort: no suitable response from remote hg |
|
55 | abort: no suitable response from remote hg | |
56 | [255] |
|
56 | [255] | |
57 | #endif |
|
57 | #endif | |
58 |
|
58 | |||
59 | clone remote via stream |
|
59 | clone remote via stream | |
60 |
|
60 | |||
61 | #if no-reposimplestore |
|
61 | #if no-reposimplestore | |
62 |
|
62 | |||
63 | $ hg clone --stream ssh://user@dummy/remote local-stream |
|
63 | $ hg clone --stream ssh://user@dummy/remote local-stream | |
64 | streaming all changes |
|
64 | streaming all changes | |
65 | 4 files to transfer, 602 bytes of data (no-zstd !) |
|
65 | 4 files to transfer, 602 bytes of data (no-zstd !) | |
66 | transferred 602 bytes in * seconds (*) (glob) (no-zstd !) |
|
66 | transferred 602 bytes in * seconds (*) (glob) (no-zstd !) | |
67 | 4 files to transfer, 621 bytes of data (zstd !) |
|
67 | 4 files to transfer, 621 bytes of data (zstd !) | |
68 | transferred 621 bytes in * seconds (* */sec) (glob) (zstd !) |
|
68 | transferred 621 bytes in * seconds (* */sec) (glob) (zstd !) | |
69 | searching for changes |
|
69 | searching for changes | |
70 | no changes found |
|
70 | no changes found | |
71 | updating to branch default |
|
71 | updating to branch default | |
72 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
72 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
73 | $ cd local-stream |
|
73 | $ cd local-stream | |
74 | $ hg verify |
|
74 | $ hg verify | |
75 | checking changesets |
|
75 | checking changesets | |
76 | checking manifests |
|
76 | checking manifests | |
77 | crosschecking files in changesets and manifests |
|
77 | crosschecking files in changesets and manifests | |
78 | checking files |
|
78 | checking files | |
79 | checked 3 changesets with 2 changes to 2 files |
|
79 | checked 3 changesets with 2 changes to 2 files | |
80 | $ hg branches |
|
80 | $ hg branches | |
81 | default 0:1160648e36ce |
|
81 | default 0:1160648e36ce | |
82 | $ cd $TESTTMP |
|
82 | $ cd $TESTTMP | |
83 |
|
83 | |||
84 | clone bookmarks via stream |
|
84 | clone bookmarks via stream | |
85 |
|
85 | |||
86 | $ hg -R local-stream book mybook |
|
86 | $ hg -R local-stream book mybook | |
87 | $ hg clone --stream ssh://user@dummy/local-stream stream2 |
|
87 | $ hg clone --stream ssh://user@dummy/local-stream stream2 | |
88 | streaming all changes |
|
88 | streaming all changes | |
89 | 4 files to transfer, 602 bytes of data (no-zstd !) |
|
89 | 4 files to transfer, 602 bytes of data (no-zstd !) | |
90 | transferred 602 bytes in * seconds (*) (glob) (no-zstd !) |
|
90 | transferred 602 bytes in * seconds (*) (glob) (no-zstd !) | |
91 | 4 files to transfer, 621 bytes of data (zstd !) |
|
91 | 4 files to transfer, 621 bytes of data (zstd !) | |
92 | transferred 621 bytes in * seconds (* */sec) (glob) (zstd !) |
|
92 | transferred 621 bytes in * seconds (* */sec) (glob) (zstd !) | |
93 | searching for changes |
|
93 | searching for changes | |
94 | no changes found |
|
94 | no changes found | |
95 | updating to branch default |
|
95 | updating to branch default | |
96 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
96 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
97 | $ cd stream2 |
|
97 | $ cd stream2 | |
98 | $ hg book |
|
98 | $ hg book | |
99 | mybook 0:1160648e36ce |
|
99 | mybook 0:1160648e36ce | |
100 | $ cd $TESTTMP |
|
100 | $ cd $TESTTMP | |
101 | $ rm -rf local-stream stream2 |
|
101 | $ rm -rf local-stream stream2 | |
102 |
|
102 | |||
103 | #endif |
|
103 | #endif | |
104 |
|
104 | |||
105 | clone remote via pull |
|
105 | clone remote via pull | |
106 |
|
106 | |||
107 | $ hg clone ssh://user@dummy/remote local |
|
107 | $ hg clone ssh://user@dummy/remote local | |
108 | requesting all changes |
|
108 | requesting all changes | |
109 | adding changesets |
|
109 | adding changesets | |
110 | adding manifests |
|
110 | adding manifests | |
111 | adding file changes |
|
111 | adding file changes | |
112 | added 3 changesets with 2 changes to 2 files |
|
112 | added 3 changesets with 2 changes to 2 files | |
113 | new changesets 1160648e36ce:ad076bfb429d |
|
113 | new changesets 1160648e36ce:ad076bfb429d | |
114 | updating to branch default |
|
114 | updating to branch default | |
115 | 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 | |
116 |
|
116 | |||
117 | verify |
|
117 | verify | |
118 |
|
118 | |||
119 | $ cd local |
|
119 | $ cd local | |
120 | $ hg verify |
|
120 | $ hg verify | |
121 | checking changesets |
|
121 | checking changesets | |
122 | checking manifests |
|
122 | checking manifests | |
123 | crosschecking files in changesets and manifests |
|
123 | crosschecking files in changesets and manifests | |
124 | checking files |
|
124 | checking files | |
125 | checked 3 changesets with 2 changes to 2 files |
|
125 | checked 3 changesets with 2 changes to 2 files | |
126 | $ cat >> .hg/hgrc <<EOF |
|
126 | $ cat >> .hg/hgrc <<EOF | |
127 | > [hooks] |
|
127 | > [hooks] | |
128 | > changegroup = sh -c "printenv.py --line changegroup-in-local 0 ../dummylog" |
|
128 | > changegroup = sh -c "printenv.py --line changegroup-in-local 0 ../dummylog" | |
129 | > EOF |
|
129 | > EOF | |
130 |
|
130 | |||
131 | empty default pull |
|
131 | empty default pull | |
132 |
|
132 | |||
133 | $ hg paths |
|
133 | $ hg paths | |
134 | default = ssh://user@dummy/remote |
|
134 | default = ssh://user@dummy/remote | |
135 | $ hg pull |
|
135 | $ hg pull | |
136 | pulling from ssh://user@dummy/remote |
|
136 | pulling from ssh://user@dummy/remote | |
137 | searching for changes |
|
137 | searching for changes | |
138 | no changes found |
|
138 | no changes found | |
139 |
|
139 | |||
140 | pull from wrong ssh URL |
|
140 | pull from wrong ssh URL | |
141 |
|
141 | |||
142 | $ hg pull ssh://user@dummy/doesnotexist |
|
142 | $ hg pull ssh://user@dummy/doesnotexist | |
143 | pulling from ssh://user@dummy/doesnotexist |
|
143 | pulling from ssh://user@dummy/doesnotexist | |
144 | remote: abort: repository doesnotexist not found |
|
144 | remote: abort: repository doesnotexist not found | |
145 | abort: no suitable response from remote hg |
|
145 | abort: no suitable response from remote hg | |
146 | [255] |
|
146 | [255] | |
147 |
|
147 | |||
148 | local change |
|
148 | local change | |
149 |
|
149 | |||
150 | $ echo bleah > foo |
|
150 | $ echo bleah > foo | |
151 | $ hg ci -m "add" |
|
151 | $ hg ci -m "add" | |
152 |
|
152 | |||
153 | updating rc |
|
153 | updating rc | |
154 |
|
154 | |||
155 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
155 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc | |
156 |
|
156 | |||
157 | find outgoing |
|
157 | find outgoing | |
158 |
|
158 | |||
159 | $ hg out ssh://user@dummy/remote |
|
159 | $ hg out ssh://user@dummy/remote | |
160 | comparing with ssh://user@dummy/remote |
|
160 | comparing with ssh://user@dummy/remote | |
161 | searching for changes |
|
161 | searching for changes | |
162 | changeset: 3:a28a9d1a809c |
|
162 | changeset: 3:a28a9d1a809c | |
163 | tag: tip |
|
163 | tag: tip | |
164 | parent: 0:1160648e36ce |
|
164 | parent: 0:1160648e36ce | |
165 | user: test |
|
165 | user: test | |
166 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
166 | date: Thu Jan 01 00:00:00 1970 +0000 | |
167 | summary: add |
|
167 | summary: add | |
168 |
|
168 | |||
169 |
|
169 | |||
170 | find incoming on the remote side |
|
170 | find incoming on the remote side | |
171 |
|
171 | |||
172 | $ hg incoming -R ../remote ssh://user@dummy/local |
|
172 | $ hg incoming -R ../remote ssh://user@dummy/local | |
173 | comparing with ssh://user@dummy/local |
|
173 | comparing with ssh://user@dummy/local | |
174 | searching for changes |
|
174 | searching for changes | |
175 | changeset: 3:a28a9d1a809c |
|
175 | changeset: 3:a28a9d1a809c | |
176 | tag: tip |
|
176 | tag: tip | |
177 | parent: 0:1160648e36ce |
|
177 | parent: 0:1160648e36ce | |
178 | user: test |
|
178 | user: test | |
179 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
179 | date: Thu Jan 01 00:00:00 1970 +0000 | |
180 | summary: add |
|
180 | summary: add | |
181 |
|
181 | |||
182 |
|
182 | |||
183 | find incoming on the remote side (using absolute path) |
|
183 | find incoming on the remote side (using absolute path) | |
184 |
|
184 | |||
185 | $ hg incoming -R ../remote "ssh://user@dummy/`pwd`" |
|
185 | $ hg incoming -R ../remote "ssh://user@dummy/`pwd`" | |
186 | comparing with ssh://user@dummy/$TESTTMP/local |
|
186 | comparing with ssh://user@dummy/$TESTTMP/local | |
187 | searching for changes |
|
187 | searching for changes | |
188 | changeset: 3:a28a9d1a809c |
|
188 | changeset: 3:a28a9d1a809c | |
189 | tag: tip |
|
189 | tag: tip | |
190 | parent: 0:1160648e36ce |
|
190 | parent: 0:1160648e36ce | |
191 | user: test |
|
191 | user: test | |
192 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
192 | date: Thu Jan 01 00:00:00 1970 +0000 | |
193 | summary: add |
|
193 | summary: add | |
194 |
|
194 | |||
195 |
|
195 | |||
196 | push |
|
196 | push | |
197 |
|
197 | |||
198 | $ hg push |
|
198 | $ hg push | |
199 | pushing to ssh://user@dummy/remote |
|
199 | pushing to ssh://user@dummy/remote | |
200 | searching for changes |
|
200 | searching for changes | |
201 | remote: adding changesets |
|
201 | remote: adding changesets | |
202 | remote: adding manifests |
|
202 | remote: adding manifests | |
203 | remote: adding file changes |
|
203 | remote: adding file changes | |
204 | remote: added 1 changesets with 1 changes to 1 files |
|
204 | remote: added 1 changesets with 1 changes to 1 files | |
205 | $ cd $TESTTMP/remote |
|
205 | $ cd $TESTTMP/remote | |
206 |
|
206 | |||
207 | check remote tip |
|
207 | check remote tip | |
208 |
|
208 | |||
209 | $ hg tip |
|
209 | $ hg tip | |
210 | changeset: 3:a28a9d1a809c |
|
210 | changeset: 3:a28a9d1a809c | |
211 | tag: tip |
|
211 | tag: tip | |
212 | parent: 0:1160648e36ce |
|
212 | parent: 0:1160648e36ce | |
213 | user: test |
|
213 | user: test | |
214 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
214 | date: Thu Jan 01 00:00:00 1970 +0000 | |
215 | summary: add |
|
215 | summary: add | |
216 |
|
216 | |||
217 | $ hg verify |
|
217 | $ hg verify | |
218 | checking changesets |
|
218 | checking changesets | |
219 | checking manifests |
|
219 | checking manifests | |
220 | crosschecking files in changesets and manifests |
|
220 | crosschecking files in changesets and manifests | |
221 | checking files |
|
221 | checking files | |
222 | checked 4 changesets with 3 changes to 2 files |
|
222 | checked 4 changesets with 3 changes to 2 files | |
223 | $ hg cat -r tip foo |
|
223 | $ hg cat -r tip foo | |
224 | bleah |
|
224 | bleah | |
225 | $ echo z > z |
|
225 | $ echo z > z | |
226 | $ hg ci -A -m z z |
|
226 | $ hg ci -A -m z z | |
227 | created new head |
|
227 | created new head | |
228 |
|
228 | |||
229 | test pushkeys and bookmarks |
|
229 | test pushkeys and bookmarks | |
230 |
|
230 | |||
231 | $ cd $TESTTMP/local |
|
231 | $ cd $TESTTMP/local | |
232 | $ hg debugpushkey ssh://user@dummy/remote namespaces |
|
232 | $ hg debugpushkey ssh://user@dummy/remote namespaces | |
233 | bookmarks |
|
233 | bookmarks | |
234 | namespaces |
|
234 | namespaces | |
235 | phases |
|
235 | phases | |
236 | $ hg book foo -r 0 |
|
236 | $ hg book foo -r 0 | |
237 | $ hg out -B |
|
237 | $ hg out -B | |
238 | comparing with ssh://user@dummy/remote |
|
238 | comparing with ssh://user@dummy/remote | |
239 | searching for changed bookmarks |
|
239 | searching for changed bookmarks | |
240 | foo 1160648e36ce |
|
240 | foo 1160648e36ce | |
241 | $ hg push -B foo |
|
241 | $ hg push -B foo | |
242 | pushing to ssh://user@dummy/remote |
|
242 | pushing to ssh://user@dummy/remote | |
243 | searching for changes |
|
243 | searching for changes | |
244 | no changes found |
|
244 | no changes found | |
245 | exporting bookmark foo |
|
245 | exporting bookmark foo | |
246 | [1] |
|
246 | [1] | |
247 | $ hg debugpushkey ssh://user@dummy/remote bookmarks |
|
247 | $ hg debugpushkey ssh://user@dummy/remote bookmarks | |
248 | foo 1160648e36cec0054048a7edc4110c6f84fde594 |
|
248 | foo 1160648e36cec0054048a7edc4110c6f84fde594 | |
249 | $ hg book -f foo |
|
249 | $ hg book -f foo | |
250 | $ hg push --traceback |
|
250 | $ hg push --traceback | |
251 | pushing to ssh://user@dummy/remote |
|
251 | pushing to ssh://user@dummy/remote | |
252 | searching for changes |
|
252 | searching for changes | |
253 | no changes found |
|
253 | no changes found | |
254 | updating bookmark foo |
|
254 | updating bookmark foo | |
255 | [1] |
|
255 | [1] | |
256 | $ hg book -d foo |
|
256 | $ hg book -d foo | |
257 | $ hg in -B |
|
257 | $ hg in -B | |
258 | comparing with ssh://user@dummy/remote |
|
258 | comparing with ssh://user@dummy/remote | |
259 | searching for changed bookmarks |
|
259 | searching for changed bookmarks | |
260 | foo a28a9d1a809c |
|
260 | foo a28a9d1a809c | |
261 | $ hg book -f -r 0 foo |
|
261 | $ hg book -f -r 0 foo | |
262 | $ hg pull -B foo |
|
262 | $ hg pull -B foo | |
263 | pulling from ssh://user@dummy/remote |
|
263 | pulling from ssh://user@dummy/remote | |
264 | no changes found |
|
264 | no changes found | |
265 | updating bookmark foo |
|
265 | updating bookmark foo | |
266 | $ hg book -d foo |
|
266 | $ hg book -d foo | |
267 | $ hg push -B foo |
|
267 | $ hg push -B foo | |
268 | pushing to ssh://user@dummy/remote |
|
268 | pushing to ssh://user@dummy/remote | |
269 | searching for changes |
|
269 | searching for changes | |
270 | no changes found |
|
270 | no changes found | |
271 | deleting remote bookmark foo |
|
271 | deleting remote bookmark foo | |
272 | [1] |
|
272 | [1] | |
273 |
|
273 | |||
274 | a bad, evil hook that prints to stdout |
|
274 | a bad, evil hook that prints to stdout | |
275 |
|
275 | |||
276 | $ cat <<EOF > $TESTTMP/badhook |
|
276 | $ cat <<EOF > $TESTTMP/badhook | |
277 | > import sys |
|
277 | > import sys | |
278 | > sys.stdout.write("KABOOM\n") |
|
278 | > sys.stdout.write("KABOOM\n") | |
279 | > EOF |
|
279 | > EOF | |
280 |
|
280 | |||
281 | $ echo '[hooks]' >> ../remote/.hg/hgrc |
|
281 | $ echo '[hooks]' >> ../remote/.hg/hgrc | |
282 | $ echo "changegroup.stdout = \"$PYTHON\" $TESTTMP/badhook" >> ../remote/.hg/hgrc |
|
282 | $ echo "changegroup.stdout = \"$PYTHON\" $TESTTMP/badhook" >> ../remote/.hg/hgrc | |
283 | $ echo r > r |
|
283 | $ echo r > r | |
284 | $ hg ci -A -m z r |
|
284 | $ hg ci -A -m z r | |
285 |
|
285 | |||
286 | push should succeed even though it has an unexpected response |
|
286 | push should succeed even though it has an unexpected response | |
287 |
|
287 | |||
288 | $ hg push |
|
288 | $ hg push | |
289 | pushing to ssh://user@dummy/remote |
|
289 | pushing to ssh://user@dummy/remote | |
290 | searching for changes |
|
290 | searching for changes | |
291 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 |
|
291 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 | |
292 | remote: adding changesets |
|
292 | remote: adding changesets | |
293 | remote: adding manifests |
|
293 | remote: adding manifests | |
294 | remote: adding file changes |
|
294 | remote: adding file changes | |
295 | remote: added 1 changesets with 1 changes to 1 files (py3 !) |
|
295 | remote: added 1 changesets with 1 changes to 1 files (py3 !) | |
296 | remote: added 1 changesets with 1 changes to 1 files (no-py3 no-chg !) |
|
|||
297 | remote: KABOOM |
|
296 | remote: KABOOM | |
298 | remote: added 1 changesets with 1 changes to 1 files (no-py3 chg !) |
|
|||
299 | $ hg -R ../remote heads |
|
297 | $ hg -R ../remote heads | |
300 | changeset: 5:1383141674ec |
|
298 | changeset: 5:1383141674ec | |
301 | tag: tip |
|
299 | tag: tip | |
302 | parent: 3:a28a9d1a809c |
|
300 | parent: 3:a28a9d1a809c | |
303 | user: test |
|
301 | user: test | |
304 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
302 | date: Thu Jan 01 00:00:00 1970 +0000 | |
305 | summary: z |
|
303 | summary: z | |
306 |
|
304 | |||
307 | changeset: 4:6c0482d977a3 |
|
305 | changeset: 4:6c0482d977a3 | |
308 | parent: 0:1160648e36ce |
|
306 | parent: 0:1160648e36ce | |
309 | user: test |
|
307 | user: test | |
310 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
308 | date: Thu Jan 01 00:00:00 1970 +0000 | |
311 | summary: z |
|
309 | summary: z | |
312 |
|
310 | |||
313 |
|
311 | |||
314 | clone bookmarks |
|
312 | clone bookmarks | |
315 |
|
313 | |||
316 | $ hg -R ../remote bookmark test |
|
314 | $ hg -R ../remote bookmark test | |
317 | $ hg -R ../remote bookmarks |
|
315 | $ hg -R ../remote bookmarks | |
318 | * test 4:6c0482d977a3 |
|
316 | * test 4:6c0482d977a3 | |
319 | $ hg clone ssh://user@dummy/remote local-bookmarks |
|
317 | $ hg clone ssh://user@dummy/remote local-bookmarks | |
320 | requesting all changes |
|
318 | requesting all changes | |
321 | adding changesets |
|
319 | adding changesets | |
322 | adding manifests |
|
320 | adding manifests | |
323 | adding file changes |
|
321 | adding file changes | |
324 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
322 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
325 | new changesets 1160648e36ce:1383141674ec |
|
323 | new changesets 1160648e36ce:1383141674ec | |
326 | updating to branch default |
|
324 | updating to branch default | |
327 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
325 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
328 | $ hg -R local-bookmarks bookmarks |
|
326 | $ hg -R local-bookmarks bookmarks | |
329 | test 4:6c0482d977a3 |
|
327 | test 4:6c0482d977a3 | |
330 |
|
328 | |||
331 | passwords in ssh urls are not supported |
|
329 | passwords in ssh urls are not supported | |
332 | (we use a glob here because different Python versions give different |
|
330 | (we use a glob here because different Python versions give different | |
333 | results here) |
|
331 | results here) | |
334 |
|
332 | |||
335 | $ hg push ssh://user:erroneouspwd@dummy/remote |
|
333 | $ hg push ssh://user:erroneouspwd@dummy/remote | |
336 | pushing to ssh://user:*@dummy/remote (glob) |
|
334 | pushing to ssh://user:*@dummy/remote (glob) | |
337 | abort: password in URL not supported |
|
335 | abort: password in URL not supported | |
338 | [255] |
|
336 | [255] | |
339 |
|
337 | |||
340 | $ cd $TESTTMP |
|
338 | $ cd $TESTTMP | |
341 |
|
339 | |||
342 | hide outer repo |
|
340 | hide outer repo | |
343 | $ hg init |
|
341 | $ hg init | |
344 |
|
342 | |||
345 | Test remote paths with spaces (issue2983): |
|
343 | Test remote paths with spaces (issue2983): | |
346 |
|
344 | |||
347 | $ hg init "ssh://user@dummy/a repo" |
|
345 | $ hg init "ssh://user@dummy/a repo" | |
348 | $ touch "$TESTTMP/a repo/test" |
|
346 | $ touch "$TESTTMP/a repo/test" | |
349 | $ hg -R 'a repo' commit -A -m "test" |
|
347 | $ hg -R 'a repo' commit -A -m "test" | |
350 | adding test |
|
348 | adding test | |
351 | $ hg -R 'a repo' tag tag |
|
349 | $ hg -R 'a repo' tag tag | |
352 | $ hg id "ssh://user@dummy/a repo" |
|
350 | $ hg id "ssh://user@dummy/a repo" | |
353 | 73649e48688a |
|
351 | 73649e48688a | |
354 |
|
352 | |||
355 | $ hg id "ssh://user@dummy/a repo#noNoNO" |
|
353 | $ hg id "ssh://user@dummy/a repo#noNoNO" | |
356 | abort: unknown revision 'noNoNO' |
|
354 | abort: unknown revision 'noNoNO' | |
357 | [255] |
|
355 | [255] | |
358 |
|
356 | |||
359 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): |
|
357 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): | |
360 |
|
358 | |||
361 | $ hg clone "ssh://user@dummy/a repo" |
|
359 | $ hg clone "ssh://user@dummy/a repo" | |
362 | destination directory: a repo |
|
360 | destination directory: a repo | |
363 | abort: destination 'a repo' is not empty |
|
361 | abort: destination 'a repo' is not empty | |
364 | [10] |
|
362 | [10] | |
365 |
|
363 | |||
366 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might |
|
364 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might | |
367 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right |
|
365 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right | |
368 | parameters: |
|
366 | parameters: | |
369 |
|
367 | |||
370 | $ cat > ssh.sh << EOF |
|
368 | $ cat > ssh.sh << EOF | |
371 | > userhost="\$1" |
|
369 | > userhost="\$1" | |
372 | > SSH_ORIGINAL_COMMAND="\$2" |
|
370 | > SSH_ORIGINAL_COMMAND="\$2" | |
373 | > export SSH_ORIGINAL_COMMAND |
|
371 | > export SSH_ORIGINAL_COMMAND | |
374 | > PYTHONPATH="$PYTHONPATH" |
|
372 | > PYTHONPATH="$PYTHONPATH" | |
375 | > export PYTHONPATH |
|
373 | > export PYTHONPATH | |
376 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" |
|
374 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" | |
377 | > EOF |
|
375 | > EOF | |
378 |
|
376 | |||
379 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" |
|
377 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" | |
380 | 73649e48688a |
|
378 | 73649e48688a | |
381 |
|
379 | |||
382 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" |
|
380 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" | |
383 | remote: Illegal repository "$TESTTMP/a'repo" |
|
381 | remote: Illegal repository "$TESTTMP/a'repo" | |
384 | abort: no suitable response from remote hg |
|
382 | abort: no suitable response from remote hg | |
385 | [255] |
|
383 | [255] | |
386 |
|
384 | |||
387 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" |
|
385 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" | |
388 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" |
|
386 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" | |
389 | abort: no suitable response from remote hg |
|
387 | abort: no suitable response from remote hg | |
390 | [255] |
|
388 | [255] | |
391 |
|
389 | |||
392 | $ SSH_ORIGINAL_COMMAND="'hg' serve -R 'a'repo' --stdio" "$PYTHON" "$TESTDIR/../contrib/hg-ssh" |
|
390 | $ SSH_ORIGINAL_COMMAND="'hg' serve -R 'a'repo' --stdio" "$PYTHON" "$TESTDIR/../contrib/hg-ssh" | |
393 | Illegal command "'hg' serve -R 'a'repo' --stdio": No closing quotation |
|
391 | Illegal command "'hg' serve -R 'a'repo' --stdio": No closing quotation | |
394 | [255] |
|
392 | [255] | |
395 |
|
393 | |||
396 | Test hg-ssh in read-only mode: |
|
394 | Test hg-ssh in read-only mode: | |
397 |
|
395 | |||
398 | $ cat > ssh.sh << EOF |
|
396 | $ cat > ssh.sh << EOF | |
399 | > userhost="\$1" |
|
397 | > userhost="\$1" | |
400 | > SSH_ORIGINAL_COMMAND="\$2" |
|
398 | > SSH_ORIGINAL_COMMAND="\$2" | |
401 | > export SSH_ORIGINAL_COMMAND |
|
399 | > export SSH_ORIGINAL_COMMAND | |
402 | > PYTHONPATH="$PYTHONPATH" |
|
400 | > PYTHONPATH="$PYTHONPATH" | |
403 | > export PYTHONPATH |
|
401 | > export PYTHONPATH | |
404 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" |
|
402 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" | |
405 | > EOF |
|
403 | > EOF | |
406 |
|
404 | |||
407 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local |
|
405 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local | |
408 | requesting all changes |
|
406 | requesting all changes | |
409 | adding changesets |
|
407 | adding changesets | |
410 | adding manifests |
|
408 | adding manifests | |
411 | adding file changes |
|
409 | adding file changes | |
412 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
410 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
413 | new changesets 1160648e36ce:1383141674ec |
|
411 | new changesets 1160648e36ce:1383141674ec | |
414 | updating to branch default |
|
412 | updating to branch default | |
415 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
413 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
416 |
|
414 | |||
417 | $ cd read-only-local |
|
415 | $ cd read-only-local | |
418 | $ echo "baz" > bar |
|
416 | $ echo "baz" > bar | |
419 | $ hg ci -A -m "unpushable commit" bar |
|
417 | $ hg ci -A -m "unpushable commit" bar | |
420 | $ hg push --ssh "sh ../ssh.sh" |
|
418 | $ hg push --ssh "sh ../ssh.sh" | |
421 | pushing to ssh://user@dummy/*/remote (glob) |
|
419 | pushing to ssh://user@dummy/*/remote (glob) | |
422 | searching for changes |
|
420 | searching for changes | |
423 | remote: Permission denied |
|
421 | remote: Permission denied | |
424 | remote: abort: pretxnopen.hg-ssh hook failed |
|
422 | remote: abort: pretxnopen.hg-ssh hook failed | |
425 | remote: Permission denied |
|
423 | remote: Permission denied | |
426 | remote: pushkey-abort: prepushkey.hg-ssh hook failed |
|
424 | remote: pushkey-abort: prepushkey.hg-ssh hook failed | |
427 | updating 6c0482d977a3 to public failed! |
|
425 | updating 6c0482d977a3 to public failed! | |
428 | [1] |
|
426 | [1] | |
429 |
|
427 | |||
430 | $ cd $TESTTMP |
|
428 | $ cd $TESTTMP | |
431 |
|
429 | |||
432 | stderr from remote commands should be printed before stdout from local code (issue4336) |
|
430 | stderr from remote commands should be printed before stdout from local code (issue4336) | |
433 |
|
431 | |||
434 | $ hg clone remote stderr-ordering |
|
432 | $ hg clone remote stderr-ordering | |
435 | updating to branch default |
|
433 | updating to branch default | |
436 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
434 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
437 | $ cd stderr-ordering |
|
435 | $ cd stderr-ordering | |
438 | $ cat >> localwrite.py << EOF |
|
436 | $ cat >> localwrite.py << EOF | |
439 | > from mercurial import exchange, extensions |
|
437 | > from mercurial import exchange, extensions | |
440 | > |
|
438 | > | |
441 | > def wrappedpush(orig, repo, *args, **kwargs): |
|
439 | > def wrappedpush(orig, repo, *args, **kwargs): | |
442 | > res = orig(repo, *args, **kwargs) |
|
440 | > res = orig(repo, *args, **kwargs) | |
443 | > repo.ui.write(b'local stdout\n') |
|
441 | > repo.ui.write(b'local stdout\n') | |
444 | > return res |
|
442 | > return res | |
445 | > |
|
443 | > | |
446 | > def extsetup(ui): |
|
444 | > def extsetup(ui): | |
447 | > extensions.wrapfunction(exchange, b'push', wrappedpush) |
|
445 | > extensions.wrapfunction(exchange, b'push', wrappedpush) | |
448 | > EOF |
|
446 | > EOF | |
449 |
|
447 | |||
450 | $ cat >> .hg/hgrc << EOF |
|
448 | $ cat >> .hg/hgrc << EOF | |
451 | > [paths] |
|
449 | > [paths] | |
452 | > default-push = ssh://user@dummy/remote |
|
450 | > default-push = ssh://user@dummy/remote | |
453 | > [extensions] |
|
451 | > [extensions] | |
454 | > localwrite = localwrite.py |
|
452 | > localwrite = localwrite.py | |
455 | > EOF |
|
453 | > EOF | |
456 |
|
454 | |||
457 | $ echo localwrite > foo |
|
455 | $ echo localwrite > foo | |
458 | $ hg commit -m 'testing localwrite' |
|
456 | $ hg commit -m 'testing localwrite' | |
459 | $ hg push |
|
457 | $ hg push | |
460 | pushing to ssh://user@dummy/remote |
|
458 | pushing to ssh://user@dummy/remote | |
461 | searching for changes |
|
459 | searching for changes | |
462 | remote: adding changesets |
|
460 | remote: adding changesets | |
463 | remote: adding manifests |
|
461 | remote: adding manifests | |
464 | remote: adding file changes |
|
462 | remote: adding file changes | |
465 | remote: added 1 changesets with 1 changes to 1 files (py3 !) |
|
463 | remote: added 1 changesets with 1 changes to 1 files (py3 !) | |
466 | remote: added 1 changesets with 1 changes to 1 files (no-py3 no-chg !) |
|
|||
467 | remote: KABOOM |
|
464 | remote: KABOOM | |
468 | remote: added 1 changesets with 1 changes to 1 files (no-py3 chg !) |
|
|||
469 | local stdout |
|
465 | local stdout | |
470 |
|
466 | |||
471 | debug output |
|
467 | debug output | |
472 |
|
468 | |||
473 | $ hg pull --debug ssh://user@dummy/remote |
|
469 | $ hg pull --debug ssh://user@dummy/remote | |
474 | pulling from ssh://user@dummy/remote |
|
470 | pulling from ssh://user@dummy/remote | |
475 | running .* ".*[/\\]dummyssh" ['"]user@dummy['"] ['"]hg -R remote serve --stdio['"] (re) |
|
471 | running .* ".*[/\\]dummyssh" ['"]user@dummy['"] ['"]hg -R remote serve --stdio['"] (re) | |
476 | sending hello command |
|
472 | sending hello command | |
477 | sending between command |
|
473 | sending between command | |
478 | remote: \d+ (re) |
|
474 | remote: \d+ (re) | |
479 | remote: capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (re) |
|
475 | remote: capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (re) | |
480 | remote: 1 |
|
476 | remote: 1 | |
481 | sending protocaps command |
|
477 | sending protocaps command | |
482 | preparing listkeys for "bookmarks" |
|
478 | preparing listkeys for "bookmarks" | |
483 | sending listkeys command |
|
479 | sending listkeys command | |
484 | received listkey for "bookmarks": 45 bytes |
|
480 | received listkey for "bookmarks": 45 bytes | |
485 | query 1; heads |
|
481 | query 1; heads | |
486 | sending batch command |
|
482 | sending batch command | |
487 | searching for changes |
|
483 | searching for changes | |
488 | all remote heads known locally |
|
484 | all remote heads known locally | |
489 | no changes found |
|
485 | no changes found | |
490 | preparing listkeys for "phases" |
|
486 | preparing listkeys for "phases" | |
491 | sending listkeys command |
|
487 | sending listkeys command | |
492 | received listkey for "phases": 15 bytes |
|
488 | received listkey for "phases": 15 bytes | |
493 | checking for updated bookmarks |
|
489 | checking for updated bookmarks | |
494 |
|
490 | |||
495 | $ cd $TESTTMP |
|
491 | $ cd $TESTTMP | |
496 |
|
492 | |||
497 | $ cat dummylog |
|
493 | $ cat dummylog | |
498 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
494 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
499 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio (no-msys !) |
|
495 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio (no-msys !) | |
500 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
496 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
501 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio (no-reposimplestore !) |
|
497 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio (no-reposimplestore !) | |
502 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) |
|
498 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) | |
503 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) |
|
499 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) | |
504 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio |
|
500 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio | |
505 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
501 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
506 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
502 | Got arguments 1:user@dummy 2:hg -R local serve --stdio | |
507 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio |
|
503 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio | |
508 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
504 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
509 | changegroup-in-remote hook: HG_HOOKNAME=changegroup |
|
505 | changegroup-in-remote hook: HG_HOOKNAME=changegroup | |
510 | HG_HOOKTYPE=changegroup |
|
506 | HG_HOOKTYPE=changegroup | |
511 | HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 |
|
507 | HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 | |
512 | HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 |
|
508 | HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 | |
513 | HG_SOURCE=serve |
|
509 | HG_SOURCE=serve | |
514 | HG_TXNID=TXN:$ID$ |
|
510 | HG_TXNID=TXN:$ID$ | |
515 | HG_TXNNAME=serve |
|
511 | HG_TXNNAME=serve | |
516 | remote:ssh:$LOCALIP |
|
512 | remote:ssh:$LOCALIP | |
517 | HG_URL=remote:ssh:$LOCALIP |
|
513 | HG_URL=remote:ssh:$LOCALIP | |
518 |
|
514 | |||
519 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
515 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
520 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
516 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
521 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
517 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
522 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
518 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
523 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
519 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
524 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
520 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
525 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
521 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
526 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
522 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
527 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
523 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
528 | changegroup-in-remote hook: HG_HOOKNAME=changegroup |
|
524 | changegroup-in-remote hook: HG_HOOKNAME=changegroup | |
529 | HG_HOOKTYPE=changegroup |
|
525 | HG_HOOKTYPE=changegroup | |
530 | HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 |
|
526 | HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 | |
531 | HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 |
|
527 | HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 | |
532 | HG_SOURCE=serve |
|
528 | HG_SOURCE=serve | |
533 | HG_TXNID=TXN:$ID$ |
|
529 | HG_TXNID=TXN:$ID$ | |
534 | HG_TXNNAME=serve |
|
530 | HG_TXNNAME=serve | |
535 | remote:ssh:$LOCALIP |
|
531 | remote:ssh:$LOCALIP | |
536 | HG_URL=remote:ssh:$LOCALIP |
|
532 | HG_URL=remote:ssh:$LOCALIP | |
537 |
|
533 | |||
538 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
534 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
539 | Got arguments 1:user@dummy 2:hg init 'a repo' |
|
535 | Got arguments 1:user@dummy 2:hg init 'a repo' | |
540 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
536 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
541 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
537 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
542 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
538 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
543 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
539 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
544 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
540 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
545 | changegroup-in-remote hook: HG_HOOKNAME=changegroup |
|
541 | changegroup-in-remote hook: HG_HOOKNAME=changegroup | |
546 | HG_HOOKTYPE=changegroup |
|
542 | HG_HOOKTYPE=changegroup | |
547 | HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 |
|
543 | HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 | |
548 | HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 |
|
544 | HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 | |
549 | HG_SOURCE=serve |
|
545 | HG_SOURCE=serve | |
550 | HG_TXNID=TXN:$ID$ |
|
546 | HG_TXNID=TXN:$ID$ | |
551 | HG_TXNNAME=serve |
|
547 | HG_TXNNAME=serve | |
552 | remote:ssh:$LOCALIP |
|
548 | remote:ssh:$LOCALIP | |
553 | HG_URL=remote:ssh:$LOCALIP |
|
549 | HG_URL=remote:ssh:$LOCALIP | |
554 |
|
550 | |||
555 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
551 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
556 |
|
552 | |||
557 | remote hook failure is attributed to remote |
|
553 | remote hook failure is attributed to remote | |
558 |
|
554 | |||
559 | $ cat > $TESTTMP/failhook << EOF |
|
555 | $ cat > $TESTTMP/failhook << EOF | |
560 | > def hook(ui, repo, **kwargs): |
|
556 | > def hook(ui, repo, **kwargs): | |
561 | > ui.write(b'hook failure!\n') |
|
557 | > ui.write(b'hook failure!\n') | |
562 | > ui.flush() |
|
558 | > ui.flush() | |
563 | > return 1 |
|
559 | > return 1 | |
564 | > EOF |
|
560 | > EOF | |
565 |
|
561 | |||
566 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc |
|
562 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc | |
567 |
|
563 | |||
568 | $ hg -q clone ssh://user@dummy/remote hookout |
|
564 | $ hg -q clone ssh://user@dummy/remote hookout | |
569 | $ cd hookout |
|
565 | $ cd hookout | |
570 | $ touch hookfailure |
|
566 | $ touch hookfailure | |
571 | $ hg -q commit -A -m 'remote hook failure' |
|
567 | $ hg -q commit -A -m 'remote hook failure' | |
572 | $ hg push |
|
568 | $ hg push | |
573 | pushing to ssh://user@dummy/remote |
|
569 | pushing to ssh://user@dummy/remote | |
574 | searching for changes |
|
570 | searching for changes | |
575 | remote: adding changesets |
|
571 | remote: adding changesets | |
576 | remote: adding manifests |
|
572 | remote: adding manifests | |
577 | remote: adding file changes |
|
573 | remote: adding file changes | |
578 | remote: hook failure! |
|
574 | remote: hook failure! | |
579 | remote: transaction abort! |
|
575 | remote: transaction abort! | |
580 | remote: rollback completed |
|
576 | remote: rollback completed | |
581 | remote: abort: pretxnchangegroup.fail hook failed |
|
577 | remote: abort: pretxnchangegroup.fail hook failed | |
582 | [1] |
|
578 | [1] | |
583 |
|
579 | |||
584 | abort during pull is properly reported as such |
|
580 | abort during pull is properly reported as such | |
585 |
|
581 | |||
586 | $ echo morefoo >> ../remote/foo |
|
582 | $ echo morefoo >> ../remote/foo | |
587 | $ hg -R ../remote commit --message "more foo to be pulled" |
|
583 | $ hg -R ../remote commit --message "more foo to be pulled" | |
588 | $ cat >> ../remote/.hg/hgrc << EOF |
|
584 | $ cat >> ../remote/.hg/hgrc << EOF | |
589 | > [extensions] |
|
585 | > [extensions] | |
590 | > crash = ${TESTDIR}/crashgetbundler.py |
|
586 | > crash = ${TESTDIR}/crashgetbundler.py | |
591 | > EOF |
|
587 | > EOF | |
592 | $ hg pull |
|
588 | $ hg pull | |
593 | pulling from ssh://user@dummy/remote |
|
589 | pulling from ssh://user@dummy/remote | |
594 | searching for changes |
|
590 | searching for changes | |
595 | adding changesets |
|
591 | adding changesets | |
596 | remote: abort: this is an exercise |
|
592 | remote: abort: this is an exercise | |
597 | transaction abort! |
|
593 | transaction abort! | |
598 | rollback completed |
|
594 | rollback completed | |
599 | abort: stream ended unexpectedly (got 0 bytes, expected 4) |
|
595 | abort: stream ended unexpectedly (got 0 bytes, expected 4) | |
600 | [255] |
|
596 | [255] |
@@ -1,718 +1,714 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 | creating 'remote' repo |
|
3 | creating 'remote' repo | |
4 |
|
4 | |||
5 | $ hg init remote |
|
5 | $ hg init remote | |
6 | $ cd remote |
|
6 | $ cd remote | |
7 | $ echo this > foo |
|
7 | $ echo this > foo | |
8 | $ echo this > fooO |
|
8 | $ echo this > fooO | |
9 | $ hg ci -A -m "init" foo fooO |
|
9 | $ hg ci -A -m "init" foo fooO | |
10 |
|
10 | |||
11 | insert a closed branch (issue4428) |
|
11 | insert a closed branch (issue4428) | |
12 |
|
12 | |||
13 | $ hg up null |
|
13 | $ hg up null | |
14 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
14 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
15 | $ hg branch closed |
|
15 | $ hg branch closed | |
16 | marked working directory as branch closed |
|
16 | marked working directory as branch closed | |
17 | (branches are permanent and global, did you want a bookmark?) |
|
17 | (branches are permanent and global, did you want a bookmark?) | |
18 | $ hg ci -mc0 |
|
18 | $ hg ci -mc0 | |
19 | $ hg ci --close-branch -mc1 |
|
19 | $ hg ci --close-branch -mc1 | |
20 | $ hg up -q default |
|
20 | $ hg up -q default | |
21 |
|
21 | |||
22 | configure for serving |
|
22 | configure for serving | |
23 |
|
23 | |||
24 | $ cat <<EOF > .hg/hgrc |
|
24 | $ cat <<EOF > .hg/hgrc | |
25 | > [server] |
|
25 | > [server] | |
26 | > uncompressed = True |
|
26 | > uncompressed = True | |
27 | > |
|
27 | > | |
28 | > [hooks] |
|
28 | > [hooks] | |
29 | > changegroup = sh -c "printenv.py --line changegroup-in-remote 0 ../dummylog" |
|
29 | > changegroup = sh -c "printenv.py --line changegroup-in-remote 0 ../dummylog" | |
30 | > EOF |
|
30 | > EOF | |
31 | $ cd $TESTTMP |
|
31 | $ cd $TESTTMP | |
32 |
|
32 | |||
33 | repo not found error |
|
33 | repo not found error | |
34 |
|
34 | |||
35 | $ hg clone ssh://user@dummy/nonexistent local |
|
35 | $ hg clone ssh://user@dummy/nonexistent local | |
36 | remote: abort: repository nonexistent not found |
|
36 | remote: abort: repository nonexistent not found | |
37 | abort: no suitable response from remote hg |
|
37 | abort: no suitable response from remote hg | |
38 | [255] |
|
38 | [255] | |
39 | $ hg clone -q ssh://user@dummy/nonexistent local |
|
39 | $ hg clone -q ssh://user@dummy/nonexistent local | |
40 | remote: abort: repository nonexistent not found |
|
40 | remote: abort: repository nonexistent not found | |
41 | abort: no suitable response from remote hg |
|
41 | abort: no suitable response from remote hg | |
42 | [255] |
|
42 | [255] | |
43 |
|
43 | |||
44 | non-existent absolute path |
|
44 | non-existent absolute path | |
45 |
|
45 | |||
46 | $ hg clone ssh://user@dummy/`pwd`/nonexistent local |
|
46 | $ hg clone ssh://user@dummy/`pwd`/nonexistent local | |
47 | remote: abort: repository $TESTTMP/nonexistent not found |
|
47 | remote: abort: repository $TESTTMP/nonexistent not found | |
48 | abort: no suitable response from remote hg |
|
48 | abort: no suitable response from remote hg | |
49 | [255] |
|
49 | [255] | |
50 |
|
50 | |||
51 | clone remote via stream |
|
51 | clone remote via stream | |
52 |
|
52 | |||
53 | #if no-reposimplestore |
|
53 | #if no-reposimplestore | |
54 |
|
54 | |||
55 | $ hg clone --stream ssh://user@dummy/remote local-stream |
|
55 | $ hg clone --stream ssh://user@dummy/remote local-stream | |
56 | streaming all changes |
|
56 | streaming all changes | |
57 | 8 files to transfer, 827 bytes of data (no-zstd !) |
|
57 | 8 files to transfer, 827 bytes of data (no-zstd !) | |
58 | transferred 827 bytes in * seconds (*) (glob) (no-zstd !) |
|
58 | transferred 827 bytes in * seconds (*) (glob) (no-zstd !) | |
59 | 8 files to transfer, 846 bytes of data (zstd !) |
|
59 | 8 files to transfer, 846 bytes of data (zstd !) | |
60 | transferred * bytes in * seconds (* */sec) (glob) (zstd !) |
|
60 | transferred * bytes in * seconds (* */sec) (glob) (zstd !) | |
61 | updating to branch default |
|
61 | updating to branch default | |
62 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
62 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
63 | $ cd local-stream |
|
63 | $ cd local-stream | |
64 | $ hg verify |
|
64 | $ hg verify | |
65 | checking changesets |
|
65 | checking changesets | |
66 | checking manifests |
|
66 | checking manifests | |
67 | crosschecking files in changesets and manifests |
|
67 | crosschecking files in changesets and manifests | |
68 | checking files |
|
68 | checking files | |
69 | checked 3 changesets with 2 changes to 2 files |
|
69 | checked 3 changesets with 2 changes to 2 files | |
70 | $ hg branches |
|
70 | $ hg branches | |
71 | default 0:1160648e36ce |
|
71 | default 0:1160648e36ce | |
72 | $ cd $TESTTMP |
|
72 | $ cd $TESTTMP | |
73 |
|
73 | |||
74 | clone bookmarks via stream |
|
74 | clone bookmarks via stream | |
75 |
|
75 | |||
76 | $ hg -R local-stream book mybook |
|
76 | $ hg -R local-stream book mybook | |
77 | $ hg clone --stream ssh://user@dummy/local-stream stream2 |
|
77 | $ hg clone --stream ssh://user@dummy/local-stream stream2 | |
78 | streaming all changes |
|
78 | streaming all changes | |
79 | 15 files to transfer, * of data (glob) |
|
79 | 15 files to transfer, * of data (glob) | |
80 | transferred * in * seconds (*) (glob) |
|
80 | transferred * in * seconds (*) (glob) | |
81 | updating to branch default |
|
81 | updating to branch default | |
82 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
82 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
83 | $ cd stream2 |
|
83 | $ cd stream2 | |
84 | $ hg book |
|
84 | $ hg book | |
85 | mybook 0:1160648e36ce |
|
85 | mybook 0:1160648e36ce | |
86 | $ cd $TESTTMP |
|
86 | $ cd $TESTTMP | |
87 | $ rm -rf local-stream stream2 |
|
87 | $ rm -rf local-stream stream2 | |
88 |
|
88 | |||
89 | #endif |
|
89 | #endif | |
90 |
|
90 | |||
91 | clone remote via pull |
|
91 | clone remote via pull | |
92 |
|
92 | |||
93 | $ hg clone ssh://user@dummy/remote local |
|
93 | $ hg clone ssh://user@dummy/remote local | |
94 | requesting all changes |
|
94 | requesting all changes | |
95 | adding changesets |
|
95 | adding changesets | |
96 | adding manifests |
|
96 | adding manifests | |
97 | adding file changes |
|
97 | adding file changes | |
98 | added 3 changesets with 2 changes to 2 files |
|
98 | added 3 changesets with 2 changes to 2 files | |
99 | new changesets 1160648e36ce:ad076bfb429d |
|
99 | new changesets 1160648e36ce:ad076bfb429d | |
100 | updating to branch default |
|
100 | updating to branch default | |
101 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
101 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
102 |
|
102 | |||
103 | verify |
|
103 | verify | |
104 |
|
104 | |||
105 | $ cd local |
|
105 | $ cd local | |
106 | $ hg verify |
|
106 | $ hg verify | |
107 | checking changesets |
|
107 | checking changesets | |
108 | checking manifests |
|
108 | checking manifests | |
109 | crosschecking files in changesets and manifests |
|
109 | crosschecking files in changesets and manifests | |
110 | checking files |
|
110 | checking files | |
111 | checked 3 changesets with 2 changes to 2 files |
|
111 | checked 3 changesets with 2 changes to 2 files | |
112 | $ cat >> .hg/hgrc <<EOF |
|
112 | $ cat >> .hg/hgrc <<EOF | |
113 | > [hooks] |
|
113 | > [hooks] | |
114 | > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog" |
|
114 | > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog" | |
115 | > EOF |
|
115 | > EOF | |
116 |
|
116 | |||
117 | empty default pull |
|
117 | empty default pull | |
118 |
|
118 | |||
119 | $ hg paths |
|
119 | $ hg paths | |
120 | default = ssh://user@dummy/remote |
|
120 | default = ssh://user@dummy/remote | |
121 | $ hg pull |
|
121 | $ hg pull | |
122 | pulling from ssh://user@dummy/remote |
|
122 | pulling from ssh://user@dummy/remote | |
123 | searching for changes |
|
123 | searching for changes | |
124 | no changes found |
|
124 | no changes found | |
125 |
|
125 | |||
126 | pull from wrong ssh URL |
|
126 | pull from wrong ssh URL | |
127 |
|
127 | |||
128 | $ hg pull ssh://user@dummy/doesnotexist |
|
128 | $ hg pull ssh://user@dummy/doesnotexist | |
129 | pulling from ssh://user@dummy/doesnotexist |
|
129 | pulling from ssh://user@dummy/doesnotexist | |
130 | remote: abort: repository doesnotexist not found |
|
130 | remote: abort: repository doesnotexist not found | |
131 | abort: no suitable response from remote hg |
|
131 | abort: no suitable response from remote hg | |
132 | [255] |
|
132 | [255] | |
133 |
|
133 | |||
134 | local change |
|
134 | local change | |
135 |
|
135 | |||
136 | $ echo bleah > foo |
|
136 | $ echo bleah > foo | |
137 | $ hg ci -m "add" |
|
137 | $ hg ci -m "add" | |
138 |
|
138 | |||
139 | updating rc |
|
139 | updating rc | |
140 |
|
140 | |||
141 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
141 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc | |
142 |
|
142 | |||
143 | find outgoing |
|
143 | find outgoing | |
144 |
|
144 | |||
145 | $ hg out ssh://user@dummy/remote |
|
145 | $ hg out ssh://user@dummy/remote | |
146 | comparing with ssh://user@dummy/remote |
|
146 | comparing with ssh://user@dummy/remote | |
147 | searching for changes |
|
147 | searching for changes | |
148 | changeset: 3:a28a9d1a809c |
|
148 | changeset: 3:a28a9d1a809c | |
149 | tag: tip |
|
149 | tag: tip | |
150 | parent: 0:1160648e36ce |
|
150 | parent: 0:1160648e36ce | |
151 | user: test |
|
151 | user: test | |
152 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
152 | date: Thu Jan 01 00:00:00 1970 +0000 | |
153 | summary: add |
|
153 | summary: add | |
154 |
|
154 | |||
155 |
|
155 | |||
156 | find incoming on the remote side |
|
156 | find incoming on the remote side | |
157 |
|
157 | |||
158 | $ hg incoming -R ../remote ssh://user@dummy/local |
|
158 | $ hg incoming -R ../remote ssh://user@dummy/local | |
159 | comparing with ssh://user@dummy/local |
|
159 | comparing with ssh://user@dummy/local | |
160 | searching for changes |
|
160 | searching for changes | |
161 | changeset: 3:a28a9d1a809c |
|
161 | changeset: 3:a28a9d1a809c | |
162 | tag: tip |
|
162 | tag: tip | |
163 | parent: 0:1160648e36ce |
|
163 | parent: 0:1160648e36ce | |
164 | user: test |
|
164 | user: test | |
165 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
165 | date: Thu Jan 01 00:00:00 1970 +0000 | |
166 | summary: add |
|
166 | summary: add | |
167 |
|
167 | |||
168 |
|
168 | |||
169 | find incoming on the remote side (using absolute path) |
|
169 | find incoming on the remote side (using absolute path) | |
170 |
|
170 | |||
171 | $ hg incoming -R ../remote "ssh://user@dummy/`pwd`" |
|
171 | $ hg incoming -R ../remote "ssh://user@dummy/`pwd`" | |
172 | comparing with ssh://user@dummy/$TESTTMP/local |
|
172 | comparing with ssh://user@dummy/$TESTTMP/local | |
173 | searching for changes |
|
173 | searching for changes | |
174 | changeset: 3:a28a9d1a809c |
|
174 | changeset: 3:a28a9d1a809c | |
175 | tag: tip |
|
175 | tag: tip | |
176 | parent: 0:1160648e36ce |
|
176 | parent: 0:1160648e36ce | |
177 | user: test |
|
177 | user: test | |
178 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
178 | date: Thu Jan 01 00:00:00 1970 +0000 | |
179 | summary: add |
|
179 | summary: add | |
180 |
|
180 | |||
181 |
|
181 | |||
182 | push |
|
182 | push | |
183 |
|
183 | |||
184 | $ hg push |
|
184 | $ hg push | |
185 | pushing to ssh://user@dummy/remote |
|
185 | pushing to ssh://user@dummy/remote | |
186 | searching for changes |
|
186 | searching for changes | |
187 | remote: adding changesets |
|
187 | remote: adding changesets | |
188 | remote: adding manifests |
|
188 | remote: adding manifests | |
189 | remote: adding file changes |
|
189 | remote: adding file changes | |
190 | remote: added 1 changesets with 1 changes to 1 files |
|
190 | remote: added 1 changesets with 1 changes to 1 files | |
191 | $ cd $TESTTMP/remote |
|
191 | $ cd $TESTTMP/remote | |
192 |
|
192 | |||
193 | check remote tip |
|
193 | check remote tip | |
194 |
|
194 | |||
195 | $ hg tip |
|
195 | $ hg tip | |
196 | changeset: 3:a28a9d1a809c |
|
196 | changeset: 3:a28a9d1a809c | |
197 | tag: tip |
|
197 | tag: tip | |
198 | parent: 0:1160648e36ce |
|
198 | parent: 0:1160648e36ce | |
199 | user: test |
|
199 | user: test | |
200 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
200 | date: Thu Jan 01 00:00:00 1970 +0000 | |
201 | summary: add |
|
201 | summary: add | |
202 |
|
202 | |||
203 | $ hg verify |
|
203 | $ hg verify | |
204 | checking changesets |
|
204 | checking changesets | |
205 | checking manifests |
|
205 | checking manifests | |
206 | crosschecking files in changesets and manifests |
|
206 | crosschecking files in changesets and manifests | |
207 | checking files |
|
207 | checking files | |
208 | checked 4 changesets with 3 changes to 2 files |
|
208 | checked 4 changesets with 3 changes to 2 files | |
209 | $ hg cat -r tip foo |
|
209 | $ hg cat -r tip foo | |
210 | bleah |
|
210 | bleah | |
211 | $ echo z > z |
|
211 | $ echo z > z | |
212 | $ hg ci -A -m z z |
|
212 | $ hg ci -A -m z z | |
213 | created new head |
|
213 | created new head | |
214 |
|
214 | |||
215 | test pushkeys and bookmarks |
|
215 | test pushkeys and bookmarks | |
216 |
|
216 | |||
217 | $ cd $TESTTMP/local |
|
217 | $ cd $TESTTMP/local | |
218 | $ hg debugpushkey ssh://user@dummy/remote namespaces |
|
218 | $ hg debugpushkey ssh://user@dummy/remote namespaces | |
219 | bookmarks |
|
219 | bookmarks | |
220 | namespaces |
|
220 | namespaces | |
221 | phases |
|
221 | phases | |
222 | $ hg book foo -r 0 |
|
222 | $ hg book foo -r 0 | |
223 | $ hg out -B --config paths.default=bogus://invalid --config paths.default:pushurl=`hg paths default` |
|
223 | $ hg out -B --config paths.default=bogus://invalid --config paths.default:pushurl=`hg paths default` | |
224 | comparing with ssh://user@dummy/remote |
|
224 | comparing with ssh://user@dummy/remote | |
225 | searching for changed bookmarks |
|
225 | searching for changed bookmarks | |
226 | foo 1160648e36ce |
|
226 | foo 1160648e36ce | |
227 | $ hg push -B foo |
|
227 | $ hg push -B foo | |
228 | pushing to ssh://user@dummy/remote |
|
228 | pushing to ssh://user@dummy/remote | |
229 | searching for changes |
|
229 | searching for changes | |
230 | no changes found |
|
230 | no changes found | |
231 | exporting bookmark foo |
|
231 | exporting bookmark foo | |
232 | [1] |
|
232 | [1] | |
233 | $ hg debugpushkey ssh://user@dummy/remote bookmarks |
|
233 | $ hg debugpushkey ssh://user@dummy/remote bookmarks | |
234 | foo 1160648e36cec0054048a7edc4110c6f84fde594 |
|
234 | foo 1160648e36cec0054048a7edc4110c6f84fde594 | |
235 | $ hg book -f foo |
|
235 | $ hg book -f foo | |
236 | $ hg push --traceback |
|
236 | $ hg push --traceback | |
237 | pushing to ssh://user@dummy/remote |
|
237 | pushing to ssh://user@dummy/remote | |
238 | searching for changes |
|
238 | searching for changes | |
239 | no changes found |
|
239 | no changes found | |
240 | updating bookmark foo |
|
240 | updating bookmark foo | |
241 | [1] |
|
241 | [1] | |
242 | $ hg book -d foo |
|
242 | $ hg book -d foo | |
243 | $ hg in -B |
|
243 | $ hg in -B | |
244 | comparing with ssh://user@dummy/remote |
|
244 | comparing with ssh://user@dummy/remote | |
245 | searching for changed bookmarks |
|
245 | searching for changed bookmarks | |
246 | foo a28a9d1a809c |
|
246 | foo a28a9d1a809c | |
247 | $ hg book -f -r 0 foo |
|
247 | $ hg book -f -r 0 foo | |
248 | $ hg pull -B foo |
|
248 | $ hg pull -B foo | |
249 | pulling from ssh://user@dummy/remote |
|
249 | pulling from ssh://user@dummy/remote | |
250 | no changes found |
|
250 | no changes found | |
251 | updating bookmark foo |
|
251 | updating bookmark foo | |
252 | $ hg book -d foo |
|
252 | $ hg book -d foo | |
253 | $ hg push -B foo |
|
253 | $ hg push -B foo | |
254 | pushing to ssh://user@dummy/remote |
|
254 | pushing to ssh://user@dummy/remote | |
255 | searching for changes |
|
255 | searching for changes | |
256 | no changes found |
|
256 | no changes found | |
257 | deleting remote bookmark foo |
|
257 | deleting remote bookmark foo | |
258 | [1] |
|
258 | [1] | |
259 |
|
259 | |||
260 | a bad, evil hook that prints to stdout |
|
260 | a bad, evil hook that prints to stdout | |
261 |
|
261 | |||
262 | $ cat <<EOF > $TESTTMP/badhook |
|
262 | $ cat <<EOF > $TESTTMP/badhook | |
263 | > import sys |
|
263 | > import sys | |
264 | > sys.stdout.write("KABOOM\n") |
|
264 | > sys.stdout.write("KABOOM\n") | |
265 | > sys.stdout.flush() |
|
265 | > sys.stdout.flush() | |
266 | > EOF |
|
266 | > EOF | |
267 |
|
267 | |||
268 | $ cat <<EOF > $TESTTMP/badpyhook.py |
|
268 | $ cat <<EOF > $TESTTMP/badpyhook.py | |
269 | > import sys |
|
269 | > import sys | |
270 | > def hook(ui, repo, hooktype, **kwargs): |
|
270 | > def hook(ui, repo, hooktype, **kwargs): | |
271 | > sys.stdout.write("KABOOM IN PROCESS\n") |
|
271 | > sys.stdout.write("KABOOM IN PROCESS\n") | |
272 | > sys.stdout.flush() |
|
272 | > sys.stdout.flush() | |
273 | > EOF |
|
273 | > EOF | |
274 |
|
274 | |||
275 | $ cat <<EOF >> ../remote/.hg/hgrc |
|
275 | $ cat <<EOF >> ../remote/.hg/hgrc | |
276 | > [hooks] |
|
276 | > [hooks] | |
277 | > changegroup.stdout = "$PYTHON" $TESTTMP/badhook |
|
277 | > changegroup.stdout = "$PYTHON" $TESTTMP/badhook | |
278 | > changegroup.pystdout = python:$TESTTMP/badpyhook.py:hook |
|
278 | > changegroup.pystdout = python:$TESTTMP/badpyhook.py:hook | |
279 | > EOF |
|
279 | > EOF | |
280 | $ echo r > r |
|
280 | $ echo r > r | |
281 | $ hg ci -A -m z r |
|
281 | $ hg ci -A -m z r | |
282 |
|
282 | |||
283 | push should succeed even though it has an unexpected response |
|
283 | push should succeed even though it has an unexpected response | |
284 |
|
284 | |||
285 | $ hg push |
|
285 | $ hg push | |
286 | pushing to ssh://user@dummy/remote |
|
286 | pushing to ssh://user@dummy/remote | |
287 | searching for changes |
|
287 | searching for changes | |
288 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 |
|
288 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 | |
289 | remote: adding changesets |
|
289 | remote: adding changesets | |
290 | remote: adding manifests |
|
290 | remote: adding manifests | |
291 | remote: adding file changes |
|
291 | remote: adding file changes | |
292 | remote: added 1 changesets with 1 changes to 1 files (py3 !) |
|
292 | remote: added 1 changesets with 1 changes to 1 files (py3 !) | |
293 | remote: added 1 changesets with 1 changes to 1 files (no-py3 no-chg !) |
|
|||
294 | remote: KABOOM |
|
293 | remote: KABOOM | |
295 | remote: KABOOM IN PROCESS |
|
294 | remote: KABOOM IN PROCESS | |
296 | remote: added 1 changesets with 1 changes to 1 files (no-py3 chg !) |
|
|||
297 |
$ |
|
295 | $ hg -R ../remote heads | |
298 | changeset: 5:1383141674ec |
|
296 | changeset: 5:1383141674ec | |
299 | tag: tip |
|
297 | tag: tip | |
300 | parent: 3:a28a9d1a809c |
|
298 | parent: 3:a28a9d1a809c | |
301 | user: test |
|
299 | user: test | |
302 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
300 | date: Thu Jan 01 00:00:00 1970 +0000 | |
303 | summary: z |
|
301 | summary: z | |
304 |
|
302 | |||
305 | changeset: 4:6c0482d977a3 |
|
303 | changeset: 4:6c0482d977a3 | |
306 | parent: 0:1160648e36ce |
|
304 | parent: 0:1160648e36ce | |
307 | user: test |
|
305 | user: test | |
308 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
306 | date: Thu Jan 01 00:00:00 1970 +0000 | |
309 | summary: z |
|
307 | summary: z | |
310 |
|
308 | |||
311 |
|
309 | |||
312 | #if chg |
|
310 | #if chg | |
313 |
|
311 | |||
314 | try again with remote chg, which should succeed as well |
|
312 | try again with remote chg, which should succeed as well | |
315 |
|
313 | |||
316 | $ hg rollback -R ../remote |
|
314 | $ hg rollback -R ../remote | |
317 | repository tip rolled back to revision 4 (undo serve) |
|
315 | repository tip rolled back to revision 4 (undo serve) | |
318 |
|
316 | |||
319 | $ hg push --config ui.remotecmd=chg |
|
317 | $ hg push --config ui.remotecmd=chg | |
320 | pushing to ssh://user@dummy/remote |
|
318 | pushing to ssh://user@dummy/remote | |
321 | searching for changes |
|
319 | searching for changes | |
322 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 |
|
320 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 | |
323 | remote: adding changesets |
|
321 | remote: adding changesets | |
324 | remote: adding manifests |
|
322 | remote: adding manifests | |
325 | remote: adding file changes |
|
323 | remote: adding file changes | |
326 | remote: added 1 changesets with 1 changes to 1 files (py3 !) |
|
324 | remote: added 1 changesets with 1 changes to 1 files (py3 !) | |
327 | remote: KABOOM |
|
325 | remote: KABOOM | |
328 | remote: KABOOM IN PROCESS |
|
326 | remote: KABOOM IN PROCESS | |
329 |
|
327 | |||
330 | #endif |
|
328 | #endif | |
331 |
|
329 | |||
332 | clone bookmarks |
|
330 | clone bookmarks | |
333 |
|
331 | |||
334 | $ hg -R ../remote bookmark test |
|
332 | $ hg -R ../remote bookmark test | |
335 | $ hg -R ../remote bookmarks |
|
333 | $ hg -R ../remote bookmarks | |
336 | * test 4:6c0482d977a3 |
|
334 | * test 4:6c0482d977a3 | |
337 | $ hg clone ssh://user@dummy/remote local-bookmarks |
|
335 | $ hg clone ssh://user@dummy/remote local-bookmarks | |
338 | requesting all changes |
|
336 | requesting all changes | |
339 | adding changesets |
|
337 | adding changesets | |
340 | adding manifests |
|
338 | adding manifests | |
341 | adding file changes |
|
339 | adding file changes | |
342 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
340 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
343 | new changesets 1160648e36ce:1383141674ec |
|
341 | new changesets 1160648e36ce:1383141674ec | |
344 | updating to branch default |
|
342 | updating to branch default | |
345 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
343 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
346 | $ hg -R local-bookmarks bookmarks |
|
344 | $ hg -R local-bookmarks bookmarks | |
347 | test 4:6c0482d977a3 |
|
345 | test 4:6c0482d977a3 | |
348 |
|
346 | |||
349 | passwords in ssh urls are not supported |
|
347 | passwords in ssh urls are not supported | |
350 | (we use a glob here because different Python versions give different |
|
348 | (we use a glob here because different Python versions give different | |
351 | results here) |
|
349 | results here) | |
352 |
|
350 | |||
353 | $ hg push ssh://user:erroneouspwd@dummy/remote |
|
351 | $ hg push ssh://user:erroneouspwd@dummy/remote | |
354 | pushing to ssh://user:*@dummy/remote (glob) |
|
352 | pushing to ssh://user:*@dummy/remote (glob) | |
355 | abort: password in URL not supported |
|
353 | abort: password in URL not supported | |
356 | [255] |
|
354 | [255] | |
357 |
|
355 | |||
358 | $ cd $TESTTMP |
|
356 | $ cd $TESTTMP | |
359 |
|
357 | |||
360 | hide outer repo |
|
358 | hide outer repo | |
361 | $ hg init |
|
359 | $ hg init | |
362 |
|
360 | |||
363 | Test remote paths with spaces (issue2983): |
|
361 | Test remote paths with spaces (issue2983): | |
364 |
|
362 | |||
365 | $ hg init "ssh://user@dummy/a repo" |
|
363 | $ hg init "ssh://user@dummy/a repo" | |
366 | $ touch "$TESTTMP/a repo/test" |
|
364 | $ touch "$TESTTMP/a repo/test" | |
367 | $ hg -R 'a repo' commit -A -m "test" |
|
365 | $ hg -R 'a repo' commit -A -m "test" | |
368 | adding test |
|
366 | adding test | |
369 | $ hg -R 'a repo' tag tag |
|
367 | $ hg -R 'a repo' tag tag | |
370 | $ hg id "ssh://user@dummy/a repo" |
|
368 | $ hg id "ssh://user@dummy/a repo" | |
371 | 73649e48688a |
|
369 | 73649e48688a | |
372 |
|
370 | |||
373 | $ hg id "ssh://user@dummy/a repo#noNoNO" |
|
371 | $ hg id "ssh://user@dummy/a repo#noNoNO" | |
374 | abort: unknown revision 'noNoNO' |
|
372 | abort: unknown revision 'noNoNO' | |
375 | [255] |
|
373 | [255] | |
376 |
|
374 | |||
377 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): |
|
375 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): | |
378 |
|
376 | |||
379 | $ hg clone "ssh://user@dummy/a repo" |
|
377 | $ hg clone "ssh://user@dummy/a repo" | |
380 | destination directory: a repo |
|
378 | destination directory: a repo | |
381 | abort: destination 'a repo' is not empty |
|
379 | abort: destination 'a repo' is not empty | |
382 | [10] |
|
380 | [10] | |
383 |
|
381 | |||
384 | #if no-rhg |
|
382 | #if no-rhg | |
385 | Make sure hg is really paranoid in serve --stdio mode. It used to be |
|
383 | Make sure hg is really paranoid in serve --stdio mode. It used to be | |
386 | possible to get a debugger REPL by specifying a repo named --debugger. |
|
384 | possible to get a debugger REPL by specifying a repo named --debugger. | |
387 | $ hg -R --debugger serve --stdio |
|
385 | $ hg -R --debugger serve --stdio | |
388 | abort: potentially unsafe serve --stdio invocation: ['-R', '--debugger', 'serve', '--stdio'] |
|
386 | abort: potentially unsafe serve --stdio invocation: ['-R', '--debugger', 'serve', '--stdio'] | |
389 | [255] |
|
387 | [255] | |
390 | $ hg -R --config=ui.debugger=yes serve --stdio |
|
388 | $ hg -R --config=ui.debugger=yes serve --stdio | |
391 | abort: potentially unsafe serve --stdio invocation: ['-R', '--config=ui.debugger=yes', 'serve', '--stdio'] |
|
389 | abort: potentially unsafe serve --stdio invocation: ['-R', '--config=ui.debugger=yes', 'serve', '--stdio'] | |
392 | [255] |
|
390 | [255] | |
393 | Abbreviations of 'serve' also don't work, to avoid shenanigans. |
|
391 | Abbreviations of 'serve' also don't work, to avoid shenanigans. | |
394 | $ hg -R narf serv --stdio |
|
392 | $ hg -R narf serv --stdio | |
395 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] |
|
393 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] | |
396 | [255] |
|
394 | [255] | |
397 | #else |
|
395 | #else | |
398 | rhg aborts early on -R without a repository at that path |
|
396 | rhg aborts early on -R without a repository at that path | |
399 | $ hg -R --debugger serve --stdio |
|
397 | $ hg -R --debugger serve --stdio | |
400 | abort: potentially unsafe serve --stdio invocation: ['-R', '--debugger', 'serve', '--stdio'] (missing-correct-output !) |
|
398 | abort: potentially unsafe serve --stdio invocation: ['-R', '--debugger', 'serve', '--stdio'] (missing-correct-output !) | |
401 | abort: repository --debugger not found (known-bad-output !) |
|
399 | abort: repository --debugger not found (known-bad-output !) | |
402 | [255] |
|
400 | [255] | |
403 | $ hg -R --config=ui.debugger=yes serve --stdio |
|
401 | $ hg -R --config=ui.debugger=yes serve --stdio | |
404 | abort: potentially unsafe serve --stdio invocation: ['-R', '--config=ui.debugger=yes', 'serve', '--stdio'] (missing-correct-output !) |
|
402 | abort: potentially unsafe serve --stdio invocation: ['-R', '--config=ui.debugger=yes', 'serve', '--stdio'] (missing-correct-output !) | |
405 | abort: repository --config=ui.debugger=yes not found (known-bad-output !) |
|
403 | abort: repository --config=ui.debugger=yes not found (known-bad-output !) | |
406 | [255] |
|
404 | [255] | |
407 | $ hg -R narf serv --stdio |
|
405 | $ hg -R narf serv --stdio | |
408 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] (missing-correct-output !) |
|
406 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] (missing-correct-output !) | |
409 | abort: repository narf not found (known-bad-output !) |
|
407 | abort: repository narf not found (known-bad-output !) | |
410 | [255] |
|
408 | [255] | |
411 | If the repo does exist, rhg finds an unsupported command and falls back to Python |
|
409 | If the repo does exist, rhg finds an unsupported command and falls back to Python | |
412 | which still does the right thing |
|
410 | which still does the right thing | |
413 | $ hg init narf |
|
411 | $ hg init narf | |
414 | $ hg -R narf serv --stdio |
|
412 | $ hg -R narf serv --stdio | |
415 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] |
|
413 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] | |
416 | [255] |
|
414 | [255] | |
417 | #endif |
|
415 | #endif | |
418 |
|
416 | |||
419 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might |
|
417 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might | |
420 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right |
|
418 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right | |
421 | parameters: |
|
419 | parameters: | |
422 |
|
420 | |||
423 | $ cat > ssh.sh << EOF |
|
421 | $ cat > ssh.sh << EOF | |
424 | > userhost="\$1" |
|
422 | > userhost="\$1" | |
425 | > SSH_ORIGINAL_COMMAND="\$2" |
|
423 | > SSH_ORIGINAL_COMMAND="\$2" | |
426 | > export SSH_ORIGINAL_COMMAND |
|
424 | > export SSH_ORIGINAL_COMMAND | |
427 | > PYTHONPATH="$PYTHONPATH" |
|
425 | > PYTHONPATH="$PYTHONPATH" | |
428 | > export PYTHONPATH |
|
426 | > export PYTHONPATH | |
429 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" |
|
427 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" | |
430 | > EOF |
|
428 | > EOF | |
431 |
|
429 | |||
432 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" |
|
430 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" | |
433 | 73649e48688a |
|
431 | 73649e48688a | |
434 |
|
432 | |||
435 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" |
|
433 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" | |
436 | remote: Illegal repository "$TESTTMP/a'repo" |
|
434 | remote: Illegal repository "$TESTTMP/a'repo" | |
437 | abort: no suitable response from remote hg |
|
435 | abort: no suitable response from remote hg | |
438 | [255] |
|
436 | [255] | |
439 |
|
437 | |||
440 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" |
|
438 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" | |
441 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" |
|
439 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" | |
442 | abort: no suitable response from remote hg |
|
440 | abort: no suitable response from remote hg | |
443 | [255] |
|
441 | [255] | |
444 |
|
442 | |||
445 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" "$PYTHON" "$TESTDIR/../contrib/hg-ssh" |
|
443 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" "$PYTHON" "$TESTDIR/../contrib/hg-ssh" | |
446 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation |
|
444 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation | |
447 | [255] |
|
445 | [255] | |
448 |
|
446 | |||
449 | Test hg-ssh in read-only mode: |
|
447 | Test hg-ssh in read-only mode: | |
450 |
|
448 | |||
451 | $ cat > ssh.sh << EOF |
|
449 | $ cat > ssh.sh << EOF | |
452 | > userhost="\$1" |
|
450 | > userhost="\$1" | |
453 | > SSH_ORIGINAL_COMMAND="\$2" |
|
451 | > SSH_ORIGINAL_COMMAND="\$2" | |
454 | > export SSH_ORIGINAL_COMMAND |
|
452 | > export SSH_ORIGINAL_COMMAND | |
455 | > PYTHONPATH="$PYTHONPATH" |
|
453 | > PYTHONPATH="$PYTHONPATH" | |
456 | > export PYTHONPATH |
|
454 | > export PYTHONPATH | |
457 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" |
|
455 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" | |
458 | > EOF |
|
456 | > EOF | |
459 |
|
457 | |||
460 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local |
|
458 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local | |
461 | requesting all changes |
|
459 | requesting all changes | |
462 | adding changesets |
|
460 | adding changesets | |
463 | adding manifests |
|
461 | adding manifests | |
464 | adding file changes |
|
462 | adding file changes | |
465 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
463 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
466 | new changesets 1160648e36ce:1383141674ec |
|
464 | new changesets 1160648e36ce:1383141674ec | |
467 | updating to branch default |
|
465 | updating to branch default | |
468 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
466 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
469 |
|
467 | |||
470 | $ cd read-only-local |
|
468 | $ cd read-only-local | |
471 | $ echo "baz" > bar |
|
469 | $ echo "baz" > bar | |
472 | $ hg ci -A -m "unpushable commit" bar |
|
470 | $ hg ci -A -m "unpushable commit" bar | |
473 | $ hg push --ssh "sh ../ssh.sh" |
|
471 | $ hg push --ssh "sh ../ssh.sh" | |
474 | pushing to ssh://user@dummy/*/remote (glob) |
|
472 | pushing to ssh://user@dummy/*/remote (glob) | |
475 | searching for changes |
|
473 | searching for changes | |
476 | remote: Permission denied |
|
474 | remote: Permission denied | |
477 | remote: pretxnopen.hg-ssh hook failed |
|
475 | remote: pretxnopen.hg-ssh hook failed | |
478 | abort: push failed on remote |
|
476 | abort: push failed on remote | |
479 | [100] |
|
477 | [100] | |
480 |
|
478 | |||
481 | $ cd $TESTTMP |
|
479 | $ cd $TESTTMP | |
482 |
|
480 | |||
483 | stderr from remote commands should be printed before stdout from local code (issue4336) |
|
481 | stderr from remote commands should be printed before stdout from local code (issue4336) | |
484 |
|
482 | |||
485 | $ hg clone remote stderr-ordering |
|
483 | $ hg clone remote stderr-ordering | |
486 | updating to branch default |
|
484 | updating to branch default | |
487 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
485 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
488 | $ cd stderr-ordering |
|
486 | $ cd stderr-ordering | |
489 | $ cat >> localwrite.py << EOF |
|
487 | $ cat >> localwrite.py << EOF | |
490 | > from mercurial import exchange, extensions |
|
488 | > from mercurial import exchange, extensions | |
491 | > |
|
489 | > | |
492 | > def wrappedpush(orig, repo, *args, **kwargs): |
|
490 | > def wrappedpush(orig, repo, *args, **kwargs): | |
493 | > res = orig(repo, *args, **kwargs) |
|
491 | > res = orig(repo, *args, **kwargs) | |
494 | > repo.ui.write(b'local stdout\n') |
|
492 | > repo.ui.write(b'local stdout\n') | |
495 | > repo.ui.flush() |
|
493 | > repo.ui.flush() | |
496 | > return res |
|
494 | > return res | |
497 | > |
|
495 | > | |
498 | > def extsetup(ui): |
|
496 | > def extsetup(ui): | |
499 | > extensions.wrapfunction(exchange, b'push', wrappedpush) |
|
497 | > extensions.wrapfunction(exchange, b'push', wrappedpush) | |
500 | > EOF |
|
498 | > EOF | |
501 |
|
499 | |||
502 | $ cat >> .hg/hgrc << EOF |
|
500 | $ cat >> .hg/hgrc << EOF | |
503 | > [paths] |
|
501 | > [paths] | |
504 | > default-push = ssh://user@dummy/remote |
|
502 | > default-push = ssh://user@dummy/remote | |
505 | > [extensions] |
|
503 | > [extensions] | |
506 | > localwrite = localwrite.py |
|
504 | > localwrite = localwrite.py | |
507 | > EOF |
|
505 | > EOF | |
508 |
|
506 | |||
509 | $ echo localwrite > foo |
|
507 | $ echo localwrite > foo | |
510 | $ hg commit -m 'testing localwrite' |
|
508 | $ hg commit -m 'testing localwrite' | |
511 | $ hg push |
|
509 | $ hg push | |
512 | pushing to ssh://user@dummy/remote |
|
510 | pushing to ssh://user@dummy/remote | |
513 | searching for changes |
|
511 | searching for changes | |
514 | remote: adding changesets |
|
512 | remote: adding changesets | |
515 | remote: adding manifests |
|
513 | remote: adding manifests | |
516 | remote: adding file changes |
|
514 | remote: adding file changes | |
517 | remote: added 1 changesets with 1 changes to 1 files (py3 !) |
|
515 | remote: added 1 changesets with 1 changes to 1 files (py3 !) | |
518 | remote: added 1 changesets with 1 changes to 1 files (no-py3 no-chg !) |
|
|||
519 | remote: KABOOM |
|
516 | remote: KABOOM | |
520 | remote: KABOOM IN PROCESS |
|
517 | remote: KABOOM IN PROCESS | |
521 | remote: added 1 changesets with 1 changes to 1 files (no-py3 chg !) |
|
|||
522 | local stdout |
|
518 | local stdout | |
523 |
|
519 | |||
524 | debug output |
|
520 | debug output | |
525 |
|
521 | |||
526 | $ hg pull --debug ssh://user@dummy/remote --config devel.debug.peer-request=yes |
|
522 | $ hg pull --debug ssh://user@dummy/remote --config devel.debug.peer-request=yes | |
527 | pulling from ssh://user@dummy/remote |
|
523 | pulling from ssh://user@dummy/remote | |
528 | running .* ".*[/\\]dummyssh" ['"]user@dummy['"] ['"]hg -R remote serve --stdio['"] (re) |
|
524 | running .* ".*[/\\]dummyssh" ['"]user@dummy['"] ['"]hg -R remote serve --stdio['"] (re) | |
529 | devel-peer-request: hello+between |
|
525 | devel-peer-request: hello+between | |
530 | devel-peer-request: pairs: 81 bytes |
|
526 | devel-peer-request: pairs: 81 bytes | |
531 | sending hello command |
|
527 | sending hello command | |
532 | sending between command |
|
528 | sending between command | |
533 | remote: \d+ (re) |
|
529 | remote: \d+ (re) | |
534 | remote: capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (re) |
|
530 | remote: capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (re) | |
535 | remote: 1 |
|
531 | remote: 1 | |
536 | devel-peer-request: protocaps |
|
532 | devel-peer-request: protocaps | |
537 | devel-peer-request: caps: * bytes (glob) |
|
533 | devel-peer-request: caps: * bytes (glob) | |
538 | sending protocaps command |
|
534 | sending protocaps command | |
539 | query 1; heads |
|
535 | query 1; heads | |
540 | devel-peer-request: batched-content |
|
536 | devel-peer-request: batched-content | |
541 | devel-peer-request: - heads (0 arguments) |
|
537 | devel-peer-request: - heads (0 arguments) | |
542 | devel-peer-request: - known (1 arguments) |
|
538 | devel-peer-request: - known (1 arguments) | |
543 | devel-peer-request: batch |
|
539 | devel-peer-request: batch | |
544 | devel-peer-request: cmds: 141 bytes |
|
540 | devel-peer-request: cmds: 141 bytes | |
545 | sending batch command |
|
541 | sending batch command | |
546 | searching for changes |
|
542 | searching for changes | |
547 | all remote heads known locally |
|
543 | all remote heads known locally | |
548 | no changes found |
|
544 | no changes found | |
549 | devel-peer-request: getbundle |
|
545 | devel-peer-request: getbundle | |
550 | devel-peer-request: bookmarks: 1 bytes |
|
546 | devel-peer-request: bookmarks: 1 bytes | |
551 | devel-peer-request: bundlecaps: 270 bytes |
|
547 | devel-peer-request: bundlecaps: 270 bytes | |
552 | devel-peer-request: cg: 1 bytes |
|
548 | devel-peer-request: cg: 1 bytes | |
553 | devel-peer-request: common: 122 bytes |
|
549 | devel-peer-request: common: 122 bytes | |
554 | devel-peer-request: heads: 122 bytes |
|
550 | devel-peer-request: heads: 122 bytes | |
555 | devel-peer-request: listkeys: 9 bytes |
|
551 | devel-peer-request: listkeys: 9 bytes | |
556 | devel-peer-request: phases: 1 bytes |
|
552 | devel-peer-request: phases: 1 bytes | |
557 | sending getbundle command |
|
553 | sending getbundle command | |
558 | bundle2-input-bundle: with-transaction |
|
554 | bundle2-input-bundle: with-transaction | |
559 | bundle2-input-part: "bookmarks" supported |
|
555 | bundle2-input-part: "bookmarks" supported | |
560 | bundle2-input-part: total payload size 26 |
|
556 | bundle2-input-part: total payload size 26 | |
561 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
557 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
562 | bundle2-input-part: total payload size 45 |
|
558 | bundle2-input-part: total payload size 45 | |
563 | bundle2-input-part: "phase-heads" supported |
|
559 | bundle2-input-part: "phase-heads" supported | |
564 | bundle2-input-part: total payload size 72 |
|
560 | bundle2-input-part: total payload size 72 | |
565 | bundle2-input-bundle: 3 parts total |
|
561 | bundle2-input-bundle: 3 parts total | |
566 | checking for updated bookmarks |
|
562 | checking for updated bookmarks | |
567 |
|
563 | |||
568 | $ cd $TESTTMP |
|
564 | $ cd $TESTTMP | |
569 |
|
565 | |||
570 | $ cat dummylog |
|
566 | $ cat dummylog | |
571 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
567 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
572 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
568 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
573 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/nonexistent serve --stdio |
|
569 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/nonexistent serve --stdio | |
574 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
570 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
575 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio (no-reposimplestore !) |
|
571 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio (no-reposimplestore !) | |
576 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) |
|
572 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) | |
577 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) |
|
573 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) | |
578 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio |
|
574 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio | |
579 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
575 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
580 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
576 | Got arguments 1:user@dummy 2:hg -R local serve --stdio | |
581 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio |
|
577 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio | |
582 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
578 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
583 | changegroup-in-remote hook: HG_BUNDLE2=1 |
|
579 | changegroup-in-remote hook: HG_BUNDLE2=1 | |
584 | HG_HOOKNAME=changegroup |
|
580 | HG_HOOKNAME=changegroup | |
585 | HG_HOOKTYPE=changegroup |
|
581 | HG_HOOKTYPE=changegroup | |
586 | HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 |
|
582 | HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 | |
587 | HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 |
|
583 | HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 | |
588 | HG_SOURCE=serve |
|
584 | HG_SOURCE=serve | |
589 | HG_TXNID=TXN:$ID$ |
|
585 | HG_TXNID=TXN:$ID$ | |
590 | HG_TXNNAME=serve |
|
586 | HG_TXNNAME=serve | |
591 | HG_URL=remote:ssh:$LOCALIP |
|
587 | HG_URL=remote:ssh:$LOCALIP | |
592 |
|
588 | |||
593 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
589 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
594 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
590 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
595 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
591 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
596 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
592 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
597 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
593 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
598 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
594 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
599 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
595 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
600 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
596 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
601 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
597 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
602 | changegroup-in-remote hook: HG_BUNDLE2=1 |
|
598 | changegroup-in-remote hook: HG_BUNDLE2=1 | |
603 | HG_HOOKNAME=changegroup |
|
599 | HG_HOOKNAME=changegroup | |
604 | HG_HOOKTYPE=changegroup |
|
600 | HG_HOOKTYPE=changegroup | |
605 | HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 |
|
601 | HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 | |
606 | HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 |
|
602 | HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 | |
607 | HG_SOURCE=serve |
|
603 | HG_SOURCE=serve | |
608 | HG_TXNID=TXN:$ID$ |
|
604 | HG_TXNID=TXN:$ID$ | |
609 | HG_TXNNAME=serve |
|
605 | HG_TXNNAME=serve | |
610 | HG_URL=remote:ssh:$LOCALIP |
|
606 | HG_URL=remote:ssh:$LOCALIP | |
611 |
|
607 | |||
612 | Got arguments 1:user@dummy 2:chg -R remote serve --stdio (chg !) |
|
608 | Got arguments 1:user@dummy 2:chg -R remote serve --stdio (chg !) | |
613 | changegroup-in-remote hook: HG_BUNDLE2=1 (chg !) |
|
609 | changegroup-in-remote hook: HG_BUNDLE2=1 (chg !) | |
614 | HG_HOOKNAME=changegroup (chg !) |
|
610 | HG_HOOKNAME=changegroup (chg !) | |
615 | HG_HOOKTYPE=changegroup (chg !) |
|
611 | HG_HOOKTYPE=changegroup (chg !) | |
616 | HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 (chg !) |
|
612 | HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 (chg !) | |
617 | HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 (chg !) |
|
613 | HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 (chg !) | |
618 | HG_SOURCE=serve (chg !) |
|
614 | HG_SOURCE=serve (chg !) | |
619 | HG_TXNID=TXN:$ID$ (chg !) |
|
615 | HG_TXNID=TXN:$ID$ (chg !) | |
620 | HG_TXNNAME=serve (chg !) |
|
616 | HG_TXNNAME=serve (chg !) | |
621 | HG_URL=remote:ssh:$LOCALIP (chg !) |
|
617 | HG_URL=remote:ssh:$LOCALIP (chg !) | |
622 | (chg !) |
|
618 | (chg !) | |
623 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
619 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
624 | Got arguments 1:user@dummy 2:hg init 'a repo' |
|
620 | Got arguments 1:user@dummy 2:hg init 'a repo' | |
625 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
621 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
626 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
622 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
627 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
623 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
628 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
624 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
629 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
625 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
630 | changegroup-in-remote hook: HG_BUNDLE2=1 |
|
626 | changegroup-in-remote hook: HG_BUNDLE2=1 | |
631 | HG_HOOKNAME=changegroup |
|
627 | HG_HOOKNAME=changegroup | |
632 | HG_HOOKTYPE=changegroup |
|
628 | HG_HOOKTYPE=changegroup | |
633 | HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 |
|
629 | HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 | |
634 | HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 |
|
630 | HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 | |
635 | HG_SOURCE=serve |
|
631 | HG_SOURCE=serve | |
636 | HG_TXNID=TXN:$ID$ |
|
632 | HG_TXNID=TXN:$ID$ | |
637 | HG_TXNNAME=serve |
|
633 | HG_TXNNAME=serve | |
638 | HG_URL=remote:ssh:$LOCALIP |
|
634 | HG_URL=remote:ssh:$LOCALIP | |
639 |
|
635 | |||
640 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
636 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
641 |
|
637 | |||
642 |
|
638 | |||
643 | remote hook failure is attributed to remote |
|
639 | remote hook failure is attributed to remote | |
644 |
|
640 | |||
645 | $ cat > $TESTTMP/failhook << EOF |
|
641 | $ cat > $TESTTMP/failhook << EOF | |
646 | > def hook(ui, repo, **kwargs): |
|
642 | > def hook(ui, repo, **kwargs): | |
647 | > ui.write(b'hook failure!\n') |
|
643 | > ui.write(b'hook failure!\n') | |
648 | > ui.flush() |
|
644 | > ui.flush() | |
649 | > return 1 |
|
645 | > return 1 | |
650 | > EOF |
|
646 | > EOF | |
651 |
|
647 | |||
652 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc |
|
648 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc | |
653 |
|
649 | |||
654 | $ hg -q clone ssh://user@dummy/remote hookout |
|
650 | $ hg -q clone ssh://user@dummy/remote hookout | |
655 | $ cd hookout |
|
651 | $ cd hookout | |
656 | $ touch hookfailure |
|
652 | $ touch hookfailure | |
657 | $ hg -q commit -A -m 'remote hook failure' |
|
653 | $ hg -q commit -A -m 'remote hook failure' | |
658 | $ hg push |
|
654 | $ hg push | |
659 | pushing to ssh://user@dummy/remote |
|
655 | pushing to ssh://user@dummy/remote | |
660 | searching for changes |
|
656 | searching for changes | |
661 | remote: adding changesets |
|
657 | remote: adding changesets | |
662 | remote: adding manifests |
|
658 | remote: adding manifests | |
663 | remote: adding file changes |
|
659 | remote: adding file changes | |
664 | remote: hook failure! |
|
660 | remote: hook failure! | |
665 | remote: transaction abort! |
|
661 | remote: transaction abort! | |
666 | remote: rollback completed |
|
662 | remote: rollback completed | |
667 | remote: pretxnchangegroup.fail hook failed |
|
663 | remote: pretxnchangegroup.fail hook failed | |
668 | abort: push failed on remote |
|
664 | abort: push failed on remote | |
669 | [100] |
|
665 | [100] | |
670 |
|
666 | |||
671 | abort during pull is properly reported as such |
|
667 | abort during pull is properly reported as such | |
672 |
|
668 | |||
673 | $ echo morefoo >> ../remote/foo |
|
669 | $ echo morefoo >> ../remote/foo | |
674 | $ hg -R ../remote commit --message "more foo to be pulled" |
|
670 | $ hg -R ../remote commit --message "more foo to be pulled" | |
675 | $ cat >> ../remote/.hg/hgrc << EOF |
|
671 | $ cat >> ../remote/.hg/hgrc << EOF | |
676 | > [extensions] |
|
672 | > [extensions] | |
677 | > crash = ${TESTDIR}/crashgetbundler.py |
|
673 | > crash = ${TESTDIR}/crashgetbundler.py | |
678 | > EOF |
|
674 | > EOF | |
679 | $ hg pull |
|
675 | $ hg pull | |
680 | pulling from ssh://user@dummy/remote |
|
676 | pulling from ssh://user@dummy/remote | |
681 | searching for changes |
|
677 | searching for changes | |
682 | remote: abort: this is an exercise |
|
678 | remote: abort: this is an exercise | |
683 | abort: pull failed on remote |
|
679 | abort: pull failed on remote | |
684 | [100] |
|
680 | [100] | |
685 |
|
681 | |||
686 | abort with no error hint when there is a ssh problem when pulling |
|
682 | abort with no error hint when there is a ssh problem when pulling | |
687 |
|
683 | |||
688 | $ hg pull ssh://brokenrepository |
|
684 | $ hg pull ssh://brokenrepository | |
689 | pulling from ssh://brokenrepository/ |
|
685 | pulling from ssh://brokenrepository/ | |
690 | abort: no suitable response from remote hg |
|
686 | abort: no suitable response from remote hg | |
691 | [255] |
|
687 | [255] | |
692 |
|
688 | |||
693 | abort with configured error hint when there is a ssh problem when pulling |
|
689 | abort with configured error hint when there is a ssh problem when pulling | |
694 |
|
690 | |||
695 | $ hg pull ssh://brokenrepository \ |
|
691 | $ hg pull ssh://brokenrepository \ | |
696 | > --config ui.ssherrorhint="Please see http://company/internalwiki/ssh.html" |
|
692 | > --config ui.ssherrorhint="Please see http://company/internalwiki/ssh.html" | |
697 | pulling from ssh://brokenrepository/ |
|
693 | pulling from ssh://brokenrepository/ | |
698 | abort: no suitable response from remote hg |
|
694 | abort: no suitable response from remote hg | |
699 | (Please see http://company/internalwiki/ssh.html) |
|
695 | (Please see http://company/internalwiki/ssh.html) | |
700 | [255] |
|
696 | [255] | |
701 |
|
697 | |||
702 | test that custom environment is passed down to ssh executable |
|
698 | test that custom environment is passed down to ssh executable | |
703 | $ cat >>dumpenv <<EOF |
|
699 | $ cat >>dumpenv <<EOF | |
704 | > #! /bin/sh |
|
700 | > #! /bin/sh | |
705 | > echo \$VAR >&2 |
|
701 | > echo \$VAR >&2 | |
706 | > EOF |
|
702 | > EOF | |
707 | $ chmod +x dumpenv |
|
703 | $ chmod +x dumpenv | |
708 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" |
|
704 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" | |
709 | pulling from ssh://something/ |
|
705 | pulling from ssh://something/ | |
710 | remote: |
|
706 | remote: | |
711 | abort: no suitable response from remote hg |
|
707 | abort: no suitable response from remote hg | |
712 | [255] |
|
708 | [255] | |
713 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" --config sshenv.VAR=17 |
|
709 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" --config sshenv.VAR=17 | |
714 | pulling from ssh://something/ |
|
710 | pulling from ssh://something/ | |
715 | remote: 17 |
|
711 | remote: 17 | |
716 | abort: no suitable response from remote hg |
|
712 | abort: no suitable response from remote hg | |
717 | [255] |
|
713 | [255] | |
718 |
|
714 |
General Comments 0
You need to be logged in to leave comments.
Login now