##// END OF EJS Templates
test-bundle2-exchange: create temp script in $TESTTMP, not $TESTDIR...
Martin von Zweigbergk -
r23759:cdfc4726 default
parent child Browse files
Show More
@@ -1,543 +1,543 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 $ cat > $TESTDIR/bundle2-pushkey-hook.sh << EOF
10 $ cat > $TESTTMP/bundle2-pushkey-hook.sh << EOF
11 > echo pushkey: lock state after \"\$HG_NAMESPACE\"
11 > echo pushkey: lock state after \"\$HG_NAMESPACE\"
12 > hg debuglock
12 > hg debuglock
13 > EOF
13 > EOF
14
14
15 $ cat >> $HGRCPATH << EOF
15 $ cat >> $HGRCPATH << EOF
16 > [experimental]
16 > [experimental]
17 > evolution=createmarkers,exchange
17 > evolution=createmarkers,exchange
18 > bundle2-exp=True
18 > bundle2-exp=True
19 > [ui]
19 > [ui]
20 > ssh=python "$TESTDIR/dummyssh"
20 > ssh=python "$TESTDIR/dummyssh"
21 > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline}
21 > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline}
22 > [web]
22 > [web]
23 > push_ssl = false
23 > push_ssl = false
24 > allow_push = *
24 > allow_push = *
25 > [phases]
25 > [phases]
26 > publish=False
26 > publish=False
27 > [hooks]
27 > [hooks]
28 > changegroup = sh -c "HG_LOCAL= python \"$TESTDIR/printenv.py\" changegroup"
28 > changegroup = sh -c "HG_LOCAL= python \"$TESTDIR/printenv.py\" changegroup"
29 > b2x-pretransactionclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n"
29 > b2x-pretransactionclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n"
30 > b2x-transactionclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n"
30 > b2x-transactionclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n"
31 > b2x-transactionclose.env = sh -c "HG_LOCAL= python \"$TESTDIR/printenv.py\" b2x-transactionclose"
31 > b2x-transactionclose.env = sh -c "HG_LOCAL= python \"$TESTDIR/printenv.py\" b2x-transactionclose"
32 > pushkey= sh "$TESTDIR/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
42
43 $ hg unbundle $TESTDIR/bundles/rebase.hg
43 $ hg unbundle $TESTDIR/bundles/rebase.hg
44 adding changesets
44 adding changesets
45 adding manifests
45 adding manifests
46 adding file changes
46 adding file changes
47 added 8 changesets with 7 changes to 7 files (+3 heads)
47 added 8 changesets with 7 changes to 7 files (+3 heads)
48 changegroup hook: HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_SOURCE=unbundle HG_URL=bundle:*/rebase.hg (glob)
48 changegroup hook: HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_SOURCE=unbundle HG_URL=bundle:*/rebase.hg (glob)
49 (run 'hg heads' to see heads, 'hg merge' to merge)
49 (run 'hg heads' to see heads, 'hg merge' to merge)
50
50
51 $ cd ..
51 $ cd ..
52
52
53 Real world exchange
53 Real world exchange
54 =====================
54 =====================
55
55
56 Add more obsolescence information
56 Add more obsolescence information
57
57
58 $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc`
58 $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc`
59 $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c`
59 $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c`
60
60
61 clone --pull
61 clone --pull
62
62
63 $ hg -R main phase --public cd010b8cd998
63 $ hg -R main phase --public cd010b8cd998
64 $ hg clone main other --pull --rev 9520eea781bc
64 $ hg clone main other --pull --rev 9520eea781bc
65 adding changesets
65 adding changesets
66 adding manifests
66 adding manifests
67 adding file changes
67 adding file changes
68 added 2 changesets with 2 changes to 2 files
68 added 2 changesets with 2 changes to 2 files
69 1 new obsolescence markers
69 1 new obsolescence markers
70 pre-close-tip:9520eea781bc draft
70 pre-close-tip:9520eea781bc draft
71 postclose-tip:9520eea781bc draft
71 postclose-tip:9520eea781bc draft
72 b2x-transactionclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
72 b2x-transactionclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
73 changegroup hook: HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
73 changegroup hook: HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
74 updating to branch default
74 updating to branch default
75 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
75 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
76 $ hg -R other log -G
76 $ hg -R other log -G
77 @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
77 @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
78 |
78 |
79 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
79 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
80
80
81 $ hg -R other debugobsolete
81 $ hg -R other debugobsolete
82 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
82 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
83
83
84 pull
84 pull
85
85
86 $ hg -R main phase --public 9520eea781bc
86 $ hg -R main phase --public 9520eea781bc
87 $ hg -R other pull -r 24b6387c8c8c
87 $ hg -R other pull -r 24b6387c8c8c
88 pulling from $TESTTMP/main (glob)
88 pulling from $TESTTMP/main (glob)
89 searching for changes
89 searching for changes
90 adding changesets
90 adding changesets
91 adding manifests
91 adding manifests
92 adding file changes
92 adding file changes
93 added 1 changesets with 1 changes to 1 files (+1 heads)
93 added 1 changesets with 1 changes to 1 files (+1 heads)
94 1 new obsolescence markers
94 1 new obsolescence markers
95 pre-close-tip:24b6387c8c8c draft
95 pre-close-tip:24b6387c8c8c draft
96 postclose-tip:24b6387c8c8c draft
96 postclose-tip:24b6387c8c8c draft
97 b2x-transactionclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
97 b2x-transactionclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
98 changegroup hook: HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
98 changegroup hook: HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
99 (run 'hg heads' to see heads, 'hg merge' to merge)
99 (run 'hg heads' to see heads, 'hg merge' to merge)
100 $ hg -R other log -G
100 $ hg -R other log -G
101 o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F
101 o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F
102 |
102 |
103 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
103 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
104 |/
104 |/
105 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
105 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
106
106
107 $ hg -R other debugobsolete
107 $ hg -R other debugobsolete
108 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
108 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
109 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
109 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
110
110
111 pull empty (with phase movement)
111 pull empty (with phase movement)
112
112
113 $ hg -R main phase --public 24b6387c8c8c
113 $ hg -R main phase --public 24b6387c8c8c
114 $ hg -R other pull -r 24b6387c8c8c
114 $ hg -R other pull -r 24b6387c8c8c
115 pulling from $TESTTMP/main (glob)
115 pulling from $TESTTMP/main (glob)
116 no changes found
116 no changes found
117 pre-close-tip:000000000000 public
117 pre-close-tip:000000000000 public
118 postclose-tip:24b6387c8c8c public
118 postclose-tip:24b6387c8c8c public
119 b2x-transactionclose hook: HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
119 b2x-transactionclose hook: HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
120 $ hg -R other log -G
120 $ hg -R other log -G
121 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
121 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
122 |
122 |
123 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
123 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
124 |/
124 |/
125 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
125 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
126
126
127 $ hg -R other debugobsolete
127 $ hg -R other debugobsolete
128 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
128 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
129 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
129 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
130
130
131 pull empty
131 pull empty
132
132
133 $ hg -R other pull -r 24b6387c8c8c
133 $ hg -R other pull -r 24b6387c8c8c
134 pulling from $TESTTMP/main (glob)
134 pulling from $TESTTMP/main (glob)
135 no changes found
135 no changes found
136 pre-close-tip:24b6387c8c8c public
136 pre-close-tip:24b6387c8c8c public
137 postclose-tip:24b6387c8c8c public
137 postclose-tip:24b6387c8c8c public
138 b2x-transactionclose hook: HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
138 b2x-transactionclose hook: HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
139 $ hg -R other log -G
139 $ hg -R other log -G
140 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
140 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
141 |
141 |
142 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
142 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
143 |/
143 |/
144 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
144 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
145
145
146 $ hg -R other debugobsolete
146 $ hg -R other debugobsolete
147 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
147 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
148 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
148 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
149
149
150 add extra data to test their exchange during push
150 add extra data to test their exchange during push
151
151
152 $ hg -R main bookmark --rev eea13746799a book_eea1
152 $ hg -R main bookmark --rev eea13746799a book_eea1
153 $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a`
153 $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a`
154 $ hg -R main bookmark --rev 02de42196ebe book_02de
154 $ hg -R main bookmark --rev 02de42196ebe book_02de
155 $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe`
155 $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe`
156 $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc
156 $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc
157 $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16`
157 $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16`
158 $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd
158 $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd
159 $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8`
159 $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8`
160 $ hg -R main bookmark --rev 32af7686d403 book_32af
160 $ hg -R main bookmark --rev 32af7686d403 book_32af
161 $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403`
161 $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403`
162
162
163 $ hg -R other bookmark --rev cd010b8cd998 book_eea1
163 $ hg -R other bookmark --rev cd010b8cd998 book_eea1
164 $ hg -R other bookmark --rev cd010b8cd998 book_02de
164 $ hg -R other bookmark --rev cd010b8cd998 book_02de
165 $ hg -R other bookmark --rev cd010b8cd998 book_42cc
165 $ hg -R other bookmark --rev cd010b8cd998 book_42cc
166 $ hg -R other bookmark --rev cd010b8cd998 book_5fdd
166 $ hg -R other bookmark --rev cd010b8cd998 book_5fdd
167 $ hg -R other bookmark --rev cd010b8cd998 book_32af
167 $ hg -R other bookmark --rev cd010b8cd998 book_32af
168
168
169 $ hg -R main phase --public eea13746799a
169 $ hg -R main phase --public eea13746799a
170
170
171 push
171 push
172 $ hg -R main push other --rev eea13746799a --bookmark book_eea1
172 $ hg -R main push other --rev eea13746799a --bookmark book_eea1
173 pushing to other
173 pushing to other
174 searching for changes
174 searching for changes
175 pre-close-tip:eea13746799a public book_eea1
175 pre-close-tip:eea13746799a public book_eea1
176 pushkey: lock state after "phases"
176 pushkey: lock state after "phases"
177 lock: free
177 lock: free
178 wlock: free
178 wlock: free
179 pushkey: lock state after "bookmarks"
179 pushkey: lock state after "bookmarks"
180 lock: free
180 lock: free
181 wlock: free
181 wlock: free
182 postclose-tip:eea13746799a public book_eea1
182 postclose-tip:eea13746799a public book_eea1
183 b2x-transactionclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2-EXP=1 HG_NEW_OBSMARKERS=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_PHASES_MOVED=1 HG_SOURCE=push HG_URL=push
183 b2x-transactionclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2-EXP=1 HG_NEW_OBSMARKERS=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_PHASES_MOVED=1 HG_SOURCE=push HG_URL=push
184 changegroup hook: HG_BUNDLE2-EXP=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_SOURCE=push HG_URL=push
184 changegroup hook: HG_BUNDLE2-EXP=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_SOURCE=push HG_URL=push
185 remote: adding changesets
185 remote: adding changesets
186 remote: adding manifests
186 remote: adding manifests
187 remote: adding file changes
187 remote: adding file changes
188 remote: added 1 changesets with 0 changes to 0 files (-1 heads)
188 remote: added 1 changesets with 0 changes to 0 files (-1 heads)
189 remote: 1 new obsolescence markers
189 remote: 1 new obsolescence markers
190 updating bookmark book_eea1
190 updating bookmark book_eea1
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 b2x-transactionclose hook: HG_SOURCE=push-response HG_URL=file:$TESTTMP/other
193 b2x-transactionclose hook: HG_SOURCE=push-response HG_URL=file:$TESTTMP/other
194 $ hg -R other log -G
194 $ hg -R other log -G
195 o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
195 o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
196 |\
196 |\
197 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
197 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
198 | |
198 | |
199 @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
199 @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
200 |/
200 |/
201 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A
201 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A
202
202
203 $ hg -R other debugobsolete
203 $ hg -R other debugobsolete
204 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
204 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
205 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
205 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
206 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
206 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
207
207
208 pull over ssh
208 pull over ssh
209
209
210 $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de
210 $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de
211 pulling from ssh://user@dummy/main
211 pulling from ssh://user@dummy/main
212 searching for changes
212 searching for changes
213 adding changesets
213 adding changesets
214 adding manifests
214 adding manifests
215 adding file changes
215 adding file changes
216 added 1 changesets with 1 changes to 1 files (+1 heads)
216 added 1 changesets with 1 changes to 1 files (+1 heads)
217 1 new obsolescence markers
217 1 new obsolescence markers
218 updating bookmark book_02de
218 updating bookmark book_02de
219 pre-close-tip:02de42196ebe draft book_02de
219 pre-close-tip:02de42196ebe draft book_02de
220 postclose-tip:02de42196ebe draft book_02de
220 postclose-tip:02de42196ebe draft book_02de
221 b2x-transactionclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=ssh://user@dummy/main
221 b2x-transactionclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=ssh://user@dummy/main
222 changegroup hook: HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_SOURCE=pull HG_URL=ssh://user@dummy/main
222 changegroup hook: HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_SOURCE=pull HG_URL=ssh://user@dummy/main
223 (run 'hg heads' to see heads, 'hg merge' to merge)
223 (run 'hg heads' to see heads, 'hg merge' to merge)
224 $ hg -R other debugobsolete
224 $ hg -R other debugobsolete
225 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
225 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
226 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
226 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
227 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
227 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
228 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
228 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
229
229
230 pull over http
230 pull over http
231
231
232 $ hg -R main serve -p $HGPORT -d --pid-file=main.pid -E main-error.log
232 $ hg -R main serve -p $HGPORT -d --pid-file=main.pid -E main-error.log
233 $ cat main.pid >> $DAEMON_PIDS
233 $ cat main.pid >> $DAEMON_PIDS
234
234
235 $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc
235 $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc
236 pulling from http://localhost:$HGPORT/
236 pulling from http://localhost:$HGPORT/
237 searching for changes
237 searching for changes
238 adding changesets
238 adding changesets
239 adding manifests
239 adding manifests
240 adding file changes
240 adding file changes
241 added 1 changesets with 1 changes to 1 files (+1 heads)
241 added 1 changesets with 1 changes to 1 files (+1 heads)
242 1 new obsolescence markers
242 1 new obsolescence markers
243 updating bookmark book_42cc
243 updating bookmark book_42cc
244 pre-close-tip:42ccdea3bb16 draft book_42cc
244 pre-close-tip:42ccdea3bb16 draft book_42cc
245 postclose-tip:42ccdea3bb16 draft book_42cc
245 postclose-tip:42ccdea3bb16 draft book_42cc
246 b2x-transactionclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/
246 b2x-transactionclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/
247 changegroup hook: HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/
247 changegroup hook: HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/
248 (run 'hg heads .' to see heads, 'hg merge' to merge)
248 (run 'hg heads .' to see heads, 'hg merge' to merge)
249 $ cat main-error.log
249 $ cat main-error.log
250 $ hg -R other debugobsolete
250 $ hg -R other debugobsolete
251 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
251 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
252 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
252 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
253 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
253 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
254 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
254 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
255 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
255 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
256
256
257 push over ssh
257 push over ssh
258
258
259 $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd
259 $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd
260 pushing to ssh://user@dummy/other
260 pushing to ssh://user@dummy/other
261 searching for changes
261 searching for changes
262 remote: adding changesets
262 remote: adding changesets
263 remote: adding manifests
263 remote: adding manifests
264 remote: adding file changes
264 remote: adding file changes
265 remote: added 1 changesets with 1 changes to 1 files
265 remote: added 1 changesets with 1 changes to 1 files
266 remote: 1 new obsolescence markers
266 remote: 1 new obsolescence markers
267 updating bookmark book_5fdd
267 updating bookmark book_5fdd
268 remote: pre-close-tip:5fddd98957c8 draft book_5fdd
268 remote: pre-close-tip:5fddd98957c8 draft book_5fdd
269 remote: pushkey: lock state after "bookmarks"
269 remote: pushkey: lock state after "bookmarks"
270 remote: lock: free
270 remote: lock: free
271 remote: wlock: free
271 remote: wlock: free
272 remote: postclose-tip:5fddd98957c8 draft book_5fdd
272 remote: postclose-tip:5fddd98957c8 draft book_5fdd
273 remote: b2x-transactionclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2-EXP=1 HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1
273 remote: b2x-transactionclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2-EXP=1 HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1
274 remote: changegroup hook: HG_BUNDLE2-EXP=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1
274 remote: changegroup hook: HG_BUNDLE2-EXP=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1
275 pre-close-tip:02de42196ebe draft book_02de
275 pre-close-tip:02de42196ebe draft book_02de
276 postclose-tip:02de42196ebe draft book_02de
276 postclose-tip:02de42196ebe draft book_02de
277 b2x-transactionclose hook: HG_SOURCE=push-response HG_URL=ssh://user@dummy/other
277 b2x-transactionclose hook: HG_SOURCE=push-response HG_URL=ssh://user@dummy/other
278 $ hg -R other log -G
278 $ hg -R other log -G
279 o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
279 o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
280 |
280 |
281 o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
281 o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
282 |
282 |
283 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H
283 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H
284 | |
284 | |
285 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
285 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
286 | |/|
286 | |/|
287 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
287 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
288 |/ /
288 |/ /
289 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
289 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
290 |/
290 |/
291 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A
291 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A
292
292
293 $ hg -R other debugobsolete
293 $ hg -R other debugobsolete
294 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
294 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
295 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
295 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
296 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
296 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
297 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
297 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
298 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
298 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
299 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
299 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
300
300
301 push over http
301 push over http
302
302
303 $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
303 $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
304 $ cat other.pid >> $DAEMON_PIDS
304 $ cat other.pid >> $DAEMON_PIDS
305
305
306 $ hg -R main phase --public 32af7686d403
306 $ hg -R main phase --public 32af7686d403
307 $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af
307 $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af
308 pushing to http://localhost:$HGPORT2/
308 pushing to http://localhost:$HGPORT2/
309 searching for changes
309 searching for changes
310 remote: adding changesets
310 remote: adding changesets
311 remote: adding manifests
311 remote: adding manifests
312 remote: adding file changes
312 remote: adding file changes
313 remote: added 1 changesets with 1 changes to 1 files
313 remote: added 1 changesets with 1 changes to 1 files
314 remote: 1 new obsolescence markers
314 remote: 1 new obsolescence markers
315 updating bookmark book_32af
315 updating bookmark book_32af
316 pre-close-tip:02de42196ebe draft book_02de
316 pre-close-tip:02de42196ebe draft book_02de
317 postclose-tip:02de42196ebe draft book_02de
317 postclose-tip:02de42196ebe draft book_02de
318 b2x-transactionclose hook: HG_SOURCE=push-response HG_URL=http://localhost:$HGPORT2/
318 b2x-transactionclose hook: HG_SOURCE=push-response HG_URL=http://localhost:$HGPORT2/
319 $ cat other-error.log
319 $ cat other-error.log
320
320
321 Check final content.
321 Check final content.
322
322
323 $ hg -R other log -G
323 $ hg -R other log -G
324 o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D
324 o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D
325 |
325 |
326 o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
326 o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
327 |
327 |
328 o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
328 o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
329 |
329 |
330 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H
330 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H
331 | |
331 | |
332 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
332 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
333 | |/|
333 | |/|
334 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
334 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
335 |/ /
335 |/ /
336 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
336 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
337 |/
337 |/
338 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
338 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
339
339
340 $ hg -R other debugobsolete
340 $ hg -R other debugobsolete
341 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
341 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
342 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
342 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
343 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
343 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
344 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
344 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
345 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
345 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
346 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
346 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
347 7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
347 7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
348
348
349 (check that no 'pending' files remain)
349 (check that no 'pending' files remain)
350
350
351 $ ls -1 other/.hg/bookmarks*
351 $ ls -1 other/.hg/bookmarks*
352 other/.hg/bookmarks
352 other/.hg/bookmarks
353 $ ls -1 other/.hg/store/phaseroots*
353 $ ls -1 other/.hg/store/phaseroots*
354 other/.hg/store/phaseroots
354 other/.hg/store/phaseroots
355 $ ls -1 other/.hg/store/00changelog.i*
355 $ ls -1 other/.hg/store/00changelog.i*
356 other/.hg/store/00changelog.i
356 other/.hg/store/00changelog.i
357
357
358 Error Handling
358 Error Handling
359 ==============
359 ==============
360
360
361 Check that errors are properly returned to the client during push.
361 Check that errors are properly returned to the client during push.
362
362
363 Setting up
363 Setting up
364
364
365 $ cat > failpush.py << EOF
365 $ cat > failpush.py << EOF
366 > """A small extension that makes push fails when using bundle2
366 > """A small extension that makes push fails when using bundle2
367 >
367 >
368 > used to test error handling in bundle2
368 > used to test error handling in bundle2
369 > """
369 > """
370 >
370 >
371 > from mercurial import util
371 > from mercurial import util
372 > from mercurial import bundle2
372 > from mercurial import bundle2
373 > from mercurial import exchange
373 > from mercurial import exchange
374 > from mercurial import extensions
374 > from mercurial import extensions
375 >
375 >
376 > def _pushbundle2failpart(pushop, bundler):
376 > def _pushbundle2failpart(pushop, bundler):
377 > reason = pushop.ui.config('failpush', 'reason', None)
377 > reason = pushop.ui.config('failpush', 'reason', None)
378 > part = None
378 > part = None
379 > if reason == 'abort':
379 > if reason == 'abort':
380 > bundler.newpart('test:abort')
380 > bundler.newpart('test:abort')
381 > if reason == 'unknown':
381 > if reason == 'unknown':
382 > bundler.newpart('test:unknown')
382 > bundler.newpart('test:unknown')
383 > if reason == 'race':
383 > if reason == 'race':
384 > # 20 Bytes of crap
384 > # 20 Bytes of crap
385 > bundler.newpart('b2x:check:heads', data='01234567890123456789')
385 > bundler.newpart('b2x:check:heads', data='01234567890123456789')
386 >
386 >
387 > @bundle2.parthandler("test:abort")
387 > @bundle2.parthandler("test:abort")
388 > def handleabort(op, part):
388 > def handleabort(op, part):
389 > raise util.Abort('Abandon ship!', hint="don't panic")
389 > raise util.Abort('Abandon ship!', hint="don't panic")
390 >
390 >
391 > def uisetup(ui):
391 > def uisetup(ui):
392 > exchange.b2partsgenmapping['failpart'] = _pushbundle2failpart
392 > exchange.b2partsgenmapping['failpart'] = _pushbundle2failpart
393 > exchange.b2partsgenorder.insert(0, 'failpart')
393 > exchange.b2partsgenorder.insert(0, 'failpart')
394 >
394 >
395 > EOF
395 > EOF
396
396
397 $ cd main
397 $ cd main
398 $ hg up tip
398 $ hg up tip
399 3 files updated, 0 files merged, 1 files removed, 0 files unresolved
399 3 files updated, 0 files merged, 1 files removed, 0 files unresolved
400 $ echo 'I' > I
400 $ echo 'I' > I
401 $ hg add I
401 $ hg add I
402 $ hg ci -m 'I'
402 $ hg ci -m 'I'
403 $ hg id
403 $ hg id
404 e7ec4e813ba6 tip
404 e7ec4e813ba6 tip
405 $ cd ..
405 $ cd ..
406
406
407 $ cat << EOF >> $HGRCPATH
407 $ cat << EOF >> $HGRCPATH
408 > [extensions]
408 > [extensions]
409 > failpush=$TESTTMP/failpush.py
409 > failpush=$TESTTMP/failpush.py
410 > EOF
410 > EOF
411
411
412 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
412 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
413 $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
413 $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
414 $ cat other.pid >> $DAEMON_PIDS
414 $ cat other.pid >> $DAEMON_PIDS
415
415
416 Doing the actual push: Abort error
416 Doing the actual push: Abort error
417
417
418 $ cat << EOF >> $HGRCPATH
418 $ cat << EOF >> $HGRCPATH
419 > [failpush]
419 > [failpush]
420 > reason = abort
420 > reason = abort
421 > EOF
421 > EOF
422
422
423 $ hg -R main push other -r e7ec4e813ba6
423 $ hg -R main push other -r e7ec4e813ba6
424 pushing to other
424 pushing to other
425 searching for changes
425 searching for changes
426 abort: Abandon ship!
426 abort: Abandon ship!
427 (don't panic)
427 (don't panic)
428 [255]
428 [255]
429
429
430 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
430 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
431 pushing to ssh://user@dummy/other
431 pushing to ssh://user@dummy/other
432 searching for changes
432 searching for changes
433 abort: Abandon ship!
433 abort: Abandon ship!
434 (don't panic)
434 (don't panic)
435 [255]
435 [255]
436
436
437 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
437 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
438 pushing to http://localhost:$HGPORT2/
438 pushing to http://localhost:$HGPORT2/
439 searching for changes
439 searching for changes
440 abort: Abandon ship!
440 abort: Abandon ship!
441 (don't panic)
441 (don't panic)
442 [255]
442 [255]
443
443
444
444
445 Doing the actual push: unknown mandatory parts
445 Doing the actual push: unknown mandatory parts
446
446
447 $ cat << EOF >> $HGRCPATH
447 $ cat << EOF >> $HGRCPATH
448 > [failpush]
448 > [failpush]
449 > reason = unknown
449 > reason = unknown
450 > EOF
450 > EOF
451
451
452 $ hg -R main push other -r e7ec4e813ba6
452 $ hg -R main push other -r e7ec4e813ba6
453 pushing to other
453 pushing to other
454 searching for changes
454 searching for changes
455 abort: missing support for test:unknown
455 abort: missing support for test:unknown
456 [255]
456 [255]
457
457
458 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
458 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
459 pushing to ssh://user@dummy/other
459 pushing to ssh://user@dummy/other
460 searching for changes
460 searching for changes
461 abort: missing support for test:unknown
461 abort: missing support for test:unknown
462 [255]
462 [255]
463
463
464 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
464 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
465 pushing to http://localhost:$HGPORT2/
465 pushing to http://localhost:$HGPORT2/
466 searching for changes
466 searching for changes
467 abort: missing support for test:unknown
467 abort: missing support for test:unknown
468 [255]
468 [255]
469
469
470 Doing the actual push: race
470 Doing the actual push: race
471
471
472 $ cat << EOF >> $HGRCPATH
472 $ cat << EOF >> $HGRCPATH
473 > [failpush]
473 > [failpush]
474 > reason = race
474 > reason = race
475 > EOF
475 > EOF
476
476
477 $ hg -R main push other -r e7ec4e813ba6
477 $ hg -R main push other -r e7ec4e813ba6
478 pushing to other
478 pushing to other
479 searching for changes
479 searching for changes
480 abort: push failed:
480 abort: push failed:
481 'repository changed while pushing - please try again'
481 'repository changed while pushing - please try again'
482 [255]
482 [255]
483
483
484 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
484 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
485 pushing to ssh://user@dummy/other
485 pushing to ssh://user@dummy/other
486 searching for changes
486 searching for changes
487 abort: push failed:
487 abort: push failed:
488 'repository changed while pushing - please try again'
488 'repository changed while pushing - please try again'
489 [255]
489 [255]
490
490
491 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
491 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
492 pushing to http://localhost:$HGPORT2/
492 pushing to http://localhost:$HGPORT2/
493 searching for changes
493 searching for changes
494 abort: push failed:
494 abort: push failed:
495 'repository changed while pushing - please try again'
495 'repository changed while pushing - please try again'
496 [255]
496 [255]
497
497
498 Doing the actual push: hook abort
498 Doing the actual push: hook abort
499
499
500 $ cat << EOF >> $HGRCPATH
500 $ cat << EOF >> $HGRCPATH
501 > [failpush]
501 > [failpush]
502 > reason =
502 > reason =
503 > [hooks]
503 > [hooks]
504 > b2x-pretransactionclose.failpush = false
504 > b2x-pretransactionclose.failpush = false
505 > EOF
505 > EOF
506
506
507 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
507 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
508 $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
508 $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
509 $ cat other.pid >> $DAEMON_PIDS
509 $ cat other.pid >> $DAEMON_PIDS
510
510
511 $ hg -R main push other -r e7ec4e813ba6
511 $ hg -R main push other -r e7ec4e813ba6
512 pushing to other
512 pushing to other
513 searching for changes
513 searching for changes
514 pre-close-tip:e7ec4e813ba6 draft
514 pre-close-tip:e7ec4e813ba6 draft
515 transaction abort!
515 transaction abort!
516 rollback completed
516 rollback completed
517 abort: b2x-pretransactionclose.failpush hook exited with status 1
517 abort: b2x-pretransactionclose.failpush hook exited with status 1
518 [255]
518 [255]
519
519
520 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
520 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
521 pushing to ssh://user@dummy/other
521 pushing to ssh://user@dummy/other
522 searching for changes
522 searching for changes
523 abort: b2x-pretransactionclose.failpush hook exited with status 1
523 abort: b2x-pretransactionclose.failpush hook exited with status 1
524 remote: pre-close-tip:e7ec4e813ba6 draft
524 remote: pre-close-tip:e7ec4e813ba6 draft
525 remote: transaction abort!
525 remote: transaction abort!
526 remote: rollback completed
526 remote: rollback completed
527 [255]
527 [255]
528
528
529 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
529 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
530 pushing to http://localhost:$HGPORT2/
530 pushing to http://localhost:$HGPORT2/
531 searching for changes
531 searching for changes
532 abort: b2x-pretransactionclose.failpush hook exited with status 1
532 abort: b2x-pretransactionclose.failpush hook exited with status 1
533 [255]
533 [255]
534
534
535 (check that no 'pending' files remain)
535 (check that no 'pending' files remain)
536
536
537 $ ls -1 other/.hg/bookmarks*
537 $ ls -1 other/.hg/bookmarks*
538 other/.hg/bookmarks
538 other/.hg/bookmarks
539 $ ls -1 other/.hg/store/phaseroots*
539 $ ls -1 other/.hg/store/phaseroots*
540 other/.hg/store/phaseroots
540 other/.hg/store/phaseroots
541 $ ls -1 other/.hg/store/00changelog.i*
541 $ ls -1 other/.hg/store/00changelog.i*
542 other/.hg/store/00changelog.i
542 other/.hg/store/00changelog.i
543
543
General Comments 0
You need to be logged in to leave comments. Login now