Show More
@@ -1,1426 +1,1428 b'' | |||
|
1 | 1 | # obsolete.py - obsolete markers handling |
|
2 | 2 | # |
|
3 | 3 | # Copyright 2012 Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
|
4 | 4 | # Logilab SA <contact@logilab.fr> |
|
5 | 5 | # |
|
6 | 6 | # This software may be used and distributed according to the terms of the |
|
7 | 7 | # GNU General Public License version 2 or any later version. |
|
8 | 8 | |
|
9 | 9 | """Obsolete marker handling |
|
10 | 10 | |
|
11 | 11 | An obsolete marker maps an old changeset to a list of new |
|
12 | 12 | changesets. If the list of new changesets is empty, the old changeset |
|
13 | 13 | is said to be "killed". Otherwise, the old changeset is being |
|
14 | 14 | "replaced" by the new changesets. |
|
15 | 15 | |
|
16 | 16 | Obsolete markers can be used to record and distribute changeset graph |
|
17 | 17 | transformations performed by history rewrite operations, and help |
|
18 | 18 | building new tools to reconcile conflicting rewrite actions. To |
|
19 | 19 | facilitate conflict resolution, markers include various annotations |
|
20 | 20 | besides old and news changeset identifiers, such as creation date or |
|
21 | 21 | author name. |
|
22 | 22 | |
|
23 | 23 | The old obsoleted changeset is called a "precursor" and possible |
|
24 | 24 | replacements are called "successors". Markers that used changeset X as |
|
25 | 25 | a precursor are called "successor markers of X" because they hold |
|
26 | 26 | information about the successors of X. Markers that use changeset Y as |
|
27 | 27 | a successors are call "precursor markers of Y" because they hold |
|
28 | 28 | information about the precursors of Y. |
|
29 | 29 | |
|
30 | 30 | Examples: |
|
31 | 31 | |
|
32 | 32 | - When changeset A is replaced by changeset A', one marker is stored: |
|
33 | 33 | |
|
34 | 34 | (A, (A',)) |
|
35 | 35 | |
|
36 | 36 | - When changesets A and B are folded into a new changeset C, two markers are |
|
37 | 37 | stored: |
|
38 | 38 | |
|
39 | 39 | (A, (C,)) and (B, (C,)) |
|
40 | 40 | |
|
41 | 41 | - When changeset A is simply "pruned" from the graph, a marker is created: |
|
42 | 42 | |
|
43 | 43 | (A, ()) |
|
44 | 44 | |
|
45 | 45 | - When changeset A is split into B and C, a single marker is used: |
|
46 | 46 | |
|
47 | 47 | (A, (B, C)) |
|
48 | 48 | |
|
49 | 49 | We use a single marker to distinguish the "split" case from the "divergence" |
|
50 | 50 | case. If two independent operations rewrite the same changeset A in to A' and |
|
51 | 51 | A'', we have an error case: divergent rewriting. We can detect it because |
|
52 | 52 | two markers will be created independently: |
|
53 | 53 | |
|
54 | 54 | (A, (B,)) and (A, (C,)) |
|
55 | 55 | |
|
56 | 56 | Format |
|
57 | 57 | ------ |
|
58 | 58 | |
|
59 | 59 | Markers are stored in an append-only file stored in |
|
60 | 60 | '.hg/store/obsstore'. |
|
61 | 61 | |
|
62 | 62 | The file starts with a version header: |
|
63 | 63 | |
|
64 | 64 | - 1 unsigned byte: version number, starting at zero. |
|
65 | 65 | |
|
66 | 66 | The header is followed by the markers. Marker format depend of the version. See |
|
67 | 67 | comment associated with each format for details. |
|
68 | 68 | |
|
69 | 69 | """ |
|
70 | 70 | from __future__ import absolute_import |
|
71 | 71 | |
|
72 | 72 | import errno |
|
73 | 73 | import struct |
|
74 | 74 | |
|
75 | 75 | from .i18n import _ |
|
76 | 76 | from . import ( |
|
77 | 77 | error, |
|
78 | 78 | node, |
|
79 | 79 | phases, |
|
80 | 80 | policy, |
|
81 | 81 | util, |
|
82 | 82 | ) |
|
83 | 83 | |
|
84 | 84 | parsers = policy.importmod(r'parsers') |
|
85 | 85 | |
|
86 | 86 | _pack = struct.pack |
|
87 | 87 | _unpack = struct.unpack |
|
88 | 88 | _calcsize = struct.calcsize |
|
89 | 89 | propertycache = util.propertycache |
|
90 | 90 | |
|
91 | 91 | # the obsolete feature is not mature enough to be enabled by default. |
|
92 | 92 | # you have to rely on third party extension extension to enable this. |
|
93 | 93 | _enabled = False |
|
94 | 94 | |
|
95 | 95 | # Options for obsolescence |
|
96 | 96 | createmarkersopt = 'createmarkers' |
|
97 | 97 | allowunstableopt = 'allowunstable' |
|
98 | 98 | exchangeopt = 'exchange' |
|
99 | 99 | |
|
100 | 100 | def isenabled(repo, option): |
|
101 | 101 | """Returns True if the given repository has the given obsolete option |
|
102 | 102 | enabled. |
|
103 | 103 | """ |
|
104 | 104 | result = set(repo.ui.configlist('experimental', 'evolution')) |
|
105 | 105 | if 'all' in result: |
|
106 | 106 | return True |
|
107 | 107 | |
|
108 | 108 | # For migration purposes, temporarily return true if the config hasn't been |
|
109 | 109 | # set but _enabled is true. |
|
110 | 110 | if len(result) == 0 and _enabled: |
|
111 | 111 | return True |
|
112 | 112 | |
|
113 | 113 | # createmarkers must be enabled if other options are enabled |
|
114 | 114 | if ((allowunstableopt in result or exchangeopt in result) and |
|
115 | 115 | not createmarkersopt in result): |
|
116 | 116 | raise error.Abort(_("'createmarkers' obsolete option must be enabled " |
|
117 | 117 | "if other obsolete options are enabled")) |
|
118 | 118 | |
|
119 | 119 | return option in result |
|
120 | 120 | |
|
121 | 121 | ### obsolescence marker flag |
|
122 | 122 | |
|
123 | 123 | ## bumpedfix flag |
|
124 | 124 | # |
|
125 | 125 | # When a changeset A' succeed to a changeset A which became public, we call A' |
|
126 | 126 | # "bumped" because it's a successors of a public changesets |
|
127 | 127 | # |
|
128 | 128 | # o A' (bumped) |
|
129 | 129 | # |`: |
|
130 | 130 | # | o A |
|
131 | 131 | # |/ |
|
132 | 132 | # o Z |
|
133 | 133 | # |
|
134 | 134 | # The way to solve this situation is to create a new changeset Ad as children |
|
135 | 135 | # of A. This changeset have the same content than A'. So the diff from A to A' |
|
136 | 136 | # is the same than the diff from A to Ad. Ad is marked as a successors of A' |
|
137 | 137 | # |
|
138 | 138 | # o Ad |
|
139 | 139 | # |`: |
|
140 | 140 | # | x A' |
|
141 | 141 | # |'| |
|
142 | 142 | # o | A |
|
143 | 143 | # |/ |
|
144 | 144 | # o Z |
|
145 | 145 | # |
|
146 | 146 | # But by transitivity Ad is also a successors of A. To avoid having Ad marked |
|
147 | 147 | # as bumped too, we add the `bumpedfix` flag to the marker. <A', (Ad,)>. |
|
148 | 148 | # This flag mean that the successors express the changes between the public and |
|
149 | 149 | # bumped version and fix the situation, breaking the transitivity of |
|
150 | 150 | # "bumped" here. |
|
151 | 151 | bumpedfix = 1 |
|
152 | 152 | usingsha256 = 2 |
|
153 | 153 | |
|
154 | 154 | ## Parsing and writing of version "0" |
|
155 | 155 | # |
|
156 | 156 | # The header is followed by the markers. Each marker is made of: |
|
157 | 157 | # |
|
158 | 158 | # - 1 uint8 : number of new changesets "N", can be zero. |
|
159 | 159 | # |
|
160 | 160 | # - 1 uint32: metadata size "M" in bytes. |
|
161 | 161 | # |
|
162 | 162 | # - 1 byte: a bit field. It is reserved for flags used in common |
|
163 | 163 | # obsolete marker operations, to avoid repeated decoding of metadata |
|
164 | 164 | # entries. |
|
165 | 165 | # |
|
166 | 166 | # - 20 bytes: obsoleted changeset identifier. |
|
167 | 167 | # |
|
168 | 168 | # - N*20 bytes: new changesets identifiers. |
|
169 | 169 | # |
|
170 | 170 | # - M bytes: metadata as a sequence of nul-terminated strings. Each |
|
171 | 171 | # string contains a key and a value, separated by a colon ':', without |
|
172 | 172 | # additional encoding. Keys cannot contain '\0' or ':' and values |
|
173 | 173 | # cannot contain '\0'. |
|
174 | 174 | _fm0version = 0 |
|
175 | 175 | _fm0fixed = '>BIB20s' |
|
176 | 176 | _fm0node = '20s' |
|
177 | 177 | _fm0fsize = _calcsize(_fm0fixed) |
|
178 | 178 | _fm0fnodesize = _calcsize(_fm0node) |
|
179 | 179 | |
|
180 | 180 | def _fm0readmarkers(data, off): |
|
181 | 181 | # Loop on markers |
|
182 | 182 | l = len(data) |
|
183 | 183 | while off + _fm0fsize <= l: |
|
184 | 184 | # read fixed part |
|
185 | 185 | cur = data[off:off + _fm0fsize] |
|
186 | 186 | off += _fm0fsize |
|
187 | 187 | numsuc, mdsize, flags, pre = _unpack(_fm0fixed, cur) |
|
188 | 188 | # read replacement |
|
189 | 189 | sucs = () |
|
190 | 190 | if numsuc: |
|
191 | 191 | s = (_fm0fnodesize * numsuc) |
|
192 | 192 | cur = data[off:off + s] |
|
193 | 193 | sucs = _unpack(_fm0node * numsuc, cur) |
|
194 | 194 | off += s |
|
195 | 195 | # read metadata |
|
196 | 196 | # (metadata will be decoded on demand) |
|
197 | 197 | metadata = data[off:off + mdsize] |
|
198 | 198 | if len(metadata) != mdsize: |
|
199 | 199 | raise error.Abort(_('parsing obsolete marker: metadata is too ' |
|
200 | 200 | 'short, %d bytes expected, got %d') |
|
201 | 201 | % (mdsize, len(metadata))) |
|
202 | 202 | off += mdsize |
|
203 | 203 | metadata = _fm0decodemeta(metadata) |
|
204 | 204 | try: |
|
205 | 205 | when, offset = metadata.pop('date', '0 0').split(' ') |
|
206 | 206 | date = float(when), int(offset) |
|
207 | 207 | except ValueError: |
|
208 | 208 | date = (0., 0) |
|
209 | 209 | parents = None |
|
210 | 210 | if 'p2' in metadata: |
|
211 | 211 | parents = (metadata.pop('p1', None), metadata.pop('p2', None)) |
|
212 | 212 | elif 'p1' in metadata: |
|
213 | 213 | parents = (metadata.pop('p1', None),) |
|
214 | 214 | elif 'p0' in metadata: |
|
215 | 215 | parents = () |
|
216 | 216 | if parents is not None: |
|
217 | 217 | try: |
|
218 | 218 | parents = tuple(node.bin(p) for p in parents) |
|
219 | 219 | # if parent content is not a nodeid, drop the data |
|
220 | 220 | for p in parents: |
|
221 | 221 | if len(p) != 20: |
|
222 | 222 | parents = None |
|
223 | 223 | break |
|
224 | 224 | except TypeError: |
|
225 | 225 | # if content cannot be translated to nodeid drop the data. |
|
226 | 226 | parents = None |
|
227 | 227 | |
|
228 | 228 | metadata = tuple(sorted(metadata.iteritems())) |
|
229 | 229 | |
|
230 | 230 | yield (pre, sucs, flags, metadata, date, parents) |
|
231 | 231 | |
|
232 | 232 | def _fm0encodeonemarker(marker): |
|
233 | 233 | pre, sucs, flags, metadata, date, parents = marker |
|
234 | 234 | if flags & usingsha256: |
|
235 | 235 | raise error.Abort(_('cannot handle sha256 with old obsstore format')) |
|
236 | 236 | metadata = dict(metadata) |
|
237 | 237 | time, tz = date |
|
238 | 238 | metadata['date'] = '%r %i' % (time, tz) |
|
239 | 239 | if parents is not None: |
|
240 | 240 | if not parents: |
|
241 | 241 | # mark that we explicitly recorded no parents |
|
242 | 242 | metadata['p0'] = '' |
|
243 | 243 | for i, p in enumerate(parents, 1): |
|
244 | 244 | metadata['p%i' % i] = node.hex(p) |
|
245 | 245 | metadata = _fm0encodemeta(metadata) |
|
246 | 246 | numsuc = len(sucs) |
|
247 | 247 | format = _fm0fixed + (_fm0node * numsuc) |
|
248 | 248 | data = [numsuc, len(metadata), flags, pre] |
|
249 | 249 | data.extend(sucs) |
|
250 | 250 | return _pack(format, *data) + metadata |
|
251 | 251 | |
|
252 | 252 | def _fm0encodemeta(meta): |
|
253 | 253 | """Return encoded metadata string to string mapping. |
|
254 | 254 | |
|
255 | 255 | Assume no ':' in key and no '\0' in both key and value.""" |
|
256 | 256 | for key, value in meta.iteritems(): |
|
257 | 257 | if ':' in key or '\0' in key: |
|
258 | 258 | raise ValueError("':' and '\0' are forbidden in metadata key'") |
|
259 | 259 | if '\0' in value: |
|
260 | 260 | raise ValueError("':' is forbidden in metadata value'") |
|
261 | 261 | return '\0'.join(['%s:%s' % (k, meta[k]) for k in sorted(meta)]) |
|
262 | 262 | |
|
263 | 263 | def _fm0decodemeta(data): |
|
264 | 264 | """Return string to string dictionary from encoded version.""" |
|
265 | 265 | d = {} |
|
266 | 266 | for l in data.split('\0'): |
|
267 | 267 | if l: |
|
268 | 268 | key, value = l.split(':') |
|
269 | 269 | d[key] = value |
|
270 | 270 | return d |
|
271 | 271 | |
|
272 | 272 | ## Parsing and writing of version "1" |
|
273 | 273 | # |
|
274 | 274 | # The header is followed by the markers. Each marker is made of: |
|
275 | 275 | # |
|
276 | 276 | # - uint32: total size of the marker (including this field) |
|
277 | 277 | # |
|
278 | 278 | # - float64: date in seconds since epoch |
|
279 | 279 | # |
|
280 | 280 | # - int16: timezone offset in minutes |
|
281 | 281 | # |
|
282 | 282 | # - uint16: a bit field. It is reserved for flags used in common |
|
283 | 283 | # obsolete marker operations, to avoid repeated decoding of metadata |
|
284 | 284 | # entries. |
|
285 | 285 | # |
|
286 | 286 | # - uint8: number of successors "N", can be zero. |
|
287 | 287 | # |
|
288 | 288 | # - uint8: number of parents "P", can be zero. |
|
289 | 289 | # |
|
290 | 290 | # 0: parents data stored but no parent, |
|
291 | 291 | # 1: one parent stored, |
|
292 | 292 | # 2: two parents stored, |
|
293 | 293 | # 3: no parent data stored |
|
294 | 294 | # |
|
295 | 295 | # - uint8: number of metadata entries M |
|
296 | 296 | # |
|
297 | 297 | # - 20 or 32 bytes: precursor changeset identifier. |
|
298 | 298 | # |
|
299 | 299 | # - N*(20 or 32) bytes: successors changesets identifiers. |
|
300 | 300 | # |
|
301 | 301 | # - P*(20 or 32) bytes: parents of the precursors changesets. |
|
302 | 302 | # |
|
303 | 303 | # - M*(uint8, uint8): size of all metadata entries (key and value) |
|
304 | 304 | # |
|
305 | 305 | # - remaining bytes: the metadata, each (key, value) pair after the other. |
|
306 | 306 | _fm1version = 1 |
|
307 | 307 | _fm1fixed = '>IdhHBBB20s' |
|
308 | 308 | _fm1nodesha1 = '20s' |
|
309 | 309 | _fm1nodesha256 = '32s' |
|
310 | 310 | _fm1nodesha1size = _calcsize(_fm1nodesha1) |
|
311 | 311 | _fm1nodesha256size = _calcsize(_fm1nodesha256) |
|
312 | 312 | _fm1fsize = _calcsize(_fm1fixed) |
|
313 | 313 | _fm1parentnone = 3 |
|
314 | 314 | _fm1parentshift = 14 |
|
315 | 315 | _fm1parentmask = (_fm1parentnone << _fm1parentshift) |
|
316 | 316 | _fm1metapair = 'BB' |
|
317 | 317 | _fm1metapairsize = _calcsize('BB') |
|
318 | 318 | |
|
319 | 319 | def _fm1purereadmarkers(data, off): |
|
320 | 320 | # make some global constants local for performance |
|
321 | 321 | noneflag = _fm1parentnone |
|
322 | 322 | sha2flag = usingsha256 |
|
323 | 323 | sha1size = _fm1nodesha1size |
|
324 | 324 | sha2size = _fm1nodesha256size |
|
325 | 325 | sha1fmt = _fm1nodesha1 |
|
326 | 326 | sha2fmt = _fm1nodesha256 |
|
327 | 327 | metasize = _fm1metapairsize |
|
328 | 328 | metafmt = _fm1metapair |
|
329 | 329 | fsize = _fm1fsize |
|
330 | 330 | unpack = _unpack |
|
331 | 331 | |
|
332 | 332 | # Loop on markers |
|
333 | 333 | stop = len(data) - _fm1fsize |
|
334 | 334 | ufixed = struct.Struct(_fm1fixed).unpack |
|
335 | 335 | |
|
336 | 336 | while off <= stop: |
|
337 | 337 | # read fixed part |
|
338 | 338 | o1 = off + fsize |
|
339 | 339 | t, secs, tz, flags, numsuc, numpar, nummeta, prec = ufixed(data[off:o1]) |
|
340 | 340 | |
|
341 | 341 | if flags & sha2flag: |
|
342 | 342 | # FIXME: prec was read as a SHA1, needs to be amended |
|
343 | 343 | |
|
344 | 344 | # read 0 or more successors |
|
345 | 345 | if numsuc == 1: |
|
346 | 346 | o2 = o1 + sha2size |
|
347 | 347 | sucs = (data[o1:o2],) |
|
348 | 348 | else: |
|
349 | 349 | o2 = o1 + sha2size * numsuc |
|
350 | 350 | sucs = unpack(sha2fmt * numsuc, data[o1:o2]) |
|
351 | 351 | |
|
352 | 352 | # read parents |
|
353 | 353 | if numpar == noneflag: |
|
354 | 354 | o3 = o2 |
|
355 | 355 | parents = None |
|
356 | 356 | elif numpar == 1: |
|
357 | 357 | o3 = o2 + sha2size |
|
358 | 358 | parents = (data[o2:o3],) |
|
359 | 359 | else: |
|
360 | 360 | o3 = o2 + sha2size * numpar |
|
361 | 361 | parents = unpack(sha2fmt * numpar, data[o2:o3]) |
|
362 | 362 | else: |
|
363 | 363 | # read 0 or more successors |
|
364 | 364 | if numsuc == 1: |
|
365 | 365 | o2 = o1 + sha1size |
|
366 | 366 | sucs = (data[o1:o2],) |
|
367 | 367 | else: |
|
368 | 368 | o2 = o1 + sha1size * numsuc |
|
369 | 369 | sucs = unpack(sha1fmt * numsuc, data[o1:o2]) |
|
370 | 370 | |
|
371 | 371 | # read parents |
|
372 | 372 | if numpar == noneflag: |
|
373 | 373 | o3 = o2 |
|
374 | 374 | parents = None |
|
375 | 375 | elif numpar == 1: |
|
376 | 376 | o3 = o2 + sha1size |
|
377 | 377 | parents = (data[o2:o3],) |
|
378 | 378 | else: |
|
379 | 379 | o3 = o2 + sha1size * numpar |
|
380 | 380 | parents = unpack(sha1fmt * numpar, data[o2:o3]) |
|
381 | 381 | |
|
382 | 382 | # read metadata |
|
383 | 383 | off = o3 + metasize * nummeta |
|
384 | 384 | metapairsize = unpack('>' + (metafmt * nummeta), data[o3:off]) |
|
385 | 385 | metadata = [] |
|
386 | 386 | for idx in xrange(0, len(metapairsize), 2): |
|
387 | 387 | o1 = off + metapairsize[idx] |
|
388 | 388 | o2 = o1 + metapairsize[idx + 1] |
|
389 | 389 | metadata.append((data[off:o1], data[o1:o2])) |
|
390 | 390 | off = o2 |
|
391 | 391 | |
|
392 | 392 | yield (prec, sucs, flags, tuple(metadata), (secs, tz * 60), parents) |
|
393 | 393 | |
|
394 | 394 | def _fm1encodeonemarker(marker): |
|
395 | 395 | pre, sucs, flags, metadata, date, parents = marker |
|
396 | 396 | # determine node size |
|
397 | 397 | _fm1node = _fm1nodesha1 |
|
398 | 398 | if flags & usingsha256: |
|
399 | 399 | _fm1node = _fm1nodesha256 |
|
400 | 400 | numsuc = len(sucs) |
|
401 | 401 | numextranodes = numsuc |
|
402 | 402 | if parents is None: |
|
403 | 403 | numpar = _fm1parentnone |
|
404 | 404 | else: |
|
405 | 405 | numpar = len(parents) |
|
406 | 406 | numextranodes += numpar |
|
407 | 407 | formatnodes = _fm1node * numextranodes |
|
408 | 408 | formatmeta = _fm1metapair * len(metadata) |
|
409 | 409 | format = _fm1fixed + formatnodes + formatmeta |
|
410 | 410 | # tz is stored in minutes so we divide by 60 |
|
411 | 411 | tz = date[1]//60 |
|
412 | 412 | data = [None, date[0], tz, flags, numsuc, numpar, len(metadata), pre] |
|
413 | 413 | data.extend(sucs) |
|
414 | 414 | if parents is not None: |
|
415 | 415 | data.extend(parents) |
|
416 | 416 | totalsize = _calcsize(format) |
|
417 | 417 | for key, value in metadata: |
|
418 | 418 | lk = len(key) |
|
419 | 419 | lv = len(value) |
|
420 | 420 | data.append(lk) |
|
421 | 421 | data.append(lv) |
|
422 | 422 | totalsize += lk + lv |
|
423 | 423 | data[0] = totalsize |
|
424 | 424 | data = [_pack(format, *data)] |
|
425 | 425 | for key, value in metadata: |
|
426 | 426 | data.append(key) |
|
427 | 427 | data.append(value) |
|
428 | 428 | return ''.join(data) |
|
429 | 429 | |
|
430 | 430 | def _fm1readmarkers(data, off): |
|
431 | 431 | native = getattr(parsers, 'fm1readmarkers', None) |
|
432 | 432 | if not native: |
|
433 | 433 | return _fm1purereadmarkers(data, off) |
|
434 | 434 | stop = len(data) - _fm1fsize |
|
435 | 435 | return native(data, off, stop) |
|
436 | 436 | |
|
437 | 437 | # mapping to read/write various marker formats |
|
438 | 438 | # <version> -> (decoder, encoder) |
|
439 | 439 | formats = {_fm0version: (_fm0readmarkers, _fm0encodeonemarker), |
|
440 | 440 | _fm1version: (_fm1readmarkers, _fm1encodeonemarker)} |
|
441 | 441 | |
|
442 | 442 | @util.nogc |
|
443 | 443 | def _readmarkers(data): |
|
444 | 444 | """Read and enumerate markers from raw data""" |
|
445 | 445 | off = 0 |
|
446 | 446 | diskversion = _unpack('>B', data[off:off + 1])[0] |
|
447 | 447 | off += 1 |
|
448 | 448 | if diskversion not in formats: |
|
449 | 449 | msg = _('parsing obsolete marker: unknown version %r') % diskversion |
|
450 | 450 | raise error.UnknownVersion(msg, version=diskversion) |
|
451 | 451 | return diskversion, formats[diskversion][0](data, off) |
|
452 | 452 | |
|
453 | 453 | def encodemarkers(markers, addheader=False, version=_fm0version): |
|
454 | 454 | # Kept separate from flushmarkers(), it will be reused for |
|
455 | 455 | # markers exchange. |
|
456 | 456 | encodeone = formats[version][1] |
|
457 | 457 | if addheader: |
|
458 | 458 | yield _pack('>B', version) |
|
459 | 459 | for marker in markers: |
|
460 | 460 | yield encodeone(marker) |
|
461 | 461 | |
|
462 | 462 | |
|
463 | 463 | class marker(object): |
|
464 | 464 | """Wrap obsolete marker raw data""" |
|
465 | 465 | |
|
466 | 466 | def __init__(self, repo, data): |
|
467 | 467 | # the repo argument will be used to create changectx in later version |
|
468 | 468 | self._repo = repo |
|
469 | 469 | self._data = data |
|
470 | 470 | self._decodedmeta = None |
|
471 | 471 | |
|
472 | 472 | def __hash__(self): |
|
473 | 473 | return hash(self._data) |
|
474 | 474 | |
|
475 | 475 | def __eq__(self, other): |
|
476 | 476 | if type(other) != type(self): |
|
477 | 477 | return False |
|
478 | 478 | return self._data == other._data |
|
479 | 479 | |
|
480 | 480 | def precnode(self): |
|
481 | 481 | """Precursor changeset node identifier""" |
|
482 | 482 | return self._data[0] |
|
483 | 483 | |
|
484 | 484 | def succnodes(self): |
|
485 | 485 | """List of successor changesets node identifiers""" |
|
486 | 486 | return self._data[1] |
|
487 | 487 | |
|
488 | 488 | def parentnodes(self): |
|
489 | 489 | """Parents of the precursors (None if not recorded)""" |
|
490 | 490 | return self._data[5] |
|
491 | 491 | |
|
492 | 492 | def metadata(self): |
|
493 | 493 | """Decoded metadata dictionary""" |
|
494 | 494 | return dict(self._data[3]) |
|
495 | 495 | |
|
496 | 496 | def date(self): |
|
497 | 497 | """Creation date as (unixtime, offset)""" |
|
498 | 498 | return self._data[4] |
|
499 | 499 | |
|
500 | 500 | def flags(self): |
|
501 | 501 | """The flags field of the marker""" |
|
502 | 502 | return self._data[2] |
|
503 | 503 | |
|
504 | 504 | @util.nogc |
|
505 | 505 | def _addsuccessors(successors, markers): |
|
506 | 506 | for mark in markers: |
|
507 | 507 | successors.setdefault(mark[0], set()).add(mark) |
|
508 | 508 | |
|
509 | 509 | @util.nogc |
|
510 | 510 | def _addprecursors(precursors, markers): |
|
511 | 511 | for mark in markers: |
|
512 | 512 | for suc in mark[1]: |
|
513 | 513 | precursors.setdefault(suc, set()).add(mark) |
|
514 | 514 | |
|
515 | 515 | @util.nogc |
|
516 | 516 | def _addchildren(children, markers): |
|
517 | 517 | for mark in markers: |
|
518 | 518 | parents = mark[5] |
|
519 | 519 | if parents is not None: |
|
520 | 520 | for p in parents: |
|
521 | 521 | children.setdefault(p, set()).add(mark) |
|
522 | 522 | |
|
523 | 523 | def _checkinvalidmarkers(markers): |
|
524 | 524 | """search for marker with invalid data and raise error if needed |
|
525 | 525 | |
|
526 | 526 | Exist as a separated function to allow the evolve extension for a more |
|
527 | 527 | subtle handling. |
|
528 | 528 | """ |
|
529 | 529 | for mark in markers: |
|
530 | 530 | if node.nullid in mark[1]: |
|
531 | 531 | raise error.Abort(_('bad obsolescence marker detected: ' |
|
532 | 532 | 'invalid successors nullid')) |
|
533 | 533 | |
|
534 | 534 | class obsstore(object): |
|
535 | 535 | """Store obsolete markers |
|
536 | 536 | |
|
537 | 537 | Markers can be accessed with two mappings: |
|
538 | 538 | - precursors[x] -> set(markers on precursors edges of x) |
|
539 | 539 | - successors[x] -> set(markers on successors edges of x) |
|
540 | 540 | - children[x] -> set(markers on precursors edges of children(x) |
|
541 | 541 | """ |
|
542 | 542 | |
|
543 | 543 | fields = ('prec', 'succs', 'flag', 'meta', 'date', 'parents') |
|
544 | 544 | # prec: nodeid, precursor changesets |
|
545 | 545 | # succs: tuple of nodeid, successor changesets (0-N length) |
|
546 | 546 | # flag: integer, flag field carrying modifier for the markers (see doc) |
|
547 | 547 | # meta: binary blob, encoded metadata dictionary |
|
548 | 548 | # date: (float, int) tuple, date of marker creation |
|
549 | 549 | # parents: (tuple of nodeid) or None, parents of precursors |
|
550 | 550 | # None is used when no data has been recorded |
|
551 | 551 | |
|
552 | 552 | def __init__(self, svfs, defaultformat=_fm1version, readonly=False): |
|
553 | 553 | # caches for various obsolescence related cache |
|
554 | 554 | self.caches = {} |
|
555 | 555 | self.svfs = svfs |
|
556 | 556 | self._version = defaultformat |
|
557 | 557 | self._readonly = readonly |
|
558 | 558 | |
|
559 | 559 | def __iter__(self): |
|
560 | 560 | return iter(self._all) |
|
561 | 561 | |
|
562 | 562 | def __len__(self): |
|
563 | 563 | return len(self._all) |
|
564 | 564 | |
|
565 | 565 | def __nonzero__(self): |
|
566 | 566 | if not self._cached('_all'): |
|
567 | 567 | try: |
|
568 | 568 | return self.svfs.stat('obsstore').st_size > 1 |
|
569 | 569 | except OSError as inst: |
|
570 | 570 | if inst.errno != errno.ENOENT: |
|
571 | 571 | raise |
|
572 | 572 | # just build an empty _all list if no obsstore exists, which |
|
573 | 573 | # avoids further stat() syscalls |
|
574 | 574 | pass |
|
575 | 575 | return bool(self._all) |
|
576 | 576 | |
|
577 | 577 | __bool__ = __nonzero__ |
|
578 | 578 | |
|
579 | 579 | @property |
|
580 | 580 | def readonly(self): |
|
581 | 581 | """True if marker creation is disabled |
|
582 | 582 | |
|
583 | 583 | Remove me in the future when obsolete marker is always on.""" |
|
584 | 584 | return self._readonly |
|
585 | 585 | |
|
586 | 586 | def create(self, transaction, prec, succs=(), flag=0, parents=None, |
|
587 | 587 | date=None, metadata=None, ui=None): |
|
588 | 588 | """obsolete: add a new obsolete marker |
|
589 | 589 | |
|
590 | 590 | * ensuring it is hashable |
|
591 | 591 | * check mandatory metadata |
|
592 | 592 | * encode metadata |
|
593 | 593 | |
|
594 | 594 | If you are a human writing code creating marker you want to use the |
|
595 | 595 | `createmarkers` function in this module instead. |
|
596 | 596 | |
|
597 | 597 | return True if a new marker have been added, False if the markers |
|
598 | 598 | already existed (no op). |
|
599 | 599 | """ |
|
600 | 600 | if metadata is None: |
|
601 | 601 | metadata = {} |
|
602 | 602 | if date is None: |
|
603 | 603 | if 'date' in metadata: |
|
604 | 604 | # as a courtesy for out-of-tree extensions |
|
605 | 605 | date = util.parsedate(metadata.pop('date')) |
|
606 | 606 | elif ui is not None: |
|
607 | 607 | date = ui.configdate('devel', 'default-date') |
|
608 | 608 | if date is None: |
|
609 | 609 | date = util.makedate() |
|
610 | 610 | else: |
|
611 | 611 | date = util.makedate() |
|
612 | 612 | if len(prec) != 20: |
|
613 | 613 | raise ValueError(prec) |
|
614 | 614 | for succ in succs: |
|
615 | 615 | if len(succ) != 20: |
|
616 | 616 | raise ValueError(succ) |
|
617 | 617 | if prec in succs: |
|
618 | 618 | raise ValueError(_('in-marker cycle with %s') % node.hex(prec)) |
|
619 | 619 | |
|
620 | 620 | metadata = tuple(sorted(metadata.iteritems())) |
|
621 | 621 | |
|
622 | 622 | marker = (str(prec), tuple(succs), int(flag), metadata, date, parents) |
|
623 | 623 | return bool(self.add(transaction, [marker])) |
|
624 | 624 | |
|
625 | 625 | def add(self, transaction, markers): |
|
626 | 626 | """Add new markers to the store |
|
627 | 627 | |
|
628 | 628 | Take care of filtering duplicate. |
|
629 | 629 | Return the number of new marker.""" |
|
630 | 630 | if self._readonly: |
|
631 | 631 | raise error.Abort(_('creating obsolete markers is not enabled on ' |
|
632 | 632 | 'this repo')) |
|
633 | 633 | known = set(self._all) |
|
634 | 634 | new = [] |
|
635 | 635 | for m in markers: |
|
636 | 636 | if m not in known: |
|
637 | 637 | known.add(m) |
|
638 | 638 | new.append(m) |
|
639 | 639 | if new: |
|
640 | 640 | f = self.svfs('obsstore', 'ab') |
|
641 | 641 | try: |
|
642 | 642 | offset = f.tell() |
|
643 | 643 | transaction.add('obsstore', offset) |
|
644 | 644 | # offset == 0: new file - add the version header |
|
645 | 645 | for bytes in encodemarkers(new, offset == 0, self._version): |
|
646 | 646 | f.write(bytes) |
|
647 | 647 | finally: |
|
648 | 648 | # XXX: f.close() == filecache invalidation == obsstore rebuilt. |
|
649 | 649 | # call 'filecacheentry.refresh()' here |
|
650 | 650 | f.close() |
|
651 | 651 | self._addmarkers(new) |
|
652 | 652 | # new marker *may* have changed several set. invalidate the cache. |
|
653 | 653 | self.caches.clear() |
|
654 | 654 | # records the number of new markers for the transaction hooks |
|
655 | 655 | previous = int(transaction.hookargs.get('new_obsmarkers', '0')) |
|
656 | 656 | transaction.hookargs['new_obsmarkers'] = str(previous + len(new)) |
|
657 | 657 | return len(new) |
|
658 | 658 | |
|
659 | 659 | def mergemarkers(self, transaction, data): |
|
660 | 660 | """merge a binary stream of markers inside the obsstore |
|
661 | 661 | |
|
662 | 662 | Returns the number of new markers added.""" |
|
663 | 663 | version, markers = _readmarkers(data) |
|
664 | 664 | return self.add(transaction, markers) |
|
665 | 665 | |
|
666 | 666 | @propertycache |
|
667 | 667 | def _all(self): |
|
668 | 668 | data = self.svfs.tryread('obsstore') |
|
669 | 669 | if not data: |
|
670 | 670 | return [] |
|
671 | 671 | self._version, markers = _readmarkers(data) |
|
672 | 672 | markers = list(markers) |
|
673 | 673 | _checkinvalidmarkers(markers) |
|
674 | 674 | return markers |
|
675 | 675 | |
|
676 | 676 | @propertycache |
|
677 | 677 | def successors(self): |
|
678 | 678 | successors = {} |
|
679 | 679 | _addsuccessors(successors, self._all) |
|
680 | 680 | return successors |
|
681 | 681 | |
|
682 | 682 | @propertycache |
|
683 | 683 | def precursors(self): |
|
684 | 684 | precursors = {} |
|
685 | 685 | _addprecursors(precursors, self._all) |
|
686 | 686 | return precursors |
|
687 | 687 | |
|
688 | 688 | @propertycache |
|
689 | 689 | def children(self): |
|
690 | 690 | children = {} |
|
691 | 691 | _addchildren(children, self._all) |
|
692 | 692 | return children |
|
693 | 693 | |
|
694 | 694 | def _cached(self, attr): |
|
695 | 695 | return attr in self.__dict__ |
|
696 | 696 | |
|
697 | 697 | def _addmarkers(self, markers): |
|
698 | 698 | markers = list(markers) # to allow repeated iteration |
|
699 | 699 | self._all.extend(markers) |
|
700 | 700 | if self._cached('successors'): |
|
701 | 701 | _addsuccessors(self.successors, markers) |
|
702 | 702 | if self._cached('precursors'): |
|
703 | 703 | _addprecursors(self.precursors, markers) |
|
704 | 704 | if self._cached('children'): |
|
705 | 705 | _addchildren(self.children, markers) |
|
706 | 706 | _checkinvalidmarkers(markers) |
|
707 | 707 | |
|
708 | 708 | def relevantmarkers(self, nodes): |
|
709 | 709 | """return a set of all obsolescence markers relevant to a set of nodes. |
|
710 | 710 | |
|
711 | 711 | "relevant" to a set of nodes mean: |
|
712 | 712 | |
|
713 | 713 | - marker that use this changeset as successor |
|
714 | 714 | - prune marker of direct children on this changeset |
|
715 | 715 | - recursive application of the two rules on precursors of these markers |
|
716 | 716 | |
|
717 | 717 | It is a set so you cannot rely on order.""" |
|
718 | 718 | |
|
719 | 719 | pendingnodes = set(nodes) |
|
720 | 720 | seenmarkers = set() |
|
721 | 721 | seennodes = set(pendingnodes) |
|
722 | 722 | precursorsmarkers = self.precursors |
|
723 | 723 | succsmarkers = self.successors |
|
724 | 724 | children = self.children |
|
725 | 725 | while pendingnodes: |
|
726 | 726 | direct = set() |
|
727 | 727 | for current in pendingnodes: |
|
728 | 728 | direct.update(precursorsmarkers.get(current, ())) |
|
729 | 729 | pruned = [m for m in children.get(current, ()) if not m[1]] |
|
730 | 730 | direct.update(pruned) |
|
731 | 731 | pruned = [m for m in succsmarkers.get(current, ()) if not m[1]] |
|
732 | 732 | direct.update(pruned) |
|
733 | 733 | direct -= seenmarkers |
|
734 | 734 | pendingnodes = set([m[0] for m in direct]) |
|
735 | 735 | seenmarkers |= direct |
|
736 | 736 | pendingnodes -= seennodes |
|
737 | 737 | seennodes |= pendingnodes |
|
738 | 738 | return seenmarkers |
|
739 | 739 | |
|
740 | 740 | def _filterprunes(markers): |
|
741 | 741 | """return a set with no prune markers""" |
|
742 | 742 | return set(m for m in markers if m[1]) |
|
743 | 743 | |
|
744 | 744 | def exclusivemarkers(repo, nodes): |
|
745 | 745 | """set of markers relevant to "nodes" but no other locally-known nodes |
|
746 | 746 | |
|
747 | 747 | This function compute the set of markers "exclusive" to a locally-known |
|
748 | 748 | node. This means we walk the markers starting from <nodes> until we reach a |
|
749 | 749 | locally-known precursors outside of <nodes>. Element of <nodes> with |
|
750 | 750 | locally-known successors outside of <nodes> are ignored (since their |
|
751 | 751 | precursors markers are also relevant to these successors). |
|
752 | 752 | |
|
753 | 753 | For example: |
|
754 | 754 | |
|
755 | 755 | # (A0 rewritten as A1) |
|
756 | 756 | # |
|
757 | 757 | # A0 <-1- A1 # Marker "1" is exclusive to A1 |
|
758 | 758 | |
|
759 | 759 | or |
|
760 | 760 | |
|
761 | 761 | # (A0 rewritten as AX; AX rewritten as A1; AX is unkown locally) |
|
762 | 762 | # |
|
763 | 763 | # <-1- A0 <-2- AX <-3- A1 # Marker "2,3" are exclusive to A1 |
|
764 | 764 | |
|
765 | 765 | or |
|
766 | 766 | |
|
767 | 767 | # (A0 has unknown precursors, A0 rewritten as A1 and A2 (divergence)) |
|
768 | 768 | # |
|
769 | 769 | # <-2- A1 # Marker "2" is exclusive to A0,A1 |
|
770 | 770 | # / |
|
771 | 771 | # <-1- A0 |
|
772 | 772 | # \ |
|
773 | 773 | # <-3- A2 # Marker "3" is exclusive to A0,A2 |
|
774 | 774 | # |
|
775 | 775 | # in addition: |
|
776 | 776 | # |
|
777 | 777 | # Markers "2,3" are exclusive to A1,A2 |
|
778 | 778 | # Markers "1,2,3" are exclusive to A0,A1,A2 |
|
779 | 779 | |
|
780 | See test/test-obsolete-bundle-strip.t for more examples. | |
|
781 | ||
|
780 | 782 | An example usage is strip. When stripping a changeset, we also want to |
|
781 | 783 | strip the markers exclusive to this changeset. Otherwise we would have |
|
782 | 784 | "dangling"" obsolescence markers from its precursors: Obsolescence markers |
|
783 | 785 | marking a node as obsolete without any successors available locally. |
|
784 | 786 | |
|
785 | 787 | As for relevant markers, the prune markers for children will be followed. |
|
786 | 788 | Of course, they will only be followed if the pruned children is |
|
787 | 789 | locally-known. Since the prune markers are relevant to the pruned node. |
|
788 | 790 | However, while prune markers are considered relevant to the parent of the |
|
789 | 791 | pruned changesets, prune markers for locally-known changeset (with no |
|
790 | 792 | successors) are considered exclusive to the pruned nodes. This allows |
|
791 | 793 | to strip the prune markers (with the rest of the exclusive chain) alongside |
|
792 | 794 | the pruned changesets. |
|
793 | 795 | """ |
|
794 | 796 | # running on a filtered repository would be dangerous as markers could be |
|
795 | 797 | # reported as exclusive when they are relevant for other filtered nodes. |
|
796 | 798 | unfi = repo.unfiltered() |
|
797 | 799 | |
|
798 | 800 | # shortcut to various useful item |
|
799 | 801 | nm = unfi.changelog.nodemap |
|
800 | 802 | precursorsmarkers = unfi.obsstore.precursors |
|
801 | 803 | successormarkers = unfi.obsstore.successors |
|
802 | 804 | childrenmarkers = unfi.obsstore.children |
|
803 | 805 | |
|
804 | 806 | # exclusive markers (return of the function) |
|
805 | 807 | exclmarkers = set() |
|
806 | 808 | # we need fast membership testing |
|
807 | 809 | nodes = set(nodes) |
|
808 | 810 | # looking for head in the obshistory |
|
809 | 811 | # |
|
810 | 812 | # XXX we are ignoring all issues in regard with cycle for now. |
|
811 | 813 | stack = [n for n in nodes if not _filterprunes(successormarkers.get(n, ()))] |
|
812 | 814 | stack.sort() |
|
813 | 815 | # nodes already stacked |
|
814 | 816 | seennodes = set(stack) |
|
815 | 817 | while stack: |
|
816 | 818 | current = stack.pop() |
|
817 | 819 | # fetch precursors markers |
|
818 | 820 | markers = list(precursorsmarkers.get(current, ())) |
|
819 | 821 | # extend the list with prune markers |
|
820 | 822 | for mark in successormarkers.get(current, ()): |
|
821 | 823 | if not mark[1]: |
|
822 | 824 | markers.append(mark) |
|
823 | 825 | # and markers from children (looking for prune) |
|
824 | 826 | for mark in childrenmarkers.get(current, ()): |
|
825 | 827 | if not mark[1]: |
|
826 | 828 | markers.append(mark) |
|
827 | 829 | # traverse the markers |
|
828 | 830 | for mark in markers: |
|
829 | 831 | if mark in exclmarkers: |
|
830 | 832 | # markers already selected |
|
831 | 833 | continue |
|
832 | 834 | |
|
833 | 835 | # If the markers is about the current node, select it |
|
834 | 836 | # |
|
835 | 837 | # (this delay the addition of markers from children) |
|
836 | 838 | if mark[1] or mark[0] == current: |
|
837 | 839 | exclmarkers.add(mark) |
|
838 | 840 | |
|
839 | 841 | # should we keep traversing through the precursors? |
|
840 | 842 | prec = mark[0] |
|
841 | 843 | |
|
842 | 844 | # nodes in the stack or already processed |
|
843 | 845 | if prec in seennodes: |
|
844 | 846 | continue |
|
845 | 847 | |
|
846 | 848 | # is this a locally known node ? |
|
847 | 849 | known = prec in nm |
|
848 | 850 | # if locally-known and not in the <nodes> set the traversal |
|
849 | 851 | # stop here. |
|
850 | 852 | if known and prec not in nodes: |
|
851 | 853 | continue |
|
852 | 854 | |
|
853 | 855 | # do not keep going if there are unselected markers pointing to this |
|
854 | 856 | # nodes. If we end up traversing these unselected markers later the |
|
855 | 857 | # node will be taken care of at that point. |
|
856 | 858 | precmarkers = _filterprunes(successormarkers.get(prec)) |
|
857 | 859 | if precmarkers.issubset(exclmarkers): |
|
858 | 860 | seennodes.add(prec) |
|
859 | 861 | stack.append(prec) |
|
860 | 862 | |
|
861 | 863 | return exclmarkers |
|
862 | 864 | |
|
863 | 865 | def commonversion(versions): |
|
864 | 866 | """Return the newest version listed in both versions and our local formats. |
|
865 | 867 | |
|
866 | 868 | Returns None if no common version exists. |
|
867 | 869 | """ |
|
868 | 870 | versions.sort(reverse=True) |
|
869 | 871 | # search for highest version known on both side |
|
870 | 872 | for v in versions: |
|
871 | 873 | if v in formats: |
|
872 | 874 | return v |
|
873 | 875 | return None |
|
874 | 876 | |
|
875 | 877 | # arbitrary picked to fit into 8K limit from HTTP server |
|
876 | 878 | # you have to take in account: |
|
877 | 879 | # - the version header |
|
878 | 880 | # - the base85 encoding |
|
879 | 881 | _maxpayload = 5300 |
|
880 | 882 | |
|
881 | 883 | def _pushkeyescape(markers): |
|
882 | 884 | """encode markers into a dict suitable for pushkey exchange |
|
883 | 885 | |
|
884 | 886 | - binary data is base85 encoded |
|
885 | 887 | - split in chunks smaller than 5300 bytes""" |
|
886 | 888 | keys = {} |
|
887 | 889 | parts = [] |
|
888 | 890 | currentlen = _maxpayload * 2 # ensure we create a new part |
|
889 | 891 | for marker in markers: |
|
890 | 892 | nextdata = _fm0encodeonemarker(marker) |
|
891 | 893 | if (len(nextdata) + currentlen > _maxpayload): |
|
892 | 894 | currentpart = [] |
|
893 | 895 | currentlen = 0 |
|
894 | 896 | parts.append(currentpart) |
|
895 | 897 | currentpart.append(nextdata) |
|
896 | 898 | currentlen += len(nextdata) |
|
897 | 899 | for idx, part in enumerate(reversed(parts)): |
|
898 | 900 | data = ''.join([_pack('>B', _fm0version)] + part) |
|
899 | 901 | keys['dump%i' % idx] = util.b85encode(data) |
|
900 | 902 | return keys |
|
901 | 903 | |
|
902 | 904 | def listmarkers(repo): |
|
903 | 905 | """List markers over pushkey""" |
|
904 | 906 | if not repo.obsstore: |
|
905 | 907 | return {} |
|
906 | 908 | return _pushkeyescape(sorted(repo.obsstore)) |
|
907 | 909 | |
|
908 | 910 | def pushmarker(repo, key, old, new): |
|
909 | 911 | """Push markers over pushkey""" |
|
910 | 912 | if not key.startswith('dump'): |
|
911 | 913 | repo.ui.warn(_('unknown key: %r') % key) |
|
912 | 914 | return 0 |
|
913 | 915 | if old: |
|
914 | 916 | repo.ui.warn(_('unexpected old value for %r') % key) |
|
915 | 917 | return 0 |
|
916 | 918 | data = util.b85decode(new) |
|
917 | 919 | lock = repo.lock() |
|
918 | 920 | try: |
|
919 | 921 | tr = repo.transaction('pushkey: obsolete markers') |
|
920 | 922 | try: |
|
921 | 923 | repo.obsstore.mergemarkers(tr, data) |
|
922 | 924 | repo.invalidatevolatilesets() |
|
923 | 925 | tr.close() |
|
924 | 926 | return 1 |
|
925 | 927 | finally: |
|
926 | 928 | tr.release() |
|
927 | 929 | finally: |
|
928 | 930 | lock.release() |
|
929 | 931 | |
|
930 | 932 | def getmarkers(repo, nodes=None, exclusive=False): |
|
931 | 933 | """returns markers known in a repository |
|
932 | 934 | |
|
933 | 935 | If <nodes> is specified, only markers "relevant" to those nodes are are |
|
934 | 936 | returned""" |
|
935 | 937 | if nodes is None: |
|
936 | 938 | rawmarkers = repo.obsstore |
|
937 | 939 | elif exclusive: |
|
938 | 940 | rawmarkers = exclusivemarkers(repo, nodes) |
|
939 | 941 | else: |
|
940 | 942 | rawmarkers = repo.obsstore.relevantmarkers(nodes) |
|
941 | 943 | |
|
942 | 944 | for markerdata in rawmarkers: |
|
943 | 945 | yield marker(repo, markerdata) |
|
944 | 946 | |
|
945 | 947 | def relevantmarkers(repo, node): |
|
946 | 948 | """all obsolete markers relevant to some revision""" |
|
947 | 949 | for markerdata in repo.obsstore.relevantmarkers(node): |
|
948 | 950 | yield marker(repo, markerdata) |
|
949 | 951 | |
|
950 | 952 | |
|
951 | 953 | def precursormarkers(ctx): |
|
952 | 954 | """obsolete marker marking this changeset as a successors""" |
|
953 | 955 | for data in ctx.repo().obsstore.precursors.get(ctx.node(), ()): |
|
954 | 956 | yield marker(ctx.repo(), data) |
|
955 | 957 | |
|
956 | 958 | def successormarkers(ctx): |
|
957 | 959 | """obsolete marker making this changeset obsolete""" |
|
958 | 960 | for data in ctx.repo().obsstore.successors.get(ctx.node(), ()): |
|
959 | 961 | yield marker(ctx.repo(), data) |
|
960 | 962 | |
|
961 | 963 | def allsuccessors(obsstore, nodes, ignoreflags=0): |
|
962 | 964 | """Yield node for every successor of <nodes>. |
|
963 | 965 | |
|
964 | 966 | Some successors may be unknown locally. |
|
965 | 967 | |
|
966 | 968 | This is a linear yield unsuited to detecting split changesets. It includes |
|
967 | 969 | initial nodes too.""" |
|
968 | 970 | remaining = set(nodes) |
|
969 | 971 | seen = set(remaining) |
|
970 | 972 | while remaining: |
|
971 | 973 | current = remaining.pop() |
|
972 | 974 | yield current |
|
973 | 975 | for mark in obsstore.successors.get(current, ()): |
|
974 | 976 | # ignore marker flagged with specified flag |
|
975 | 977 | if mark[2] & ignoreflags: |
|
976 | 978 | continue |
|
977 | 979 | for suc in mark[1]: |
|
978 | 980 | if suc not in seen: |
|
979 | 981 | seen.add(suc) |
|
980 | 982 | remaining.add(suc) |
|
981 | 983 | |
|
982 | 984 | def allprecursors(obsstore, nodes, ignoreflags=0): |
|
983 | 985 | """Yield node for every precursors of <nodes>. |
|
984 | 986 | |
|
985 | 987 | Some precursors may be unknown locally. |
|
986 | 988 | |
|
987 | 989 | This is a linear yield unsuited to detecting folded changesets. It includes |
|
988 | 990 | initial nodes too.""" |
|
989 | 991 | |
|
990 | 992 | remaining = set(nodes) |
|
991 | 993 | seen = set(remaining) |
|
992 | 994 | while remaining: |
|
993 | 995 | current = remaining.pop() |
|
994 | 996 | yield current |
|
995 | 997 | for mark in obsstore.precursors.get(current, ()): |
|
996 | 998 | # ignore marker flagged with specified flag |
|
997 | 999 | if mark[2] & ignoreflags: |
|
998 | 1000 | continue |
|
999 | 1001 | suc = mark[0] |
|
1000 | 1002 | if suc not in seen: |
|
1001 | 1003 | seen.add(suc) |
|
1002 | 1004 | remaining.add(suc) |
|
1003 | 1005 | |
|
1004 | 1006 | def foreground(repo, nodes): |
|
1005 | 1007 | """return all nodes in the "foreground" of other node |
|
1006 | 1008 | |
|
1007 | 1009 | The foreground of a revision is anything reachable using parent -> children |
|
1008 | 1010 | or precursor -> successor relation. It is very similar to "descendant" but |
|
1009 | 1011 | augmented with obsolescence information. |
|
1010 | 1012 | |
|
1011 | 1013 | Beware that possible obsolescence cycle may result if complex situation. |
|
1012 | 1014 | """ |
|
1013 | 1015 | repo = repo.unfiltered() |
|
1014 | 1016 | foreground = set(repo.set('%ln::', nodes)) |
|
1015 | 1017 | if repo.obsstore: |
|
1016 | 1018 | # We only need this complicated logic if there is obsolescence |
|
1017 | 1019 | # XXX will probably deserve an optimised revset. |
|
1018 | 1020 | nm = repo.changelog.nodemap |
|
1019 | 1021 | plen = -1 |
|
1020 | 1022 | # compute the whole set of successors or descendants |
|
1021 | 1023 | while len(foreground) != plen: |
|
1022 | 1024 | plen = len(foreground) |
|
1023 | 1025 | succs = set(c.node() for c in foreground) |
|
1024 | 1026 | mutable = [c.node() for c in foreground if c.mutable()] |
|
1025 | 1027 | succs.update(allsuccessors(repo.obsstore, mutable)) |
|
1026 | 1028 | known = (n for n in succs if n in nm) |
|
1027 | 1029 | foreground = set(repo.set('%ln::', known)) |
|
1028 | 1030 | return set(c.node() for c in foreground) |
|
1029 | 1031 | |
|
1030 | 1032 | |
|
1031 | 1033 | def successorssets(repo, initialnode, cache=None): |
|
1032 | 1034 | """Return set of all latest successors of initial nodes |
|
1033 | 1035 | |
|
1034 | 1036 | The successors set of a changeset A are the group of revisions that succeed |
|
1035 | 1037 | A. It succeeds A as a consistent whole, each revision being only a partial |
|
1036 | 1038 | replacement. The successors set contains non-obsolete changesets only. |
|
1037 | 1039 | |
|
1038 | 1040 | This function returns the full list of successor sets which is why it |
|
1039 | 1041 | returns a list of tuples and not just a single tuple. Each tuple is a valid |
|
1040 | 1042 | successors set. Note that (A,) may be a valid successors set for changeset A |
|
1041 | 1043 | (see below). |
|
1042 | 1044 | |
|
1043 | 1045 | In most cases, a changeset A will have a single element (e.g. the changeset |
|
1044 | 1046 | A is replaced by A') in its successors set. Though, it is also common for a |
|
1045 | 1047 | changeset A to have no elements in its successor set (e.g. the changeset |
|
1046 | 1048 | has been pruned). Therefore, the returned list of successors sets will be |
|
1047 | 1049 | [(A',)] or [], respectively. |
|
1048 | 1050 | |
|
1049 | 1051 | When a changeset A is split into A' and B', however, it will result in a |
|
1050 | 1052 | successors set containing more than a single element, i.e. [(A',B')]. |
|
1051 | 1053 | Divergent changesets will result in multiple successors sets, i.e. [(A',), |
|
1052 | 1054 | (A'')]. |
|
1053 | 1055 | |
|
1054 | 1056 | If a changeset A is not obsolete, then it will conceptually have no |
|
1055 | 1057 | successors set. To distinguish this from a pruned changeset, the successor |
|
1056 | 1058 | set will contain itself only, i.e. [(A,)]. |
|
1057 | 1059 | |
|
1058 | 1060 | Finally, successors unknown locally are considered to be pruned (obsoleted |
|
1059 | 1061 | without any successors). |
|
1060 | 1062 | |
|
1061 | 1063 | The optional `cache` parameter is a dictionary that may contain precomputed |
|
1062 | 1064 | successors sets. It is meant to reuse the computation of a previous call to |
|
1063 | 1065 | `successorssets` when multiple calls are made at the same time. The cache |
|
1064 | 1066 | dictionary is updated in place. The caller is responsible for its life |
|
1065 | 1067 | span. Code that makes multiple calls to `successorssets` *must* use this |
|
1066 | 1068 | cache mechanism or suffer terrible performance. |
|
1067 | 1069 | """ |
|
1068 | 1070 | |
|
1069 | 1071 | succmarkers = repo.obsstore.successors |
|
1070 | 1072 | |
|
1071 | 1073 | # Stack of nodes we search successors sets for |
|
1072 | 1074 | toproceed = [initialnode] |
|
1073 | 1075 | # set version of above list for fast loop detection |
|
1074 | 1076 | # element added to "toproceed" must be added here |
|
1075 | 1077 | stackedset = set(toproceed) |
|
1076 | 1078 | if cache is None: |
|
1077 | 1079 | cache = {} |
|
1078 | 1080 | |
|
1079 | 1081 | # This while loop is the flattened version of a recursive search for |
|
1080 | 1082 | # successors sets |
|
1081 | 1083 | # |
|
1082 | 1084 | # def successorssets(x): |
|
1083 | 1085 | # successors = directsuccessors(x) |
|
1084 | 1086 | # ss = [[]] |
|
1085 | 1087 | # for succ in directsuccessors(x): |
|
1086 | 1088 | # # product as in itertools cartesian product |
|
1087 | 1089 | # ss = product(ss, successorssets(succ)) |
|
1088 | 1090 | # return ss |
|
1089 | 1091 | # |
|
1090 | 1092 | # But we can not use plain recursive calls here: |
|
1091 | 1093 | # - that would blow the python call stack |
|
1092 | 1094 | # - obsolescence markers may have cycles, we need to handle them. |
|
1093 | 1095 | # |
|
1094 | 1096 | # The `toproceed` list act as our call stack. Every node we search |
|
1095 | 1097 | # successors set for are stacked there. |
|
1096 | 1098 | # |
|
1097 | 1099 | # The `stackedset` is set version of this stack used to check if a node is |
|
1098 | 1100 | # already stacked. This check is used to detect cycles and prevent infinite |
|
1099 | 1101 | # loop. |
|
1100 | 1102 | # |
|
1101 | 1103 | # successors set of all nodes are stored in the `cache` dictionary. |
|
1102 | 1104 | # |
|
1103 | 1105 | # After this while loop ends we use the cache to return the successors sets |
|
1104 | 1106 | # for the node requested by the caller. |
|
1105 | 1107 | while toproceed: |
|
1106 | 1108 | # Every iteration tries to compute the successors sets of the topmost |
|
1107 | 1109 | # node of the stack: CURRENT. |
|
1108 | 1110 | # |
|
1109 | 1111 | # There are four possible outcomes: |
|
1110 | 1112 | # |
|
1111 | 1113 | # 1) We already know the successors sets of CURRENT: |
|
1112 | 1114 | # -> mission accomplished, pop it from the stack. |
|
1113 | 1115 | # 2) Node is not obsolete: |
|
1114 | 1116 | # -> the node is its own successors sets. Add it to the cache. |
|
1115 | 1117 | # 3) We do not know successors set of direct successors of CURRENT: |
|
1116 | 1118 | # -> We add those successors to the stack. |
|
1117 | 1119 | # 4) We know successors sets of all direct successors of CURRENT: |
|
1118 | 1120 | # -> We can compute CURRENT successors set and add it to the |
|
1119 | 1121 | # cache. |
|
1120 | 1122 | # |
|
1121 | 1123 | current = toproceed[-1] |
|
1122 | 1124 | if current in cache: |
|
1123 | 1125 | # case (1): We already know the successors sets |
|
1124 | 1126 | stackedset.remove(toproceed.pop()) |
|
1125 | 1127 | elif current not in succmarkers: |
|
1126 | 1128 | # case (2): The node is not obsolete. |
|
1127 | 1129 | if current in repo: |
|
1128 | 1130 | # We have a valid last successors. |
|
1129 | 1131 | cache[current] = [(current,)] |
|
1130 | 1132 | else: |
|
1131 | 1133 | # Final obsolete version is unknown locally. |
|
1132 | 1134 | # Do not count that as a valid successors |
|
1133 | 1135 | cache[current] = [] |
|
1134 | 1136 | else: |
|
1135 | 1137 | # cases (3) and (4) |
|
1136 | 1138 | # |
|
1137 | 1139 | # We proceed in two phases. Phase 1 aims to distinguish case (3) |
|
1138 | 1140 | # from case (4): |
|
1139 | 1141 | # |
|
1140 | 1142 | # For each direct successors of CURRENT, we check whether its |
|
1141 | 1143 | # successors sets are known. If they are not, we stack the |
|
1142 | 1144 | # unknown node and proceed to the next iteration of the while |
|
1143 | 1145 | # loop. (case 3) |
|
1144 | 1146 | # |
|
1145 | 1147 | # During this step, we may detect obsolescence cycles: a node |
|
1146 | 1148 | # with unknown successors sets but already in the call stack. |
|
1147 | 1149 | # In such a situation, we arbitrary set the successors sets of |
|
1148 | 1150 | # the node to nothing (node pruned) to break the cycle. |
|
1149 | 1151 | # |
|
1150 | 1152 | # If no break was encountered we proceed to phase 2. |
|
1151 | 1153 | # |
|
1152 | 1154 | # Phase 2 computes successors sets of CURRENT (case 4); see details |
|
1153 | 1155 | # in phase 2 itself. |
|
1154 | 1156 | # |
|
1155 | 1157 | # Note the two levels of iteration in each phase. |
|
1156 | 1158 | # - The first one handles obsolescence markers using CURRENT as |
|
1157 | 1159 | # precursor (successors markers of CURRENT). |
|
1158 | 1160 | # |
|
1159 | 1161 | # Having multiple entry here means divergence. |
|
1160 | 1162 | # |
|
1161 | 1163 | # - The second one handles successors defined in each marker. |
|
1162 | 1164 | # |
|
1163 | 1165 | # Having none means pruned node, multiple successors means split, |
|
1164 | 1166 | # single successors are standard replacement. |
|
1165 | 1167 | # |
|
1166 | 1168 | for mark in sorted(succmarkers[current]): |
|
1167 | 1169 | for suc in mark[1]: |
|
1168 | 1170 | if suc not in cache: |
|
1169 | 1171 | if suc in stackedset: |
|
1170 | 1172 | # cycle breaking |
|
1171 | 1173 | cache[suc] = [] |
|
1172 | 1174 | else: |
|
1173 | 1175 | # case (3) If we have not computed successors sets |
|
1174 | 1176 | # of one of those successors we add it to the |
|
1175 | 1177 | # `toproceed` stack and stop all work for this |
|
1176 | 1178 | # iteration. |
|
1177 | 1179 | toproceed.append(suc) |
|
1178 | 1180 | stackedset.add(suc) |
|
1179 | 1181 | break |
|
1180 | 1182 | else: |
|
1181 | 1183 | continue |
|
1182 | 1184 | break |
|
1183 | 1185 | else: |
|
1184 | 1186 | # case (4): we know all successors sets of all direct |
|
1185 | 1187 | # successors |
|
1186 | 1188 | # |
|
1187 | 1189 | # Successors set contributed by each marker depends on the |
|
1188 | 1190 | # successors sets of all its "successors" node. |
|
1189 | 1191 | # |
|
1190 | 1192 | # Each different marker is a divergence in the obsolescence |
|
1191 | 1193 | # history. It contributes successors sets distinct from other |
|
1192 | 1194 | # markers. |
|
1193 | 1195 | # |
|
1194 | 1196 | # Within a marker, a successor may have divergent successors |
|
1195 | 1197 | # sets. In such a case, the marker will contribute multiple |
|
1196 | 1198 | # divergent successors sets. If multiple successors have |
|
1197 | 1199 | # divergent successors sets, a Cartesian product is used. |
|
1198 | 1200 | # |
|
1199 | 1201 | # At the end we post-process successors sets to remove |
|
1200 | 1202 | # duplicated entry and successors set that are strict subset of |
|
1201 | 1203 | # another one. |
|
1202 | 1204 | succssets = [] |
|
1203 | 1205 | for mark in sorted(succmarkers[current]): |
|
1204 | 1206 | # successors sets contributed by this marker |
|
1205 | 1207 | markss = [[]] |
|
1206 | 1208 | for suc in mark[1]: |
|
1207 | 1209 | # cardinal product with previous successors |
|
1208 | 1210 | productresult = [] |
|
1209 | 1211 | for prefix in markss: |
|
1210 | 1212 | for suffix in cache[suc]: |
|
1211 | 1213 | newss = list(prefix) |
|
1212 | 1214 | for part in suffix: |
|
1213 | 1215 | # do not duplicated entry in successors set |
|
1214 | 1216 | # first entry wins. |
|
1215 | 1217 | if part not in newss: |
|
1216 | 1218 | newss.append(part) |
|
1217 | 1219 | productresult.append(newss) |
|
1218 | 1220 | markss = productresult |
|
1219 | 1221 | succssets.extend(markss) |
|
1220 | 1222 | # remove duplicated and subset |
|
1221 | 1223 | seen = [] |
|
1222 | 1224 | final = [] |
|
1223 | 1225 | candidate = sorted(((set(s), s) for s in succssets if s), |
|
1224 | 1226 | key=lambda x: len(x[1]), reverse=True) |
|
1225 | 1227 | for setversion, listversion in candidate: |
|
1226 | 1228 | for seenset in seen: |
|
1227 | 1229 | if setversion.issubset(seenset): |
|
1228 | 1230 | break |
|
1229 | 1231 | else: |
|
1230 | 1232 | final.append(listversion) |
|
1231 | 1233 | seen.append(setversion) |
|
1232 | 1234 | final.reverse() # put small successors set first |
|
1233 | 1235 | cache[current] = final |
|
1234 | 1236 | return cache[initialnode] |
|
1235 | 1237 | |
|
1236 | 1238 | # mapping of 'set-name' -> <function to compute this set> |
|
1237 | 1239 | cachefuncs = {} |
|
1238 | 1240 | def cachefor(name): |
|
1239 | 1241 | """Decorator to register a function as computing the cache for a set""" |
|
1240 | 1242 | def decorator(func): |
|
1241 | 1243 | assert name not in cachefuncs |
|
1242 | 1244 | cachefuncs[name] = func |
|
1243 | 1245 | return func |
|
1244 | 1246 | return decorator |
|
1245 | 1247 | |
|
1246 | 1248 | def getrevs(repo, name): |
|
1247 | 1249 | """Return the set of revision that belong to the <name> set |
|
1248 | 1250 | |
|
1249 | 1251 | Such access may compute the set and cache it for future use""" |
|
1250 | 1252 | repo = repo.unfiltered() |
|
1251 | 1253 | if not repo.obsstore: |
|
1252 | 1254 | return frozenset() |
|
1253 | 1255 | if name not in repo.obsstore.caches: |
|
1254 | 1256 | repo.obsstore.caches[name] = cachefuncs[name](repo) |
|
1255 | 1257 | return repo.obsstore.caches[name] |
|
1256 | 1258 | |
|
1257 | 1259 | # To be simple we need to invalidate obsolescence cache when: |
|
1258 | 1260 | # |
|
1259 | 1261 | # - new changeset is added: |
|
1260 | 1262 | # - public phase is changed |
|
1261 | 1263 | # - obsolescence marker are added |
|
1262 | 1264 | # - strip is used a repo |
|
1263 | 1265 | def clearobscaches(repo): |
|
1264 | 1266 | """Remove all obsolescence related cache from a repo |
|
1265 | 1267 | |
|
1266 | 1268 | This remove all cache in obsstore is the obsstore already exist on the |
|
1267 | 1269 | repo. |
|
1268 | 1270 | |
|
1269 | 1271 | (We could be smarter here given the exact event that trigger the cache |
|
1270 | 1272 | clearing)""" |
|
1271 | 1273 | # only clear cache is there is obsstore data in this repo |
|
1272 | 1274 | if 'obsstore' in repo._filecache: |
|
1273 | 1275 | repo.obsstore.caches.clear() |
|
1274 | 1276 | |
|
1275 | 1277 | @cachefor('obsolete') |
|
1276 | 1278 | def _computeobsoleteset(repo): |
|
1277 | 1279 | """the set of obsolete revisions""" |
|
1278 | 1280 | obs = set() |
|
1279 | 1281 | getnode = repo.changelog.node |
|
1280 | 1282 | notpublic = repo._phasecache.getrevset(repo, (phases.draft, phases.secret)) |
|
1281 | 1283 | for r in notpublic: |
|
1282 | 1284 | if getnode(r) in repo.obsstore.successors: |
|
1283 | 1285 | obs.add(r) |
|
1284 | 1286 | return obs |
|
1285 | 1287 | |
|
1286 | 1288 | @cachefor('unstable') |
|
1287 | 1289 | def _computeunstableset(repo): |
|
1288 | 1290 | """the set of non obsolete revisions with obsolete parents""" |
|
1289 | 1291 | revs = [(ctx.rev(), ctx) for ctx in |
|
1290 | 1292 | repo.set('(not public()) and (not obsolete())')] |
|
1291 | 1293 | revs.sort(key=lambda x:x[0]) |
|
1292 | 1294 | unstable = set() |
|
1293 | 1295 | for rev, ctx in revs: |
|
1294 | 1296 | # A rev is unstable if one of its parent is obsolete or unstable |
|
1295 | 1297 | # this works since we traverse following growing rev order |
|
1296 | 1298 | if any((x.obsolete() or (x.rev() in unstable)) |
|
1297 | 1299 | for x in ctx.parents()): |
|
1298 | 1300 | unstable.add(rev) |
|
1299 | 1301 | return unstable |
|
1300 | 1302 | |
|
1301 | 1303 | @cachefor('suspended') |
|
1302 | 1304 | def _computesuspendedset(repo): |
|
1303 | 1305 | """the set of obsolete parents with non obsolete descendants""" |
|
1304 | 1306 | suspended = repo.changelog.ancestors(getrevs(repo, 'unstable')) |
|
1305 | 1307 | return set(r for r in getrevs(repo, 'obsolete') if r in suspended) |
|
1306 | 1308 | |
|
1307 | 1309 | @cachefor('extinct') |
|
1308 | 1310 | def _computeextinctset(repo): |
|
1309 | 1311 | """the set of obsolete parents without non obsolete descendants""" |
|
1310 | 1312 | return getrevs(repo, 'obsolete') - getrevs(repo, 'suspended') |
|
1311 | 1313 | |
|
1312 | 1314 | |
|
1313 | 1315 | @cachefor('bumped') |
|
1314 | 1316 | def _computebumpedset(repo): |
|
1315 | 1317 | """the set of revs trying to obsolete public revisions""" |
|
1316 | 1318 | bumped = set() |
|
1317 | 1319 | # util function (avoid attribute lookup in the loop) |
|
1318 | 1320 | phase = repo._phasecache.phase # would be faster to grab the full list |
|
1319 | 1321 | public = phases.public |
|
1320 | 1322 | cl = repo.changelog |
|
1321 | 1323 | torev = cl.nodemap.get |
|
1322 | 1324 | for ctx in repo.set('(not public()) and (not obsolete())'): |
|
1323 | 1325 | rev = ctx.rev() |
|
1324 | 1326 | # We only evaluate mutable, non-obsolete revision |
|
1325 | 1327 | node = ctx.node() |
|
1326 | 1328 | # (future) A cache of precursors may worth if split is very common |
|
1327 | 1329 | for pnode in allprecursors(repo.obsstore, [node], |
|
1328 | 1330 | ignoreflags=bumpedfix): |
|
1329 | 1331 | prev = torev(pnode) # unfiltered! but so is phasecache |
|
1330 | 1332 | if (prev is not None) and (phase(repo, prev) <= public): |
|
1331 | 1333 | # we have a public precursor |
|
1332 | 1334 | bumped.add(rev) |
|
1333 | 1335 | break # Next draft! |
|
1334 | 1336 | return bumped |
|
1335 | 1337 | |
|
1336 | 1338 | @cachefor('divergent') |
|
1337 | 1339 | def _computedivergentset(repo): |
|
1338 | 1340 | """the set of rev that compete to be the final successors of some revision. |
|
1339 | 1341 | """ |
|
1340 | 1342 | divergent = set() |
|
1341 | 1343 | obsstore = repo.obsstore |
|
1342 | 1344 | newermap = {} |
|
1343 | 1345 | for ctx in repo.set('(not public()) - obsolete()'): |
|
1344 | 1346 | mark = obsstore.precursors.get(ctx.node(), ()) |
|
1345 | 1347 | toprocess = set(mark) |
|
1346 | 1348 | seen = set() |
|
1347 | 1349 | while toprocess: |
|
1348 | 1350 | prec = toprocess.pop()[0] |
|
1349 | 1351 | if prec in seen: |
|
1350 | 1352 | continue # emergency cycle hanging prevention |
|
1351 | 1353 | seen.add(prec) |
|
1352 | 1354 | if prec not in newermap: |
|
1353 | 1355 | successorssets(repo, prec, newermap) |
|
1354 | 1356 | newer = [n for n in newermap[prec] if n] |
|
1355 | 1357 | if len(newer) > 1: |
|
1356 | 1358 | divergent.add(ctx.rev()) |
|
1357 | 1359 | break |
|
1358 | 1360 | toprocess.update(obsstore.precursors.get(prec, ())) |
|
1359 | 1361 | return divergent |
|
1360 | 1362 | |
|
1361 | 1363 | |
|
1362 | 1364 | def createmarkers(repo, relations, flag=0, date=None, metadata=None, |
|
1363 | 1365 | operation=None): |
|
1364 | 1366 | """Add obsolete markers between changesets in a repo |
|
1365 | 1367 | |
|
1366 | 1368 | <relations> must be an iterable of (<old>, (<new>, ...)[,{metadata}]) |
|
1367 | 1369 | tuple. `old` and `news` are changectx. metadata is an optional dictionary |
|
1368 | 1370 | containing metadata for this marker only. It is merged with the global |
|
1369 | 1371 | metadata specified through the `metadata` argument of this function, |
|
1370 | 1372 | |
|
1371 | 1373 | Trying to obsolete a public changeset will raise an exception. |
|
1372 | 1374 | |
|
1373 | 1375 | Current user and date are used except if specified otherwise in the |
|
1374 | 1376 | metadata attribute. |
|
1375 | 1377 | |
|
1376 | 1378 | This function operates within a transaction of its own, but does |
|
1377 | 1379 | not take any lock on the repo. |
|
1378 | 1380 | """ |
|
1379 | 1381 | # prepare metadata |
|
1380 | 1382 | if metadata is None: |
|
1381 | 1383 | metadata = {} |
|
1382 | 1384 | if 'user' not in metadata: |
|
1383 | 1385 | metadata['user'] = repo.ui.username() |
|
1384 | 1386 | useoperation = repo.ui.configbool('experimental', |
|
1385 | 1387 | 'evolution.track-operation', |
|
1386 | 1388 | False) |
|
1387 | 1389 | if useoperation and operation: |
|
1388 | 1390 | metadata['operation'] = operation |
|
1389 | 1391 | tr = repo.transaction('add-obsolescence-marker') |
|
1390 | 1392 | try: |
|
1391 | 1393 | markerargs = [] |
|
1392 | 1394 | for rel in relations: |
|
1393 | 1395 | prec = rel[0] |
|
1394 | 1396 | sucs = rel[1] |
|
1395 | 1397 | localmetadata = metadata.copy() |
|
1396 | 1398 | if 2 < len(rel): |
|
1397 | 1399 | localmetadata.update(rel[2]) |
|
1398 | 1400 | |
|
1399 | 1401 | if not prec.mutable(): |
|
1400 | 1402 | raise error.Abort(_("cannot obsolete public changeset: %s") |
|
1401 | 1403 | % prec, |
|
1402 | 1404 | hint="see 'hg help phases' for details") |
|
1403 | 1405 | nprec = prec.node() |
|
1404 | 1406 | nsucs = tuple(s.node() for s in sucs) |
|
1405 | 1407 | npare = None |
|
1406 | 1408 | if not nsucs: |
|
1407 | 1409 | npare = tuple(p.node() for p in prec.parents()) |
|
1408 | 1410 | if nprec in nsucs: |
|
1409 | 1411 | raise error.Abort(_("changeset %s cannot obsolete itself") |
|
1410 | 1412 | % prec) |
|
1411 | 1413 | |
|
1412 | 1414 | # Creating the marker causes the hidden cache to become invalid, |
|
1413 | 1415 | # which causes recomputation when we ask for prec.parents() above. |
|
1414 | 1416 | # Resulting in n^2 behavior. So let's prepare all of the args |
|
1415 | 1417 | # first, then create the markers. |
|
1416 | 1418 | markerargs.append((nprec, nsucs, npare, localmetadata)) |
|
1417 | 1419 | |
|
1418 | 1420 | for args in markerargs: |
|
1419 | 1421 | nprec, nsucs, npare, localmetadata = args |
|
1420 | 1422 | repo.obsstore.create(tr, nprec, nsucs, flag, parents=npare, |
|
1421 | 1423 | date=date, metadata=localmetadata, |
|
1422 | 1424 | ui=repo.ui) |
|
1423 | 1425 | repo.filteredrevcache.clear() |
|
1424 | 1426 | tr.close() |
|
1425 | 1427 | finally: |
|
1426 | 1428 | tr.release() |
@@ -1,1053 +1,1147 b'' | |||
|
1 | 1 | ================================================== |
|
2 | 2 | Test obsmarkers interaction with bundle and strip |
|
3 | 3 | ================================================== |
|
4 | 4 | |
|
5 | 5 | Setup a repository with various case |
|
6 | 6 | ==================================== |
|
7 | 7 | |
|
8 | 8 | Config setup |
|
9 | 9 | ------------ |
|
10 | 10 | |
|
11 | 11 | $ cat >> $HGRCPATH <<EOF |
|
12 | 12 | > [ui] |
|
13 | 13 | > # simpler log output |
|
14 | 14 | > logtemplate = "{node|short}: {desc}\n" |
|
15 | 15 | > |
|
16 | 16 | > [experimental] |
|
17 | 17 | > # enable evolution |
|
18 | 18 | > evolution = all |
|
19 | 19 | > |
|
20 | 20 | > # include obsmarkers in bundle |
|
21 | 21 | > evolution.bundle-obsmarker = yes |
|
22 | 22 | > |
|
23 | 23 | > [extensions] |
|
24 | 24 | > # needed for some tests |
|
25 | 25 | > strip = |
|
26 | 26 | > [defaults] |
|
27 | 27 | > # we'll query many hidden changeset |
|
28 | 28 | > debugobsolete = --hidden |
|
29 | 29 | > EOF |
|
30 | 30 | |
|
31 | 31 | $ mkcommit() { |
|
32 | 32 | > echo "$1" > "$1" |
|
33 | 33 | > hg add "$1" |
|
34 | 34 | > hg ci -m "$1" |
|
35 | 35 | > } |
|
36 | 36 | |
|
37 | 37 | $ getid() { |
|
38 | 38 | > hg log --hidden --template '{node}\n' --rev "$1" |
|
39 | 39 | > } |
|
40 | 40 | |
|
41 | 41 | $ mktestrepo () { |
|
42 | 42 | > [ -n "$1" ] || exit 1 |
|
43 | 43 | > cd $TESTTMP |
|
44 | 44 | > hg init $1 |
|
45 | 45 | > cd $1 |
|
46 | 46 | > mkcommit ROOT |
|
47 | 47 | > } |
|
48 | 48 | |
|
49 | 49 | Function to compare the expected bundled obsmarkers with the actually bundled |
|
50 | 50 | obsmarkers. It also check the obsmarkers backed up during strip. |
|
51 | 51 | |
|
52 | 52 | $ testrevs () { |
|
53 | 53 | > revs="$1" |
|
54 | 54 | > testname=`basename \`pwd\`` |
|
55 | 55 | > revsname=`hg --hidden log -T '-{desc}\n' --rev "${revs}"` |
|
56 | 56 | > prefix="${TESTTMP}/${testname}${revsname}" |
|
57 | 57 | > markersfile="${prefix}-relevant-markers.txt" |
|
58 | > exclufile="${prefix}-exclusive-markers.txt" | |
|
58 | 59 | > bundlefile="${prefix}-bundle.hg" |
|
59 | 60 | > contentfile="${prefix}-bundle-markers.hg" |
|
60 | 61 | > stripcontentfile="${prefix}-bundle-markers.hg" |
|
61 | 62 | > hg debugobsolete --hidden --rev "${revs}" | sed 's/^/ /' > "${markersfile}" |
|
63 | > hg debugobsolete --hidden --rev "${revs}" --exclusive | sed 's/^/ /' > "${exclufile}" | |
|
62 | 64 | > echo '### Matched revisions###' |
|
63 | 65 | > hg log --hidden --rev "${revs}" | sort |
|
64 | 66 | > echo '### Relevant markers ###' |
|
65 | 67 | > cat "${markersfile}" |
|
66 | 68 | > printf "# bundling: " |
|
67 | 69 | > hg bundle --hidden --base "parents(roots(${revs}))" --rev "${revs}" "${bundlefile}" |
|
68 | 70 | > hg debugbundle "${bundlefile}" | grep "obsmarkers --" -A 100 | sed 1,2d > "${contentfile}" |
|
69 | 71 | > echo '### Bundled markers ###' |
|
70 | 72 | > cat "${contentfile}" |
|
71 | 73 | > echo '### diff <relevant> <bundled> ###' |
|
72 | 74 | > cmp "${markersfile}" "${contentfile}" || diff -u "${markersfile}" "${contentfile}" |
|
73 | 75 | > echo '#################################' |
|
76 | > echo '### Exclusive markers ###' | |
|
77 | > cat "${exclufile}" | |
|
74 | 78 | > # if the matched revs do not have children, we also check the result of strip |
|
75 | 79 |
> orphan=`hg log --hidden -T ' |
|
76 | 80 | > if [ $orphan -eq 0 ]; |
|
77 | 81 | > then |
|
78 | 82 | > printf "# stripping: " |
|
79 | 83 | > hg strip --hidden --rev "${revs}" |
|
80 | 84 | > hg debugbundle .hg/strip-backup/* | grep "obsmarkers --" -A 100 | sed 1,2d > "${stripcontentfile}" |
|
81 | 85 | > echo '### Backup markers ###' |
|
82 | 86 | > cat "${stripcontentfile}" |
|
83 | 87 | > echo '### diff <relevant> <backed-up> ###' |
|
84 | 88 | > cmp "${markersfile}" "${stripcontentfile}" || diff -u "${markersfile}" "${stripcontentfile}" |
|
85 | 89 | > echo '#################################' |
|
86 | 90 | > hg unbundle .hg/strip-backup/* | sed 's/^/# unbundling: /' |
|
87 | 91 | > # clean up directory for the next test |
|
88 | 92 | > rm .hg/strip-backup/* |
|
89 | 93 | > fi |
|
90 | 94 | > } |
|
91 | 95 | |
|
92 | 96 | root setup |
|
93 | 97 | ------------- |
|
94 | 98 | |
|
95 | 99 | simple chain |
|
96 | 100 | ============ |
|
97 | 101 | |
|
98 | 102 | . A0 |
|
99 | 103 | . β ΓΈβ β A1 |
|
100 | 104 | . |/ |
|
101 | 105 | . β |
|
102 | 106 | |
|
103 | 107 | setup |
|
104 | 108 | ----- |
|
105 | 109 | |
|
106 | 110 | $ mktestrepo simple-chain |
|
107 | 111 | $ mkcommit 'C-A0' |
|
108 | 112 | $ hg up 'desc("ROOT")' |
|
109 | 113 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
110 | 114 | $ mkcommit 'C-A1' |
|
111 | 115 | created new head |
|
112 | 116 | $ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A0")'` |
|
113 | 117 | $ hg debugobsolete `getid 'desc("C-A0")'` a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 |
|
114 | 118 | $ hg debugobsolete a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 `getid 'desc("C-A1")'` |
|
115 | 119 | |
|
116 | 120 | $ hg up 'desc("ROOT")' |
|
117 | 121 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
118 | 122 | $ hg log --hidden -G |
|
119 | 123 | o cf2c22470d67: C-A1 |
|
120 | 124 | | |
|
121 | 125 | | x 84fcb0dfe17b: C-A0 |
|
122 | 126 | |/ |
|
123 | 127 | @ ea207398892e: ROOT |
|
124 | 128 | |
|
125 | 129 | $ hg debugobsolete |
|
126 | 130 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
127 | 131 | 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
128 | 132 | a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
129 | 133 | |
|
130 | 134 | Actual testing |
|
131 | 135 | -------------- |
|
132 | 136 | |
|
133 | 137 | $ testrevs 'desc("C-A0")' |
|
134 | 138 | ### Matched revisions### |
|
135 | 139 | 84fcb0dfe17b: C-A0 |
|
136 | 140 | ### Relevant markers ### |
|
137 | 141 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
138 | 142 | # bundling: 1 changesets found |
|
139 | 143 | ### Bundled markers ### |
|
140 | 144 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
141 | 145 | ### diff <relevant> <bundled> ### |
|
142 | 146 | ################################# |
|
147 | ### Exclusive markers ### | |
|
143 | 148 | # stripping: saved backup bundle to $TESTTMP/simple-chain/.hg/strip-backup/84fcb0dfe17b-6454bbdc-backup.hg |
|
144 | 149 | ### Backup markers ### |
|
145 | 150 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
146 | 151 | ### diff <relevant> <backed-up> ### |
|
147 | 152 | ################################# |
|
148 | 153 | # unbundling: adding changesets |
|
149 | 154 | # unbundling: adding manifests |
|
150 | 155 | # unbundling: adding file changes |
|
151 | 156 | # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads) |
|
152 | 157 | # unbundling: (run 'hg heads' to see heads) |
|
153 | 158 | |
|
154 | 159 | $ testrevs 'desc("C-A1")' |
|
155 | 160 | ### Matched revisions### |
|
156 | 161 | cf2c22470d67: C-A1 |
|
157 | 162 | ### Relevant markers ### |
|
158 | 163 | 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
159 | 164 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
160 | 165 | a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
161 | 166 | # bundling: 1 changesets found |
|
162 | 167 | ### Bundled markers ### |
|
163 | 168 | 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
164 | 169 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
165 | 170 | a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
166 | 171 | ### diff <relevant> <bundled> ### |
|
167 | 172 | ################################# |
|
173 | ### Exclusive markers ### | |
|
174 | 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
175 | a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
168 | 176 | # stripping: saved backup bundle to $TESTTMP/simple-chain/.hg/strip-backup/cf2c22470d67-fa0f07b0-backup.hg |
|
169 | 177 | ### Backup markers ### |
|
170 | 178 | 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
171 | 179 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
172 | 180 | a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
173 | 181 | ### diff <relevant> <backed-up> ### |
|
174 | 182 | ################################# |
|
175 | 183 | # unbundling: adding changesets |
|
176 | 184 | # unbundling: adding manifests |
|
177 | 185 | # unbundling: adding file changes |
|
178 | 186 | # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads) |
|
179 | 187 | # unbundling: (run 'hg heads' to see heads) |
|
180 | 188 | |
|
181 | 189 | $ testrevs 'desc("C-A")' |
|
182 | 190 | ### Matched revisions### |
|
183 | 191 | 84fcb0dfe17b: C-A0 |
|
184 | 192 | cf2c22470d67: C-A1 |
|
185 | 193 | ### Relevant markers ### |
|
186 | 194 | 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
187 | 195 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
188 | 196 | a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
189 | 197 | # bundling: 2 changesets found |
|
190 | 198 | ### Bundled markers ### |
|
191 | 199 | 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
192 | 200 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
193 | 201 | a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
194 | 202 | ### diff <relevant> <bundled> ### |
|
195 | 203 | ################################# |
|
204 | ### Exclusive markers ### | |
|
205 | 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
206 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
207 | a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
196 | 208 | # stripping: saved backup bundle to $TESTTMP/simple-chain/.hg/strip-backup/cf2c22470d67-fce4fc64-backup.hg |
|
197 | 209 | ### Backup markers ### |
|
198 | 210 | 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
199 | 211 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
200 | 212 | a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
201 | 213 | ### diff <relevant> <backed-up> ### |
|
202 | 214 | ################################# |
|
203 | 215 | # unbundling: adding changesets |
|
204 | 216 | # unbundling: adding manifests |
|
205 | 217 | # unbundling: adding file changes |
|
206 | 218 | # unbundling: added 2 changesets with 2 changes to 2 files (+1 heads) |
|
207 | 219 | # unbundling: (run 'hg heads' to see heads) |
|
208 | 220 | |
|
209 | 221 | chain with prune children |
|
210 | 222 | ========================= |
|
211 | 223 | |
|
212 | 224 | . β β B0 |
|
213 | 225 | . | |
|
214 | 226 | . β ΓΈβ β A1 |
|
215 | 227 | . | |
|
216 | 228 | . β |
|
217 | 229 | |
|
218 | 230 | setup |
|
219 | 231 | ----- |
|
220 | 232 | |
|
221 | 233 | $ mktestrepo prune |
|
222 | 234 | $ mkcommit 'C-A0' |
|
223 | 235 | $ mkcommit 'C-B0' |
|
224 | 236 | $ hg up 'desc("ROOT")' |
|
225 | 237 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
226 | 238 | $ mkcommit 'C-A1' |
|
227 | 239 | created new head |
|
228 | 240 | $ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A0")'` |
|
229 | 241 | $ hg debugobsolete `getid 'desc("C-A0")'` `getid 'desc("C-A1")'` |
|
230 | 242 | $ hg debugobsolete --record-parents `getid 'desc("C-B0")'` |
|
231 | 243 | $ hg up 'desc("ROOT")' |
|
232 | 244 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
233 | 245 | $ hg log --hidden -G |
|
234 | 246 | o cf2c22470d67: C-A1 |
|
235 | 247 | | |
|
236 | 248 | | x 29f93b1df87b: C-B0 |
|
237 | 249 | | | |
|
238 | 250 | | x 84fcb0dfe17b: C-A0 |
|
239 | 251 | |/ |
|
240 | 252 | @ ea207398892e: ROOT |
|
241 | 253 | |
|
242 | 254 | $ hg debugobsolete |
|
243 | 255 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
244 | 256 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
245 | 257 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
246 | 258 | |
|
247 | 259 | Actual testing |
|
248 | 260 | -------------- |
|
249 | 261 | |
|
250 | 262 | $ testrevs 'desc("C-A0")' |
|
251 | 263 | ### Matched revisions### |
|
252 | 264 | 84fcb0dfe17b: C-A0 |
|
253 | 265 | ### Relevant markers ### |
|
254 | 266 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
255 | 267 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
256 | 268 | # bundling: 1 changesets found |
|
257 | 269 | ### Bundled markers ### |
|
258 | 270 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
259 | 271 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
260 | 272 | ### diff <relevant> <bundled> ### |
|
261 | 273 | ################################# |
|
274 | ### Exclusive markers ### | |
|
275 | ||
|
276 | (The strip markers is considered exclusive to the pruned changeset even if it | |
|
277 | is also considered "relevant" to its parent. This allows to strip prune | |
|
278 | markers. This avoid leaving prune markers from dead-end that could be | |
|
279 | problematic) | |
|
262 | 280 |
|
|
263 | 281 | $ testrevs 'desc("C-B0")' |
|
264 | 282 | ### Matched revisions### |
|
265 | 283 | 29f93b1df87b: C-B0 |
|
266 | 284 | ### Relevant markers ### |
|
267 | 285 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
268 | 286 | # bundling: 1 changesets found |
|
269 | 287 | ### Bundled markers ### |
|
270 | 288 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
271 | 289 | ### diff <relevant> <bundled> ### |
|
272 | 290 | ################################# |
|
291 | ### Exclusive markers ### | |
|
292 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
273 | 293 | # stripping: saved backup bundle to $TESTTMP/prune/.hg/strip-backup/29f93b1df87b-7fb32101-backup.hg |
|
274 | 294 | ### Backup markers ### |
|
275 | 295 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
276 | 296 | ### diff <relevant> <backed-up> ### |
|
277 | 297 | ################################# |
|
278 | 298 | # unbundling: adding changesets |
|
279 | 299 | # unbundling: adding manifests |
|
280 | 300 | # unbundling: adding file changes |
|
281 | 301 | # unbundling: added 1 changesets with 1 changes to 1 files |
|
282 | 302 | # unbundling: (run 'hg update' to get a working copy) |
|
283 | 303 | |
|
284 | 304 | $ testrevs 'desc("C-A1")' |
|
285 | 305 | ### Matched revisions### |
|
286 | 306 | cf2c22470d67: C-A1 |
|
287 | 307 | ### Relevant markers ### |
|
288 | 308 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
289 | 309 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
290 | 310 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
291 | 311 | # bundling: 1 changesets found |
|
292 | 312 | ### Bundled markers ### |
|
293 | 313 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
294 | 314 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
295 | 315 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
296 | 316 | ### diff <relevant> <bundled> ### |
|
297 | 317 | ################################# |
|
318 | ### Exclusive markers ### | |
|
319 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
298 | 320 | # stripping: saved backup bundle to $TESTTMP/prune/.hg/strip-backup/cf2c22470d67-fa0f07b0-backup.hg |
|
299 | 321 | ### Backup markers ### |
|
300 | 322 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
301 | 323 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
302 | 324 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
303 | 325 | ### diff <relevant> <backed-up> ### |
|
304 | 326 | ################################# |
|
305 | 327 | # unbundling: adding changesets |
|
306 | 328 | # unbundling: adding manifests |
|
307 | 329 | # unbundling: adding file changes |
|
308 | 330 | # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads) |
|
309 | 331 | # unbundling: (run 'hg heads' to see heads) |
|
310 | 332 | |
|
311 | 333 | bundling multiple revisions |
|
312 | 334 | |
|
313 | 335 | $ testrevs 'desc("C-A")' |
|
314 | 336 | ### Matched revisions### |
|
315 | 337 | 84fcb0dfe17b: C-A0 |
|
316 | 338 | cf2c22470d67: C-A1 |
|
317 | 339 | ### Relevant markers ### |
|
318 | 340 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
319 | 341 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
320 | 342 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
321 | 343 | # bundling: 2 changesets found |
|
322 | 344 | ### Bundled markers ### |
|
323 | 345 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
324 | 346 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
325 | 347 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
326 | 348 | ### diff <relevant> <bundled> ### |
|
327 | 349 | ################################# |
|
350 | ### Exclusive markers ### | |
|
351 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
352 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
328 | 353 |
|
|
329 | 354 | $ testrevs 'desc("C-")' |
|
330 | 355 | ### Matched revisions### |
|
331 | 356 | 29f93b1df87b: C-B0 |
|
332 | 357 | 84fcb0dfe17b: C-A0 |
|
333 | 358 | cf2c22470d67: C-A1 |
|
334 | 359 | ### Relevant markers ### |
|
335 | 360 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
336 | 361 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
337 | 362 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
338 | 363 | # bundling: 3 changesets found |
|
339 | 364 | ### Bundled markers ### |
|
340 | 365 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
341 | 366 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
342 | 367 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
343 | 368 | ### diff <relevant> <bundled> ### |
|
344 | 369 | ################################# |
|
370 | ### Exclusive markers ### | |
|
371 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
372 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
373 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
345 | 374 | # stripping: saved backup bundle to $TESTTMP/prune/.hg/strip-backup/cf2c22470d67-884c33b0-backup.hg |
|
346 | 375 | ### Backup markers ### |
|
347 | 376 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
348 | 377 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
349 | 378 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
350 | 379 | ### diff <relevant> <backed-up> ### |
|
351 | 380 | ################################# |
|
352 | 381 | # unbundling: adding changesets |
|
353 | 382 | # unbundling: adding manifests |
|
354 | 383 | # unbundling: adding file changes |
|
355 | 384 | # unbundling: added 3 changesets with 3 changes to 3 files (+1 heads) |
|
356 | 385 | # unbundling: (run 'hg heads' to see heads) |
|
357 | 386 | |
|
358 | 387 | chain with precursors also pruned |
|
359 | 388 | ================================= |
|
360 | 389 | |
|
361 | 390 | . A0 (also pruned) |
|
362 | 391 | . β ΓΈβ β A1 |
|
363 | 392 | . | |
|
364 | 393 | . β |
|
365 | 394 | |
|
366 | 395 | setup |
|
367 | 396 | ----- |
|
368 | 397 | |
|
369 | 398 | $ mktestrepo prune-inline |
|
370 | 399 | $ mkcommit 'C-A0' |
|
371 | 400 | $ hg up 'desc("ROOT")' |
|
372 | 401 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
373 | 402 | $ mkcommit 'C-A1' |
|
374 | 403 | created new head |
|
375 | 404 | $ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A0")'` |
|
376 | 405 | $ hg debugobsolete --record-parents `getid 'desc("C-A0")'` |
|
377 | 406 | $ hg debugobsolete `getid 'desc("C-A0")'` `getid 'desc("C-A1")'` |
|
378 | 407 | $ hg up 'desc("ROOT")' |
|
379 | 408 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
380 | 409 | $ hg log --hidden -G |
|
381 | 410 | o cf2c22470d67: C-A1 |
|
382 | 411 | | |
|
383 | 412 | | x 84fcb0dfe17b: C-A0 |
|
384 | 413 | |/ |
|
385 | 414 | @ ea207398892e: ROOT |
|
386 | 415 | |
|
387 | 416 | $ hg debugobsolete |
|
388 | 417 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
389 | 418 | 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
390 | 419 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
391 | 420 | |
|
392 | 421 | Actual testing |
|
393 | 422 | -------------- |
|
394 | 423 | |
|
395 | 424 | $ testrevs 'desc("C-A0")' |
|
396 | 425 | ### Matched revisions### |
|
397 | 426 | 84fcb0dfe17b: C-A0 |
|
398 | 427 | ### Relevant markers ### |
|
399 | 428 | 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
400 | 429 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
401 | 430 | # bundling: 1 changesets found |
|
402 | 431 | ### Bundled markers ### |
|
403 | 432 | 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
404 | 433 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
405 | 434 | ### diff <relevant> <bundled> ### |
|
406 | 435 | ################################# |
|
436 | ### Exclusive markers ### | |
|
407 | 437 | # stripping: saved backup bundle to $TESTTMP/prune-inline/.hg/strip-backup/84fcb0dfe17b-6454bbdc-backup.hg |
|
408 | 438 | ### Backup markers ### |
|
409 | 439 | 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
410 | 440 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
411 | 441 | ### diff <relevant> <backed-up> ### |
|
412 | 442 | ################################# |
|
413 | 443 | # unbundling: adding changesets |
|
414 | 444 | # unbundling: adding manifests |
|
415 | 445 | # unbundling: adding file changes |
|
416 | 446 | # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads) |
|
417 | 447 | # unbundling: (run 'hg heads' to see heads) |
|
418 | 448 | |
|
419 | 449 | $ testrevs 'desc("C-A1")' |
|
420 | 450 | ### Matched revisions### |
|
421 | 451 | cf2c22470d67: C-A1 |
|
422 | 452 | ### Relevant markers ### |
|
423 | 453 | 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
424 | 454 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
425 | 455 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
426 | 456 | # bundling: 1 changesets found |
|
427 | 457 | ### Bundled markers ### |
|
428 | 458 | 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
429 | 459 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
430 | 460 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
431 | 461 | ### diff <relevant> <bundled> ### |
|
432 | 462 | ################################# |
|
463 | ### Exclusive markers ### | |
|
464 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
433 | 465 | # stripping: saved backup bundle to $TESTTMP/prune-inline/.hg/strip-backup/cf2c22470d67-fa0f07b0-backup.hg |
|
434 | 466 | ### Backup markers ### |
|
435 | 467 | 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
436 | 468 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
437 | 469 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
438 | 470 | ### diff <relevant> <backed-up> ### |
|
439 | 471 | ################################# |
|
440 | 472 | # unbundling: adding changesets |
|
441 | 473 | # unbundling: adding manifests |
|
442 | 474 | # unbundling: adding file changes |
|
443 | 475 | # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads) |
|
444 | 476 | # unbundling: (run 'hg heads' to see heads) |
|
445 | 477 | |
|
446 | 478 | $ testrevs 'desc("C-A")' |
|
447 | 479 | ### Matched revisions### |
|
448 | 480 | 84fcb0dfe17b: C-A0 |
|
449 | 481 | cf2c22470d67: C-A1 |
|
450 | 482 | ### Relevant markers ### |
|
451 | 483 | 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
452 | 484 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
453 | 485 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
454 | 486 | # bundling: 2 changesets found |
|
455 | 487 | ### Bundled markers ### |
|
456 | 488 | 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
457 | 489 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
458 | 490 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
459 | 491 | ### diff <relevant> <bundled> ### |
|
460 | 492 | ################################# |
|
493 | ### Exclusive markers ### | |
|
494 | 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
495 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
496 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
461 | 497 | # stripping: saved backup bundle to $TESTTMP/prune-inline/.hg/strip-backup/cf2c22470d67-fce4fc64-backup.hg |
|
462 | 498 | ### Backup markers ### |
|
463 | 499 | 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
464 | 500 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
465 | 501 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
466 | 502 | ### diff <relevant> <backed-up> ### |
|
467 | 503 | ################################# |
|
468 | 504 | # unbundling: adding changesets |
|
469 | 505 | # unbundling: adding manifests |
|
470 | 506 | # unbundling: adding file changes |
|
471 | 507 | # unbundling: added 2 changesets with 2 changes to 2 files (+1 heads) |
|
472 | 508 | # unbundling: (run 'hg heads' to see heads) |
|
473 | 509 | |
|
474 | 510 | chain with missing prune |
|
475 | 511 | ======================== |
|
476 | 512 | |
|
477 | 513 | . β B |
|
478 | 514 | . | |
|
479 | 515 | . β ββ β A1 |
|
480 | 516 | . | |
|
481 | 517 | . β |
|
482 | 518 | |
|
483 | 519 | setup |
|
484 | 520 | ----- |
|
485 | 521 | |
|
486 | 522 | $ mktestrepo missing-prune |
|
487 | 523 | $ mkcommit 'C-A0' |
|
488 | 524 | $ mkcommit 'C-B0' |
|
489 | 525 | $ hg up 'desc("ROOT")' |
|
490 | 526 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
491 | 527 | $ mkcommit 'C-A1' |
|
492 | 528 | created new head |
|
493 | 529 | $ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A0")'` |
|
494 | 530 | $ hg debugobsolete `getid 'desc("C-A0")'` `getid 'desc("C-A1")'` |
|
495 | 531 | $ hg debugobsolete --record-parents `getid 'desc("C-B0")'` |
|
496 | 532 | |
|
497 | 533 | (it is annoying to create prune with parent data without the changeset, so we strip it after the fact) |
|
498 | 534 | |
|
499 | 535 | $ hg strip --hidden --rev 'desc("C-A0")::' --no-backup |
|
500 | 536 | |
|
501 | 537 | $ hg up 'desc("ROOT")' |
|
502 | 538 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
503 | 539 | $ hg log --hidden -G |
|
504 | 540 | o cf2c22470d67: C-A1 |
|
505 | 541 | | |
|
506 | 542 | @ ea207398892e: ROOT |
|
507 | 543 | |
|
508 | 544 | $ hg debugobsolete |
|
509 | 545 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
510 | 546 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
511 | 547 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
512 | 548 | |
|
513 | 549 | Actual testing |
|
514 | 550 | -------------- |
|
515 | 551 | |
|
516 | 552 | $ testrevs 'desc("C-A1")' |
|
517 | 553 | ### Matched revisions### |
|
518 | 554 | cf2c22470d67: C-A1 |
|
519 | 555 | ### Relevant markers ### |
|
520 | 556 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
521 | 557 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
522 | 558 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
523 | 559 | # bundling: 1 changesets found |
|
524 | 560 | ### Bundled markers ### |
|
525 | 561 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
526 | 562 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
527 | 563 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
528 | 564 | ### diff <relevant> <bundled> ### |
|
529 | 565 | ################################# |
|
566 | ### Exclusive markers ### | |
|
567 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
568 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
569 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
530 | 570 | # stripping: saved backup bundle to $TESTTMP/missing-prune/.hg/strip-backup/cf2c22470d67-fa0f07b0-backup.hg |
|
531 | 571 | ### Backup markers ### |
|
532 | 572 | 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
533 | 573 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
534 | 574 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
535 | 575 | ### diff <relevant> <backed-up> ### |
|
536 | 576 | ################################# |
|
537 | 577 | # unbundling: adding changesets |
|
538 | 578 | # unbundling: adding manifests |
|
539 | 579 | # unbundling: adding file changes |
|
540 | 580 | # unbundling: added 1 changesets with 1 changes to 1 files |
|
541 | 581 | # unbundling: (run 'hg update' to get a working copy) |
|
542 | 582 | |
|
543 | 583 | chain with precursors also pruned |
|
544 | 584 | ================================= |
|
545 | 585 | |
|
546 | 586 | . A0 (also pruned) |
|
547 | 587 | . β ββ β A1 |
|
548 | 588 | . | |
|
549 | 589 | . β |
|
550 | 590 | |
|
551 | 591 | setup |
|
552 | 592 | ----- |
|
553 | 593 | |
|
554 | 594 | $ mktestrepo prune-inline-missing |
|
555 | 595 | $ mkcommit 'C-A0' |
|
556 | 596 | $ hg up 'desc("ROOT")' |
|
557 | 597 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
558 | 598 | $ mkcommit 'C-A1' |
|
559 | 599 | created new head |
|
560 | 600 | $ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A0")'` |
|
561 | 601 | $ hg debugobsolete --record-parents `getid 'desc("C-A0")'` |
|
562 | 602 | $ hg debugobsolete `getid 'desc("C-A0")'` `getid 'desc("C-A1")'` |
|
563 | 603 | |
|
564 | 604 | (it is annoying to create prune with parent data without the changeset, so we strip it after the fact) |
|
565 | 605 | |
|
566 | 606 | $ hg strip --hidden --rev 'desc("C-A0")::' --no-backup |
|
567 | 607 | |
|
568 | 608 | $ hg up 'desc("ROOT")' |
|
569 | 609 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
570 | 610 | $ hg log --hidden -G |
|
571 | 611 | o cf2c22470d67: C-A1 |
|
572 | 612 | | |
|
573 | 613 | @ ea207398892e: ROOT |
|
574 | 614 | |
|
575 | 615 | $ hg debugobsolete |
|
576 | 616 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
577 | 617 | 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
578 | 618 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
579 | 619 | |
|
580 | 620 | Actual testing |
|
581 | 621 | -------------- |
|
582 | 622 | |
|
583 | 623 | $ testrevs 'desc("C-A1")' |
|
584 | 624 | ### Matched revisions### |
|
585 | 625 | cf2c22470d67: C-A1 |
|
586 | 626 | ### Relevant markers ### |
|
587 | 627 | 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
588 | 628 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
589 | 629 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
590 | 630 | # bundling: 1 changesets found |
|
591 | 631 | ### Bundled markers ### |
|
592 | 632 | 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
593 | 633 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
594 | 634 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
595 | 635 | ### diff <relevant> <bundled> ### |
|
596 | 636 | ################################# |
|
637 | ### Exclusive markers ### | |
|
638 | 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
639 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
640 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
597 | 641 | # stripping: saved backup bundle to $TESTTMP/prune-inline-missing/.hg/strip-backup/cf2c22470d67-fa0f07b0-backup.hg |
|
598 | 642 | ### Backup markers ### |
|
599 | 643 | 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
600 | 644 | 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
601 | 645 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
602 | 646 | ### diff <relevant> <backed-up> ### |
|
603 | 647 | ################################# |
|
604 | 648 | # unbundling: adding changesets |
|
605 | 649 | # unbundling: adding manifests |
|
606 | 650 | # unbundling: adding file changes |
|
607 | 651 | # unbundling: added 1 changesets with 1 changes to 1 files |
|
608 | 652 | # unbundling: (run 'hg update' to get a working copy) |
|
609 | 653 | |
|
610 | 654 | Chain with fold and split |
|
611 | 655 | ========================= |
|
612 | 656 | |
|
613 | 657 | setup |
|
614 | 658 | ----- |
|
615 | 659 | |
|
616 | 660 | $ mktestrepo split-fold |
|
617 | 661 | $ mkcommit 'C-A' |
|
618 | 662 | $ hg up 'desc("ROOT")' |
|
619 | 663 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
620 | 664 | $ mkcommit 'C-B' |
|
621 | 665 | created new head |
|
622 | 666 | $ hg up 'desc("ROOT")' |
|
623 | 667 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
624 | 668 | $ mkcommit 'C-C' |
|
625 | 669 | created new head |
|
626 | 670 | $ hg up 'desc("ROOT")' |
|
627 | 671 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
628 | 672 | $ mkcommit 'C-D' |
|
629 | 673 | created new head |
|
630 | 674 | $ hg up 'desc("ROOT")' |
|
631 | 675 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
632 | 676 | $ mkcommit 'C-E' |
|
633 | 677 | created new head |
|
634 | 678 | $ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A")'` |
|
635 | 679 | $ hg debugobsolete `getid 'desc("C-A")'` `getid 'desc("C-B")'` `getid 'desc("C-C")'` # record split |
|
636 | 680 | $ hg debugobsolete `getid 'desc("C-A")'` `getid 'desc("C-D")'` # other divergent |
|
637 | 681 | $ hg debugobsolete `getid 'desc("C-A")'` b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 |
|
638 | 682 | $ hg debugobsolete b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 `getid 'desc("C-E")'` |
|
639 | 683 | $ hg debugobsolete `getid 'desc("C-B")'` `getid 'desc("C-E")'` |
|
640 | 684 | $ hg debugobsolete `getid 'desc("C-C")'` `getid 'desc("C-E")'` |
|
641 | 685 | $ hg debugobsolete `getid 'desc("C-D")'` `getid 'desc("C-E")'` |
|
642 | 686 | $ hg debugobsolete c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 `getid 'desc("C-E")'` |
|
643 | 687 | |
|
644 | 688 | $ hg up 'desc("ROOT")' |
|
645 | 689 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
646 | 690 | $ hg log --hidden -G |
|
647 | 691 | o 2f20ff6509f0: C-E |
|
648 | 692 | | |
|
649 | 693 | | x 06dc9da25ef0: C-D |
|
650 | 694 | |/ |
|
651 | 695 | | x 27ec657ca21d: C-C |
|
652 | 696 | |/ |
|
653 | 697 | | x a9b9da38ed96: C-B |
|
654 | 698 | |/ |
|
655 | 699 | | x 9ac430e15fca: C-A |
|
656 | 700 | |/ |
|
657 | 701 | @ ea207398892e: ROOT |
|
658 | 702 | |
|
659 | 703 | $ hg debugobsolete |
|
660 | 704 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
661 | 705 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
662 | 706 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
663 | 707 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
664 | 708 | b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
665 | 709 | a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
666 | 710 | 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
667 | 711 | 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
668 | 712 | c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
669 | 713 | |
|
670 | 714 | Actual testing |
|
671 | 715 | -------------- |
|
672 | 716 | |
|
673 | 717 | $ testrevs 'desc("C-A")' |
|
674 | 718 | ### Matched revisions### |
|
675 | 719 | 9ac430e15fca: C-A |
|
676 | 720 | ### Relevant markers ### |
|
677 | 721 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
678 | 722 | # bundling: 1 changesets found |
|
679 | 723 | ### Bundled markers ### |
|
680 | 724 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
681 | 725 | ### diff <relevant> <bundled> ### |
|
682 | 726 | ################################# |
|
727 | ### Exclusive markers ### | |
|
683 | 728 | # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/9ac430e15fca-81204eba-backup.hg |
|
684 | 729 | ### Backup markers ### |
|
685 | 730 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
686 | 731 | ### diff <relevant> <backed-up> ### |
|
687 | 732 | ################################# |
|
688 | 733 | # unbundling: adding changesets |
|
689 | 734 | # unbundling: adding manifests |
|
690 | 735 | # unbundling: adding file changes |
|
691 | 736 | # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads) |
|
692 | 737 | # unbundling: (run 'hg heads' to see heads) |
|
693 | 738 | |
|
694 | 739 | $ testrevs 'desc("C-B")' |
|
695 | 740 | ### Matched revisions### |
|
696 | 741 | a9b9da38ed96: C-B |
|
697 | 742 | ### Relevant markers ### |
|
698 | 743 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
699 | 744 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
700 | 745 | # bundling: 1 changesets found |
|
701 | 746 | ### Bundled markers ### |
|
702 | 747 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
703 | 748 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
704 | 749 | ### diff <relevant> <bundled> ### |
|
705 | 750 | ################################# |
|
751 | ### Exclusive markers ### | |
|
706 | 752 | # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/a9b9da38ed96-7465d6e9-backup.hg |
|
707 | 753 | ### Backup markers ### |
|
708 | 754 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
709 | 755 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
710 | 756 | ### diff <relevant> <backed-up> ### |
|
711 | 757 | ################################# |
|
712 | 758 | # unbundling: adding changesets |
|
713 | 759 | # unbundling: adding manifests |
|
714 | 760 | # unbundling: adding file changes |
|
715 | 761 | # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads) |
|
716 | 762 | # unbundling: (run 'hg heads' to see heads) |
|
717 | 763 | |
|
718 | 764 | $ testrevs 'desc("C-C")' |
|
719 | 765 | ### Matched revisions### |
|
720 | 766 | 27ec657ca21d: C-C |
|
721 | 767 | ### Relevant markers ### |
|
722 | 768 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
723 | 769 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
724 | 770 | # bundling: 1 changesets found |
|
725 | 771 | ### Bundled markers ### |
|
726 | 772 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
727 | 773 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
728 | 774 | ### diff <relevant> <bundled> ### |
|
729 | 775 | ################################# |
|
776 | ### Exclusive markers ### | |
|
730 | 777 | # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/27ec657ca21d-d5dd1c7c-backup.hg |
|
731 | 778 | ### Backup markers ### |
|
732 | 779 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
733 | 780 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
734 | 781 | ### diff <relevant> <backed-up> ### |
|
735 | 782 | ################################# |
|
736 | 783 | # unbundling: adding changesets |
|
737 | 784 | # unbundling: adding manifests |
|
738 | 785 | # unbundling: adding file changes |
|
739 | 786 | # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads) |
|
740 | 787 | # unbundling: (run 'hg heads' to see heads) |
|
741 | 788 | |
|
742 | 789 | $ testrevs 'desc("C-D")' |
|
743 | 790 | ### Matched revisions### |
|
744 | 791 | 06dc9da25ef0: C-D |
|
745 | 792 | ### Relevant markers ### |
|
746 | 793 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
747 | 794 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
748 | 795 | # bundling: 1 changesets found |
|
749 | 796 | ### Bundled markers ### |
|
750 | 797 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
751 | 798 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
752 | 799 | ### diff <relevant> <bundled> ### |
|
753 | 800 | ################################# |
|
801 | ### Exclusive markers ### | |
|
754 | 802 | # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/06dc9da25ef0-9b1c0a91-backup.hg |
|
755 | 803 | ### Backup markers ### |
|
756 | 804 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
757 | 805 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
758 | 806 | ### diff <relevant> <backed-up> ### |
|
759 | 807 | ################################# |
|
760 | 808 | # unbundling: adding changesets |
|
761 | 809 | # unbundling: adding manifests |
|
762 | 810 | # unbundling: adding file changes |
|
763 | 811 | # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads) |
|
764 | 812 | # unbundling: (run 'hg heads' to see heads) |
|
765 | 813 | |
|
766 | 814 | $ testrevs 'desc("C-E")' |
|
767 | 815 | ### Matched revisions### |
|
768 | 816 | 2f20ff6509f0: C-E |
|
769 | 817 | ### Relevant markers ### |
|
770 | 818 | 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
771 | 819 | 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
772 | 820 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
773 | 821 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
774 | 822 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
775 | 823 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
776 | 824 | a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
777 | 825 | b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
778 | 826 | c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
779 | 827 | # bundling: 1 changesets found |
|
780 | 828 | ### Bundled markers ### |
|
781 | 829 | 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
782 | 830 | 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
783 | 831 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
784 | 832 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
785 | 833 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
786 | 834 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
787 | 835 | a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
788 | 836 | b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
789 | 837 | c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
790 | 838 | ### diff <relevant> <bundled> ### |
|
791 | 839 | ################################# |
|
840 | ### Exclusive markers ### | |
|
841 | 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
842 | 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
843 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
844 | a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
845 | b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
846 | c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
792 | 847 | # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/2f20ff6509f0-8adeb22d-backup.hg |
|
793 | 848 | ### Backup markers ### |
|
794 | 849 | 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
795 | 850 | 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
796 | 851 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
797 | 852 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
798 | 853 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
799 | 854 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
800 | 855 | a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
801 | 856 | b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
802 | 857 | c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
803 | 858 | ### diff <relevant> <backed-up> ### |
|
804 | 859 | ################################# |
|
805 | 860 | # unbundling: adding changesets |
|
806 | 861 | # unbundling: adding manifests |
|
807 | 862 | # unbundling: adding file changes |
|
808 | 863 | # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads) |
|
809 | 864 | # unbundling: (run 'hg heads' to see heads) |
|
810 | 865 | |
|
811 | 866 | Bundle multiple revisions |
|
812 | 867 | |
|
813 | 868 | * each part of the split |
|
814 | 869 | |
|
815 | 870 | $ testrevs 'desc("C-B") + desc("C-C")' |
|
816 | 871 | ### Matched revisions### |
|
817 | 872 | 27ec657ca21d: C-C |
|
818 | 873 | a9b9da38ed96: C-B |
|
819 | 874 | ### Relevant markers ### |
|
820 | 875 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
821 | 876 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
822 | 877 | # bundling: 2 changesets found |
|
823 | 878 | ### Bundled markers ### |
|
824 | 879 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
825 | 880 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
826 | 881 | ### diff <relevant> <bundled> ### |
|
827 | 882 | ################################# |
|
883 | ### Exclusive markers ### | |
|
828 | 884 | |
|
829 | 885 | * top one and other divergent |
|
830 | 886 | |
|
831 | 887 | $ testrevs 'desc("C-E") + desc("C-D")' |
|
832 | 888 | ### Matched revisions### |
|
833 | 889 | 06dc9da25ef0: C-D |
|
834 | 890 | 2f20ff6509f0: C-E |
|
835 | 891 | ### Relevant markers ### |
|
836 | 892 | 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
837 | 893 | 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
838 | 894 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
839 | 895 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
840 | 896 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
841 | 897 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
842 | 898 | a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
843 | 899 | b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
844 | 900 | c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
845 | 901 | # bundling: 2 changesets found |
|
846 | 902 | ### Bundled markers ### |
|
847 | 903 | 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
848 | 904 | 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
849 | 905 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
850 | 906 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
851 | 907 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
852 | 908 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
853 | 909 | a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
854 | 910 | b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
855 | 911 | c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
856 | 912 | ### diff <relevant> <bundled> ### |
|
857 | 913 | ################################# |
|
914 | ### Exclusive markers ### | |
|
915 | 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
916 | 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
917 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
918 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
919 | a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
920 | b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
921 | c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
858 | 922 |
|
|
859 | 923 | * top one and initial precursors |
|
860 | 924 | |
|
861 | 925 | $ testrevs 'desc("C-E") + desc("C-A")' |
|
862 | 926 | ### Matched revisions### |
|
863 | 927 | 2f20ff6509f0: C-E |
|
864 | 928 | 9ac430e15fca: C-A |
|
865 | 929 | ### Relevant markers ### |
|
866 | 930 | 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
867 | 931 | 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
868 | 932 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
869 | 933 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
870 | 934 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
871 | 935 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
872 | 936 | a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
873 | 937 | b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
874 | 938 | c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
875 | 939 | # bundling: 2 changesets found |
|
876 | 940 | ### Bundled markers ### |
|
877 | 941 | 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
878 | 942 | 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
879 | 943 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
880 | 944 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
881 | 945 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
882 | 946 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
883 | 947 | a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
884 | 948 | b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
885 | 949 | c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
886 | 950 | ### diff <relevant> <bundled> ### |
|
887 | 951 | ################################# |
|
952 | ### Exclusive markers ### | |
|
953 | 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
954 | 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
955 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
956 | a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
957 | b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
958 | c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
888 | 959 |
|
|
889 | 960 | * top one and one of the split |
|
890 | 961 | |
|
891 | 962 | $ testrevs 'desc("C-E") + desc("C-C")' |
|
892 | 963 | ### Matched revisions### |
|
893 | 964 | 27ec657ca21d: C-C |
|
894 | 965 | 2f20ff6509f0: C-E |
|
895 | 966 | ### Relevant markers ### |
|
896 | 967 | 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
897 | 968 | 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
898 | 969 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
899 | 970 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
900 | 971 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
901 | 972 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
902 | 973 | a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
903 | 974 | b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
904 | 975 | c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
905 | 976 | # bundling: 2 changesets found |
|
906 | 977 | ### Bundled markers ### |
|
907 | 978 | 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
908 | 979 | 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
909 | 980 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
910 | 981 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
911 | 982 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
912 | 983 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
913 | 984 | a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
914 | 985 | b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
915 | 986 | c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
916 | 987 | ### diff <relevant> <bundled> ### |
|
917 | 988 | ################################# |
|
989 | ### Exclusive markers ### | |
|
990 | 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
991 | 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
992 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
993 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
994 | a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
995 | b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
996 | c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
918 | 997 |
|
|
919 | 998 | * all |
|
920 | 999 | |
|
921 | 1000 | $ testrevs 'desc("C-")' |
|
922 | 1001 | ### Matched revisions### |
|
923 | 1002 | 06dc9da25ef0: C-D |
|
924 | 1003 | 27ec657ca21d: C-C |
|
925 | 1004 | 2f20ff6509f0: C-E |
|
926 | 1005 | 9ac430e15fca: C-A |
|
927 | 1006 | a9b9da38ed96: C-B |
|
928 | 1007 | ### Relevant markers ### |
|
929 | 1008 | 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
930 | 1009 | 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
931 | 1010 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
932 | 1011 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
933 | 1012 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
934 | 1013 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
935 | 1014 | a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
936 | 1015 | b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
937 | 1016 | c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
938 | 1017 | # bundling: 5 changesets found |
|
939 | 1018 | ### Bundled markers ### |
|
940 | 1019 | 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
941 | 1020 | 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
942 | 1021 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
943 | 1022 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
944 | 1023 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
945 | 1024 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
946 | 1025 | a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
947 | 1026 | b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
948 | 1027 | c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
949 | 1028 | ### diff <relevant> <bundled> ### |
|
950 | 1029 | ################################# |
|
1030 | ### Exclusive markers ### | |
|
1031 | 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
1032 | 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
1033 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
1034 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
1035 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
1036 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
1037 | a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
1038 | b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
1039 | c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
951 | 1040 | # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/a9b9da38ed96-eeb4258f-backup.hg |
|
952 | 1041 | ### Backup markers ### |
|
953 | 1042 | 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
954 | 1043 | 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
955 | 1044 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
956 | 1045 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
957 | 1046 | 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
958 | 1047 | a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
959 | 1048 | a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
960 | 1049 | b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
961 | 1050 | c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
962 | 1051 | ### diff <relevant> <backed-up> ### |
|
963 | 1052 | ################################# |
|
964 | 1053 | # unbundling: adding changesets |
|
965 | 1054 | # unbundling: adding manifests |
|
966 | 1055 | # unbundling: adding file changes |
|
967 | 1056 | # unbundling: added 5 changesets with 5 changes to 5 files (+4 heads) |
|
968 | 1057 | # unbundling: (run 'hg heads' to see heads) |
|
969 | 1058 | |
|
970 | 1059 | changeset pruned on its own |
|
971 | 1060 | =========================== |
|
972 | 1061 | |
|
973 | 1062 | . β B |
|
974 | 1063 | . | |
|
975 | 1064 | . β A |
|
976 | 1065 | . | |
|
977 | 1066 | . β |
|
978 | 1067 | |
|
979 | 1068 | setup |
|
980 | 1069 | ----- |
|
981 | 1070 | |
|
982 | 1071 | $ mktestrepo lonely-prune |
|
983 | 1072 | $ hg up 'desc("ROOT")' |
|
984 | 1073 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
985 | 1074 | $ mkcommit 'C-A' |
|
986 | 1075 | $ mkcommit 'C-B' |
|
987 | 1076 | $ hg debugobsolete --record-parent `getid 'desc("C-B")'` |
|
988 | 1077 | |
|
989 | 1078 | $ hg up 'desc("ROOT")' |
|
990 | 1079 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
991 | 1080 | $ hg log --hidden -G |
|
992 | 1081 | x cefb651fc2fd: C-B |
|
993 | 1082 | | |
|
994 | 1083 | o 9ac430e15fca: C-A |
|
995 | 1084 | | |
|
996 | 1085 | @ ea207398892e: ROOT |
|
997 | 1086 | |
|
998 | 1087 | $ hg debugobsolete |
|
999 | 1088 | cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1000 | 1089 | |
|
1001 | 1090 | Actual testing |
|
1002 | 1091 | -------------- |
|
1003 | 1092 | $ testrevs 'desc("C-A")' |
|
1004 | 1093 | ### Matched revisions### |
|
1005 | 1094 | 9ac430e15fca: C-A |
|
1006 | 1095 | ### Relevant markers ### |
|
1007 | 1096 | cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1008 | 1097 | # bundling: 1 changesets found |
|
1009 | 1098 | ### Bundled markers ### |
|
1010 | 1099 | cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1011 | 1100 | ### diff <relevant> <bundled> ### |
|
1012 | 1101 | ################################# |
|
1102 | ### Exclusive markers ### | |
|
1013 | 1103 | $ testrevs 'desc("C-B")' |
|
1014 | 1104 | ### Matched revisions### |
|
1015 | 1105 | cefb651fc2fd: C-B |
|
1016 | 1106 | ### Relevant markers ### |
|
1017 | 1107 | cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1018 | 1108 | # bundling: 1 changesets found |
|
1019 | 1109 | ### Bundled markers ### |
|
1020 | 1110 | cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1021 | 1111 | ### diff <relevant> <bundled> ### |
|
1022 | 1112 | ################################# |
|
1113 | ### Exclusive markers ### | |
|
1114 | cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
1023 | 1115 | # stripping: saved backup bundle to $TESTTMP/lonely-prune/.hg/strip-backup/cefb651fc2fd-345c8dfa-backup.hg |
|
1024 | 1116 | ### Backup markers ### |
|
1025 | 1117 | cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1026 | 1118 | ### diff <relevant> <backed-up> ### |
|
1027 | 1119 | ################################# |
|
1028 | 1120 | # unbundling: adding changesets |
|
1029 | 1121 | # unbundling: adding manifests |
|
1030 | 1122 | # unbundling: adding file changes |
|
1031 | 1123 | # unbundling: added 1 changesets with 1 changes to 1 files |
|
1032 | 1124 | # unbundling: (run 'hg update' to get a working copy) |
|
1033 | 1125 | $ testrevs 'desc("C-")' |
|
1034 | 1126 | ### Matched revisions### |
|
1035 | 1127 | 9ac430e15fca: C-A |
|
1036 | 1128 | cefb651fc2fd: C-B |
|
1037 | 1129 | ### Relevant markers ### |
|
1038 | 1130 | cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1039 | 1131 | # bundling: 2 changesets found |
|
1040 | 1132 | ### Bundled markers ### |
|
1041 | 1133 | cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1042 | 1134 | ### diff <relevant> <bundled> ### |
|
1043 | 1135 | ################################# |
|
1136 | ### Exclusive markers ### | |
|
1137 | cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
1044 | 1138 | # stripping: saved backup bundle to $TESTTMP/lonely-prune/.hg/strip-backup/9ac430e15fca-b9855b02-backup.hg |
|
1045 | 1139 | ### Backup markers ### |
|
1046 | 1140 | cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1047 | 1141 | ### diff <relevant> <backed-up> ### |
|
1048 | 1142 | ################################# |
|
1049 | 1143 | # unbundling: adding changesets |
|
1050 | 1144 | # unbundling: adding manifests |
|
1051 | 1145 | # unbundling: adding file changes |
|
1052 | 1146 | # unbundling: added 2 changesets with 2 changes to 2 files |
|
1053 | 1147 | # unbundling: (run 'hg update' to get a working copy) |
General Comments 0
You need to be logged in to leave comments.
Login now