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