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