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