##// END OF EJS Templates
tests: enter full hex hash in plain text in bundle part...
Martin von Zweigbergk -
r37464:d46d4f14 default
parent child Browse files
Show More
@@ -1,1158 +1,1158
1 #testcases sshv1 sshv2
1 #testcases sshv1 sshv2
2
2
3 #if sshv2
3 #if sshv2
4 $ cat >> $HGRCPATH << EOF
4 $ cat >> $HGRCPATH << EOF
5 > [experimental]
5 > [experimental]
6 > sshpeer.advertise-v2 = true
6 > sshpeer.advertise-v2 = true
7 > sshserver.support-v2 = true
7 > sshserver.support-v2 = true
8 > EOF
8 > EOF
9 #endif
9 #endif
10
10
11 Test exchange of common information using bundle2
11 Test exchange of common information using bundle2
12
12
13
13
14 $ getmainid() {
14 $ getmainid() {
15 > hg -R main log --template '{node}\n' --rev "$1"
15 > hg -R main log --template '{node}\n' --rev "$1"
16 > }
16 > }
17
17
18 enable obsolescence
18 enable obsolescence
19
19
20 $ cp $HGRCPATH $TESTTMP/hgrc.orig
20 $ cp $HGRCPATH $TESTTMP/hgrc.orig
21 $ cat > $TESTTMP/bundle2-pushkey-hook.sh << EOF
21 $ cat > $TESTTMP/bundle2-pushkey-hook.sh << EOF
22 > echo pushkey: lock state after \"\$HG_NAMESPACE\"
22 > echo pushkey: lock state after \"\$HG_NAMESPACE\"
23 > hg debuglock
23 > hg debuglock
24 > EOF
24 > EOF
25
25
26 $ cat >> $HGRCPATH << EOF
26 $ cat >> $HGRCPATH << EOF
27 > [experimental]
27 > [experimental]
28 > evolution.createmarkers=True
28 > evolution.createmarkers=True
29 > evolution.exchange=True
29 > evolution.exchange=True
30 > bundle2-output-capture=True
30 > bundle2-output-capture=True
31 > [ui]
31 > [ui]
32 > ssh="$PYTHON" "$TESTDIR/dummyssh"
32 > ssh="$PYTHON" "$TESTDIR/dummyssh"
33 > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline}
33 > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline}
34 > [web]
34 > [web]
35 > push_ssl = false
35 > push_ssl = false
36 > allow_push = *
36 > allow_push = *
37 > [phases]
37 > [phases]
38 > publish=False
38 > publish=False
39 > [hooks]
39 > [hooks]
40 > pretxnclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n"
40 > pretxnclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n"
41 > txnclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n"
41 > txnclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n"
42 > txnclose.env = sh -c "HG_LOCAL= printenv.py txnclose"
42 > txnclose.env = sh -c "HG_LOCAL= printenv.py txnclose"
43 > pushkey= sh "$TESTTMP/bundle2-pushkey-hook.sh"
43 > pushkey= sh "$TESTTMP/bundle2-pushkey-hook.sh"
44 > EOF
44 > EOF
45
45
46 The extension requires a repo (currently unused)
46 The extension requires a repo (currently unused)
47
47
48 $ hg init main
48 $ hg init main
49 $ cd main
49 $ cd main
50 $ touch a
50 $ touch a
51 $ hg add a
51 $ hg add a
52 $ hg commit -m 'a'
52 $ hg commit -m 'a'
53 pre-close-tip:3903775176ed draft
53 pre-close-tip:3903775176ed draft
54 postclose-tip:3903775176ed draft
54 postclose-tip:3903775176ed draft
55 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
55 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
56
56
57 $ hg unbundle $TESTDIR/bundles/rebase.hg
57 $ hg unbundle $TESTDIR/bundles/rebase.hg
58 adding changesets
58 adding changesets
59 adding manifests
59 adding manifests
60 adding file changes
60 adding file changes
61 added 8 changesets with 7 changes to 7 files (+3 heads)
61 added 8 changesets with 7 changes to 7 files (+3 heads)
62 pre-close-tip:02de42196ebe draft
62 pre-close-tip:02de42196ebe draft
63 new changesets cd010b8cd998:02de42196ebe
63 new changesets cd010b8cd998:02de42196ebe
64 postclose-tip:02de42196ebe draft
64 postclose-tip:02de42196ebe draft
65 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=unbundle HG_TXNID=TXN:$ID$ HG_TXNNAME=unbundle
65 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=unbundle HG_TXNID=TXN:$ID$ HG_TXNNAME=unbundle
66 bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob)
66 bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob)
67 (run 'hg heads' to see heads, 'hg merge' to merge)
67 (run 'hg heads' to see heads, 'hg merge' to merge)
68
68
69 $ cd ..
69 $ cd ..
70
70
71 Real world exchange
71 Real world exchange
72 =====================
72 =====================
73
73
74 Add more obsolescence information
74 Add more obsolescence information
75
75
76 $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc`
76 $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc`
77 pre-close-tip:02de42196ebe draft
77 pre-close-tip:02de42196ebe draft
78 postclose-tip:02de42196ebe draft
78 postclose-tip:02de42196ebe draft
79 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
79 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
80 $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c`
80 $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c`
81 pre-close-tip:02de42196ebe draft
81 pre-close-tip:02de42196ebe draft
82 postclose-tip:02de42196ebe draft
82 postclose-tip:02de42196ebe draft
83 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
83 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
84
84
85 clone --pull
85 clone --pull
86
86
87 $ hg -R main phase --public cd010b8cd998
87 $ hg -R main phase --public cd010b8cd998
88 pre-close-tip:02de42196ebe draft
88 pre-close-tip:02de42196ebe draft
89 postclose-tip:02de42196ebe draft
89 postclose-tip:02de42196ebe draft
90 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
90 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
91 $ hg clone main other --pull --rev 9520eea781bc
91 $ hg clone main other --pull --rev 9520eea781bc
92 adding changesets
92 adding changesets
93 adding manifests
93 adding manifests
94 adding file changes
94 adding file changes
95 added 2 changesets with 2 changes to 2 files
95 added 2 changesets with 2 changes to 2 files
96 1 new obsolescence markers
96 1 new obsolescence markers
97 pre-close-tip:9520eea781bc draft
97 pre-close-tip:9520eea781bc draft
98 new changesets cd010b8cd998:9520eea781bc
98 new changesets cd010b8cd998:9520eea781bc
99 postclose-tip:9520eea781bc draft
99 postclose-tip:9520eea781bc draft
100 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=9520eea781bcca16c1e15acc0ba14335a0e8e5ba HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
100 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=9520eea781bcca16c1e15acc0ba14335a0e8e5ba HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
101 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
101 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
102 updating to branch default
102 updating to branch default
103 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
103 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
104 $ hg -R other log -G
104 $ hg -R other log -G
105 @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
105 @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
106 |
106 |
107 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
107 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
108
108
109 $ hg -R other debugobsolete
109 $ hg -R other debugobsolete
110 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
110 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
111
111
112 pull
112 pull
113
113
114 $ hg -R main phase --public 9520eea781bc
114 $ hg -R main phase --public 9520eea781bc
115 pre-close-tip:02de42196ebe draft
115 pre-close-tip:02de42196ebe draft
116 postclose-tip:02de42196ebe draft
116 postclose-tip:02de42196ebe draft
117 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
117 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
118 $ hg -R other pull -r 24b6387c8c8c
118 $ hg -R other pull -r 24b6387c8c8c
119 pulling from $TESTTMP/main
119 pulling from $TESTTMP/main
120 searching for changes
120 searching for changes
121 adding changesets
121 adding changesets
122 adding manifests
122 adding manifests
123 adding file changes
123 adding file changes
124 added 1 changesets with 1 changes to 1 files (+1 heads)
124 added 1 changesets with 1 changes to 1 files (+1 heads)
125 1 new obsolescence markers
125 1 new obsolescence markers
126 pre-close-tip:24b6387c8c8c draft
126 pre-close-tip:24b6387c8c8c draft
127 new changesets 24b6387c8c8c
127 new changesets 24b6387c8c8c
128 postclose-tip:24b6387c8c8c draft
128 postclose-tip:24b6387c8c8c draft
129 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_NODE_LAST=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
129 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_NODE_LAST=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
130 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
130 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
131 (run 'hg heads' to see heads, 'hg merge' to merge)
131 (run 'hg heads' to see heads, 'hg merge' to merge)
132 $ hg -R other log -G
132 $ hg -R other log -G
133 o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F
133 o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F
134 |
134 |
135 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
135 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
136 |/
136 |/
137 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
137 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
138
138
139 $ hg -R other debugobsolete
139 $ hg -R other debugobsolete
140 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
140 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
141 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
141 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
142
142
143 pull empty (with phase movement)
143 pull empty (with phase movement)
144
144
145 $ hg -R main phase --public 24b6387c8c8c
145 $ hg -R main phase --public 24b6387c8c8c
146 pre-close-tip:02de42196ebe draft
146 pre-close-tip:02de42196ebe draft
147 postclose-tip:02de42196ebe draft
147 postclose-tip:02de42196ebe draft
148 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
148 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
149 $ hg -R other pull -r 24b6387c8c8c
149 $ hg -R other pull -r 24b6387c8c8c
150 pulling from $TESTTMP/main
150 pulling from $TESTTMP/main
151 no changes found
151 no changes found
152 pre-close-tip:24b6387c8c8c public
152 pre-close-tip:24b6387c8c8c public
153 postclose-tip:24b6387c8c8c public
153 postclose-tip:24b6387c8c8c public
154 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
154 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
155 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
155 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
156 $ hg -R other log -G
156 $ hg -R other log -G
157 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
157 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
158 |
158 |
159 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
159 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
160 |/
160 |/
161 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
161 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
162
162
163 $ hg -R other debugobsolete
163 $ hg -R other debugobsolete
164 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
164 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
165 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
165 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
166
166
167 pull empty
167 pull empty
168
168
169 $ hg -R other pull -r 24b6387c8c8c
169 $ hg -R other pull -r 24b6387c8c8c
170 pulling from $TESTTMP/main
170 pulling from $TESTTMP/main
171 no changes found
171 no changes found
172 pre-close-tip:24b6387c8c8c public
172 pre-close-tip:24b6387c8c8c public
173 postclose-tip:24b6387c8c8c public
173 postclose-tip:24b6387c8c8c public
174 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
174 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
175 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
175 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
176 $ hg -R other log -G
176 $ hg -R other log -G
177 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
177 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
178 |
178 |
179 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
179 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
180 |/
180 |/
181 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
181 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
182
182
183 $ hg -R other debugobsolete
183 $ hg -R other debugobsolete
184 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
184 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
185 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
185 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
186
186
187 add extra data to test their exchange during push
187 add extra data to test their exchange during push
188
188
189 $ hg -R main bookmark --rev eea13746799a book_eea1
189 $ hg -R main bookmark --rev eea13746799a book_eea1
190 pre-close-tip:02de42196ebe draft
190 pre-close-tip:02de42196ebe draft
191 postclose-tip:02de42196ebe draft
191 postclose-tip:02de42196ebe draft
192 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
192 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
193 $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a`
193 $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a`
194 pre-close-tip:02de42196ebe draft
194 pre-close-tip:02de42196ebe draft
195 postclose-tip:02de42196ebe draft
195 postclose-tip:02de42196ebe draft
196 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
196 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
197 $ hg -R main bookmark --rev 02de42196ebe book_02de
197 $ hg -R main bookmark --rev 02de42196ebe book_02de
198 pre-close-tip:02de42196ebe draft book_02de
198 pre-close-tip:02de42196ebe draft book_02de
199 postclose-tip:02de42196ebe draft book_02de
199 postclose-tip:02de42196ebe draft book_02de
200 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
200 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
201 $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe`
201 $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe`
202 pre-close-tip:02de42196ebe draft book_02de
202 pre-close-tip:02de42196ebe draft book_02de
203 postclose-tip:02de42196ebe draft book_02de
203 postclose-tip:02de42196ebe draft book_02de
204 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
204 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
205 $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc
205 $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc
206 pre-close-tip:02de42196ebe draft book_02de
206 pre-close-tip:02de42196ebe draft book_02de
207 postclose-tip:02de42196ebe draft book_02de
207 postclose-tip:02de42196ebe draft book_02de
208 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
208 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
209 $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16`
209 $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16`
210 pre-close-tip:02de42196ebe draft book_02de
210 pre-close-tip:02de42196ebe draft book_02de
211 postclose-tip:02de42196ebe draft book_02de
211 postclose-tip:02de42196ebe draft book_02de
212 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
212 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
213 $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd
213 $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd
214 pre-close-tip:02de42196ebe draft book_02de
214 pre-close-tip:02de42196ebe draft book_02de
215 postclose-tip:02de42196ebe draft book_02de
215 postclose-tip:02de42196ebe draft book_02de
216 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
216 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
217 $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8`
217 $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8`
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_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
220 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
221 $ hg -R main bookmark --rev 32af7686d403 book_32af
221 $ hg -R main bookmark --rev 32af7686d403 book_32af
222 pre-close-tip:02de42196ebe draft book_02de
222 pre-close-tip:02de42196ebe draft book_02de
223 postclose-tip:02de42196ebe draft book_02de
223 postclose-tip:02de42196ebe draft book_02de
224 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
224 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
225 $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403`
225 $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403`
226 pre-close-tip:02de42196ebe draft book_02de
226 pre-close-tip:02de42196ebe draft book_02de
227 postclose-tip:02de42196ebe draft book_02de
227 postclose-tip:02de42196ebe draft book_02de
228 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
228 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
229
229
230 $ hg -R other bookmark --rev cd010b8cd998 book_eea1
230 $ hg -R other bookmark --rev cd010b8cd998 book_eea1
231 pre-close-tip:24b6387c8c8c public
231 pre-close-tip:24b6387c8c8c public
232 postclose-tip:24b6387c8c8c public
232 postclose-tip:24b6387c8c8c public
233 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
233 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
234 $ hg -R other bookmark --rev cd010b8cd998 book_02de
234 $ hg -R other bookmark --rev cd010b8cd998 book_02de
235 pre-close-tip:24b6387c8c8c public
235 pre-close-tip:24b6387c8c8c public
236 postclose-tip:24b6387c8c8c public
236 postclose-tip:24b6387c8c8c public
237 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
237 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
238 $ hg -R other bookmark --rev cd010b8cd998 book_42cc
238 $ hg -R other bookmark --rev cd010b8cd998 book_42cc
239 pre-close-tip:24b6387c8c8c public
239 pre-close-tip:24b6387c8c8c public
240 postclose-tip:24b6387c8c8c public
240 postclose-tip:24b6387c8c8c public
241 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
241 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
242 $ hg -R other bookmark --rev cd010b8cd998 book_5fdd
242 $ hg -R other bookmark --rev cd010b8cd998 book_5fdd
243 pre-close-tip:24b6387c8c8c public
243 pre-close-tip:24b6387c8c8c public
244 postclose-tip:24b6387c8c8c public
244 postclose-tip:24b6387c8c8c public
245 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
245 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
246 $ hg -R other bookmark --rev cd010b8cd998 book_32af
246 $ hg -R other bookmark --rev cd010b8cd998 book_32af
247 pre-close-tip:24b6387c8c8c public
247 pre-close-tip:24b6387c8c8c public
248 postclose-tip:24b6387c8c8c public
248 postclose-tip:24b6387c8c8c public
249 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
249 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
250
250
251 $ hg -R main phase --public eea13746799a
251 $ hg -R main phase --public eea13746799a
252 pre-close-tip:02de42196ebe draft book_02de
252 pre-close-tip:02de42196ebe draft book_02de
253 postclose-tip:02de42196ebe draft book_02de
253 postclose-tip:02de42196ebe draft book_02de
254 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
254 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
255
255
256 push
256 push
257 $ hg -R main push other --rev eea13746799a --bookmark book_eea1
257 $ hg -R main push other --rev eea13746799a --bookmark book_eea1
258 pushing to other
258 pushing to other
259 searching for changes
259 searching for changes
260 remote: adding changesets
260 remote: adding changesets
261 remote: adding manifests
261 remote: adding manifests
262 remote: adding file changes
262 remote: adding file changes
263 remote: added 1 changesets with 0 changes to 0 files (-1 heads)
263 remote: added 1 changesets with 0 changes to 0 files (-1 heads)
264 remote: 1 new obsolescence markers
264 remote: 1 new obsolescence markers
265 remote: pre-close-tip:eea13746799a public book_eea1
265 remote: pre-close-tip:eea13746799a public book_eea1
266 remote: pushkey: lock state after "bookmarks"
266 remote: pushkey: lock state after "bookmarks"
267 remote: lock: free
267 remote: lock: free
268 remote: wlock: free
268 remote: wlock: free
269 remote: postclose-tip:eea13746799a public book_eea1
269 remote: postclose-tip:eea13746799a public book_eea1
270 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_NODE_LAST=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_PHASES_MOVED=1 HG_SOURCE=push HG_TXNID=TXN:$ID$ HG_TXNNAME=push HG_URL=file:$TESTTMP/other
270 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_NODE_LAST=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_PHASES_MOVED=1 HG_SOURCE=push HG_TXNID=TXN:$ID$ HG_TXNNAME=push HG_URL=file:$TESTTMP/other
271 updating bookmark book_eea1
271 updating bookmark book_eea1
272 pre-close-tip:02de42196ebe draft book_02de
272 pre-close-tip:02de42196ebe draft book_02de
273 postclose-tip:02de42196ebe draft book_02de
273 postclose-tip:02de42196ebe draft book_02de
274 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response
274 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response
275 file:/*/$TESTTMP/other HG_URL=file:$TESTTMP/other (glob)
275 file:/*/$TESTTMP/other HG_URL=file:$TESTTMP/other (glob)
276 $ hg -R other log -G
276 $ hg -R other log -G
277 o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
277 o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
278 |\
278 |\
279 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
279 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
280 | |
280 | |
281 @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
281 @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
282 |/
282 |/
283 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A
283 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A
284
284
285 $ hg -R other debugobsolete
285 $ hg -R other debugobsolete
286 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
286 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
287 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
287 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
288 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
288 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
289
289
290 pull over ssh
290 pull over ssh
291
291
292 $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de
292 $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de
293 pulling from ssh://user@dummy/main
293 pulling from ssh://user@dummy/main
294 searching for changes
294 searching for changes
295 adding changesets
295 adding changesets
296 adding manifests
296 adding manifests
297 adding file changes
297 adding file changes
298 added 1 changesets with 1 changes to 1 files (+1 heads)
298 added 1 changesets with 1 changes to 1 files (+1 heads)
299 1 new obsolescence markers
299 1 new obsolescence markers
300 updating bookmark book_02de
300 updating bookmark book_02de
301 pre-close-tip:02de42196ebe draft book_02de
301 pre-close-tip:02de42196ebe draft book_02de
302 new changesets 02de42196ebe
302 new changesets 02de42196ebe
303 postclose-tip:02de42196ebe draft book_02de
303 postclose-tip:02de42196ebe draft book_02de
304 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
304 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
305 ssh://user@dummy/main HG_URL=ssh://user@dummy/main
305 ssh://user@dummy/main HG_URL=ssh://user@dummy/main
306 (run 'hg heads' to see heads, 'hg merge' to merge)
306 (run 'hg heads' to see heads, 'hg merge' to merge)
307 $ hg -R other debugobsolete
307 $ hg -R other debugobsolete
308 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
308 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
309 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
309 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
310 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
310 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
311 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
311 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
312
312
313 pull over http
313 pull over http
314
314
315 $ hg serve -R main -p $HGPORT -d --pid-file=main.pid -E main-error.log
315 $ hg serve -R main -p $HGPORT -d --pid-file=main.pid -E main-error.log
316 $ cat main.pid >> $DAEMON_PIDS
316 $ cat main.pid >> $DAEMON_PIDS
317
317
318 $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc
318 $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc
319 pulling from http://localhost:$HGPORT/
319 pulling from http://localhost:$HGPORT/
320 searching for changes
320 searching for changes
321 adding changesets
321 adding changesets
322 adding manifests
322 adding manifests
323 adding file changes
323 adding file changes
324 added 1 changesets with 1 changes to 1 files (+1 heads)
324 added 1 changesets with 1 changes to 1 files (+1 heads)
325 1 new obsolescence markers
325 1 new obsolescence markers
326 updating bookmark book_42cc
326 updating bookmark book_42cc
327 pre-close-tip:42ccdea3bb16 draft book_42cc
327 pre-close-tip:42ccdea3bb16 draft book_42cc
328 new changesets 42ccdea3bb16
328 new changesets 42ccdea3bb16
329 postclose-tip:42ccdea3bb16 draft book_42cc
329 postclose-tip:42ccdea3bb16 draft book_42cc
330 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_NODE_LAST=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
330 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_NODE_LAST=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
331 http://localhost:$HGPORT/ HG_URL=http://localhost:$HGPORT/
331 http://localhost:$HGPORT/ HG_URL=http://localhost:$HGPORT/
332 (run 'hg heads .' to see heads, 'hg merge' to merge)
332 (run 'hg heads .' to see heads, 'hg merge' to merge)
333 $ cat main-error.log
333 $ cat main-error.log
334 $ hg -R other debugobsolete
334 $ hg -R other debugobsolete
335 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
335 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
336 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
336 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
337 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
337 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
338 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
338 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
339 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
339 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
340
340
341 push over ssh
341 push over ssh
342
342
343 $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd
343 $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd
344 pushing to ssh://user@dummy/other
344 pushing to ssh://user@dummy/other
345 searching for changes
345 searching for changes
346 remote: adding changesets
346 remote: adding changesets
347 remote: adding manifests
347 remote: adding manifests
348 remote: adding file changes
348 remote: adding file changes
349 remote: added 1 changesets with 1 changes to 1 files
349 remote: added 1 changesets with 1 changes to 1 files
350 remote: 1 new obsolescence markers
350 remote: 1 new obsolescence markers
351 remote: pre-close-tip:5fddd98957c8 draft book_5fdd
351 remote: pre-close-tip:5fddd98957c8 draft book_5fdd
352 remote: pushkey: lock state after "bookmarks"
352 remote: pushkey: lock state after "bookmarks"
353 remote: lock: free
353 remote: lock: free
354 remote: wlock: free
354 remote: wlock: free
355 remote: postclose-tip:5fddd98957c8 draft book_5fdd
355 remote: postclose-tip:5fddd98957c8 draft book_5fdd
356 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_NODE_LAST=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_TXNNAME=serve HG_URL=remote:ssh:$LOCALIP
356 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_NODE_LAST=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_TXNNAME=serve HG_URL=remote:ssh:$LOCALIP
357 updating bookmark book_5fdd
357 updating bookmark book_5fdd
358 pre-close-tip:02de42196ebe draft book_02de
358 pre-close-tip:02de42196ebe draft book_02de
359 postclose-tip:02de42196ebe draft book_02de
359 postclose-tip:02de42196ebe draft book_02de
360 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response
360 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response
361 ssh://user@dummy/other HG_URL=ssh://user@dummy/other
361 ssh://user@dummy/other HG_URL=ssh://user@dummy/other
362 $ hg -R other log -G
362 $ hg -R other log -G
363 o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
363 o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
364 |
364 |
365 o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
365 o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
366 |
366 |
367 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H
367 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H
368 | |
368 | |
369 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
369 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
370 | |/|
370 | |/|
371 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
371 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
372 |/ /
372 |/ /
373 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
373 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
374 |/
374 |/
375 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A
375 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A
376
376
377 $ hg -R other debugobsolete
377 $ hg -R other debugobsolete
378 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
378 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
379 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
379 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
380 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
380 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
381 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
381 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
382 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
382 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
383 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
383 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
384
384
385 push over http
385 push over http
386
386
387 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
387 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
388 $ cat other.pid >> $DAEMON_PIDS
388 $ cat other.pid >> $DAEMON_PIDS
389
389
390 $ hg -R main phase --public 32af7686d403
390 $ hg -R main phase --public 32af7686d403
391 pre-close-tip:02de42196ebe draft book_02de
391 pre-close-tip:02de42196ebe draft book_02de
392 postclose-tip:02de42196ebe draft book_02de
392 postclose-tip:02de42196ebe draft book_02de
393 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
393 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
394 $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af
394 $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af
395 pushing to http://localhost:$HGPORT2/
395 pushing to http://localhost:$HGPORT2/
396 searching for changes
396 searching for changes
397 remote: adding changesets
397 remote: adding changesets
398 remote: adding manifests
398 remote: adding manifests
399 remote: adding file changes
399 remote: adding file changes
400 remote: added 1 changesets with 1 changes to 1 files
400 remote: added 1 changesets with 1 changes to 1 files
401 remote: 1 new obsolescence markers
401 remote: 1 new obsolescence markers
402 remote: pre-close-tip:32af7686d403 public book_32af
402 remote: pre-close-tip:32af7686d403 public book_32af
403 remote: pushkey: lock state after "bookmarks"
403 remote: pushkey: lock state after "bookmarks"
404 remote: lock: free
404 remote: lock: free
405 remote: wlock: free
405 remote: wlock: free
406 remote: postclose-tip:32af7686d403 public book_32af
406 remote: postclose-tip:32af7686d403 public book_32af
407 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=32af7686d403cf45b5d95f2d70cebea587ac806a HG_NODE_LAST=32af7686d403cf45b5d95f2d70cebea587ac806a HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_TXNNAME=serve HG_URL=remote:http:$LOCALIP: (glob)
407 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=32af7686d403cf45b5d95f2d70cebea587ac806a HG_NODE_LAST=32af7686d403cf45b5d95f2d70cebea587ac806a HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_TXNNAME=serve HG_URL=remote:http:$LOCALIP: (glob)
408 updating bookmark book_32af
408 updating bookmark book_32af
409 pre-close-tip:02de42196ebe draft book_02de
409 pre-close-tip:02de42196ebe draft book_02de
410 postclose-tip:02de42196ebe draft book_02de
410 postclose-tip:02de42196ebe draft book_02de
411 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response
411 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response
412 http://localhost:$HGPORT2/ HG_URL=http://localhost:$HGPORT2/
412 http://localhost:$HGPORT2/ HG_URL=http://localhost:$HGPORT2/
413 $ cat other-error.log
413 $ cat other-error.log
414
414
415 Check final content.
415 Check final content.
416
416
417 $ hg -R other log -G
417 $ hg -R other log -G
418 o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D
418 o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D
419 |
419 |
420 o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
420 o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
421 |
421 |
422 o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
422 o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
423 |
423 |
424 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H
424 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H
425 | |
425 | |
426 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
426 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
427 | |/|
427 | |/|
428 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
428 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
429 |/ /
429 |/ /
430 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
430 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
431 |/
431 |/
432 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
432 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
433
433
434 $ hg -R other debugobsolete
434 $ hg -R other debugobsolete
435 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
435 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
436 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
436 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
437 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
437 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
438 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
438 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
439 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
439 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
440 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
440 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
441 7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
441 7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
442
442
443 (check that no 'pending' files remain)
443 (check that no 'pending' files remain)
444
444
445 $ ls -1 other/.hg/bookmarks*
445 $ ls -1 other/.hg/bookmarks*
446 other/.hg/bookmarks
446 other/.hg/bookmarks
447 $ ls -1 other/.hg/store/phaseroots*
447 $ ls -1 other/.hg/store/phaseroots*
448 other/.hg/store/phaseroots
448 other/.hg/store/phaseroots
449 $ ls -1 other/.hg/store/00changelog.i*
449 $ ls -1 other/.hg/store/00changelog.i*
450 other/.hg/store/00changelog.i
450 other/.hg/store/00changelog.i
451
451
452 Error Handling
452 Error Handling
453 ==============
453 ==============
454
454
455 Check that errors are properly returned to the client during push.
455 Check that errors are properly returned to the client during push.
456
456
457 Setting up
457 Setting up
458
458
459 $ cat > failpush.py << EOF
459 $ cat > failpush.py << EOF
460 > """A small extension that makes push fails when using bundle2
460 > """A small extension that makes push fails when using bundle2
461 >
461 >
462 > used to test error handling in bundle2
462 > used to test error handling in bundle2
463 > """
463 > """
464 >
464 >
465 > from mercurial import error
465 > from mercurial import error
466 > from mercurial import bundle2
466 > from mercurial import bundle2
467 > from mercurial import exchange
467 > from mercurial import exchange
468 > from mercurial import extensions
468 > from mercurial import extensions
469 > from mercurial import registrar
469 > from mercurial import registrar
470 > cmdtable = {}
470 > cmdtable = {}
471 > command = registrar.command(cmdtable)
471 > command = registrar.command(cmdtable)
472 >
472 >
473 > configtable = {}
473 > configtable = {}
474 > configitem = registrar.configitem(configtable)
474 > configitem = registrar.configitem(configtable)
475 > configitem('failpush', 'reason',
475 > configitem('failpush', 'reason',
476 > default=None,
476 > default=None,
477 > )
477 > )
478 >
478 >
479 > def _pushbundle2failpart(pushop, bundler):
479 > def _pushbundle2failpart(pushop, bundler):
480 > reason = pushop.ui.config('failpush', 'reason')
480 > reason = pushop.ui.config('failpush', 'reason')
481 > part = None
481 > part = None
482 > if reason == 'abort':
482 > if reason == 'abort':
483 > bundler.newpart('test:abort')
483 > bundler.newpart('test:abort')
484 > if reason == 'unknown':
484 > if reason == 'unknown':
485 > bundler.newpart('test:unknown')
485 > bundler.newpart('test:unknown')
486 > if reason == 'race':
486 > if reason == 'race':
487 > # 20 Bytes of crap
487 > # 20 Bytes of crap
488 > bundler.newpart('check:heads', data='01234567890123456789')
488 > bundler.newpart('check:heads', data='01234567890123456789')
489 >
489 >
490 > @bundle2.parthandler("test:abort")
490 > @bundle2.parthandler("test:abort")
491 > def handleabort(op, part):
491 > def handleabort(op, part):
492 > raise error.Abort('Abandon ship!', hint="don't panic")
492 > raise error.Abort('Abandon ship!', hint="don't panic")
493 >
493 >
494 > def uisetup(ui):
494 > def uisetup(ui):
495 > exchange.b2partsgenmapping['failpart'] = _pushbundle2failpart
495 > exchange.b2partsgenmapping['failpart'] = _pushbundle2failpart
496 > exchange.b2partsgenorder.insert(0, 'failpart')
496 > exchange.b2partsgenorder.insert(0, 'failpart')
497 >
497 >
498 > EOF
498 > EOF
499
499
500 $ cd main
500 $ cd main
501 $ hg up tip
501 $ hg up tip
502 3 files updated, 0 files merged, 1 files removed, 0 files unresolved
502 3 files updated, 0 files merged, 1 files removed, 0 files unresolved
503 $ echo 'I' > I
503 $ echo 'I' > I
504 $ hg add I
504 $ hg add I
505 $ hg ci -m 'I'
505 $ hg ci -m 'I'
506 pre-close-tip:e7ec4e813ba6 draft
506 pre-close-tip:e7ec4e813ba6 draft
507 postclose-tip:e7ec4e813ba6 draft
507 postclose-tip:e7ec4e813ba6 draft
508 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
508 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
509 $ hg id
509 $ hg id
510 e7ec4e813ba6 tip
510 e7ec4e813ba6 tip
511 $ cd ..
511 $ cd ..
512
512
513 $ cat << EOF >> $HGRCPATH
513 $ cat << EOF >> $HGRCPATH
514 > [extensions]
514 > [extensions]
515 > failpush=$TESTTMP/failpush.py
515 > failpush=$TESTTMP/failpush.py
516 > EOF
516 > EOF
517
517
518 $ killdaemons.py
518 $ killdaemons.py
519 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
519 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
520 $ cat other.pid >> $DAEMON_PIDS
520 $ cat other.pid >> $DAEMON_PIDS
521
521
522 Doing the actual push: Abort error
522 Doing the actual push: Abort error
523
523
524 $ cat << EOF >> $HGRCPATH
524 $ cat << EOF >> $HGRCPATH
525 > [failpush]
525 > [failpush]
526 > reason = abort
526 > reason = abort
527 > EOF
527 > EOF
528
528
529 $ hg -R main push other -r e7ec4e813ba6
529 $ hg -R main push other -r e7ec4e813ba6
530 pushing to other
530 pushing to other
531 searching for changes
531 searching for changes
532 abort: Abandon ship!
532 abort: Abandon ship!
533 (don't panic)
533 (don't panic)
534 [255]
534 [255]
535
535
536 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
536 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
537 pushing to ssh://user@dummy/other
537 pushing to ssh://user@dummy/other
538 searching for changes
538 searching for changes
539 remote: Abandon ship!
539 remote: Abandon ship!
540 remote: (don't panic)
540 remote: (don't panic)
541 abort: push failed on remote
541 abort: push failed on remote
542 [255]
542 [255]
543
543
544 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
544 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
545 pushing to http://localhost:$HGPORT2/
545 pushing to http://localhost:$HGPORT2/
546 searching for changes
546 searching for changes
547 remote: Abandon ship!
547 remote: Abandon ship!
548 remote: (don't panic)
548 remote: (don't panic)
549 abort: push failed on remote
549 abort: push failed on remote
550 [255]
550 [255]
551
551
552
552
553 Doing the actual push: unknown mandatory parts
553 Doing the actual push: unknown mandatory parts
554
554
555 $ cat << EOF >> $HGRCPATH
555 $ cat << EOF >> $HGRCPATH
556 > [failpush]
556 > [failpush]
557 > reason = unknown
557 > reason = unknown
558 > EOF
558 > EOF
559
559
560 $ hg -R main push other -r e7ec4e813ba6
560 $ hg -R main push other -r e7ec4e813ba6
561 pushing to other
561 pushing to other
562 searching for changes
562 searching for changes
563 abort: missing support for test:unknown
563 abort: missing support for test:unknown
564 [255]
564 [255]
565
565
566 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
566 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
567 pushing to ssh://user@dummy/other
567 pushing to ssh://user@dummy/other
568 searching for changes
568 searching for changes
569 abort: missing support for test:unknown
569 abort: missing support for test:unknown
570 [255]
570 [255]
571
571
572 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
572 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
573 pushing to http://localhost:$HGPORT2/
573 pushing to http://localhost:$HGPORT2/
574 searching for changes
574 searching for changes
575 abort: missing support for test:unknown
575 abort: missing support for test:unknown
576 [255]
576 [255]
577
577
578 Doing the actual push: race
578 Doing the actual push: race
579
579
580 $ cat << EOF >> $HGRCPATH
580 $ cat << EOF >> $HGRCPATH
581 > [failpush]
581 > [failpush]
582 > reason = race
582 > reason = race
583 > EOF
583 > EOF
584
584
585 $ hg -R main push other -r e7ec4e813ba6
585 $ hg -R main push other -r e7ec4e813ba6
586 pushing to other
586 pushing to other
587 searching for changes
587 searching for changes
588 abort: push failed:
588 abort: push failed:
589 'repository changed while pushing - please try again'
589 'repository changed while pushing - please try again'
590 [255]
590 [255]
591
591
592 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
592 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
593 pushing to ssh://user@dummy/other
593 pushing to ssh://user@dummy/other
594 searching for changes
594 searching for changes
595 abort: push failed:
595 abort: push failed:
596 'repository changed while pushing - please try again'
596 'repository changed while pushing - please try again'
597 [255]
597 [255]
598
598
599 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
599 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
600 pushing to http://localhost:$HGPORT2/
600 pushing to http://localhost:$HGPORT2/
601 searching for changes
601 searching for changes
602 abort: push failed:
602 abort: push failed:
603 'repository changed while pushing - please try again'
603 'repository changed while pushing - please try again'
604 [255]
604 [255]
605
605
606 Doing the actual push: hook abort
606 Doing the actual push: hook abort
607
607
608 $ cat << EOF >> $HGRCPATH
608 $ cat << EOF >> $HGRCPATH
609 > [failpush]
609 > [failpush]
610 > reason =
610 > reason =
611 > [hooks]
611 > [hooks]
612 > pretxnclose.failpush = sh -c "echo 'You shall not pass!'; false"
612 > pretxnclose.failpush = sh -c "echo 'You shall not pass!'; false"
613 > txnabort.failpush = sh -c "echo 'Cleaning up the mess...'"
613 > txnabort.failpush = sh -c "echo 'Cleaning up the mess...'"
614 > EOF
614 > EOF
615
615
616 $ killdaemons.py
616 $ killdaemons.py
617 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
617 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
618 $ cat other.pid >> $DAEMON_PIDS
618 $ cat other.pid >> $DAEMON_PIDS
619
619
620 $ hg -R main push other -r e7ec4e813ba6
620 $ hg -R main push other -r e7ec4e813ba6
621 pushing to other
621 pushing to other
622 searching for changes
622 searching for changes
623 remote: adding changesets
623 remote: adding changesets
624 remote: adding manifests
624 remote: adding manifests
625 remote: adding file changes
625 remote: adding file changes
626 remote: added 1 changesets with 1 changes to 1 files
626 remote: added 1 changesets with 1 changes to 1 files
627 remote: pre-close-tip:e7ec4e813ba6 draft
627 remote: pre-close-tip:e7ec4e813ba6 draft
628 remote: You shall not pass!
628 remote: You shall not pass!
629 remote: transaction abort!
629 remote: transaction abort!
630 remote: Cleaning up the mess...
630 remote: Cleaning up the mess...
631 remote: rollback completed
631 remote: rollback completed
632 abort: pretxnclose.failpush hook exited with status 1
632 abort: pretxnclose.failpush hook exited with status 1
633 [255]
633 [255]
634
634
635 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
635 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
636 pushing to ssh://user@dummy/other
636 pushing to ssh://user@dummy/other
637 searching for changes
637 searching for changes
638 remote: adding changesets
638 remote: adding changesets
639 remote: adding manifests
639 remote: adding manifests
640 remote: adding file changes
640 remote: adding file changes
641 remote: added 1 changesets with 1 changes to 1 files
641 remote: added 1 changesets with 1 changes to 1 files
642 remote: pre-close-tip:e7ec4e813ba6 draft
642 remote: pre-close-tip:e7ec4e813ba6 draft
643 remote: You shall not pass!
643 remote: You shall not pass!
644 remote: transaction abort!
644 remote: transaction abort!
645 remote: Cleaning up the mess...
645 remote: Cleaning up the mess...
646 remote: rollback completed
646 remote: rollback completed
647 remote: pretxnclose.failpush hook exited with status 1
647 remote: pretxnclose.failpush hook exited with status 1
648 abort: push failed on remote
648 abort: push failed on remote
649 [255]
649 [255]
650
650
651 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
651 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
652 pushing to http://localhost:$HGPORT2/
652 pushing to http://localhost:$HGPORT2/
653 searching for changes
653 searching for changes
654 remote: adding changesets
654 remote: adding changesets
655 remote: adding manifests
655 remote: adding manifests
656 remote: adding file changes
656 remote: adding file changes
657 remote: added 1 changesets with 1 changes to 1 files
657 remote: added 1 changesets with 1 changes to 1 files
658 remote: pre-close-tip:e7ec4e813ba6 draft
658 remote: pre-close-tip:e7ec4e813ba6 draft
659 remote: You shall not pass!
659 remote: You shall not pass!
660 remote: transaction abort!
660 remote: transaction abort!
661 remote: Cleaning up the mess...
661 remote: Cleaning up the mess...
662 remote: rollback completed
662 remote: rollback completed
663 remote: pretxnclose.failpush hook exited with status 1
663 remote: pretxnclose.failpush hook exited with status 1
664 abort: push failed on remote
664 abort: push failed on remote
665 [255]
665 [255]
666
666
667 (check that no 'pending' files remain)
667 (check that no 'pending' files remain)
668
668
669 $ ls -1 other/.hg/bookmarks*
669 $ ls -1 other/.hg/bookmarks*
670 other/.hg/bookmarks
670 other/.hg/bookmarks
671 $ ls -1 other/.hg/store/phaseroots*
671 $ ls -1 other/.hg/store/phaseroots*
672 other/.hg/store/phaseroots
672 other/.hg/store/phaseroots
673 $ ls -1 other/.hg/store/00changelog.i*
673 $ ls -1 other/.hg/store/00changelog.i*
674 other/.hg/store/00changelog.i
674 other/.hg/store/00changelog.i
675
675
676 Check error from hook during the unbundling process itself
676 Check error from hook during the unbundling process itself
677
677
678 $ cat << EOF >> $HGRCPATH
678 $ cat << EOF >> $HGRCPATH
679 > pretxnchangegroup = sh -c "echo 'Fail early!'; false"
679 > pretxnchangegroup = sh -c "echo 'Fail early!'; false"
680 > EOF
680 > EOF
681 $ killdaemons.py # reload http config
681 $ killdaemons.py # reload http config
682 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
682 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
683 $ cat other.pid >> $DAEMON_PIDS
683 $ cat other.pid >> $DAEMON_PIDS
684
684
685 $ hg -R main push other -r e7ec4e813ba6
685 $ hg -R main push other -r e7ec4e813ba6
686 pushing to other
686 pushing to other
687 searching for changes
687 searching for changes
688 remote: adding changesets
688 remote: adding changesets
689 remote: adding manifests
689 remote: adding manifests
690 remote: adding file changes
690 remote: adding file changes
691 remote: added 1 changesets with 1 changes to 1 files
691 remote: added 1 changesets with 1 changes to 1 files
692 remote: Fail early!
692 remote: Fail early!
693 remote: transaction abort!
693 remote: transaction abort!
694 remote: Cleaning up the mess...
694 remote: Cleaning up the mess...
695 remote: rollback completed
695 remote: rollback completed
696 abort: pretxnchangegroup hook exited with status 1
696 abort: pretxnchangegroup hook exited with status 1
697 [255]
697 [255]
698 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
698 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
699 pushing to ssh://user@dummy/other
699 pushing to ssh://user@dummy/other
700 searching for changes
700 searching for changes
701 remote: adding changesets
701 remote: adding changesets
702 remote: adding manifests
702 remote: adding manifests
703 remote: adding file changes
703 remote: adding file changes
704 remote: added 1 changesets with 1 changes to 1 files
704 remote: added 1 changesets with 1 changes to 1 files
705 remote: Fail early!
705 remote: Fail early!
706 remote: transaction abort!
706 remote: transaction abort!
707 remote: Cleaning up the mess...
707 remote: Cleaning up the mess...
708 remote: rollback completed
708 remote: rollback completed
709 remote: pretxnchangegroup hook exited with status 1
709 remote: pretxnchangegroup hook exited with status 1
710 abort: push failed on remote
710 abort: push failed on remote
711 [255]
711 [255]
712 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
712 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
713 pushing to http://localhost:$HGPORT2/
713 pushing to http://localhost:$HGPORT2/
714 searching for changes
714 searching for changes
715 remote: adding changesets
715 remote: adding changesets
716 remote: adding manifests
716 remote: adding manifests
717 remote: adding file changes
717 remote: adding file changes
718 remote: added 1 changesets with 1 changes to 1 files
718 remote: added 1 changesets with 1 changes to 1 files
719 remote: Fail early!
719 remote: Fail early!
720 remote: transaction abort!
720 remote: transaction abort!
721 remote: Cleaning up the mess...
721 remote: Cleaning up the mess...
722 remote: rollback completed
722 remote: rollback completed
723 remote: pretxnchangegroup hook exited with status 1
723 remote: pretxnchangegroup hook exited with status 1
724 abort: push failed on remote
724 abort: push failed on remote
725 [255]
725 [255]
726
726
727 Check output capture control.
727 Check output capture control.
728
728
729 (should be still forced for http, disabled for local and ssh)
729 (should be still forced for http, disabled for local and ssh)
730
730
731 $ cat >> $HGRCPATH << EOF
731 $ cat >> $HGRCPATH << EOF
732 > [experimental]
732 > [experimental]
733 > bundle2-output-capture=False
733 > bundle2-output-capture=False
734 > EOF
734 > EOF
735
735
736 $ hg -R main push other -r e7ec4e813ba6
736 $ hg -R main push other -r e7ec4e813ba6
737 pushing to other
737 pushing to other
738 searching for changes
738 searching for changes
739 adding changesets
739 adding changesets
740 adding manifests
740 adding manifests
741 adding file changes
741 adding file changes
742 added 1 changesets with 1 changes to 1 files
742 added 1 changesets with 1 changes to 1 files
743 Fail early!
743 Fail early!
744 transaction abort!
744 transaction abort!
745 Cleaning up the mess...
745 Cleaning up the mess...
746 rollback completed
746 rollback completed
747 abort: pretxnchangegroup hook exited with status 1
747 abort: pretxnchangegroup hook exited with status 1
748 [255]
748 [255]
749 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
749 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
750 pushing to ssh://user@dummy/other
750 pushing to ssh://user@dummy/other
751 searching for changes
751 searching for changes
752 remote: adding changesets
752 remote: adding changesets
753 remote: adding manifests
753 remote: adding manifests
754 remote: adding file changes
754 remote: adding file changes
755 remote: added 1 changesets with 1 changes to 1 files
755 remote: added 1 changesets with 1 changes to 1 files
756 remote: Fail early!
756 remote: Fail early!
757 remote: transaction abort!
757 remote: transaction abort!
758 remote: Cleaning up the mess...
758 remote: Cleaning up the mess...
759 remote: rollback completed
759 remote: rollback completed
760 remote: pretxnchangegroup hook exited with status 1
760 remote: pretxnchangegroup hook exited with status 1
761 abort: push failed on remote
761 abort: push failed on remote
762 [255]
762 [255]
763 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
763 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
764 pushing to http://localhost:$HGPORT2/
764 pushing to http://localhost:$HGPORT2/
765 searching for changes
765 searching for changes
766 remote: adding changesets
766 remote: adding changesets
767 remote: adding manifests
767 remote: adding manifests
768 remote: adding file changes
768 remote: adding file changes
769 remote: added 1 changesets with 1 changes to 1 files
769 remote: added 1 changesets with 1 changes to 1 files
770 remote: Fail early!
770 remote: Fail early!
771 remote: transaction abort!
771 remote: transaction abort!
772 remote: Cleaning up the mess...
772 remote: Cleaning up the mess...
773 remote: rollback completed
773 remote: rollback completed
774 remote: pretxnchangegroup hook exited with status 1
774 remote: pretxnchangegroup hook exited with status 1
775 abort: push failed on remote
775 abort: push failed on remote
776 [255]
776 [255]
777
777
778 Check abort from mandatory pushkey
778 Check abort from mandatory pushkey
779
779
780 $ cat > mandatorypart.py << EOF
780 $ cat > mandatorypart.py << EOF
781 > from mercurial import exchange
781 > from mercurial import exchange
782 > from mercurial import pushkey
782 > from mercurial import pushkey
783 > from mercurial import node
783 > from mercurial import node
784 > from mercurial import error
784 > from mercurial import error
785 > @exchange.b2partsgenerator('failingpuskey')
785 > @exchange.b2partsgenerator('failingpuskey')
786 > def addfailingpushey(pushop, bundler):
786 > def addfailingpushey(pushop, bundler):
787 > enc = pushkey.encode
787 > enc = pushkey.encode
788 > part = bundler.newpart('pushkey')
788 > part = bundler.newpart('pushkey')
789 > part.addparam('namespace', enc('phases'))
789 > part.addparam('namespace', enc('phases'))
790 > part.addparam('key', enc(pushop.repo['cd010b8cd998'].hex()))
790 > part.addparam('key', enc('cd010b8cd998f3981a5a8115f94f8da4ab506089'))
791 > part.addparam('old', enc(str(0))) # successful update
791 > part.addparam('old', enc(str(0))) # successful update
792 > part.addparam('new', enc(str(0)))
792 > part.addparam('new', enc(str(0)))
793 > def fail(pushop, exc):
793 > def fail(pushop, exc):
794 > raise error.Abort('Correct phase push failed (because hooks)')
794 > raise error.Abort('Correct phase push failed (because hooks)')
795 > pushop.pkfailcb[part.id] = fail
795 > pushop.pkfailcb[part.id] = fail
796 > EOF
796 > EOF
797 $ cat >> $HGRCPATH << EOF
797 $ cat >> $HGRCPATH << EOF
798 > [hooks]
798 > [hooks]
799 > pretxnchangegroup=
799 > pretxnchangegroup=
800 > pretxnclose.failpush=
800 > pretxnclose.failpush=
801 > prepushkey.failpush = sh -c "echo 'do not push the key !'; false"
801 > prepushkey.failpush = sh -c "echo 'do not push the key !'; false"
802 > [extensions]
802 > [extensions]
803 > mandatorypart=$TESTTMP/mandatorypart.py
803 > mandatorypart=$TESTTMP/mandatorypart.py
804 > EOF
804 > EOF
805 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config
805 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config
806 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
806 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
807 $ cat other.pid >> $DAEMON_PIDS
807 $ cat other.pid >> $DAEMON_PIDS
808
808
809 (Failure from a hook)
809 (Failure from a hook)
810
810
811 $ hg -R main push other -r e7ec4e813ba6
811 $ hg -R main push other -r e7ec4e813ba6
812 pushing to other
812 pushing to other
813 searching for changes
813 searching for changes
814 adding changesets
814 adding changesets
815 adding manifests
815 adding manifests
816 adding file changes
816 adding file changes
817 added 1 changesets with 1 changes to 1 files
817 added 1 changesets with 1 changes to 1 files
818 do not push the key !
818 do not push the key !
819 pushkey-abort: prepushkey.failpush hook exited with status 1
819 pushkey-abort: prepushkey.failpush hook exited with status 1
820 transaction abort!
820 transaction abort!
821 Cleaning up the mess...
821 Cleaning up the mess...
822 rollback completed
822 rollback completed
823 abort: Correct phase push failed (because hooks)
823 abort: Correct phase push failed (because hooks)
824 [255]
824 [255]
825 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
825 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
826 pushing to ssh://user@dummy/other
826 pushing to ssh://user@dummy/other
827 searching for changes
827 searching for changes
828 remote: adding changesets
828 remote: adding changesets
829 remote: adding manifests
829 remote: adding manifests
830 remote: adding file changes
830 remote: adding file changes
831 remote: added 1 changesets with 1 changes to 1 files
831 remote: added 1 changesets with 1 changes to 1 files
832 remote: do not push the key !
832 remote: do not push the key !
833 remote: pushkey-abort: prepushkey.failpush hook exited with status 1
833 remote: pushkey-abort: prepushkey.failpush hook exited with status 1
834 remote: transaction abort!
834 remote: transaction abort!
835 remote: Cleaning up the mess...
835 remote: Cleaning up the mess...
836 remote: rollback completed
836 remote: rollback completed
837 abort: Correct phase push failed (because hooks)
837 abort: Correct phase push failed (because hooks)
838 [255]
838 [255]
839 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
839 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
840 pushing to http://localhost:$HGPORT2/
840 pushing to http://localhost:$HGPORT2/
841 searching for changes
841 searching for changes
842 remote: adding changesets
842 remote: adding changesets
843 remote: adding manifests
843 remote: adding manifests
844 remote: adding file changes
844 remote: adding file changes
845 remote: added 1 changesets with 1 changes to 1 files
845 remote: added 1 changesets with 1 changes to 1 files
846 remote: do not push the key !
846 remote: do not push the key !
847 remote: pushkey-abort: prepushkey.failpush hook exited with status 1
847 remote: pushkey-abort: prepushkey.failpush hook exited with status 1
848 remote: transaction abort!
848 remote: transaction abort!
849 remote: Cleaning up the mess...
849 remote: Cleaning up the mess...
850 remote: rollback completed
850 remote: rollback completed
851 abort: Correct phase push failed (because hooks)
851 abort: Correct phase push failed (because hooks)
852 [255]
852 [255]
853
853
854 (Failure from a the pushkey)
854 (Failure from a the pushkey)
855
855
856 $ cat > mandatorypart.py << EOF
856 $ cat > mandatorypart.py << EOF
857 > from mercurial import exchange
857 > from mercurial import exchange
858 > from mercurial import pushkey
858 > from mercurial import pushkey
859 > from mercurial import node
859 > from mercurial import node
860 > from mercurial import error
860 > from mercurial import error
861 > @exchange.b2partsgenerator('failingpuskey')
861 > @exchange.b2partsgenerator('failingpuskey')
862 > def addfailingpushey(pushop, bundler):
862 > def addfailingpushey(pushop, bundler):
863 > enc = pushkey.encode
863 > enc = pushkey.encode
864 > part = bundler.newpart('pushkey')
864 > part = bundler.newpart('pushkey')
865 > part.addparam('namespace', enc('phases'))
865 > part.addparam('namespace', enc('phases'))
866 > part.addparam('key', enc(pushop.repo['cd010b8cd998'].hex()))
866 > part.addparam('key', enc(pushop.repo['cd010b8cd998'].hex()))
867 > part.addparam('old', enc(str(4))) # will fail
867 > part.addparam('old', enc(str(4))) # will fail
868 > part.addparam('new', enc(str(3)))
868 > part.addparam('new', enc(str(3)))
869 > def fail(pushop, exc):
869 > def fail(pushop, exc):
870 > raise error.Abort('Clown phase push failed')
870 > raise error.Abort('Clown phase push failed')
871 > pushop.pkfailcb[part.id] = fail
871 > pushop.pkfailcb[part.id] = fail
872 > EOF
872 > EOF
873 $ cat >> $HGRCPATH << EOF
873 $ cat >> $HGRCPATH << EOF
874 > [hooks]
874 > [hooks]
875 > prepushkey.failpush =
875 > prepushkey.failpush =
876 > EOF
876 > EOF
877 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config
877 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config
878 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
878 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
879 $ cat other.pid >> $DAEMON_PIDS
879 $ cat other.pid >> $DAEMON_PIDS
880
880
881 $ hg -R main push other -r e7ec4e813ba6
881 $ hg -R main push other -r e7ec4e813ba6
882 pushing to other
882 pushing to other
883 searching for changes
883 searching for changes
884 adding changesets
884 adding changesets
885 adding manifests
885 adding manifests
886 adding file changes
886 adding file changes
887 added 1 changesets with 1 changes to 1 files
887 added 1 changesets with 1 changes to 1 files
888 transaction abort!
888 transaction abort!
889 Cleaning up the mess...
889 Cleaning up the mess...
890 rollback completed
890 rollback completed
891 pushkey: lock state after "phases"
891 pushkey: lock state after "phases"
892 lock: free
892 lock: free
893 wlock: free
893 wlock: free
894 abort: Clown phase push failed
894 abort: Clown phase push failed
895 [255]
895 [255]
896 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
896 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
897 pushing to ssh://user@dummy/other
897 pushing to ssh://user@dummy/other
898 searching for changes
898 searching for changes
899 remote: adding changesets
899 remote: adding changesets
900 remote: adding manifests
900 remote: adding manifests
901 remote: adding file changes
901 remote: adding file changes
902 remote: added 1 changesets with 1 changes to 1 files
902 remote: added 1 changesets with 1 changes to 1 files
903 remote: transaction abort!
903 remote: transaction abort!
904 remote: Cleaning up the mess...
904 remote: Cleaning up the mess...
905 remote: rollback completed
905 remote: rollback completed
906 remote: pushkey: lock state after "phases"
906 remote: pushkey: lock state after "phases"
907 remote: lock: free
907 remote: lock: free
908 remote: wlock: free
908 remote: wlock: free
909 abort: Clown phase push failed
909 abort: Clown phase push failed
910 [255]
910 [255]
911 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
911 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
912 pushing to http://localhost:$HGPORT2/
912 pushing to http://localhost:$HGPORT2/
913 searching for changes
913 searching for changes
914 remote: adding changesets
914 remote: adding changesets
915 remote: adding manifests
915 remote: adding manifests
916 remote: adding file changes
916 remote: adding file changes
917 remote: added 1 changesets with 1 changes to 1 files
917 remote: added 1 changesets with 1 changes to 1 files
918 remote: transaction abort!
918 remote: transaction abort!
919 remote: Cleaning up the mess...
919 remote: Cleaning up the mess...
920 remote: rollback completed
920 remote: rollback completed
921 remote: pushkey: lock state after "phases"
921 remote: pushkey: lock state after "phases"
922 remote: lock: free
922 remote: lock: free
923 remote: wlock: free
923 remote: wlock: free
924 abort: Clown phase push failed
924 abort: Clown phase push failed
925 [255]
925 [255]
926
926
927 Test lazily acquiring the lock during unbundle
927 Test lazily acquiring the lock during unbundle
928 $ cp $TESTTMP/hgrc.orig $HGRCPATH
928 $ cp $TESTTMP/hgrc.orig $HGRCPATH
929 $ cat >> $HGRCPATH <<EOF
929 $ cat >> $HGRCPATH <<EOF
930 > [ui]
930 > [ui]
931 > ssh="$PYTHON" "$TESTDIR/dummyssh"
931 > ssh="$PYTHON" "$TESTDIR/dummyssh"
932 > EOF
932 > EOF
933
933
934 $ cat >> $TESTTMP/locktester.py <<EOF
934 $ cat >> $TESTTMP/locktester.py <<EOF
935 > import os
935 > import os
936 > from mercurial import extensions, bundle2, error
936 > from mercurial import extensions, bundle2, error
937 > def checklock(orig, repo, *args, **kwargs):
937 > def checklock(orig, repo, *args, **kwargs):
938 > if repo.svfs.lexists("lock"):
938 > if repo.svfs.lexists("lock"):
939 > raise error.Abort("Lock should not be taken")
939 > raise error.Abort("Lock should not be taken")
940 > return orig(repo, *args, **kwargs)
940 > return orig(repo, *args, **kwargs)
941 > def extsetup(ui):
941 > def extsetup(ui):
942 > extensions.wrapfunction(bundle2, 'processbundle', checklock)
942 > extensions.wrapfunction(bundle2, 'processbundle', checklock)
943 > EOF
943 > EOF
944
944
945 $ hg init lazylock
945 $ hg init lazylock
946 $ cat >> lazylock/.hg/hgrc <<EOF
946 $ cat >> lazylock/.hg/hgrc <<EOF
947 > [extensions]
947 > [extensions]
948 > locktester=$TESTTMP/locktester.py
948 > locktester=$TESTTMP/locktester.py
949 > EOF
949 > EOF
950
950
951 $ hg clone -q ssh://user@dummy/lazylock lazylockclient
951 $ hg clone -q ssh://user@dummy/lazylock lazylockclient
952 $ cd lazylockclient
952 $ cd lazylockclient
953 $ touch a && hg ci -Aqm a
953 $ touch a && hg ci -Aqm a
954 $ hg push
954 $ hg push
955 pushing to ssh://user@dummy/lazylock
955 pushing to ssh://user@dummy/lazylock
956 searching for changes
956 searching for changes
957 remote: Lock should not be taken
957 remote: Lock should not be taken
958 abort: push failed on remote
958 abort: push failed on remote
959 [255]
959 [255]
960
960
961 $ cat >> ../lazylock/.hg/hgrc <<EOF
961 $ cat >> ../lazylock/.hg/hgrc <<EOF
962 > [experimental]
962 > [experimental]
963 > bundle2lazylocking=True
963 > bundle2lazylocking=True
964 > EOF
964 > EOF
965 $ hg push
965 $ hg push
966 pushing to ssh://user@dummy/lazylock
966 pushing to ssh://user@dummy/lazylock
967 searching for changes
967 searching for changes
968 remote: adding changesets
968 remote: adding changesets
969 remote: adding manifests
969 remote: adding manifests
970 remote: adding file changes
970 remote: adding file changes
971 remote: added 1 changesets with 1 changes to 1 files
971 remote: added 1 changesets with 1 changes to 1 files
972
972
973 $ cd ..
973 $ cd ..
974
974
975 Servers can disable bundle1 for clone/pull operations
975 Servers can disable bundle1 for clone/pull operations
976
976
977 $ killdaemons.py
977 $ killdaemons.py
978 $ hg init bundle2onlyserver
978 $ hg init bundle2onlyserver
979 $ cd bundle2onlyserver
979 $ cd bundle2onlyserver
980 $ cat > .hg/hgrc << EOF
980 $ cat > .hg/hgrc << EOF
981 > [server]
981 > [server]
982 > bundle1.pull = false
982 > bundle1.pull = false
983 > EOF
983 > EOF
984
984
985 $ touch foo
985 $ touch foo
986 $ hg -q commit -A -m initial
986 $ hg -q commit -A -m initial
987
987
988 $ hg serve -p $HGPORT -d --pid-file=hg.pid
988 $ hg serve -p $HGPORT -d --pid-file=hg.pid
989 $ cat hg.pid >> $DAEMON_PIDS
989 $ cat hg.pid >> $DAEMON_PIDS
990
990
991 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
991 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
992 requesting all changes
992 requesting all changes
993 abort: remote error:
993 abort: remote error:
994 incompatible Mercurial client; bundle2 required
994 incompatible Mercurial client; bundle2 required
995 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
995 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
996 [255]
996 [255]
997 $ killdaemons.py
997 $ killdaemons.py
998 $ cd ..
998 $ cd ..
999
999
1000 bundle1 can still pull non-generaldelta repos when generaldelta bundle1 disabled
1000 bundle1 can still pull non-generaldelta repos when generaldelta bundle1 disabled
1001
1001
1002 $ hg --config format.usegeneraldelta=false init notgdserver
1002 $ hg --config format.usegeneraldelta=false init notgdserver
1003 $ cd notgdserver
1003 $ cd notgdserver
1004 $ cat > .hg/hgrc << EOF
1004 $ cat > .hg/hgrc << EOF
1005 > [server]
1005 > [server]
1006 > bundle1gd.pull = false
1006 > bundle1gd.pull = false
1007 > EOF
1007 > EOF
1008
1008
1009 $ touch foo
1009 $ touch foo
1010 $ hg -q commit -A -m initial
1010 $ hg -q commit -A -m initial
1011 $ hg serve -p $HGPORT -d --pid-file=hg.pid
1011 $ hg serve -p $HGPORT -d --pid-file=hg.pid
1012 $ cat hg.pid >> $DAEMON_PIDS
1012 $ cat hg.pid >> $DAEMON_PIDS
1013
1013
1014 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-1
1014 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-1
1015 requesting all changes
1015 requesting all changes
1016 adding changesets
1016 adding changesets
1017 adding manifests
1017 adding manifests
1018 adding file changes
1018 adding file changes
1019 added 1 changesets with 1 changes to 1 files
1019 added 1 changesets with 1 changes to 1 files
1020 new changesets 96ee1d7354c4
1020 new changesets 96ee1d7354c4
1021 updating to branch default
1021 updating to branch default
1022 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1022 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1023
1023
1024 $ killdaemons.py
1024 $ killdaemons.py
1025 $ cd ../bundle2onlyserver
1025 $ cd ../bundle2onlyserver
1026
1026
1027 bundle1 pull can be disabled for generaldelta repos only
1027 bundle1 pull can be disabled for generaldelta repos only
1028
1028
1029 $ cat > .hg/hgrc << EOF
1029 $ cat > .hg/hgrc << EOF
1030 > [server]
1030 > [server]
1031 > bundle1gd.pull = false
1031 > bundle1gd.pull = false
1032 > EOF
1032 > EOF
1033
1033
1034 $ hg serve -p $HGPORT -d --pid-file=hg.pid
1034 $ hg serve -p $HGPORT -d --pid-file=hg.pid
1035 $ cat hg.pid >> $DAEMON_PIDS
1035 $ cat hg.pid >> $DAEMON_PIDS
1036 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
1036 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
1037 requesting all changes
1037 requesting all changes
1038 abort: remote error:
1038 abort: remote error:
1039 incompatible Mercurial client; bundle2 required
1039 incompatible Mercurial client; bundle2 required
1040 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1040 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1041 [255]
1041 [255]
1042
1042
1043 $ killdaemons.py
1043 $ killdaemons.py
1044
1044
1045 Verify the global server.bundle1 option works
1045 Verify the global server.bundle1 option works
1046
1046
1047 $ cd ..
1047 $ cd ..
1048 $ cat > bundle2onlyserver/.hg/hgrc << EOF
1048 $ cat > bundle2onlyserver/.hg/hgrc << EOF
1049 > [server]
1049 > [server]
1050 > bundle1 = false
1050 > bundle1 = false
1051 > EOF
1051 > EOF
1052 $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid
1052 $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid
1053 $ cat hg.pid >> $DAEMON_PIDS
1053 $ cat hg.pid >> $DAEMON_PIDS
1054 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT not-bundle2
1054 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT not-bundle2
1055 requesting all changes
1055 requesting all changes
1056 abort: remote error:
1056 abort: remote error:
1057 incompatible Mercurial client; bundle2 required
1057 incompatible Mercurial client; bundle2 required
1058 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1058 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1059 [255]
1059 [255]
1060 $ killdaemons.py
1060 $ killdaemons.py
1061
1061
1062 $ hg --config devel.legacy.exchange=bundle1 clone ssh://user@dummy/bundle2onlyserver not-bundle2-ssh
1062 $ hg --config devel.legacy.exchange=bundle1 clone ssh://user@dummy/bundle2onlyserver not-bundle2-ssh
1063 requesting all changes
1063 requesting all changes
1064 adding changesets
1064 adding changesets
1065 remote: abort: incompatible Mercurial client; bundle2 required
1065 remote: abort: incompatible Mercurial client; bundle2 required
1066 remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1066 remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1067 transaction abort!
1067 transaction abort!
1068 rollback completed
1068 rollback completed
1069 abort: stream ended unexpectedly (got 0 bytes, expected 4)
1069 abort: stream ended unexpectedly (got 0 bytes, expected 4)
1070 [255]
1070 [255]
1071
1071
1072 $ cat > bundle2onlyserver/.hg/hgrc << EOF
1072 $ cat > bundle2onlyserver/.hg/hgrc << EOF
1073 > [server]
1073 > [server]
1074 > bundle1gd = false
1074 > bundle1gd = false
1075 > EOF
1075 > EOF
1076 $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid
1076 $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid
1077 $ cat hg.pid >> $DAEMON_PIDS
1077 $ cat hg.pid >> $DAEMON_PIDS
1078
1078
1079 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
1079 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
1080 requesting all changes
1080 requesting all changes
1081 abort: remote error:
1081 abort: remote error:
1082 incompatible Mercurial client; bundle2 required
1082 incompatible Mercurial client; bundle2 required
1083 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1083 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1084 [255]
1084 [255]
1085
1085
1086 $ killdaemons.py
1086 $ killdaemons.py
1087
1087
1088 $ cd notgdserver
1088 $ cd notgdserver
1089 $ cat > .hg/hgrc << EOF
1089 $ cat > .hg/hgrc << EOF
1090 > [server]
1090 > [server]
1091 > bundle1gd = false
1091 > bundle1gd = false
1092 > EOF
1092 > EOF
1093 $ hg serve -p $HGPORT -d --pid-file=hg.pid
1093 $ hg serve -p $HGPORT -d --pid-file=hg.pid
1094 $ cat hg.pid >> $DAEMON_PIDS
1094 $ cat hg.pid >> $DAEMON_PIDS
1095
1095
1096 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-2
1096 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-2
1097 requesting all changes
1097 requesting all changes
1098 adding changesets
1098 adding changesets
1099 adding manifests
1099 adding manifests
1100 adding file changes
1100 adding file changes
1101 added 1 changesets with 1 changes to 1 files
1101 added 1 changesets with 1 changes to 1 files
1102 new changesets 96ee1d7354c4
1102 new changesets 96ee1d7354c4
1103 updating to branch default
1103 updating to branch default
1104 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1104 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1105
1105
1106 $ killdaemons.py
1106 $ killdaemons.py
1107 $ cd ../bundle2onlyserver
1107 $ cd ../bundle2onlyserver
1108
1108
1109 Verify bundle1 pushes can be disabled
1109 Verify bundle1 pushes can be disabled
1110
1110
1111 $ cat > .hg/hgrc << EOF
1111 $ cat > .hg/hgrc << EOF
1112 > [server]
1112 > [server]
1113 > bundle1.push = false
1113 > bundle1.push = false
1114 > [web]
1114 > [web]
1115 > allow_push = *
1115 > allow_push = *
1116 > push_ssl = false
1116 > push_ssl = false
1117 > EOF
1117 > EOF
1118
1118
1119 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E error.log
1119 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E error.log
1120 $ cat hg.pid >> $DAEMON_PIDS
1120 $ cat hg.pid >> $DAEMON_PIDS
1121 $ cd ..
1121 $ cd ..
1122
1122
1123 $ hg clone http://localhost:$HGPORT bundle2-only
1123 $ hg clone http://localhost:$HGPORT bundle2-only
1124 requesting all changes
1124 requesting all changes
1125 adding changesets
1125 adding changesets
1126 adding manifests
1126 adding manifests
1127 adding file changes
1127 adding file changes
1128 added 1 changesets with 1 changes to 1 files
1128 added 1 changesets with 1 changes to 1 files
1129 new changesets 96ee1d7354c4
1129 new changesets 96ee1d7354c4
1130 updating to branch default
1130 updating to branch default
1131 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1131 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1132 $ cd bundle2-only
1132 $ cd bundle2-only
1133 $ echo commit > foo
1133 $ echo commit > foo
1134 $ hg commit -m commit
1134 $ hg commit -m commit
1135 $ hg --config devel.legacy.exchange=bundle1 push
1135 $ hg --config devel.legacy.exchange=bundle1 push
1136 pushing to http://localhost:$HGPORT/
1136 pushing to http://localhost:$HGPORT/
1137 searching for changes
1137 searching for changes
1138 abort: remote error:
1138 abort: remote error:
1139 incompatible Mercurial client; bundle2 required
1139 incompatible Mercurial client; bundle2 required
1140 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1140 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1141 [255]
1141 [255]
1142
1142
1143 (also check with ssh)
1143 (also check with ssh)
1144
1144
1145 $ hg --config devel.legacy.exchange=bundle1 push ssh://user@dummy/bundle2onlyserver
1145 $ hg --config devel.legacy.exchange=bundle1 push ssh://user@dummy/bundle2onlyserver
1146 pushing to ssh://user@dummy/bundle2onlyserver
1146 pushing to ssh://user@dummy/bundle2onlyserver
1147 searching for changes
1147 searching for changes
1148 remote: abort: incompatible Mercurial client; bundle2 required
1148 remote: abort: incompatible Mercurial client; bundle2 required
1149 remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1149 remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1150 [1]
1150 [1]
1151
1151
1152 $ hg push
1152 $ hg push
1153 pushing to http://localhost:$HGPORT/
1153 pushing to http://localhost:$HGPORT/
1154 searching for changes
1154 searching for changes
1155 remote: adding changesets
1155 remote: adding changesets
1156 remote: adding manifests
1156 remote: adding manifests
1157 remote: adding file changes
1157 remote: adding file changes
1158 remote: added 1 changesets with 1 changes to 1 files
1158 remote: added 1 changesets with 1 changes to 1 files
General Comments 0
You need to be logged in to leave comments. Login now