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