Show More
@@ -1,1506 +1,1507 | |||
|
1 | 1 | $ cat >> $HGRCPATH << EOF |
|
2 | 2 | > [phases] |
|
3 | 3 | > # public changeset are not obsolete |
|
4 | 4 | > publish=false |
|
5 | 5 | > [ui] |
|
6 | 6 | > logtemplate="{rev}:{node|short} ({phase}{if(obsolete, ' *{obsolete}*')}{if(instabilities, ' {instabilities}')}) [{tags} {bookmarks}] {desc|firstline}\n" |
|
7 | 7 | > EOF |
|
8 | 8 | $ mkcommit() { |
|
9 | 9 | > echo "$1" > "$1" |
|
10 | 10 | > hg add "$1" |
|
11 | 11 | > hg ci -m "add $1" |
|
12 | 12 | > } |
|
13 | 13 | $ getid() { |
|
14 | 14 | > hg log -T "{node}\n" --hidden -r "desc('$1')" |
|
15 | 15 | > } |
|
16 | 16 | |
|
17 | 17 | $ cat > debugkeys.py <<EOF |
|
18 | 18 | > def reposetup(ui, repo): |
|
19 | 19 | > class debugkeysrepo(repo.__class__): |
|
20 | 20 | > def listkeys(self, namespace): |
|
21 | 21 | > ui.write('listkeys %s\n' % (namespace,)) |
|
22 | 22 | > return super(debugkeysrepo, self).listkeys(namespace) |
|
23 | 23 | > |
|
24 | 24 | > if repo.local(): |
|
25 | 25 | > repo.__class__ = debugkeysrepo |
|
26 | 26 | > EOF |
|
27 | 27 | |
|
28 | 28 | $ hg init tmpa |
|
29 | 29 | $ cd tmpa |
|
30 | 30 | $ mkcommit kill_me |
|
31 | 31 | |
|
32 | 32 | Checking that the feature is properly disabled |
|
33 | 33 | |
|
34 | 34 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar |
|
35 | 35 | abort: creating obsolete markers is not enabled on this repo |
|
36 | 36 | [255] |
|
37 | 37 | |
|
38 | 38 | Enabling it |
|
39 | 39 | |
|
40 | 40 | $ cat >> $HGRCPATH << EOF |
|
41 | 41 | > [experimental] |
|
42 | 42 | > stabilization=createmarkers,exchange |
|
43 | 43 | > EOF |
|
44 | 44 | |
|
45 | 45 | Killing a single changeset without replacement |
|
46 | 46 | |
|
47 | 47 | $ hg debugobsolete 0 |
|
48 | 48 | abort: changeset references must be full hexadecimal node identifiers |
|
49 | 49 | [255] |
|
50 | 50 | $ hg debugobsolete '00' |
|
51 | 51 | abort: changeset references must be full hexadecimal node identifiers |
|
52 | 52 | [255] |
|
53 | 53 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar |
|
54 | 54 | obsoleted 1 changesets |
|
55 | 55 | $ hg debugobsolete |
|
56 | 56 | 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'} |
|
57 | 57 | |
|
58 | 58 | (test that mercurial is not confused) |
|
59 | 59 | |
|
60 | 60 | $ hg up null --quiet # having 0 as parent prevents it to be hidden |
|
61 | 61 | $ hg tip |
|
62 | 62 | -1:000000000000 (public) [tip ] |
|
63 | 63 | $ hg up --hidden tip --quiet |
|
64 | 64 | |
|
65 | 65 | Killing a single changeset with itself should fail |
|
66 | 66 | (simple local safeguard) |
|
67 | 67 | |
|
68 | 68 | $ hg debugobsolete `getid kill_me` `getid kill_me` |
|
69 | 69 | abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0 |
|
70 | 70 | [255] |
|
71 | 71 | |
|
72 | 72 | $ cd .. |
|
73 | 73 | |
|
74 | 74 | Killing a single changeset with replacement |
|
75 | 75 | (and testing the format option) |
|
76 | 76 | |
|
77 | 77 | $ hg init tmpb |
|
78 | 78 | $ cd tmpb |
|
79 | 79 | $ mkcommit a |
|
80 | 80 | $ mkcommit b |
|
81 | 81 | $ mkcommit original_c |
|
82 | 82 | $ hg up "desc('b')" |
|
83 | 83 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
84 | 84 | $ mkcommit new_c |
|
85 | 85 | created new head |
|
86 | 86 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
|
87 | 87 | $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120' |
|
88 | 88 | obsoleted 1 changesets |
|
89 | 89 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
|
90 | 90 | 2:245bde4270cd add original_c |
|
91 | 91 | $ hg debugrevlog -cd |
|
92 | 92 | # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen |
|
93 | 93 | 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0 |
|
94 | 94 | 1 0 -1 59 118 59 59 0 0 58 116 0 1 0 |
|
95 | 95 | 2 1 -1 118 193 118 118 59 0 76 192 0 1 0 |
|
96 | 96 | 3 1 -1 193 260 193 193 59 0 66 258 0 2 0 |
|
97 | 97 | $ hg debugobsolete |
|
98 | 98 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
99 | 99 | |
|
100 | 100 | (check for version number of the obsstore) |
|
101 | 101 | |
|
102 | 102 | $ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null |
|
103 | 103 | \x00 (no-eol) (esc) |
|
104 | 104 | |
|
105 | 105 | do it again (it read the obsstore before adding new changeset) |
|
106 | 106 | |
|
107 | 107 | $ hg up '.^' |
|
108 | 108 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
109 | 109 | $ mkcommit new_2_c |
|
110 | 110 | created new head |
|
111 | 111 | $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c` |
|
112 | 112 | obsoleted 1 changesets |
|
113 | 113 | $ hg debugobsolete |
|
114 | 114 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
115 | 115 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
116 | 116 | |
|
117 | 117 | Register two markers with a missing node |
|
118 | 118 | |
|
119 | 119 | $ hg up '.^' |
|
120 | 120 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
121 | 121 | $ mkcommit new_3_c |
|
122 | 122 | created new head |
|
123 | 123 | $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337 |
|
124 | 124 | obsoleted 1 changesets |
|
125 | 125 | $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c` |
|
126 | 126 | $ hg debugobsolete |
|
127 | 127 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
128 | 128 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
129 | 129 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
130 | 130 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
131 | 131 | |
|
132 | 132 | Test the --index option of debugobsolete command |
|
133 | 133 | $ hg debugobsolete --index |
|
134 | 134 | 0 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
135 | 135 | 1 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
136 | 136 | 2 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
137 | 137 | 3 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
138 | 138 | |
|
139 | 139 | Refuse pathological nullid successors |
|
140 | 140 | $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000 |
|
141 | 141 | transaction abort! |
|
142 | 142 | rollback completed |
|
143 | 143 | abort: bad obsolescence marker detected: invalid successors nullid |
|
144 | 144 | [255] |
|
145 | 145 | |
|
146 | 146 | Check that graphlog detect that a changeset is obsolete: |
|
147 | 147 | |
|
148 | 148 | $ hg log -G |
|
149 | 149 | @ 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
150 | 150 | | |
|
151 | 151 | o 1:7c3bad9141dc (draft) [ ] add b |
|
152 | 152 | | |
|
153 | 153 | o 0:1f0dee641bb7 (draft) [ ] add a |
|
154 | 154 | |
|
155 | 155 | |
|
156 | 156 | check that heads does not report them |
|
157 | 157 | |
|
158 | 158 | $ hg heads |
|
159 | 159 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
160 | 160 | $ hg heads --hidden |
|
161 | 161 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
162 | 162 | 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c |
|
163 | 163 | 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c |
|
164 | 164 | 2:245bde4270cd (draft *obsolete*) [ ] add original_c |
|
165 | 165 | |
|
166 | 166 | |
|
167 | 167 | check that summary does not report them |
|
168 | 168 | |
|
169 | 169 | $ hg init ../sink |
|
170 | 170 | $ echo '[paths]' >> .hg/hgrc |
|
171 | 171 | $ echo 'default=../sink' >> .hg/hgrc |
|
172 | 172 | $ hg summary --remote |
|
173 | 173 | parent: 5:5601fb93a350 tip |
|
174 | 174 | add new_3_c |
|
175 | 175 | branch: default |
|
176 | 176 | commit: (clean) |
|
177 | 177 | update: (current) |
|
178 | 178 | phases: 3 draft |
|
179 | 179 | remote: 3 outgoing |
|
180 | 180 | |
|
181 | 181 | $ hg summary --remote --hidden |
|
182 | 182 | parent: 5:5601fb93a350 tip |
|
183 | 183 | add new_3_c |
|
184 | 184 | branch: default |
|
185 | 185 | commit: (clean) |
|
186 | 186 | update: 3 new changesets, 4 branch heads (merge) |
|
187 | 187 | phases: 6 draft |
|
188 | 188 | remote: 3 outgoing |
|
189 | 189 | |
|
190 | 190 | check that various commands work well with filtering |
|
191 | 191 | |
|
192 | 192 | $ hg tip |
|
193 | 193 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
194 | 194 | $ hg log -r 6 |
|
195 | 195 | abort: unknown revision '6'! |
|
196 | 196 | [255] |
|
197 | 197 | $ hg log -r 4 |
|
198 | 198 | abort: hidden revision '4'! |
|
199 | 199 | (use --hidden to access hidden revisions) |
|
200 | 200 | [255] |
|
201 | 201 | $ hg debugrevspec 'rev(6)' |
|
202 | 202 | $ hg debugrevspec 'rev(4)' |
|
203 | 203 | $ hg debugrevspec 'null' |
|
204 | 204 | -1 |
|
205 | 205 | |
|
206 | 206 | Check that public changeset are not accounted as obsolete: |
|
207 | 207 | |
|
208 | 208 | $ hg --hidden phase --public 2 |
|
209 | 209 | $ hg log -G |
|
210 | 210 | @ 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c |
|
211 | 211 | | |
|
212 | 212 | | o 2:245bde4270cd (public) [ ] add original_c |
|
213 | 213 | |/ |
|
214 | 214 | o 1:7c3bad9141dc (public) [ ] add b |
|
215 | 215 | | |
|
216 | 216 | o 0:1f0dee641bb7 (public) [ ] add a |
|
217 | 217 | |
|
218 | 218 | |
|
219 | 219 | And that bumped changeset are detected |
|
220 | 220 | -------------------------------------- |
|
221 | 221 | |
|
222 | 222 | If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also |
|
223 | 223 | note that the bumped changeset (5:5601fb93a350) is not a direct successor of |
|
224 | 224 | the public changeset |
|
225 | 225 | |
|
226 | 226 | $ hg log --hidden -r 'phasedivergent()' |
|
227 | 227 | 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c |
|
228 | 228 | |
|
229 | 229 | And that we can't push bumped changeset |
|
230 | 230 | |
|
231 | 231 | $ hg push ../tmpa -r 0 --force #(make repo related) |
|
232 | 232 | pushing to ../tmpa |
|
233 | 233 | searching for changes |
|
234 | 234 | warning: repository is unrelated |
|
235 | 235 | adding changesets |
|
236 | 236 | adding manifests |
|
237 | 237 | adding file changes |
|
238 | 238 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
239 | 239 | $ hg push ../tmpa |
|
240 | 240 | pushing to ../tmpa |
|
241 | 241 | searching for changes |
|
242 | 242 | abort: push includes phase-divergent changeset: 5601fb93a350! |
|
243 | 243 | [255] |
|
244 | 244 | |
|
245 | 245 | Fixing "bumped" situation |
|
246 | 246 | We need to create a clone of 5 and add a special marker with a flag |
|
247 | 247 | |
|
248 | 248 | $ hg summary |
|
249 | 249 | parent: 5:5601fb93a350 tip (phase-divergent) |
|
250 | 250 | add new_3_c |
|
251 | 251 | branch: default |
|
252 | 252 | commit: (clean) |
|
253 | 253 | update: 1 new changesets, 2 branch heads (merge) |
|
254 | 254 | phases: 1 draft |
|
255 | 255 | phase-divergent: 1 changesets |
|
256 | 256 | $ hg up '5^' |
|
257 | 257 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
258 | 258 | $ hg revert -ar 5 |
|
259 | 259 | adding new_3_c |
|
260 | 260 | $ hg ci -m 'add n3w_3_c' |
|
261 | 261 | created new head |
|
262 | 262 | $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c` |
|
263 | 263 | obsoleted 1 changesets |
|
264 | 264 | $ hg log -r 'phasedivergent()' |
|
265 | 265 | $ hg log -G |
|
266 | 266 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
267 | 267 | | |
|
268 | 268 | | o 2:245bde4270cd (public) [ ] add original_c |
|
269 | 269 | |/ |
|
270 | 270 | o 1:7c3bad9141dc (public) [ ] add b |
|
271 | 271 | | |
|
272 | 272 | o 0:1f0dee641bb7 (public) [ ] add a |
|
273 | 273 | |
|
274 | 274 | |
|
275 | 275 | Basic exclusive testing |
|
276 | 276 | |
|
277 | 277 | $ hg log -G --hidden |
|
278 | 278 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
279 | 279 | | |
|
280 | 280 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c |
|
281 | 281 | |/ |
|
282 | 282 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c |
|
283 | 283 | |/ |
|
284 | 284 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c |
|
285 | 285 | |/ |
|
286 | 286 | | o 2:245bde4270cd (public) [ ] add original_c |
|
287 | 287 | |/ |
|
288 | 288 | o 1:7c3bad9141dc (public) [ ] add b |
|
289 | 289 | | |
|
290 | 290 | o 0:1f0dee641bb7 (public) [ ] add a |
|
291 | 291 | |
|
292 | 292 | $ hg debugobsolete --rev 6f9641995072 |
|
293 | 293 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
294 | 294 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
295 | 295 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
296 | 296 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
297 | 297 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
298 | 298 | $ hg debugobsolete --rev 6f9641995072 --exclusive |
|
299 | 299 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
300 | 300 | $ hg debugobsolete --rev 5601fb93a350 --hidden |
|
301 | 301 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
302 | 302 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
303 | 303 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
304 | 304 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
305 | 305 | $ hg debugobsolete --rev 5601fb93a350 --hidden --exclusive |
|
306 | 306 | $ hg debugobsolete --rev 5601fb93a350+6f9641995072 --hidden --exclusive |
|
307 | 307 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
308 | 308 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
309 | 309 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
310 | 310 | |
|
311 | 311 | $ cd .. |
|
312 | 312 | |
|
313 | 313 | Revision 0 is hidden |
|
314 | 314 | -------------------- |
|
315 | 315 | |
|
316 | 316 | $ hg init rev0hidden |
|
317 | 317 | $ cd rev0hidden |
|
318 | 318 | |
|
319 | 319 | $ mkcommit kill0 |
|
320 | 320 | $ hg up -q null |
|
321 | 321 | $ hg debugobsolete `getid kill0` |
|
322 | 322 | obsoleted 1 changesets |
|
323 | 323 | $ mkcommit a |
|
324 | 324 | $ mkcommit b |
|
325 | 325 | |
|
326 | 326 | Should pick the first visible revision as "repo" node |
|
327 | 327 | |
|
328 | 328 | $ hg archive ../archive-null |
|
329 | 329 | $ cat ../archive-null/.hg_archival.txt |
|
330 | 330 | repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e |
|
331 | 331 | node: 7c3bad9141dcb46ff89abf5f61856facd56e476c |
|
332 | 332 | branch: default |
|
333 | 333 | latesttag: null |
|
334 | 334 | latesttagdistance: 2 |
|
335 | 335 | changessincelatesttag: 2 |
|
336 | 336 | |
|
337 | 337 | |
|
338 | 338 | $ cd .. |
|
339 | 339 | |
|
340 | 340 | Exchange Test |
|
341 | 341 | ============================ |
|
342 | 342 | |
|
343 | 343 | Destination repo does not have any data |
|
344 | 344 | --------------------------------------- |
|
345 | 345 | |
|
346 | 346 | Simple incoming test |
|
347 | 347 | |
|
348 | 348 | $ hg init tmpc |
|
349 | 349 | $ cd tmpc |
|
350 | 350 | $ hg incoming ../tmpb |
|
351 | 351 | comparing with ../tmpb |
|
352 | 352 | 0:1f0dee641bb7 (public) [ ] add a |
|
353 | 353 | 1:7c3bad9141dc (public) [ ] add b |
|
354 | 354 | 2:245bde4270cd (public) [ ] add original_c |
|
355 | 355 | 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
356 | 356 | |
|
357 | 357 | Try to pull markers |
|
358 | 358 | (extinct changeset are excluded but marker are pushed) |
|
359 | 359 | |
|
360 | 360 | $ hg pull ../tmpb |
|
361 | 361 | pulling from ../tmpb |
|
362 | 362 | requesting all changes |
|
363 | 363 | adding changesets |
|
364 | 364 | adding manifests |
|
365 | 365 | adding file changes |
|
366 | 366 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
367 | 367 | 5 new obsolescence markers |
|
368 | 368 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
369 | 369 | $ hg debugobsolete |
|
370 | 370 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
371 | 371 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
372 | 372 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
373 | 373 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
374 | 374 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
375 | 375 | |
|
376 | 376 | Rollback//Transaction support |
|
377 | 377 | |
|
378 | 378 | $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
|
379 | 379 | $ hg debugobsolete |
|
380 | 380 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
381 | 381 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
382 | 382 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
383 | 383 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
384 | 384 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
385 | 385 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'} |
|
386 | 386 | $ hg rollback -n |
|
387 | 387 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
388 | 388 | $ hg rollback |
|
389 | 389 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
390 | 390 | $ hg debugobsolete |
|
391 | 391 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
392 | 392 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
393 | 393 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
394 | 394 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
395 | 395 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
396 | 396 | |
|
397 | 397 | $ cd .. |
|
398 | 398 | |
|
399 | 399 | Try to push markers |
|
400 | 400 | |
|
401 | 401 | $ hg init tmpd |
|
402 | 402 | $ hg -R tmpb push tmpd |
|
403 | 403 | pushing to tmpd |
|
404 | 404 | searching for changes |
|
405 | 405 | adding changesets |
|
406 | 406 | adding manifests |
|
407 | 407 | adding file changes |
|
408 | 408 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
409 | 409 | 5 new obsolescence markers |
|
410 | 410 | $ hg -R tmpd debugobsolete | sort |
|
411 | 411 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
412 | 412 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
413 | 413 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
414 | 414 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
415 | 415 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
416 | 416 | |
|
417 | 417 | Check obsolete keys are exchanged only if source has an obsolete store |
|
418 | 418 | |
|
419 | 419 | $ hg init empty |
|
420 | 420 | $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd |
|
421 | 421 | pushing to tmpd |
|
422 | 422 | listkeys phases |
|
423 | 423 | listkeys bookmarks |
|
424 | 424 | no changes found |
|
425 | 425 | listkeys phases |
|
426 | 426 | [1] |
|
427 | 427 | |
|
428 | 428 | clone support |
|
429 | 429 | (markers are copied and extinct changesets are included to allow hardlinks) |
|
430 | 430 | |
|
431 | 431 | $ hg clone tmpb clone-dest |
|
432 | 432 | updating to branch default |
|
433 | 433 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
434 | 434 | $ hg -R clone-dest log -G --hidden |
|
435 | 435 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
436 | 436 | | |
|
437 | 437 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c |
|
438 | 438 | |/ |
|
439 | 439 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c |
|
440 | 440 | |/ |
|
441 | 441 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c |
|
442 | 442 | |/ |
|
443 | 443 | | o 2:245bde4270cd (public) [ ] add original_c |
|
444 | 444 | |/ |
|
445 | 445 | o 1:7c3bad9141dc (public) [ ] add b |
|
446 | 446 | | |
|
447 | 447 | o 0:1f0dee641bb7 (public) [ ] add a |
|
448 | 448 | |
|
449 | 449 | $ hg -R clone-dest debugobsolete |
|
450 | 450 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
451 | 451 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
452 | 452 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
453 | 453 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
454 | 454 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
455 | 455 | |
|
456 | 456 | |
|
457 | 457 | Destination repo have existing data |
|
458 | 458 | --------------------------------------- |
|
459 | 459 | |
|
460 | 460 | On pull |
|
461 | 461 | |
|
462 | 462 | $ hg init tmpe |
|
463 | 463 | $ cd tmpe |
|
464 | 464 | $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 |
|
465 | 465 | $ hg pull ../tmpb |
|
466 | 466 | pulling from ../tmpb |
|
467 | 467 | requesting all changes |
|
468 | 468 | adding changesets |
|
469 | 469 | adding manifests |
|
470 | 470 | adding file changes |
|
471 | 471 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
472 | 472 | 5 new obsolescence markers |
|
473 | 473 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
474 | 474 | $ hg debugobsolete |
|
475 | 475 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
476 | 476 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
477 | 477 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
478 | 478 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
479 | 479 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
480 | 480 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
481 | 481 | |
|
482 | 482 | |
|
483 | 483 | On push |
|
484 | 484 | |
|
485 | 485 | $ hg push ../tmpc |
|
486 | 486 | pushing to ../tmpc |
|
487 | 487 | searching for changes |
|
488 | 488 | no changes found |
|
489 | 489 | 1 new obsolescence markers |
|
490 | 490 | [1] |
|
491 | 491 | $ hg -R ../tmpc debugobsolete |
|
492 | 492 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
493 | 493 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
494 | 494 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
495 | 495 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
496 | 496 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
497 | 497 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
498 | 498 | |
|
499 | 499 | detect outgoing obsolete and unstable |
|
500 | 500 | --------------------------------------- |
|
501 | 501 | |
|
502 | 502 | |
|
503 | 503 | $ hg log -G |
|
504 | 504 | o 3:6f9641995072 (draft) [tip ] add n3w_3_c |
|
505 | 505 | | |
|
506 | 506 | | o 2:245bde4270cd (public) [ ] add original_c |
|
507 | 507 | |/ |
|
508 | 508 | o 1:7c3bad9141dc (public) [ ] add b |
|
509 | 509 | | |
|
510 | 510 | o 0:1f0dee641bb7 (public) [ ] add a |
|
511 | 511 | |
|
512 | 512 | $ hg up 'desc("n3w_3_c")' |
|
513 | 513 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
514 | 514 | $ mkcommit original_d |
|
515 | 515 | $ mkcommit original_e |
|
516 | 516 | $ hg debugobsolete --record-parents `getid original_d` -d '0 0' |
|
517 | 517 | obsoleted 1 changesets |
|
518 | 518 | $ hg debugobsolete | grep `getid original_d` |
|
519 | 519 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
520 | 520 | $ hg log -r 'obsolete()' |
|
521 | 521 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
522 | 522 | $ hg summary |
|
523 | 523 | parent: 5:cda648ca50f5 tip (orphan) |
|
524 | 524 | add original_e |
|
525 | 525 | branch: default |
|
526 | 526 | commit: (clean) |
|
527 | 527 | update: 1 new changesets, 2 branch heads (merge) |
|
528 | 528 | phases: 3 draft |
|
529 | 529 | orphan: 1 changesets |
|
530 | 530 | $ hg log -G -r '::orphan()' |
|
531 | 531 | @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e |
|
532 | 532 | | |
|
533 | 533 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
534 | 534 | | |
|
535 | 535 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
536 | 536 | | |
|
537 | 537 | o 1:7c3bad9141dc (public) [ ] add b |
|
538 | 538 | | |
|
539 | 539 | o 0:1f0dee641bb7 (public) [ ] add a |
|
540 | 540 | |
|
541 | 541 | |
|
542 | 542 | refuse to push obsolete changeset |
|
543 | 543 | |
|
544 | 544 | $ hg push ../tmpc/ -r 'desc("original_d")' |
|
545 | 545 | pushing to ../tmpc/ |
|
546 | 546 | searching for changes |
|
547 | 547 | abort: push includes obsolete changeset: 94b33453f93b! |
|
548 | 548 | [255] |
|
549 | 549 | |
|
550 | 550 | refuse to push unstable changeset |
|
551 | 551 | |
|
552 | 552 | $ hg push ../tmpc/ |
|
553 | 553 | pushing to ../tmpc/ |
|
554 | 554 | searching for changes |
|
555 | 555 | abort: push includes orphan changeset: cda648ca50f5! |
|
556 | 556 | [255] |
|
557 | 557 | |
|
558 | 558 | Test that extinct changeset are properly detected |
|
559 | 559 | |
|
560 | 560 | $ hg log -r 'extinct()' |
|
561 | 561 | |
|
562 | 562 | Don't try to push extinct changeset |
|
563 | 563 | |
|
564 | 564 | $ hg init ../tmpf |
|
565 | 565 | $ hg out ../tmpf |
|
566 | 566 | comparing with ../tmpf |
|
567 | 567 | searching for changes |
|
568 | 568 | 0:1f0dee641bb7 (public) [ ] add a |
|
569 | 569 | 1:7c3bad9141dc (public) [ ] add b |
|
570 | 570 | 2:245bde4270cd (public) [ ] add original_c |
|
571 | 571 | 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
572 | 572 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
573 | 573 | 5:cda648ca50f5 (draft orphan) [tip ] add original_e |
|
574 | 574 | $ hg push ../tmpf -f # -f because be push unstable too |
|
575 | 575 | pushing to ../tmpf |
|
576 | 576 | searching for changes |
|
577 | 577 | adding changesets |
|
578 | 578 | adding manifests |
|
579 | 579 | adding file changes |
|
580 | 580 | added 6 changesets with 6 changes to 6 files (+1 heads) |
|
581 | 581 | 7 new obsolescence markers |
|
582 | 582 | |
|
583 | 583 | no warning displayed |
|
584 | 584 | |
|
585 | 585 | $ hg push ../tmpf |
|
586 | 586 | pushing to ../tmpf |
|
587 | 587 | searching for changes |
|
588 | 588 | no changes found |
|
589 | 589 | [1] |
|
590 | 590 | |
|
591 | 591 | Do not warn about new head when the new head is a successors of a remote one |
|
592 | 592 | |
|
593 | 593 | $ hg log -G |
|
594 | 594 | @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e |
|
595 | 595 | | |
|
596 | 596 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
597 | 597 | | |
|
598 | 598 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
599 | 599 | | |
|
600 | 600 | | o 2:245bde4270cd (public) [ ] add original_c |
|
601 | 601 | |/ |
|
602 | 602 | o 1:7c3bad9141dc (public) [ ] add b |
|
603 | 603 | | |
|
604 | 604 | o 0:1f0dee641bb7 (public) [ ] add a |
|
605 | 605 | |
|
606 | 606 | $ hg up -q 'desc(n3w_3_c)' |
|
607 | 607 | $ mkcommit obsolete_e |
|
608 | 608 | created new head |
|
609 | 609 | $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` \ |
|
610 | 610 | > -u 'test <test@example.net>' |
|
611 | 611 | obsoleted 1 changesets |
|
612 | 612 | $ hg outgoing ../tmpf # parasite hg outgoing testin |
|
613 | 613 | comparing with ../tmpf |
|
614 | 614 | searching for changes |
|
615 | 615 | 6:3de5eca88c00 (draft) [tip ] add obsolete_e |
|
616 | 616 | $ hg push ../tmpf |
|
617 | 617 | pushing to ../tmpf |
|
618 | 618 | searching for changes |
|
619 | 619 | adding changesets |
|
620 | 620 | adding manifests |
|
621 | 621 | adding file changes |
|
622 | 622 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
623 | 623 | 1 new obsolescence markers |
|
624 | 624 | obsoleted 1 changesets |
|
625 | 625 | |
|
626 | 626 | test relevance computation |
|
627 | 627 | --------------------------------------- |
|
628 | 628 | |
|
629 | 629 | Checking simple case of "marker relevance". |
|
630 | 630 | |
|
631 | 631 | |
|
632 | 632 | Reminder of the repo situation |
|
633 | 633 | |
|
634 | 634 | $ hg log --hidden --graph |
|
635 | 635 | @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e |
|
636 | 636 | | |
|
637 | 637 | | x 5:cda648ca50f5 (draft *obsolete*) [ ] add original_e |
|
638 | 638 | | | |
|
639 | 639 | | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
640 | 640 | |/ |
|
641 | 641 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
642 | 642 | | |
|
643 | 643 | | o 2:245bde4270cd (public) [ ] add original_c |
|
644 | 644 | |/ |
|
645 | 645 | o 1:7c3bad9141dc (public) [ ] add b |
|
646 | 646 | | |
|
647 | 647 | o 0:1f0dee641bb7 (public) [ ] add a |
|
648 | 648 | |
|
649 | 649 | |
|
650 | 650 | List of all markers |
|
651 | 651 | |
|
652 | 652 | $ hg debugobsolete |
|
653 | 653 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
654 | 654 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
655 | 655 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
656 | 656 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
657 | 657 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
658 | 658 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
659 | 659 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
660 | 660 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) |
|
661 | 661 | |
|
662 | 662 | List of changesets with no chain |
|
663 | 663 | |
|
664 | 664 | $ hg debugobsolete --hidden --rev ::2 |
|
665 | 665 | |
|
666 | 666 | List of changesets that are included on marker chain |
|
667 | 667 | |
|
668 | 668 | $ hg debugobsolete --hidden --rev 6 |
|
669 | 669 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) |
|
670 | 670 | |
|
671 | 671 | List of changesets with a longer chain, (including a pruned children) |
|
672 | 672 | |
|
673 | 673 | $ hg debugobsolete --hidden --rev 3 |
|
674 | 674 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
675 | 675 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
676 | 676 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
677 | 677 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
678 | 678 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
679 | 679 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
680 | 680 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
681 | 681 | |
|
682 | 682 | List of both |
|
683 | 683 | |
|
684 | 684 | $ hg debugobsolete --hidden --rev 3::6 |
|
685 | 685 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
686 | 686 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
687 | 687 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
688 | 688 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
689 | 689 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
690 | 690 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
691 | 691 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) |
|
692 | 692 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
693 | 693 | |
|
694 | 694 | List of all markers in JSON |
|
695 | 695 | |
|
696 | 696 | $ hg debugobsolete -Tjson |
|
697 | 697 | [ |
|
698 | 698 | { |
|
699 | 699 | "date": [1339.0, 0], |
|
700 | 700 | "flag": 0, |
|
701 | 701 | "metadata": {"user": "test"}, |
|
702 | 702 | "prednode": "1339133913391339133913391339133913391339", |
|
703 | 703 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] |
|
704 | 704 | }, |
|
705 | 705 | { |
|
706 | 706 | "date": [1339.0, 0], |
|
707 | 707 | "flag": 0, |
|
708 | 708 | "metadata": {"user": "test"}, |
|
709 | 709 | "prednode": "1337133713371337133713371337133713371337", |
|
710 | 710 | "succnodes": ["5601fb93a350734d935195fee37f4054c529ff39"] |
|
711 | 711 | }, |
|
712 | 712 | { |
|
713 | 713 | "date": [121.0, 120], |
|
714 | 714 | "flag": 12, |
|
715 | 715 | "metadata": {"user": "test"}, |
|
716 | 716 | "prednode": "245bde4270cd1072a27757984f9cda8ba26f08ca", |
|
717 | 717 | "succnodes": ["cdbce2fbb16313928851e97e0d85413f3f7eb77f"] |
|
718 | 718 | }, |
|
719 | 719 | { |
|
720 | 720 | "date": [1338.0, 0], |
|
721 | 721 | "flag": 1, |
|
722 | 722 | "metadata": {"user": "test"}, |
|
723 | 723 | "prednode": "5601fb93a350734d935195fee37f4054c529ff39", |
|
724 | 724 | "succnodes": ["6f96419950729f3671185b847352890f074f7557"] |
|
725 | 725 | }, |
|
726 | 726 | { |
|
727 | 727 | "date": [1338.0, 0], |
|
728 | 728 | "flag": 0, |
|
729 | 729 | "metadata": {"user": "test"}, |
|
730 | 730 | "prednode": "ca819180edb99ed25ceafb3e9584ac287e240b00", |
|
731 | 731 | "succnodes": ["1337133713371337133713371337133713371337"] |
|
732 | 732 | }, |
|
733 | 733 | { |
|
734 | 734 | "date": [1337.0, 0], |
|
735 | 735 | "flag": 0, |
|
736 | 736 | "metadata": {"user": "test"}, |
|
737 | 737 | "prednode": "cdbce2fbb16313928851e97e0d85413f3f7eb77f", |
|
738 | 738 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] |
|
739 | 739 | }, |
|
740 | 740 | { |
|
741 | 741 | "date": [0.0, 0], |
|
742 | 742 | "flag": 0, |
|
743 | 743 | "metadata": {"user": "test"}, |
|
744 | 744 | "parentnodes": ["6f96419950729f3671185b847352890f074f7557"], |
|
745 | 745 | "prednode": "94b33453f93bdb8d457ef9b770851a618bf413e1", |
|
746 | 746 | "succnodes": [] |
|
747 | 747 | }, |
|
748 | 748 | { |
|
749 | 749 | "date": *, (glob) |
|
750 | 750 | "flag": 0, |
|
751 | 751 | "metadata": {"user": "test <test@example.net>"}, |
|
752 | 752 | "prednode": "cda648ca50f50482b7055c0b0c4c117bba6733d9", |
|
753 | 753 | "succnodes": ["3de5eca88c00aa039da7399a220f4a5221faa585"] |
|
754 | 754 | } |
|
755 | 755 | ] |
|
756 | 756 | |
|
757 | 757 | Template keywords |
|
758 | 758 | |
|
759 | 759 | $ hg debugobsolete -r6 -T '{succnodes % "{node|short}"} {date|shortdate}\n' |
|
760 | 760 | 3de5eca88c00 ????-??-?? (glob) |
|
761 | 761 | $ hg debugobsolete -r6 -T '{join(metadata % "{key}={value}", " ")}\n' |
|
762 | 762 | user=test <test@example.net> |
|
763 | 763 | $ hg debugobsolete -r6 -T '{metadata}\n' |
|
764 | 764 | 'user': 'test <test@example.net>' |
|
765 | 765 | $ hg debugobsolete -r6 -T '{flag} {get(metadata, "user")}\n' |
|
766 | 766 | 0 test <test@example.net> |
|
767 | 767 | |
|
768 | 768 | Test the debug output for exchange |
|
769 | 769 | ---------------------------------- |
|
770 | 770 | |
|
771 | 771 | $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' # bundle2 |
|
772 | 772 | pulling from ../tmpb |
|
773 | 773 | searching for changes |
|
774 | 774 | no changes found |
|
775 | 775 | obsmarker-exchange: 346 bytes received |
|
776 | 776 | |
|
777 | 777 | check hgweb does not explode |
|
778 | 778 | ==================================== |
|
779 | 779 | |
|
780 | 780 | $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg |
|
781 | 781 | adding changesets |
|
782 | 782 | adding manifests |
|
783 | 783 | adding file changes |
|
784 | 784 | added 62 changesets with 63 changes to 9 files (+60 heads) |
|
785 | 785 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
786 | 786 | $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`; |
|
787 | 787 | > do |
|
788 | 788 | > hg debugobsolete $node |
|
789 | 789 | > done |
|
790 | 790 | obsoleted 1 changesets |
|
791 | 791 | obsoleted 1 changesets |
|
792 | 792 | obsoleted 1 changesets |
|
793 | 793 | obsoleted 1 changesets |
|
794 | 794 | obsoleted 1 changesets |
|
795 | 795 | obsoleted 1 changesets |
|
796 | 796 | obsoleted 1 changesets |
|
797 | 797 | obsoleted 1 changesets |
|
798 | 798 | obsoleted 1 changesets |
|
799 | 799 | obsoleted 1 changesets |
|
800 | 800 | obsoleted 1 changesets |
|
801 | 801 | obsoleted 1 changesets |
|
802 | 802 | obsoleted 1 changesets |
|
803 | 803 | obsoleted 1 changesets |
|
804 | 804 | obsoleted 1 changesets |
|
805 | 805 | obsoleted 1 changesets |
|
806 | 806 | obsoleted 1 changesets |
|
807 | 807 | obsoleted 1 changesets |
|
808 | 808 | obsoleted 1 changesets |
|
809 | 809 | obsoleted 1 changesets |
|
810 | 810 | obsoleted 1 changesets |
|
811 | 811 | obsoleted 1 changesets |
|
812 | 812 | obsoleted 1 changesets |
|
813 | 813 | obsoleted 1 changesets |
|
814 | 814 | obsoleted 1 changesets |
|
815 | 815 | obsoleted 1 changesets |
|
816 | 816 | obsoleted 1 changesets |
|
817 | 817 | obsoleted 1 changesets |
|
818 | 818 | obsoleted 1 changesets |
|
819 | 819 | obsoleted 1 changesets |
|
820 | 820 | obsoleted 1 changesets |
|
821 | 821 | obsoleted 1 changesets |
|
822 | 822 | obsoleted 1 changesets |
|
823 | 823 | obsoleted 1 changesets |
|
824 | 824 | obsoleted 1 changesets |
|
825 | 825 | obsoleted 1 changesets |
|
826 | 826 | obsoleted 1 changesets |
|
827 | 827 | obsoleted 1 changesets |
|
828 | 828 | obsoleted 1 changesets |
|
829 | 829 | obsoleted 1 changesets |
|
830 | 830 | obsoleted 1 changesets |
|
831 | 831 | obsoleted 1 changesets |
|
832 | 832 | obsoleted 1 changesets |
|
833 | 833 | obsoleted 1 changesets |
|
834 | 834 | obsoleted 1 changesets |
|
835 | 835 | obsoleted 1 changesets |
|
836 | 836 | obsoleted 1 changesets |
|
837 | 837 | obsoleted 1 changesets |
|
838 | 838 | obsoleted 1 changesets |
|
839 | 839 | obsoleted 1 changesets |
|
840 | 840 | obsoleted 1 changesets |
|
841 | 841 | obsoleted 1 changesets |
|
842 | 842 | obsoleted 1 changesets |
|
843 | 843 | obsoleted 1 changesets |
|
844 | 844 | obsoleted 1 changesets |
|
845 | 845 | obsoleted 1 changesets |
|
846 | 846 | obsoleted 1 changesets |
|
847 | 847 | obsoleted 1 changesets |
|
848 | 848 | obsoleted 1 changesets |
|
849 | 849 | obsoleted 1 changesets |
|
850 | 850 | $ hg up tip |
|
851 | 851 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
852 | 852 | |
|
853 | 853 | #if serve |
|
854 | 854 | |
|
855 | 855 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
856 | 856 | $ cat hg.pid >> $DAEMON_PIDS |
|
857 | 857 | |
|
858 | 858 | check changelog view |
|
859 | 859 | |
|
860 | 860 | $ get-with-headers.py --headeronly localhost:$HGPORT 'shortlog/' |
|
861 | 861 | 200 Script output follows |
|
862 | 862 | |
|
863 | 863 | check graph view |
|
864 | 864 | |
|
865 | 865 | $ get-with-headers.py --headeronly localhost:$HGPORT 'graph' |
|
866 | 866 | 200 Script output follows |
|
867 | 867 | |
|
868 | 868 | check filelog view |
|
869 | 869 | |
|
870 | 870 | $ get-with-headers.py --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar' |
|
871 | 871 | 200 Script output follows |
|
872 | 872 | |
|
873 | 873 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/68' |
|
874 | 874 | 200 Script output follows |
|
875 | 875 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' |
|
876 | 876 | 404 Not Found |
|
877 | 877 | [1] |
|
878 | 878 | |
|
879 | 879 | check that web.view config option: |
|
880 | 880 | |
|
881 | 881 | $ killdaemons.py hg.pid |
|
882 | 882 | $ cat >> .hg/hgrc << EOF |
|
883 | 883 | > [web] |
|
884 | 884 | > view=all |
|
885 | 885 | > EOF |
|
886 | 886 | $ wait |
|
887 | 887 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
888 | 888 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' |
|
889 | 889 | 200 Script output follows |
|
890 | 890 | $ killdaemons.py hg.pid |
|
891 | 891 | |
|
892 | 892 | Checking _enable=False warning if obsolete marker exists |
|
893 | 893 | |
|
894 | 894 | $ echo '[experimental]' >> $HGRCPATH |
|
895 | 895 | $ echo "stabilization=" >> $HGRCPATH |
|
896 | 896 | $ hg log -r tip |
|
897 | 897 | obsolete feature not enabled but 68 markers found! |
|
898 | 898 | 68:c15e9edfca13 (draft) [tip ] add celestine |
|
899 | 899 | |
|
900 | 900 | reenable for later test |
|
901 | 901 | |
|
902 | 902 | $ echo '[experimental]' >> $HGRCPATH |
|
903 | 903 | $ echo "stabilization=createmarkers,exchange" >> $HGRCPATH |
|
904 | 904 | |
|
905 | 905 | $ rm hg.pid access.log errors.log |
|
906 | 906 | #endif |
|
907 | 907 | |
|
908 | 908 | Several troubles on the same changeset (create an unstable and bumped changeset) |
|
909 | 909 | |
|
910 | 910 | $ hg debugobsolete `getid obsolete_e` |
|
911 | 911 | obsoleted 1 changesets |
|
912 | 912 | $ hg debugobsolete `getid original_c` `getid babar` |
|
913 | 913 | $ hg log --config ui.logtemplate= -r 'phasedivergent() and orphan()' |
|
914 | 914 | changeset: 7:50c51b361e60 |
|
915 | 915 | user: test |
|
916 | 916 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
917 | 917 | instability: orphan, phase-divergent |
|
918 | 918 | summary: add babar |
|
919 | 919 | |
|
920 | 920 | |
|
921 | 921 | test the "obsolete" templatekw |
|
922 | 922 | |
|
923 | 923 | $ hg log -r 'obsolete()' |
|
924 | 924 | 6:3de5eca88c00 (draft *obsolete*) [ ] add obsolete_e |
|
925 | 925 | |
|
926 | 926 | test the "troubles" templatekw |
|
927 | 927 | |
|
928 | 928 | $ hg log -r 'phasedivergent() and orphan()' |
|
929 | 929 | 7:50c51b361e60 (draft orphan phase-divergent) [ ] add babar |
|
930 | 930 | |
|
931 | 931 | test the default cmdline template |
|
932 | 932 | |
|
933 | 933 | $ hg log -T default -r 'phasedivergent()' |
|
934 | 934 | changeset: 7:50c51b361e60 |
|
935 | 935 | user: test |
|
936 | 936 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
937 | 937 | instability: orphan, phase-divergent |
|
938 | 938 | summary: add babar |
|
939 | 939 | |
|
940 | 940 | $ hg log -T default -r 'obsolete()' |
|
941 | 941 | changeset: 6:3de5eca88c00 |
|
942 | 942 | parent: 3:6f9641995072 |
|
943 | 943 | user: test |
|
944 | 944 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
945 | 945 | summary: add obsolete_e |
|
946 | 946 | |
|
947 | 947 | |
|
948 | 948 | test the obsolete labels |
|
949 | 949 | |
|
950 | 950 | $ hg log --config ui.logtemplate= --color=debug -r 'phasedivergent()' |
|
951 | 951 | [log.changeset changeset.draft changeset.unstable instability.orphan instability.phase-divergent|changeset: 7:50c51b361e60] |
|
952 | 952 | [log.user|user: test] |
|
953 | 953 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
954 | 954 | [log.instability|instability: orphan, phase-divergent] |
|
955 | 955 | [log.summary|summary: add babar] |
|
956 | 956 | |
|
957 | 957 | |
|
958 | 958 | $ hg log -T default -r 'phasedivergent()' --color=debug |
|
959 | 959 | [log.changeset changeset.draft changeset.unstable instability.orphaninstability.phase-divergent|changeset: 7:50c51b361e60] |
|
960 | 960 | [log.user|user: test] |
|
961 | 961 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
962 | 962 | [log.instability|instability: orphan, phase-divergent] |
|
963 | 963 | [log.summary|summary: add babar] |
|
964 | 964 | |
|
965 | 965 | |
|
966 | 966 | $ hg log --config ui.logtemplate= --color=debug -r "obsolete()" |
|
967 | 967 | [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00] |
|
968 | 968 | [log.parent changeset.draft|parent: 3:6f9641995072] |
|
969 | 969 | [log.user|user: test] |
|
970 | 970 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
971 | 971 | [log.summary|summary: add obsolete_e] |
|
972 | 972 | |
|
973 | 973 | |
|
974 | 974 | $ hg log -T default -r 'obsolete()' --color=debug |
|
975 | 975 | [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00] |
|
976 | 976 | [log.parent changeset.draft|parent: 3:6f9641995072] |
|
977 | 977 | [log.user|user: test] |
|
978 | 978 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
979 | 979 | [log.summary|summary: add obsolete_e] |
|
980 | 980 | |
|
981 | 981 | |
|
982 | 982 | test summary output |
|
983 | 983 | |
|
984 | 984 | $ hg up -r 'phasedivergent() and orphan()' |
|
985 | 985 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
986 | 986 | $ hg summary |
|
987 | 987 | parent: 7:50c51b361e60 (orphan, phase-divergent) |
|
988 | 988 | add babar |
|
989 | 989 | branch: default |
|
990 | 990 | commit: (clean) |
|
991 | 991 | update: 2 new changesets (update) |
|
992 | 992 | phases: 4 draft |
|
993 | 993 | orphan: 2 changesets |
|
994 | 994 | phase-divergent: 1 changesets |
|
995 | 995 | $ hg up -r 'obsolete()' |
|
996 | 996 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
997 | 997 | $ hg summary |
|
998 | 998 | parent: 6:3de5eca88c00 (obsolete) |
|
999 | 999 | add obsolete_e |
|
1000 | 1000 | branch: default |
|
1001 | 1001 | commit: (clean) |
|
1002 | 1002 | update: 3 new changesets (update) |
|
1003 | 1003 | phases: 4 draft |
|
1004 | 1004 | orphan: 2 changesets |
|
1005 | 1005 | phase-divergent: 1 changesets |
|
1006 | 1006 | |
|
1007 | 1007 | Test incoming/outcoming with changesets obsoleted remotely, known locally |
|
1008 | 1008 | =============================================================================== |
|
1009 | 1009 | |
|
1010 | 1010 | This test issue 3805 |
|
1011 | 1011 | |
|
1012 | 1012 | $ hg init repo-issue3805 |
|
1013 | 1013 | $ cd repo-issue3805 |
|
1014 | 1014 | $ echo "base" > base |
|
1015 | 1015 | $ hg ci -Am "base" |
|
1016 | 1016 | adding base |
|
1017 | 1017 | $ echo "foo" > foo |
|
1018 | 1018 | $ hg ci -Am "A" |
|
1019 | 1019 | adding foo |
|
1020 | 1020 | $ hg clone . ../other-issue3805 |
|
1021 | 1021 | updating to branch default |
|
1022 | 1022 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1023 | 1023 | $ echo "bar" >> foo |
|
1024 | 1024 | $ hg ci --amend |
|
1025 | 1025 | $ cd ../other-issue3805 |
|
1026 | 1026 | $ hg log -G |
|
1027 | 1027 | @ 1:29f0c6921ddd (draft) [tip ] A |
|
1028 | 1028 | | |
|
1029 | 1029 | o 0:d20a80d4def3 (draft) [ ] base |
|
1030 | 1030 | |
|
1031 | 1031 | $ hg log -G -R ../repo-issue3805 |
|
1032 | 1032 | @ 3:323a9c3ddd91 (draft) [tip ] A |
|
1033 | 1033 | | |
|
1034 | 1034 | o 0:d20a80d4def3 (draft) [ ] base |
|
1035 | 1035 | |
|
1036 | 1036 | $ hg incoming |
|
1037 | 1037 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
1038 | 1038 | searching for changes |
|
1039 | 1039 | 3:323a9c3ddd91 (draft) [tip ] A |
|
1040 | 1040 | $ hg incoming --bundle ../issue3805.hg |
|
1041 | 1041 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
1042 | 1042 | searching for changes |
|
1043 | 1043 | 3:323a9c3ddd91 (draft) [tip ] A |
|
1044 | 1044 | $ hg outgoing |
|
1045 | 1045 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
1046 | 1046 | searching for changes |
|
1047 | 1047 | 1:29f0c6921ddd (draft) [tip ] A |
|
1048 | 1048 | |
|
1049 | 1049 | #if serve |
|
1050 | 1050 | |
|
1051 | 1051 | $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
1052 | 1052 | $ cat hg.pid >> $DAEMON_PIDS |
|
1053 | 1053 | |
|
1054 | 1054 | $ hg incoming http://localhost:$HGPORT |
|
1055 | 1055 | comparing with http://localhost:$HGPORT/ |
|
1056 | 1056 | searching for changes |
|
1057 | 1057 | 2:323a9c3ddd91 (draft) [tip ] A |
|
1058 | 1058 | $ hg outgoing http://localhost:$HGPORT |
|
1059 | 1059 | comparing with http://localhost:$HGPORT/ |
|
1060 | 1060 | searching for changes |
|
1061 | 1061 | 1:29f0c6921ddd (draft) [tip ] A |
|
1062 | 1062 | |
|
1063 | 1063 | $ killdaemons.py |
|
1064 | 1064 | |
|
1065 | 1065 | #endif |
|
1066 | 1066 | |
|
1067 | 1067 | This test issue 3814 |
|
1068 | 1068 | |
|
1069 | 1069 | (nothing to push but locally hidden changeset) |
|
1070 | 1070 | |
|
1071 | 1071 | $ cd .. |
|
1072 | 1072 | $ hg init repo-issue3814 |
|
1073 | 1073 | $ cd repo-issue3805 |
|
1074 | 1074 | $ hg push -r 323a9c3ddd91 ../repo-issue3814 |
|
1075 | 1075 | pushing to ../repo-issue3814 |
|
1076 | 1076 | searching for changes |
|
1077 | 1077 | adding changesets |
|
1078 | 1078 | adding manifests |
|
1079 | 1079 | adding file changes |
|
1080 | 1080 | added 2 changesets with 2 changes to 2 files |
|
1081 | 1081 | 2 new obsolescence markers |
|
1082 | 1082 | $ hg out ../repo-issue3814 |
|
1083 | 1083 | comparing with ../repo-issue3814 |
|
1084 | 1084 | searching for changes |
|
1085 | 1085 | no changes found |
|
1086 | 1086 | [1] |
|
1087 | 1087 | |
|
1088 | 1088 | Test that a local tag blocks a changeset from being hidden |
|
1089 | 1089 | |
|
1090 | 1090 | $ hg tag -l visible -r 1 --hidden |
|
1091 | 1091 | $ hg log -G |
|
1092 | 1092 | @ 3:323a9c3ddd91 (draft) [tip ] A |
|
1093 | 1093 | | |
|
1094 | 1094 | | x 1:29f0c6921ddd (draft *obsolete*) [visible ] A |
|
1095 | 1095 | |/ |
|
1096 | 1096 | o 0:d20a80d4def3 (draft) [ ] base |
|
1097 | 1097 | |
|
1098 | 1098 | Test that removing a local tag does not cause some commands to fail |
|
1099 | 1099 | |
|
1100 | 1100 | $ hg tag -l -r tip tiptag |
|
1101 | 1101 | $ hg tags |
|
1102 | 1102 | tiptag 3:323a9c3ddd91 |
|
1103 | 1103 | tip 3:323a9c3ddd91 |
|
1104 | 1104 | visible 1:29f0c6921ddd |
|
1105 | 1105 | $ hg --config extensions.strip= strip -r tip --no-backup |
|
1106 | 1106 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1107 | 1107 | $ hg tags |
|
1108 | 1108 | visible 1:29f0c6921ddd |
|
1109 | 1109 | tip 1:29f0c6921ddd |
|
1110 | 1110 | |
|
1111 | 1111 | Test bundle overlay onto hidden revision |
|
1112 | 1112 | |
|
1113 | 1113 | $ cd .. |
|
1114 | 1114 | $ hg init repo-bundleoverlay |
|
1115 | 1115 | $ cd repo-bundleoverlay |
|
1116 | 1116 | $ echo "A" > foo |
|
1117 | 1117 | $ hg ci -Am "A" |
|
1118 | 1118 | adding foo |
|
1119 | 1119 | $ echo "B" >> foo |
|
1120 | 1120 | $ hg ci -m "B" |
|
1121 | 1121 | $ hg up 0 |
|
1122 | 1122 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1123 | 1123 | $ echo "C" >> foo |
|
1124 | 1124 | $ hg ci -m "C" |
|
1125 | 1125 | created new head |
|
1126 | 1126 | $ hg log -G |
|
1127 | 1127 | @ 2:c186d7714947 (draft) [tip ] C |
|
1128 | 1128 | | |
|
1129 | 1129 | | o 1:44526ebb0f98 (draft) [ ] B |
|
1130 | 1130 | |/ |
|
1131 | 1131 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1132 | 1132 | |
|
1133 | 1133 | |
|
1134 | 1134 | $ hg clone -r1 . ../other-bundleoverlay |
|
1135 | 1135 | adding changesets |
|
1136 | 1136 | adding manifests |
|
1137 | 1137 | adding file changes |
|
1138 | 1138 | added 2 changesets with 2 changes to 1 files |
|
1139 | 1139 | updating to branch default |
|
1140 | 1140 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1141 | 1141 | $ cd ../other-bundleoverlay |
|
1142 | 1142 | $ echo "B+" >> foo |
|
1143 | 1143 | $ hg ci --amend -m "B+" |
|
1144 | 1144 | $ hg log -G --hidden |
|
1145 | 1145 | @ 3:b7d587542d40 (draft) [tip ] B+ |
|
1146 | 1146 | | |
|
1147 | 1147 | | x 2:eb95e9297e18 (draft *obsolete*) [ ] temporary amend commit for 44526ebb0f98 |
|
1148 | 1148 | | | |
|
1149 | 1149 | | x 1:44526ebb0f98 (draft *obsolete*) [ ] B |
|
1150 | 1150 | |/ |
|
1151 | 1151 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1152 | 1152 | |
|
1153 | 1153 | |
|
1154 | 1154 | $ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg |
|
1155 | 1155 | comparing with ../repo-bundleoverlay |
|
1156 | 1156 | searching for changes |
|
1157 | 1157 | 1:44526ebb0f98 (draft) [ ] B |
|
1158 | 1158 | 2:c186d7714947 (draft) [tip ] C |
|
1159 | 1159 | $ hg log -G -R ../bundleoverlay.hg |
|
1160 | 1160 | o 4:c186d7714947 (draft) [tip ] C |
|
1161 | 1161 | | |
|
1162 | 1162 | | @ 3:b7d587542d40 (draft) [ ] B+ |
|
1163 | 1163 | |/ |
|
1164 | 1164 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1165 | 1165 | |
|
1166 | 1166 | |
|
1167 | 1167 | #if serve |
|
1168 | 1168 | |
|
1169 | 1169 | Test issue 4506 |
|
1170 | 1170 | |
|
1171 | 1171 | $ cd .. |
|
1172 | 1172 | $ hg init repo-issue4506 |
|
1173 | 1173 | $ cd repo-issue4506 |
|
1174 | 1174 | $ echo "0" > foo |
|
1175 | 1175 | $ hg add foo |
|
1176 | 1176 | $ hg ci -m "content-0" |
|
1177 | 1177 | |
|
1178 | 1178 | $ hg up null |
|
1179 | 1179 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1180 | 1180 | $ echo "1" > bar |
|
1181 | 1181 | $ hg add bar |
|
1182 | 1182 | $ hg ci -m "content-1" |
|
1183 | 1183 | created new head |
|
1184 | 1184 | $ hg up 0 |
|
1185 | 1185 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1186 | 1186 | $ hg graft 1 |
|
1187 | 1187 | grafting 1:1c9eddb02162 "content-1" (tip) |
|
1188 | 1188 | |
|
1189 | 1189 | $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'` |
|
1190 | 1190 | obsoleted 1 changesets |
|
1191 | 1191 | |
|
1192 | 1192 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
1193 | 1193 | $ cat hg.pid >> $DAEMON_PIDS |
|
1194 | 1194 | |
|
1195 | 1195 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1' |
|
1196 | 1196 | 404 Not Found |
|
1197 | 1197 | [1] |
|
1198 | 1198 | $ get-with-headers.py --headeronly localhost:$HGPORT 'file/tip/bar' |
|
1199 | 1199 | 200 Script output follows |
|
1200 | 1200 | $ get-with-headers.py --headeronly localhost:$HGPORT 'annotate/tip/bar' |
|
1201 | 1201 | 200 Script output follows |
|
1202 | 1202 | |
|
1203 | 1203 | $ killdaemons.py |
|
1204 | 1204 | |
|
1205 | 1205 | #endif |
|
1206 | 1206 | |
|
1207 | 1207 | Test heads computation on pending index changes with obsolescence markers |
|
1208 | 1208 | $ cd .. |
|
1209 | 1209 | $ cat >$TESTTMP/test_extension.py << EOF |
|
1210 | > from __future__ import absolute_import | |
|
1211 | > from mercurial.i18n import _ | |
|
1210 | 1212 | > from mercurial import cmdutil, registrar |
|
1211 | > from mercurial.i18n import _ | |
|
1212 | 1213 | > |
|
1213 | 1214 | > cmdtable = {} |
|
1214 | 1215 | > command = registrar.command(cmdtable) |
|
1215 | 1216 | > @command(b"amendtransient",[], _('hg amendtransient [rev]')) |
|
1216 | 1217 | > def amend(ui, repo, *pats, **opts): |
|
1217 | 1218 | > def commitfunc(ui, repo, message, match, opts): |
|
1218 | 1219 | > return repo.commit(message, repo['.'].user(), repo['.'].date(), match) |
|
1219 | 1220 | > opts['message'] = 'Test' |
|
1220 | 1221 | > opts['logfile'] = None |
|
1221 | 1222 | > cmdutil.amend(ui, repo, commitfunc, repo['.'], {}, pats, opts) |
|
1222 | 1223 | > ui.write('%s\n' % repo.changelog.headrevs()) |
|
1223 | 1224 | > EOF |
|
1224 | 1225 | $ cat >> $HGRCPATH << EOF |
|
1225 | 1226 | > [extensions] |
|
1226 | 1227 | > testextension=$TESTTMP/test_extension.py |
|
1227 | 1228 | > EOF |
|
1228 | 1229 | $ hg init repo-issue-nativerevs-pending-changes |
|
1229 | 1230 | $ cd repo-issue-nativerevs-pending-changes |
|
1230 | 1231 | $ mkcommit a |
|
1231 | 1232 | $ mkcommit b |
|
1232 | 1233 | $ hg up ".^" |
|
1233 | 1234 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1234 | 1235 | $ echo aa > a |
|
1235 | 1236 | $ hg amendtransient |
|
1236 | 1237 | [1, 3] |
|
1237 | 1238 | |
|
1238 | 1239 | Test cache consistency for the visible filter |
|
1239 | 1240 | 1) We want to make sure that the cached filtered revs are invalidated when |
|
1240 | 1241 | bookmarks change |
|
1241 | 1242 | $ cd .. |
|
1242 | 1243 | $ cat >$TESTTMP/test_extension.py << EOF |
|
1243 | 1244 | > import weakref |
|
1244 | 1245 | > from mercurial import cmdutil, extensions, bookmarks, repoview |
|
1245 | 1246 | > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs): |
|
1246 | 1247 | > reporef = weakref.ref(bkmstoreinst._repo) |
|
1247 | 1248 | > def trhook(tr): |
|
1248 | 1249 | > repo = reporef() |
|
1249 | 1250 | > hidden1 = repoview.computehidden(repo) |
|
1250 | 1251 | > hidden = repoview.filterrevs(repo, 'visible') |
|
1251 | 1252 | > if sorted(hidden1) != sorted(hidden): |
|
1252 | 1253 | > print "cache inconsistency" |
|
1253 | 1254 | > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook) |
|
1254 | 1255 | > orig(bkmstoreinst, *args, **kwargs) |
|
1255 | 1256 | > def extsetup(ui): |
|
1256 | 1257 | > extensions.wrapfunction(bookmarks.bmstore, '_recordchange', |
|
1257 | 1258 | > _bookmarkchanged) |
|
1258 | 1259 | > EOF |
|
1259 | 1260 | |
|
1260 | 1261 | $ hg init repo-cache-inconsistency |
|
1261 | 1262 | $ cd repo-issue-nativerevs-pending-changes |
|
1262 | 1263 | $ mkcommit a |
|
1263 | 1264 | a already tracked! |
|
1264 | 1265 | $ mkcommit b |
|
1265 | 1266 | $ hg id |
|
1266 | 1267 | 13bedc178fce tip |
|
1267 | 1268 | $ echo "hello" > b |
|
1268 | 1269 | $ hg commit --amend -m "message" |
|
1269 | 1270 | $ hg book bookb -r 13bedc178fce --hidden |
|
1270 | 1271 | $ hg log -r 13bedc178fce |
|
1271 | 1272 | 5:13bedc178fce (draft *obsolete*) [ bookb] add b |
|
1272 | 1273 | $ hg book -d bookb |
|
1273 | 1274 | $ hg log -r 13bedc178fce |
|
1274 | 1275 | abort: hidden revision '13bedc178fce'! |
|
1275 | 1276 | (use --hidden to access hidden revisions) |
|
1276 | 1277 | [255] |
|
1277 | 1278 | |
|
1278 | 1279 | Empty out the test extension, as it isn't compatible with later parts |
|
1279 | 1280 | of the test. |
|
1280 | 1281 | $ echo > $TESTTMP/test_extension.py |
|
1281 | 1282 | |
|
1282 | 1283 | Test ability to pull changeset with locally applying obsolescence markers |
|
1283 | 1284 | (issue4945) |
|
1284 | 1285 | |
|
1285 | 1286 | $ cd .. |
|
1286 | 1287 | $ hg init issue4845 |
|
1287 | 1288 | $ cd issue4845 |
|
1288 | 1289 | |
|
1289 | 1290 | $ echo foo > f0 |
|
1290 | 1291 | $ hg add f0 |
|
1291 | 1292 | $ hg ci -m '0' |
|
1292 | 1293 | $ echo foo > f1 |
|
1293 | 1294 | $ hg add f1 |
|
1294 | 1295 | $ hg ci -m '1' |
|
1295 | 1296 | $ echo foo > f2 |
|
1296 | 1297 | $ hg add f2 |
|
1297 | 1298 | $ hg ci -m '2' |
|
1298 | 1299 | |
|
1299 | 1300 | $ echo bar > f2 |
|
1300 | 1301 | $ hg commit --amend --config experimetnal.stabilization=createmarkers |
|
1301 | 1302 | $ hg log -G |
|
1302 | 1303 | @ 4:b0551702f918 (draft) [tip ] 2 |
|
1303 | 1304 | | |
|
1304 | 1305 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1305 | 1306 | | |
|
1306 | 1307 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1307 | 1308 | |
|
1308 | 1309 | $ hg log -G --hidden |
|
1309 | 1310 | @ 4:b0551702f918 (draft) [tip ] 2 |
|
1310 | 1311 | | |
|
1311 | 1312 | | x 3:f27abbcc1f77 (draft *obsolete*) [ ] temporary amend commit for e008cf283490 |
|
1312 | 1313 | | | |
|
1313 | 1314 | | x 2:e008cf283490 (draft *obsolete*) [ ] 2 |
|
1314 | 1315 | |/ |
|
1315 | 1316 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1316 | 1317 | | |
|
1317 | 1318 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1318 | 1319 | |
|
1319 | 1320 | |
|
1320 | 1321 | $ hg strip --hidden -r 2 --config extensions.strip= --config devel.strip-obsmarkers=no |
|
1321 | 1322 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e008cf283490-39c978dc-backup.hg (glob) |
|
1322 | 1323 | $ hg debugobsolete |
|
1323 | 1324 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) |
|
1324 | 1325 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (*) {'user': 'test'} (glob) |
|
1325 | 1326 | $ hg log -G |
|
1326 | 1327 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1327 | 1328 | | |
|
1328 | 1329 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1329 | 1330 | | |
|
1330 | 1331 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1331 | 1332 | |
|
1332 | 1333 | $ hg log -G --hidden |
|
1333 | 1334 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1334 | 1335 | | |
|
1335 | 1336 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1336 | 1337 | | |
|
1337 | 1338 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1338 | 1339 | |
|
1339 | 1340 | $ hg debugbundle .hg/strip-backup/e008cf283490-*-backup.hg |
|
1340 | 1341 | Stream params: sortdict([('Compression', 'BZ')]) |
|
1341 | 1342 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '2')])" |
|
1342 | 1343 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 |
|
1343 | 1344 | f27abbcc1f77fb409cf9160482fe619541e2d605 |
|
1344 | 1345 | obsmarkers -- 'sortdict()' |
|
1345 | 1346 | version: 1 (70 bytes) |
|
1346 | 1347 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1347 | 1348 | phase-heads -- 'sortdict()' |
|
1348 | 1349 | f27abbcc1f77fb409cf9160482fe619541e2d605 draft |
|
1349 | 1350 | |
|
1350 | 1351 | $ hg pull .hg/strip-backup/e008cf283490-*-backup.hg |
|
1351 | 1352 | pulling from .hg/strip-backup/e008cf283490-39c978dc-backup.hg |
|
1352 | 1353 | searching for changes |
|
1353 | 1354 | no changes found |
|
1354 | 1355 | $ hg debugobsolete |
|
1355 | 1356 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) |
|
1356 | 1357 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (*) {'user': 'test'} (glob) |
|
1357 | 1358 | $ hg log -G |
|
1358 | 1359 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1359 | 1360 | | |
|
1360 | 1361 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1361 | 1362 | | |
|
1362 | 1363 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1363 | 1364 | |
|
1364 | 1365 | $ hg log -G --hidden |
|
1365 | 1366 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1366 | 1367 | | |
|
1367 | 1368 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1368 | 1369 | | |
|
1369 | 1370 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1370 | 1371 | |
|
1371 | 1372 | |
|
1372 | 1373 | Testing that strip remove markers: |
|
1373 | 1374 | |
|
1374 | 1375 | $ hg strip -r 1 --config extensions.strip= |
|
1375 | 1376 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1376 | 1377 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e016b03fd86f-65ede734-backup.hg (glob) |
|
1377 | 1378 | $ hg debugobsolete |
|
1378 | 1379 | $ hg log -G |
|
1379 | 1380 | @ 0:a78f55e5508c (draft) [tip ] 0 |
|
1380 | 1381 | |
|
1381 | 1382 | $ hg log -G --hidden |
|
1382 | 1383 | @ 0:a78f55e5508c (draft) [tip ] 0 |
|
1383 | 1384 | |
|
1384 | 1385 | $ hg debugbundle .hg/strip-backup/e016b03fd86f-*-backup.hg |
|
1385 | 1386 | Stream params: sortdict([('Compression', 'BZ')]) |
|
1386 | 1387 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '2')])" |
|
1387 | 1388 | e016b03fd86fcccc54817d120b90b751aaf367d6 |
|
1388 | 1389 | b0551702f918510f01ae838ab03a463054c67b46 |
|
1389 | 1390 | obsmarkers -- 'sortdict()' |
|
1390 | 1391 | version: 1 (139 bytes) |
|
1391 | 1392 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1392 | 1393 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1393 | 1394 | phase-heads -- 'sortdict()' |
|
1394 | 1395 | b0551702f918510f01ae838ab03a463054c67b46 draft |
|
1395 | 1396 | |
|
1396 | 1397 | $ hg unbundle .hg/strip-backup/e016b03fd86f-*-backup.hg |
|
1397 | 1398 | adding changesets |
|
1398 | 1399 | adding manifests |
|
1399 | 1400 | adding file changes |
|
1400 | 1401 | added 2 changesets with 2 changes to 2 files |
|
1401 | 1402 | 2 new obsolescence markers |
|
1402 | 1403 | (run 'hg update' to get a working copy) |
|
1403 | 1404 | $ hg debugobsolete | sort |
|
1404 | 1405 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) |
|
1405 | 1406 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (*) {'user': 'test'} (glob) |
|
1406 | 1407 | $ hg log -G |
|
1407 | 1408 | o 2:b0551702f918 (draft) [tip ] 2 |
|
1408 | 1409 | | |
|
1409 | 1410 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1410 | 1411 | | |
|
1411 | 1412 | @ 0:a78f55e5508c (draft) [ ] 0 |
|
1412 | 1413 | |
|
1413 | 1414 | $ hg log -G --hidden |
|
1414 | 1415 | o 2:b0551702f918 (draft) [tip ] 2 |
|
1415 | 1416 | | |
|
1416 | 1417 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1417 | 1418 | | |
|
1418 | 1419 | @ 0:a78f55e5508c (draft) [ ] 0 |
|
1419 | 1420 | |
|
1420 | 1421 | Test that 'hg debugobsolete --index --rev' can show indices of obsmarkers when |
|
1421 | 1422 | only a subset of those are displayed (because of --rev option) |
|
1422 | 1423 | $ hg init doindexrev |
|
1423 | 1424 | $ cd doindexrev |
|
1424 | 1425 | $ echo a > a |
|
1425 | 1426 | $ hg ci -Am a |
|
1426 | 1427 | adding a |
|
1427 | 1428 | $ hg ci --amend -m aa |
|
1428 | 1429 | $ echo b > b |
|
1429 | 1430 | $ hg ci -Am b |
|
1430 | 1431 | adding b |
|
1431 | 1432 | $ hg ci --amend -m bb |
|
1432 | 1433 | $ echo c > c |
|
1433 | 1434 | $ hg ci -Am c |
|
1434 | 1435 | adding c |
|
1435 | 1436 | $ hg ci --amend -m cc |
|
1436 | 1437 | $ echo d > d |
|
1437 | 1438 | $ hg ci -Am d |
|
1438 | 1439 | adding d |
|
1439 | 1440 | $ hg ci --amend -m dd --config experimental.stabilization.track-operation=1 |
|
1440 | 1441 | $ hg debugobsolete --index --rev "3+7" |
|
1441 | 1442 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 \(.*\) {'user': 'test'} (re) |
|
1442 | 1443 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 \(.*\) {'operation': 'amend', 'user': 'test'} (re) |
|
1443 | 1444 | $ hg debugobsolete --index --rev "3+7" -Tjson |
|
1444 | 1445 | [ |
|
1445 | 1446 | { |
|
1446 | 1447 | "date": [0.0, 0], |
|
1447 | 1448 | "flag": 0, |
|
1448 | 1449 | "index": 1, |
|
1449 | 1450 | "metadata": {"user": "test"}, |
|
1450 | 1451 | "prednode": "6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1", |
|
1451 | 1452 | "succnodes": ["d27fb9b066076fd921277a4b9e8b9cb48c95bc6a"] |
|
1452 | 1453 | }, |
|
1453 | 1454 | { |
|
1454 | 1455 | "date": [0.0, 0], |
|
1455 | 1456 | "flag": 0, |
|
1456 | 1457 | "index": 3, |
|
1457 | 1458 | "metadata": {"operation": "amend", "user": "test"}, |
|
1458 | 1459 | "prednode": "4715cf767440ed891755448016c2b8cf70760c30", |
|
1459 | 1460 | "succnodes": ["7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d"] |
|
1460 | 1461 | } |
|
1461 | 1462 | ] |
|
1462 | 1463 | |
|
1463 | 1464 | Test the --delete option of debugobsolete command |
|
1464 | 1465 | $ hg debugobsolete --index |
|
1465 | 1466 | 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1466 | 1467 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1467 | 1468 | 2 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1468 | 1469 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
1469 | 1470 | $ hg debugobsolete --delete 1 --delete 3 |
|
1470 | 1471 | deleted 2 obsolescence markers |
|
1471 | 1472 | $ hg debugobsolete |
|
1472 | 1473 | cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1473 | 1474 | 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1474 | 1475 | |
|
1475 | 1476 | Test adding changeset after obsmarkers affecting it |
|
1476 | 1477 | (eg: during pull, or unbundle) |
|
1477 | 1478 | |
|
1478 | 1479 | $ mkcommit e |
|
1479 | 1480 | $ hg bundle -r . --base .~1 ../bundle-2.hg |
|
1480 | 1481 | 1 changesets found |
|
1481 | 1482 | $ getid . |
|
1482 | 1483 | $ hg --config extensions.strip= strip -r . |
|
1483 | 1484 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1484 | 1485 | saved backup bundle to $TESTTMP/tmpe/issue4845/doindexrev/.hg/strip-backup/9bc153528424-ee80edd4-backup.hg (glob) |
|
1485 | 1486 | $ hg debugobsolete 9bc153528424ea266d13e57f9ff0d799dfe61e4b |
|
1486 | 1487 | $ hg unbundle ../bundle-2.hg |
|
1487 | 1488 | adding changesets |
|
1488 | 1489 | adding manifests |
|
1489 | 1490 | adding file changes |
|
1490 | 1491 | added 1 changesets with 1 changes to 1 files |
|
1491 | 1492 | (run 'hg update' to get a working copy) |
|
1492 | 1493 | $ hg log -G |
|
1493 | 1494 | @ 7:7ae79c5d60f0 (draft) [tip ] dd |
|
1494 | 1495 | | |
|
1495 | 1496 | | o 6:4715cf767440 (draft) [ ] d |
|
1496 | 1497 | |/ |
|
1497 | 1498 | o 5:29346082e4a9 (draft) [ ] cc |
|
1498 | 1499 | | |
|
1499 | 1500 | o 3:d27fb9b06607 (draft) [ ] bb |
|
1500 | 1501 | | |
|
1501 | 1502 | | o 2:6fdef60fcbab (draft) [ ] b |
|
1502 | 1503 | |/ |
|
1503 | 1504 | o 1:f9bd49731b0b (draft) [ ] aa |
|
1504 | 1505 | |
|
1505 | 1506 | |
|
1506 | 1507 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now