Show More
@@ -1,836 +1,837 b'' | |||
|
1 | 1 | # obsutil.py - utility functions for obsolescence |
|
2 | 2 | # |
|
3 | 3 | # Copyright 2017 Boris Feld <boris.feld@octobus.net> |
|
4 | 4 | # |
|
5 | 5 | # This software may be used and distributed according to the terms of the |
|
6 | 6 | # GNU General Public License version 2 or any later version. |
|
7 | 7 | |
|
8 | 8 | from __future__ import absolute_import |
|
9 | 9 | |
|
10 | 10 | import re |
|
11 | 11 | |
|
12 | 12 | from . import ( |
|
13 | 13 | phases, |
|
14 | 14 | util |
|
15 | 15 | ) |
|
16 | 16 | |
|
17 | 17 | class marker(object): |
|
18 | 18 | """Wrap obsolete marker raw data""" |
|
19 | 19 | |
|
20 | 20 | def __init__(self, repo, data): |
|
21 | 21 | # the repo argument will be used to create changectx in later version |
|
22 | 22 | self._repo = repo |
|
23 | 23 | self._data = data |
|
24 | 24 | self._decodedmeta = None |
|
25 | 25 | |
|
26 | 26 | def __hash__(self): |
|
27 | 27 | return hash(self._data) |
|
28 | 28 | |
|
29 | 29 | def __eq__(self, other): |
|
30 | 30 | if type(other) != type(self): |
|
31 | 31 | return False |
|
32 | 32 | return self._data == other._data |
|
33 | 33 | |
|
34 | 34 | def precnode(self): |
|
35 | 35 | msg = ("'marker.precnode' is deprecated, " |
|
36 | 36 | "use 'marker.prednode'") |
|
37 | 37 | util.nouideprecwarn(msg, '4.4') |
|
38 | 38 | return self.prednode() |
|
39 | 39 | |
|
40 | 40 | def prednode(self): |
|
41 | 41 | """Predecessor changeset node identifier""" |
|
42 | 42 | return self._data[0] |
|
43 | 43 | |
|
44 | 44 | def succnodes(self): |
|
45 | 45 | """List of successor changesets node identifiers""" |
|
46 | 46 | return self._data[1] |
|
47 | 47 | |
|
48 | 48 | def parentnodes(self): |
|
49 | 49 | """Parents of the predecessors (None if not recorded)""" |
|
50 | 50 | return self._data[5] |
|
51 | 51 | |
|
52 | 52 | def metadata(self): |
|
53 | 53 | """Decoded metadata dictionary""" |
|
54 | 54 | return dict(self._data[3]) |
|
55 | 55 | |
|
56 | 56 | def date(self): |
|
57 | 57 | """Creation date as (unixtime, offset)""" |
|
58 | 58 | return self._data[4] |
|
59 | 59 | |
|
60 | 60 | def flags(self): |
|
61 | 61 | """The flags field of the marker""" |
|
62 | 62 | return self._data[2] |
|
63 | 63 | |
|
64 | 64 | def getmarkers(repo, nodes=None, exclusive=False): |
|
65 | 65 | """returns markers known in a repository |
|
66 | 66 | |
|
67 | 67 | If <nodes> is specified, only markers "relevant" to those nodes are are |
|
68 | 68 | returned""" |
|
69 | 69 | if nodes is None: |
|
70 | 70 | rawmarkers = repo.obsstore |
|
71 | 71 | elif exclusive: |
|
72 | 72 | rawmarkers = exclusivemarkers(repo, nodes) |
|
73 | 73 | else: |
|
74 | 74 | rawmarkers = repo.obsstore.relevantmarkers(nodes) |
|
75 | 75 | |
|
76 | 76 | for markerdata in rawmarkers: |
|
77 | 77 | yield marker(repo, markerdata) |
|
78 | 78 | |
|
79 | 79 | def closestpredecessors(repo, nodeid): |
|
80 | 80 | """yield the list of next predecessors pointing on visible changectx nodes |
|
81 | 81 | |
|
82 | 82 | This function respect the repoview filtering, filtered revision will be |
|
83 | 83 | considered missing. |
|
84 | 84 | """ |
|
85 | 85 | |
|
86 | 86 | precursors = repo.obsstore.predecessors |
|
87 | 87 | stack = [nodeid] |
|
88 | 88 | seen = set(stack) |
|
89 | 89 | |
|
90 | 90 | while stack: |
|
91 | 91 | current = stack.pop() |
|
92 | 92 | currentpreccs = precursors.get(current, ()) |
|
93 | 93 | |
|
94 | 94 | for prec in currentpreccs: |
|
95 | 95 | precnodeid = prec[0] |
|
96 | 96 | |
|
97 | 97 | # Basic cycle protection |
|
98 | 98 | if precnodeid in seen: |
|
99 | 99 | continue |
|
100 | 100 | seen.add(precnodeid) |
|
101 | 101 | |
|
102 | 102 | if precnodeid in repo: |
|
103 | 103 | yield precnodeid |
|
104 | 104 | else: |
|
105 | 105 | stack.append(precnodeid) |
|
106 | 106 | |
|
107 | 107 | def allprecursors(*args, **kwargs): |
|
108 | 108 | """ (DEPRECATED) |
|
109 | 109 | """ |
|
110 | 110 | msg = ("'obsutil.allprecursors' is deprecated, " |
|
111 | 111 | "use 'obsutil.allpredecessors'") |
|
112 | 112 | util.nouideprecwarn(msg, '4.4') |
|
113 | 113 | |
|
114 | 114 | return allpredecessors(*args, **kwargs) |
|
115 | 115 | |
|
116 | 116 | def allpredecessors(obsstore, nodes, ignoreflags=0): |
|
117 | 117 | """Yield node for every precursors of <nodes>. |
|
118 | 118 | |
|
119 | 119 | Some precursors may be unknown locally. |
|
120 | 120 | |
|
121 | 121 | This is a linear yield unsuited to detecting folded changesets. It includes |
|
122 | 122 | initial nodes too.""" |
|
123 | 123 | |
|
124 | 124 | remaining = set(nodes) |
|
125 | 125 | seen = set(remaining) |
|
126 | 126 | while remaining: |
|
127 | 127 | current = remaining.pop() |
|
128 | 128 | yield current |
|
129 | 129 | for mark in obsstore.predecessors.get(current, ()): |
|
130 | 130 | # ignore marker flagged with specified flag |
|
131 | 131 | if mark[2] & ignoreflags: |
|
132 | 132 | continue |
|
133 | 133 | suc = mark[0] |
|
134 | 134 | if suc not in seen: |
|
135 | 135 | seen.add(suc) |
|
136 | 136 | remaining.add(suc) |
|
137 | 137 | |
|
138 | 138 | def allsuccessors(obsstore, nodes, ignoreflags=0): |
|
139 | 139 | """Yield node for every successor of <nodes>. |
|
140 | 140 | |
|
141 | 141 | Some successors may be unknown locally. |
|
142 | 142 | |
|
143 | 143 | This is a linear yield unsuited to detecting split changesets. It includes |
|
144 | 144 | initial nodes too.""" |
|
145 | 145 | remaining = set(nodes) |
|
146 | 146 | seen = set(remaining) |
|
147 | 147 | while remaining: |
|
148 | 148 | current = remaining.pop() |
|
149 | 149 | yield current |
|
150 | 150 | for mark in obsstore.successors.get(current, ()): |
|
151 | 151 | # ignore marker flagged with specified flag |
|
152 | 152 | if mark[2] & ignoreflags: |
|
153 | 153 | continue |
|
154 | 154 | for suc in mark[1]: |
|
155 | 155 | if suc not in seen: |
|
156 | 156 | seen.add(suc) |
|
157 | 157 | remaining.add(suc) |
|
158 | 158 | |
|
159 | 159 | def _filterprunes(markers): |
|
160 | 160 | """return a set with no prune markers""" |
|
161 | 161 | return set(m for m in markers if m[1]) |
|
162 | 162 | |
|
163 | 163 | def exclusivemarkers(repo, nodes): |
|
164 | 164 | """set of markers relevant to "nodes" but no other locally-known nodes |
|
165 | 165 | |
|
166 | 166 | This function compute the set of markers "exclusive" to a locally-known |
|
167 | 167 | node. This means we walk the markers starting from <nodes> until we reach a |
|
168 | 168 | locally-known precursors outside of <nodes>. Element of <nodes> with |
|
169 | 169 | locally-known successors outside of <nodes> are ignored (since their |
|
170 | 170 | precursors markers are also relevant to these successors). |
|
171 | 171 | |
|
172 | 172 | For example: |
|
173 | 173 | |
|
174 | 174 | # (A0 rewritten as A1) |
|
175 | 175 | # |
|
176 | 176 | # A0 <-1- A1 # Marker "1" is exclusive to A1 |
|
177 | 177 | |
|
178 | 178 | or |
|
179 | 179 | |
|
180 | 180 | # (A0 rewritten as AX; AX rewritten as A1; AX is unkown locally) |
|
181 | 181 | # |
|
182 | 182 | # <-1- A0 <-2- AX <-3- A1 # Marker "2,3" are exclusive to A1 |
|
183 | 183 | |
|
184 | 184 | or |
|
185 | 185 | |
|
186 | 186 | # (A0 has unknown precursors, A0 rewritten as A1 and A2 (divergence)) |
|
187 | 187 | # |
|
188 | 188 | # <-2- A1 # Marker "2" is exclusive to A0,A1 |
|
189 | 189 | # / |
|
190 | 190 | # <-1- A0 |
|
191 | 191 | # \ |
|
192 | 192 | # <-3- A2 # Marker "3" is exclusive to A0,A2 |
|
193 | 193 | # |
|
194 | 194 | # in addition: |
|
195 | 195 | # |
|
196 | 196 | # Markers "2,3" are exclusive to A1,A2 |
|
197 | 197 | # Markers "1,2,3" are exclusive to A0,A1,A2 |
|
198 | 198 | |
|
199 | 199 | See test/test-obsolete-bundle-strip.t for more examples. |
|
200 | 200 | |
|
201 | 201 | An example usage is strip. When stripping a changeset, we also want to |
|
202 | 202 | strip the markers exclusive to this changeset. Otherwise we would have |
|
203 | 203 | "dangling"" obsolescence markers from its precursors: Obsolescence markers |
|
204 | 204 | marking a node as obsolete without any successors available locally. |
|
205 | 205 | |
|
206 | 206 | As for relevant markers, the prune markers for children will be followed. |
|
207 | 207 | Of course, they will only be followed if the pruned children is |
|
208 | 208 | locally-known. Since the prune markers are relevant to the pruned node. |
|
209 | 209 | However, while prune markers are considered relevant to the parent of the |
|
210 | 210 | pruned changesets, prune markers for locally-known changeset (with no |
|
211 | 211 | successors) are considered exclusive to the pruned nodes. This allows |
|
212 | 212 | to strip the prune markers (with the rest of the exclusive chain) alongside |
|
213 | 213 | the pruned changesets. |
|
214 | 214 | """ |
|
215 | 215 | # running on a filtered repository would be dangerous as markers could be |
|
216 | 216 | # reported as exclusive when they are relevant for other filtered nodes. |
|
217 | 217 | unfi = repo.unfiltered() |
|
218 | 218 | |
|
219 | 219 | # shortcut to various useful item |
|
220 | 220 | nm = unfi.changelog.nodemap |
|
221 | 221 | precursorsmarkers = unfi.obsstore.predecessors |
|
222 | 222 | successormarkers = unfi.obsstore.successors |
|
223 | 223 | childrenmarkers = unfi.obsstore.children |
|
224 | 224 | |
|
225 | 225 | # exclusive markers (return of the function) |
|
226 | 226 | exclmarkers = set() |
|
227 | 227 | # we need fast membership testing |
|
228 | 228 | nodes = set(nodes) |
|
229 | 229 | # looking for head in the obshistory |
|
230 | 230 | # |
|
231 | 231 | # XXX we are ignoring all issues in regard with cycle for now. |
|
232 | 232 | stack = [n for n in nodes if not _filterprunes(successormarkers.get(n, ()))] |
|
233 | 233 | stack.sort() |
|
234 | 234 | # nodes already stacked |
|
235 | 235 | seennodes = set(stack) |
|
236 | 236 | while stack: |
|
237 | 237 | current = stack.pop() |
|
238 | 238 | # fetch precursors markers |
|
239 | 239 | markers = list(precursorsmarkers.get(current, ())) |
|
240 | 240 | # extend the list with prune markers |
|
241 | 241 | for mark in successormarkers.get(current, ()): |
|
242 | 242 | if not mark[1]: |
|
243 | 243 | markers.append(mark) |
|
244 | 244 | # and markers from children (looking for prune) |
|
245 | 245 | for mark in childrenmarkers.get(current, ()): |
|
246 | 246 | if not mark[1]: |
|
247 | 247 | markers.append(mark) |
|
248 | 248 | # traverse the markers |
|
249 | 249 | for mark in markers: |
|
250 | 250 | if mark in exclmarkers: |
|
251 | 251 | # markers already selected |
|
252 | 252 | continue |
|
253 | 253 | |
|
254 | 254 | # If the markers is about the current node, select it |
|
255 | 255 | # |
|
256 | 256 | # (this delay the addition of markers from children) |
|
257 | 257 | if mark[1] or mark[0] == current: |
|
258 | 258 | exclmarkers.add(mark) |
|
259 | 259 | |
|
260 | 260 | # should we keep traversing through the precursors? |
|
261 | 261 | prec = mark[0] |
|
262 | 262 | |
|
263 | 263 | # nodes in the stack or already processed |
|
264 | 264 | if prec in seennodes: |
|
265 | 265 | continue |
|
266 | 266 | |
|
267 | 267 | # is this a locally known node ? |
|
268 | 268 | known = prec in nm |
|
269 | 269 | # if locally-known and not in the <nodes> set the traversal |
|
270 | 270 | # stop here. |
|
271 | 271 | if known and prec not in nodes: |
|
272 | 272 | continue |
|
273 | 273 | |
|
274 | 274 | # do not keep going if there are unselected markers pointing to this |
|
275 | 275 | # nodes. If we end up traversing these unselected markers later the |
|
276 | 276 | # node will be taken care of at that point. |
|
277 | 277 | precmarkers = _filterprunes(successormarkers.get(prec)) |
|
278 | 278 | if precmarkers.issubset(exclmarkers): |
|
279 | 279 | seennodes.add(prec) |
|
280 | 280 | stack.append(prec) |
|
281 | 281 | |
|
282 | 282 | return exclmarkers |
|
283 | 283 | |
|
284 | 284 | def foreground(repo, nodes): |
|
285 | 285 | """return all nodes in the "foreground" of other node |
|
286 | 286 | |
|
287 | 287 | The foreground of a revision is anything reachable using parent -> children |
|
288 | 288 | or precursor -> successor relation. It is very similar to "descendant" but |
|
289 | 289 | augmented with obsolescence information. |
|
290 | 290 | |
|
291 | 291 | Beware that possible obsolescence cycle may result if complex situation. |
|
292 | 292 | """ |
|
293 | 293 | repo = repo.unfiltered() |
|
294 | 294 | foreground = set(repo.set('%ln::', nodes)) |
|
295 | 295 | if repo.obsstore: |
|
296 | 296 | # We only need this complicated logic if there is obsolescence |
|
297 | 297 | # XXX will probably deserve an optimised revset. |
|
298 | 298 | nm = repo.changelog.nodemap |
|
299 | 299 | plen = -1 |
|
300 | 300 | # compute the whole set of successors or descendants |
|
301 | 301 | while len(foreground) != plen: |
|
302 | 302 | plen = len(foreground) |
|
303 | 303 | succs = set(c.node() for c in foreground) |
|
304 | 304 | mutable = [c.node() for c in foreground if c.mutable()] |
|
305 | 305 | succs.update(allsuccessors(repo.obsstore, mutable)) |
|
306 | 306 | known = (n for n in succs if n in nm) |
|
307 | 307 | foreground = set(repo.set('%ln::', known)) |
|
308 | 308 | return set(c.node() for c in foreground) |
|
309 | 309 | |
|
310 | 310 | # effectflag field |
|
311 | 311 | # |
|
312 | 312 | # Effect-flag is a 1-byte bit field used to store what changed between a |
|
313 | 313 | # changeset and its successor(s). |
|
314 | 314 | # |
|
315 | 315 | # The effect flag is stored in obs-markers metadata while we iterate on the |
|
316 | 316 | # information design. That's why we have the EFFECTFLAGFIELD. If we come up |
|
317 | 317 | # with an incompatible design for effect flag, we can store a new design under |
|
318 | 318 | # another field name so we don't break readers. We plan to extend the existing |
|
319 | 319 | # obsmarkers bit-field when the effect flag design will be stabilized. |
|
320 | 320 | # |
|
321 | 321 | # The effect-flag is placed behind an experimental flag |
|
322 | 322 | # `effect-flags` set to off by default. |
|
323 | 323 | # |
|
324 | 324 | |
|
325 | 325 | EFFECTFLAGFIELD = "ef1" |
|
326 | 326 | |
|
327 | 327 | DESCCHANGED = 1 << 0 # action changed the description |
|
328 | 328 | METACHANGED = 1 << 1 # action change the meta |
|
329 | 329 | DIFFCHANGED = 1 << 3 # action change diff introduced by the changeset |
|
330 | 330 | PARENTCHANGED = 1 << 2 # action change the parent |
|
331 | 331 | USERCHANGED = 1 << 4 # the user changed |
|
332 | 332 | DATECHANGED = 1 << 5 # the date changed |
|
333 | 333 | BRANCHCHANGED = 1 << 6 # the branch changed |
|
334 | 334 | |
|
335 | 335 | METABLACKLIST = [ |
|
336 | 336 | re.compile('^branch$'), |
|
337 | 337 | re.compile('^.*-source$'), |
|
338 | 338 | re.compile('^.*_source$'), |
|
339 | 339 | re.compile('^source$'), |
|
340 | 340 | ] |
|
341 | 341 | |
|
342 | 342 | def metanotblacklisted(metaitem): |
|
343 | 343 | """ Check that the key of a meta item (extrakey, extravalue) does not |
|
344 | 344 | match at least one of the blacklist pattern |
|
345 | 345 | """ |
|
346 | 346 | metakey = metaitem[0] |
|
347 | 347 | |
|
348 | 348 | return not any(pattern.match(metakey) for pattern in METABLACKLIST) |
|
349 | 349 | |
|
350 | 350 | def _prepare_hunk(hunk): |
|
351 | 351 | """Drop all information but the username and patch""" |
|
352 | 352 | cleanhunk = [] |
|
353 | 353 | for line in hunk.splitlines(): |
|
354 | 354 | if line.startswith(b'# User') or not line.startswith(b'#'): |
|
355 | 355 | if line.startswith(b'@@'): |
|
356 | 356 | line = b'@@\n' |
|
357 | 357 | cleanhunk.append(line) |
|
358 | 358 | return cleanhunk |
|
359 | 359 | |
|
360 | 360 | def _getdifflines(iterdiff): |
|
361 | 361 | """return a cleaned up lines""" |
|
362 | 362 | lines = next(iterdiff, None) |
|
363 | 363 | |
|
364 | 364 | if lines is None: |
|
365 | 365 | return lines |
|
366 | 366 | |
|
367 | 367 | return _prepare_hunk(lines) |
|
368 | 368 | |
|
369 | 369 | def _cmpdiff(leftctx, rightctx): |
|
370 | 370 | """return True if both ctx introduce the "same diff" |
|
371 | 371 | |
|
372 | 372 | This is a first and basic implementation, with many shortcoming. |
|
373 | 373 | """ |
|
374 | 374 | |
|
375 | 375 | # Leftctx or right ctx might be filtered, so we need to use the contexts |
|
376 | 376 | # with an unfiltered repository to safely compute the diff |
|
377 | 377 | leftunfi = leftctx._repo.unfiltered()[leftctx.rev()] |
|
378 | 378 | leftdiff = leftunfi.diff(git=1) |
|
379 | 379 | rightunfi = rightctx._repo.unfiltered()[rightctx.rev()] |
|
380 | 380 | rightdiff = rightunfi.diff(git=1) |
|
381 | 381 | |
|
382 | 382 | left, right = (0, 0) |
|
383 | 383 | while None not in (left, right): |
|
384 | 384 | left = _getdifflines(leftdiff) |
|
385 | 385 | right = _getdifflines(rightdiff) |
|
386 | 386 | |
|
387 | 387 | if left != right: |
|
388 | 388 | return False |
|
389 | 389 | return True |
|
390 | 390 | |
|
391 | 391 | def geteffectflag(relation): |
|
392 | 392 | """ From an obs-marker relation, compute what changed between the |
|
393 | 393 | predecessor and the successor. |
|
394 | 394 | """ |
|
395 | 395 | effects = 0 |
|
396 | 396 | |
|
397 | 397 | source = relation[0] |
|
398 | 398 | |
|
399 | 399 | for changectx in relation[1]: |
|
400 | 400 | # Check if description has changed |
|
401 | 401 | if changectx.description() != source.description(): |
|
402 | 402 | effects |= DESCCHANGED |
|
403 | 403 | |
|
404 | 404 | # Check if user has changed |
|
405 | 405 | if changectx.user() != source.user(): |
|
406 | 406 | effects |= USERCHANGED |
|
407 | 407 | |
|
408 | 408 | # Check if date has changed |
|
409 | 409 | if changectx.date() != source.date(): |
|
410 | 410 | effects |= DATECHANGED |
|
411 | 411 | |
|
412 | 412 | # Check if branch has changed |
|
413 | 413 | if changectx.branch() != source.branch(): |
|
414 | 414 | effects |= BRANCHCHANGED |
|
415 | 415 | |
|
416 | 416 | # Check if at least one of the parent has changed |
|
417 | 417 | if changectx.parents() != source.parents(): |
|
418 | 418 | effects |= PARENTCHANGED |
|
419 | 419 | |
|
420 | 420 | # Check if other meta has changed |
|
421 | 421 | changeextra = changectx.extra().items() |
|
422 | 422 | ctxmeta = filter(metanotblacklisted, changeextra) |
|
423 | 423 | |
|
424 | 424 | sourceextra = source.extra().items() |
|
425 | 425 | srcmeta = filter(metanotblacklisted, sourceextra) |
|
426 | 426 | |
|
427 | 427 | if ctxmeta != srcmeta: |
|
428 | 428 | effects |= METACHANGED |
|
429 | 429 | |
|
430 | 430 | # Check if the diff has changed |
|
431 | 431 | if not _cmpdiff(source, changectx): |
|
432 | 432 | effects |= DIFFCHANGED |
|
433 | 433 | |
|
434 | 434 | return effects |
|
435 | 435 | |
|
436 | 436 | def getobsoleted(repo, tr): |
|
437 | 437 | """return the set of pre-existing revisions obsoleted by a transaction""" |
|
438 | 438 | torev = repo.unfiltered().changelog.nodemap.get |
|
439 | 439 | phase = repo._phasecache.phase |
|
440 | 440 | succsmarkers = repo.obsstore.successors.get |
|
441 | 441 | public = phases.public |
|
442 | 442 | addedmarkers = tr.changes.get('obsmarkers') |
|
443 | 443 | addedrevs = tr.changes.get('revs') |
|
444 | 444 | seenrevs = set(addedrevs) |
|
445 | 445 | obsoleted = set() |
|
446 | 446 | for mark in addedmarkers: |
|
447 | 447 | node = mark[0] |
|
448 | 448 | rev = torev(node) |
|
449 | 449 | if rev is None or rev in seenrevs: |
|
450 | 450 | continue |
|
451 | 451 | seenrevs.add(rev) |
|
452 | 452 | if phase(repo, rev) == public: |
|
453 | 453 | continue |
|
454 | 454 | if set(succsmarkers(node) or []).issubset(addedmarkers): |
|
455 | 455 | obsoleted.add(rev) |
|
456 | 456 | return obsoleted |
|
457 | 457 | |
|
458 | 458 | class _succs(list): |
|
459 | 459 | """small class to represent a successors with some metadata about it""" |
|
460 | 460 | |
|
461 | 461 | def __init__(self, *args, **kwargs): |
|
462 | 462 | super(_succs, self).__init__(*args, **kwargs) |
|
463 | 463 | self.markers = set() |
|
464 | 464 | |
|
465 | 465 | def copy(self): |
|
466 | 466 | new = _succs(self) |
|
467 | 467 | new.markers = self.markers.copy() |
|
468 | 468 | return new |
|
469 | 469 | |
|
470 | 470 | @util.propertycache |
|
471 | 471 | def _set(self): |
|
472 | 472 | # immutable |
|
473 | 473 | return set(self) |
|
474 | 474 | |
|
475 | 475 | def canmerge(self, other): |
|
476 | 476 | return self._set.issubset(other._set) |
|
477 | 477 | |
|
478 | 478 | def successorssets(repo, initialnode, closest=False, cache=None): |
|
479 | 479 | """Return set of all latest successors of initial nodes |
|
480 | 480 | |
|
481 | 481 | The successors set of a changeset A are the group of revisions that succeed |
|
482 | 482 | A. It succeeds A as a consistent whole, each revision being only a partial |
|
483 | 483 | replacement. By default, the successors set contains non-obsolete |
|
484 | 484 | changesets only, walking the obsolescence graph until reaching a leaf. If |
|
485 | 485 | 'closest' is set to True, closest successors-sets are return (the |
|
486 | 486 | obsolescence walk stops on known changesets). |
|
487 | 487 | |
|
488 | 488 | This function returns the full list of successor sets which is why it |
|
489 | 489 | returns a list of tuples and not just a single tuple. Each tuple is a valid |
|
490 | 490 | successors set. Note that (A,) may be a valid successors set for changeset A |
|
491 | 491 | (see below). |
|
492 | 492 | |
|
493 | 493 | In most cases, a changeset A will have a single element (e.g. the changeset |
|
494 | 494 | A is replaced by A') in its successors set. Though, it is also common for a |
|
495 | 495 | changeset A to have no elements in its successor set (e.g. the changeset |
|
496 | 496 | has been pruned). Therefore, the returned list of successors sets will be |
|
497 | 497 | [(A',)] or [], respectively. |
|
498 | 498 | |
|
499 | 499 | When a changeset A is split into A' and B', however, it will result in a |
|
500 | 500 | successors set containing more than a single element, i.e. [(A',B')]. |
|
501 | 501 | Divergent changesets will result in multiple successors sets, i.e. [(A',), |
|
502 | 502 | (A'')]. |
|
503 | 503 | |
|
504 | 504 | If a changeset A is not obsolete, then it will conceptually have no |
|
505 | 505 | successors set. To distinguish this from a pruned changeset, the successor |
|
506 | 506 | set will contain itself only, i.e. [(A,)]. |
|
507 | 507 | |
|
508 | 508 | Finally, final successors unknown locally are considered to be pruned |
|
509 | 509 | (pruned: obsoleted without any successors). (Final: successors not affected |
|
510 | 510 | by markers). |
|
511 | 511 | |
|
512 | 512 | The 'closest' mode respect the repoview filtering. For example, without |
|
513 | 513 | filter it will stop at the first locally known changeset, with 'visible' |
|
514 | 514 | filter it will stop on visible changesets). |
|
515 | 515 | |
|
516 | 516 | The optional `cache` parameter is a dictionary that may contains |
|
517 | 517 | precomputed successors sets. It is meant to reuse the computation of a |
|
518 | 518 | previous call to `successorssets` when multiple calls are made at the same |
|
519 | 519 | time. The cache dictionary is updated in place. The caller is responsible |
|
520 | 520 | for its life span. Code that makes multiple calls to `successorssets` |
|
521 | 521 | *should* use this cache mechanism or risk a performance hit. |
|
522 | 522 | |
|
523 | 523 | Since results are different depending of the 'closest' most, the same cache |
|
524 | 524 | cannot be reused for both mode. |
|
525 | 525 | """ |
|
526 | 526 | |
|
527 | 527 | succmarkers = repo.obsstore.successors |
|
528 | 528 | |
|
529 | 529 | # Stack of nodes we search successors sets for |
|
530 | 530 | toproceed = [initialnode] |
|
531 | 531 | # set version of above list for fast loop detection |
|
532 | 532 | # element added to "toproceed" must be added here |
|
533 | 533 | stackedset = set(toproceed) |
|
534 | 534 | if cache is None: |
|
535 | 535 | cache = {} |
|
536 | 536 | |
|
537 | 537 | # This while loop is the flattened version of a recursive search for |
|
538 | 538 | # successors sets |
|
539 | 539 | # |
|
540 | 540 | # def successorssets(x): |
|
541 | 541 | # successors = directsuccessors(x) |
|
542 | 542 | # ss = [[]] |
|
543 | 543 | # for succ in directsuccessors(x): |
|
544 | 544 | # # product as in itertools cartesian product |
|
545 | 545 | # ss = product(ss, successorssets(succ)) |
|
546 | 546 | # return ss |
|
547 | 547 | # |
|
548 | 548 | # But we can not use plain recursive calls here: |
|
549 | 549 | # - that would blow the python call stack |
|
550 | 550 | # - obsolescence markers may have cycles, we need to handle them. |
|
551 | 551 | # |
|
552 | 552 | # The `toproceed` list act as our call stack. Every node we search |
|
553 | 553 | # successors set for are stacked there. |
|
554 | 554 | # |
|
555 | 555 | # The `stackedset` is set version of this stack used to check if a node is |
|
556 | 556 | # already stacked. This check is used to detect cycles and prevent infinite |
|
557 | 557 | # loop. |
|
558 | 558 | # |
|
559 | 559 | # successors set of all nodes are stored in the `cache` dictionary. |
|
560 | 560 | # |
|
561 | 561 | # After this while loop ends we use the cache to return the successors sets |
|
562 | 562 | # for the node requested by the caller. |
|
563 | 563 | while toproceed: |
|
564 | 564 | # Every iteration tries to compute the successors sets of the topmost |
|
565 | 565 | # node of the stack: CURRENT. |
|
566 | 566 | # |
|
567 | 567 | # There are four possible outcomes: |
|
568 | 568 | # |
|
569 | 569 | # 1) We already know the successors sets of CURRENT: |
|
570 | 570 | # -> mission accomplished, pop it from the stack. |
|
571 | 571 | # 2) Stop the walk: |
|
572 | 572 | # default case: Node is not obsolete |
|
573 | 573 | # closest case: Node is known at this repo filter level |
|
574 | 574 | # -> the node is its own successors sets. Add it to the cache. |
|
575 | 575 | # 3) We do not know successors set of direct successors of CURRENT: |
|
576 | 576 | # -> We add those successors to the stack. |
|
577 | 577 | # 4) We know successors sets of all direct successors of CURRENT: |
|
578 | 578 | # -> We can compute CURRENT successors set and add it to the |
|
579 | 579 | # cache. |
|
580 | 580 | # |
|
581 | 581 | current = toproceed[-1] |
|
582 | 582 | |
|
583 | 583 | # case 2 condition is a bit hairy because of closest, |
|
584 | 584 | # we compute it on its own |
|
585 | 585 | case2condition = ((current not in succmarkers) |
|
586 | 586 | or (closest and current != initialnode |
|
587 | 587 | and current in repo)) |
|
588 | 588 | |
|
589 | 589 | if current in cache: |
|
590 | 590 | # case (1): We already know the successors sets |
|
591 | 591 | stackedset.remove(toproceed.pop()) |
|
592 | 592 | elif case2condition: |
|
593 | 593 | # case (2): end of walk. |
|
594 | 594 | if current in repo: |
|
595 | 595 | # We have a valid successors. |
|
596 | 596 | cache[current] = [_succs((current,))] |
|
597 | 597 | else: |
|
598 | 598 | # Final obsolete version is unknown locally. |
|
599 | 599 | # Do not count that as a valid successors |
|
600 | 600 | cache[current] = [] |
|
601 | 601 | else: |
|
602 | 602 | # cases (3) and (4) |
|
603 | 603 | # |
|
604 | 604 | # We proceed in two phases. Phase 1 aims to distinguish case (3) |
|
605 | 605 | # from case (4): |
|
606 | 606 | # |
|
607 | 607 | # For each direct successors of CURRENT, we check whether its |
|
608 | 608 | # successors sets are known. If they are not, we stack the |
|
609 | 609 | # unknown node and proceed to the next iteration of the while |
|
610 | 610 | # loop. (case 3) |
|
611 | 611 | # |
|
612 | 612 | # During this step, we may detect obsolescence cycles: a node |
|
613 | 613 | # with unknown successors sets but already in the call stack. |
|
614 | 614 | # In such a situation, we arbitrary set the successors sets of |
|
615 | 615 | # the node to nothing (node pruned) to break the cycle. |
|
616 | 616 | # |
|
617 | 617 | # If no break was encountered we proceed to phase 2. |
|
618 | 618 | # |
|
619 | 619 | # Phase 2 computes successors sets of CURRENT (case 4); see details |
|
620 | 620 | # in phase 2 itself. |
|
621 | 621 | # |
|
622 | 622 | # Note the two levels of iteration in each phase. |
|
623 | 623 | # - The first one handles obsolescence markers using CURRENT as |
|
624 | 624 | # precursor (successors markers of CURRENT). |
|
625 | 625 | # |
|
626 | 626 | # Having multiple entry here means divergence. |
|
627 | 627 | # |
|
628 | 628 | # - The second one handles successors defined in each marker. |
|
629 | 629 | # |
|
630 | 630 | # Having none means pruned node, multiple successors means split, |
|
631 | 631 | # single successors are standard replacement. |
|
632 | 632 | # |
|
633 | 633 | for mark in sorted(succmarkers[current]): |
|
634 | 634 | for suc in mark[1]: |
|
635 | 635 | if suc not in cache: |
|
636 | 636 | if suc in stackedset: |
|
637 | 637 | # cycle breaking |
|
638 | 638 | cache[suc] = [] |
|
639 | 639 | else: |
|
640 | 640 | # case (3) If we have not computed successors sets |
|
641 | 641 | # of one of those successors we add it to the |
|
642 | 642 | # `toproceed` stack and stop all work for this |
|
643 | 643 | # iteration. |
|
644 | 644 | toproceed.append(suc) |
|
645 | 645 | stackedset.add(suc) |
|
646 | 646 | break |
|
647 | 647 | else: |
|
648 | 648 | continue |
|
649 | 649 | break |
|
650 | 650 | else: |
|
651 | 651 | # case (4): we know all successors sets of all direct |
|
652 | 652 | # successors |
|
653 | 653 | # |
|
654 | 654 | # Successors set contributed by each marker depends on the |
|
655 | 655 | # successors sets of all its "successors" node. |
|
656 | 656 | # |
|
657 | 657 | # Each different marker is a divergence in the obsolescence |
|
658 | 658 | # history. It contributes successors sets distinct from other |
|
659 | 659 | # markers. |
|
660 | 660 | # |
|
661 | 661 | # Within a marker, a successor may have divergent successors |
|
662 | 662 | # sets. In such a case, the marker will contribute multiple |
|
663 | 663 | # divergent successors sets. If multiple successors have |
|
664 | 664 | # divergent successors sets, a Cartesian product is used. |
|
665 | 665 | # |
|
666 | 666 | # At the end we post-process successors sets to remove |
|
667 | 667 | # duplicated entry and successors set that are strict subset of |
|
668 | 668 | # another one. |
|
669 | 669 | succssets = [] |
|
670 | 670 | for mark in sorted(succmarkers[current]): |
|
671 | 671 | # successors sets contributed by this marker |
|
672 | 672 | base = _succs() |
|
673 | 673 | base.markers.add(mark) |
|
674 | 674 | markss = [base] |
|
675 | 675 | for suc in mark[1]: |
|
676 | 676 | # cardinal product with previous successors |
|
677 | 677 | productresult = [] |
|
678 | 678 | for prefix in markss: |
|
679 | 679 | for suffix in cache[suc]: |
|
680 | 680 | newss = prefix.copy() |
|
681 | 681 | newss.markers.update(suffix.markers) |
|
682 | 682 | for part in suffix: |
|
683 | 683 | # do not duplicated entry in successors set |
|
684 | 684 | # first entry wins. |
|
685 | 685 | if part not in newss: |
|
686 | 686 | newss.append(part) |
|
687 | 687 | productresult.append(newss) |
|
688 | 688 | markss = productresult |
|
689 | 689 | succssets.extend(markss) |
|
690 | 690 | # remove duplicated and subset |
|
691 | 691 | seen = [] |
|
692 | 692 | final = [] |
|
693 | 693 | candidates = sorted((s for s in succssets if s), |
|
694 | 694 | key=len, reverse=True) |
|
695 | 695 | for cand in candidates: |
|
696 | 696 | for seensuccs in seen: |
|
697 | 697 | if cand.canmerge(seensuccs): |
|
698 | 698 | seensuccs.markers.update(cand.markers) |
|
699 | 699 | break |
|
700 | 700 | else: |
|
701 | 701 | final.append(cand) |
|
702 | 702 | seen.append(cand) |
|
703 | 703 | final.reverse() # put small successors set first |
|
704 | 704 | cache[current] = final |
|
705 | 705 | return cache[initialnode] |
|
706 | 706 | |
|
707 | 707 | def successorsandmarkers(repo, ctx): |
|
708 | 708 | """compute the raw data needed for computing obsfate |
|
709 | 709 | Returns a list of dict, one dict per successors set |
|
710 | 710 | """ |
|
711 | 711 | if not ctx.obsolete(): |
|
712 | 712 | return None |
|
713 | 713 | |
|
714 | 714 | ssets = successorssets(repo, ctx.node(), closest=True) |
|
715 | 715 | |
|
716 | 716 | # closestsuccessors returns an empty list for pruned revisions, remap it |
|
717 | 717 | # into a list containing an empty list for future processing |
|
718 | 718 | if ssets == []: |
|
719 | 719 | ssets = [[]] |
|
720 | 720 | |
|
721 | 721 | # Try to recover pruned markers |
|
722 | 722 | succsmap = repo.obsstore.successors |
|
723 | 723 | fullsuccessorsets = [] # successor set + markers |
|
724 | 724 | for sset in ssets: |
|
725 | 725 | if sset: |
|
726 | 726 | fullsuccessorsets.append(sset) |
|
727 | 727 | else: |
|
728 | 728 | # successorsset return an empty set() when ctx or one of its |
|
729 | 729 | # successors is pruned. |
|
730 | 730 | # In this case, walk the obs-markers tree again starting with ctx |
|
731 | 731 | # and find the relevant pruning obs-makers, the ones without |
|
732 | 732 | # successors. |
|
733 | 733 | # Having these markers allow us to compute some information about |
|
734 | 734 | # its fate, like who pruned this changeset and when. |
|
735 | 735 | |
|
736 | 736 | # XXX we do not catch all prune markers (eg rewritten then pruned) |
|
737 | 737 | # (fix me later) |
|
738 | 738 | foundany = False |
|
739 | 739 | for mark in succsmap.get(ctx.node(), ()): |
|
740 | 740 | if not mark[1]: |
|
741 | 741 | foundany = True |
|
742 | 742 | sset = _succs() |
|
743 | 743 | sset.markers.add(mark) |
|
744 | 744 | fullsuccessorsets.append(sset) |
|
745 | 745 | if not foundany: |
|
746 | 746 | fullsuccessorsets.append(_succs()) |
|
747 | 747 | |
|
748 | 748 | values = [] |
|
749 | 749 | for sset in fullsuccessorsets: |
|
750 | 750 | values.append({'successors': sset, 'markers': sset.markers}) |
|
751 | 751 | |
|
752 | 752 | return values |
|
753 | 753 | |
|
754 | 754 | def successorsetverb(successorset): |
|
755 | 755 | """ Return the verb summarizing the successorset |
|
756 | 756 | """ |
|
757 | 757 | if not successorset: |
|
758 | 758 | verb = 'pruned' |
|
759 | 759 | elif len(successorset) == 1: |
|
760 | 760 | verb = 'rewritten' |
|
761 | 761 | else: |
|
762 | 762 | verb = 'split' |
|
763 | 763 | return verb |
|
764 | 764 | |
|
765 | 765 | def markersdates(markers): |
|
766 | 766 | """returns the list of dates for a list of markers |
|
767 | 767 | """ |
|
768 | 768 | return [m[4] for m in markers] |
|
769 | 769 | |
|
770 | 770 | def markersusers(markers): |
|
771 | 771 | """ Returns a sorted list of markers users without duplicates |
|
772 | 772 | """ |
|
773 | 773 | markersmeta = [dict(m[3]) for m in markers] |
|
774 | 774 | users = set(meta.get('user') for meta in markersmeta if meta.get('user')) |
|
775 | 775 | |
|
776 | 776 | return sorted(users) |
|
777 | 777 | |
|
778 | 778 | def markersoperations(markers): |
|
779 | 779 | """ Returns a sorted list of markers operations without duplicates |
|
780 | 780 | """ |
|
781 | 781 | markersmeta = [dict(m[3]) for m in markers] |
|
782 | 782 | operations = set(meta.get('operation') for meta in markersmeta |
|
783 | 783 | if meta.get('operation')) |
|
784 | 784 | |
|
785 | 785 | return sorted(operations) |
|
786 | 786 | |
|
787 | 787 | def obsfateprinter(successors, markers, ui): |
|
788 | 788 | """ Build a obsfate string for a single successorset using all obsfate |
|
789 | 789 | related function defined in obsutil |
|
790 | 790 | """ |
|
791 | 791 | quiet = ui.quiet |
|
792 | 792 | verbose = ui.verbose |
|
793 | 793 | normal = not verbose and not quiet |
|
794 | 794 | |
|
795 | 795 | line = [] |
|
796 | 796 | |
|
797 | 797 | # Verb |
|
798 | 798 | line.append(successorsetverb(successors)) |
|
799 | 799 | |
|
800 | 800 | # Operations |
|
801 | 801 | operations = markersoperations(markers) |
|
802 | 802 | if operations: |
|
803 | 803 | line.append(" using %s" % ", ".join(operations)) |
|
804 | 804 | |
|
805 | 805 | # Successors |
|
806 | 806 | if successors: |
|
807 | 807 | fmtsuccessors = [successors.joinfmt(succ) for succ in successors] |
|
808 | 808 | line.append(" as %s" % ", ".join(fmtsuccessors)) |
|
809 | 809 | |
|
810 | 810 | # Users |
|
811 | 811 | users = markersusers(markers) |
|
812 | 812 | # Filter out current user in not verbose mode to reduce amount of |
|
813 | 813 | # information |
|
814 | 814 | if not verbose: |
|
815 | 815 | currentuser = ui.username(acceptempty=True) |
|
816 | 816 | if len(users) == 1 and currentuser in users: |
|
817 | 817 | users = None |
|
818 | 818 | |
|
819 | 819 | if (verbose or normal) and users: |
|
820 | 820 | line.append(" by %s" % ", ".join(users)) |
|
821 | 821 | |
|
822 | 822 | # Date |
|
823 | 823 | dates = markersdates(markers) |
|
824 | 824 | |
|
825 | min_date = min(dates) | |
|
826 |
|
|
|
825 | if verbose: | |
|
826 | min_date = min(dates) | |
|
827 | max_date = max(dates) | |
|
827 | 828 | |
|
828 | if min_date == max_date: | |
|
829 | fmtmin_date = util.datestr(min_date, '%Y-%m-%d %H:%M %1%2') | |
|
830 | line.append(" (at %s)" % fmtmin_date) | |
|
831 | else: | |
|
832 | fmtmin_date = util.datestr(min_date, '%Y-%m-%d %H:%M %1%2') | |
|
833 | fmtmax_date = util.datestr(max_date, '%Y-%m-%d %H:%M %1%2') | |
|
834 | line.append(" (between %s and %s)" % (fmtmin_date, fmtmax_date)) | |
|
829 | if min_date == max_date: | |
|
830 | fmtmin_date = util.datestr(min_date, '%Y-%m-%d %H:%M %1%2') | |
|
831 | line.append(" (at %s)" % fmtmin_date) | |
|
832 | else: | |
|
833 | fmtmin_date = util.datestr(min_date, '%Y-%m-%d %H:%M %1%2') | |
|
834 | fmtmax_date = util.datestr(max_date, '%Y-%m-%d %H:%M %1%2') | |
|
835 | line.append(" (between %s and %s)" % (fmtmin_date, fmtmax_date)) | |
|
835 | 836 | |
|
836 | 837 | return "".join(line) |
@@ -1,2128 +1,2128 b'' | |||
|
1 | 1 | This test file test the various templates related to obsmarkers. |
|
2 | 2 | |
|
3 | 3 | Global setup |
|
4 | 4 | ============ |
|
5 | 5 | |
|
6 | 6 | $ . $TESTDIR/testlib/obsmarker-common.sh |
|
7 | 7 | $ cat >> $HGRCPATH <<EOF |
|
8 | 8 | > [ui] |
|
9 | 9 | > interactive = true |
|
10 | 10 | > [phases] |
|
11 | 11 | > publish=False |
|
12 | 12 | > [experimental] |
|
13 | 13 | > stabilization=all |
|
14 | 14 | > [templates] |
|
15 | 15 | > obsfatesuccessors = "{if(successors, " as ")}{join(successors, ", ")}" |
|
16 | 16 | > obsfateverb = "{obsfateverb(successors)}" |
|
17 | 17 | > obsfateoperations = "{if(obsfateoperations(markers), " using {join(obsfateoperations(markers), ", ")}")}" |
|
18 | 18 | > obsfateusers = "{if(obsfateusers(markers), " by {join(obsfateusers(markers), ", ")}")}" |
|
19 | 19 | > obsfatedate = "{if(obsfatedate(markers), "{ifeq(min(obsfatedate(markers)), max(obsfatedate(markers)), " (at {min(obsfatedate(markers))|isodate})", " (between {min(obsfatedate(markers))|isodate} and {max(obsfatedate(markers))|isodate})")}")}" |
|
20 | 20 | > obsfatetempl = "{obsfateverb}{obsfateoperations}{obsfatesuccessors}{obsfateusers}{obsfatedate}; " |
|
21 | 21 | > [alias] |
|
22 | 22 | > tlog = log -G -T '{node|short}\ |
|
23 | 23 | > {if(predecessors, "\n Predecessors: {predecessors}")}\ |
|
24 | 24 | > {if(predecessors, "\n semi-colon: {join(predecessors, "; ")}")}\ |
|
25 | 25 | > {if(predecessors, "\n json: {predecessors|json}")}\ |
|
26 | 26 | > {if(predecessors, "\n map: {join(predecessors % "{rev}:{node}", " ")}")}\ |
|
27 | 27 | > {if(successorssets, "\n Successors: {successorssets}")}\ |
|
28 | 28 | > {if(successorssets, "\n multi-line: {join(successorssets, "\n multi-line: ")}")}\ |
|
29 | 29 | > {if(successorssets, "\n json: {successorssets|json}")}\n' |
|
30 | 30 | > fatelog = log -G -T '{node|short}\n{if(succsandmarkers, " Obsfate: {succsandmarkers % "{obsfatetempl}"} \n" )}' |
|
31 | 31 | > fatelogjson = log -G -T '{node|short}\n{if(succsandmarkers, " Obsfate: {succsandmarkers|json}\n")}' |
|
32 | 32 | > fatelogkw = log -G -T '{node|short}\n{if(obsfate, "{obsfate % " Obsfate: {fate}\n"}")}' |
|
33 | 33 | > EOF |
|
34 | 34 | |
|
35 | 35 | Test templates on amended commit |
|
36 | 36 | ================================ |
|
37 | 37 | |
|
38 | 38 | Test setup |
|
39 | 39 | ---------- |
|
40 | 40 | |
|
41 | 41 | $ hg init $TESTTMP/templates-local-amend |
|
42 | 42 | $ cd $TESTTMP/templates-local-amend |
|
43 | 43 | $ mkcommit ROOT |
|
44 | 44 | $ mkcommit A0 |
|
45 | 45 | $ echo 42 >> A0 |
|
46 | 46 | $ hg commit --amend -m "A1" --config devel.default-date="1234567890 0" |
|
47 | 47 | $ hg commit --amend -m "A2" --config devel.default-date="987654321 0" --config devel.user.obsmarker=test2 |
|
48 | 48 | |
|
49 | 49 | $ hg log --hidden -G |
|
50 | 50 | @ changeset: 3:d004c8f274b9 |
|
51 | 51 | | tag: tip |
|
52 | 52 | | parent: 0:ea207398892e |
|
53 | 53 | | user: test |
|
54 | 54 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
55 | 55 | | summary: A2 |
|
56 | 56 | | |
|
57 | 57 | | x changeset: 2:a468dc9b3633 |
|
58 | 58 | |/ parent: 0:ea207398892e |
|
59 | 59 | | user: test |
|
60 | 60 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
61 | 61 | | summary: A1 |
|
62 | 62 | | |
|
63 | 63 | | x changeset: 1:471f378eab4c |
|
64 | 64 | |/ user: test |
|
65 | 65 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
66 | 66 | | summary: A0 |
|
67 | 67 | | |
|
68 | 68 | o changeset: 0:ea207398892e |
|
69 | 69 | user: test |
|
70 | 70 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
71 | 71 | summary: ROOT |
|
72 | 72 | |
|
73 | 73 | Check templates |
|
74 | 74 | --------------- |
|
75 | 75 | $ hg up 'desc(A0)' --hidden |
|
76 | 76 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
77 | 77 | |
|
78 | 78 | Predecessors template should show current revision as it is the working copy |
|
79 | 79 | $ hg tlog |
|
80 | 80 | o d004c8f274b9 |
|
81 | 81 | | Predecessors: 1:471f378eab4c |
|
82 | 82 | | semi-colon: 1:471f378eab4c |
|
83 | 83 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
84 | 84 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
85 | 85 | | @ 471f378eab4c |
|
86 | 86 | |/ Successors: 3:d004c8f274b9 |
|
87 | 87 | | multi-line: 3:d004c8f274b9 |
|
88 | 88 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] |
|
89 | 89 | o ea207398892e |
|
90 | 90 | |
|
91 | 91 | $ hg fatelog |
|
92 | 92 | o d004c8f274b9 |
|
93 | 93 | | |
|
94 | 94 | | @ 471f378eab4c |
|
95 | 95 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000); |
|
96 | 96 | o ea207398892e |
|
97 | 97 | |
|
98 | 98 | |
|
99 | 99 | $ hg fatelogkw |
|
100 | 100 | o d004c8f274b9 |
|
101 | 101 | | |
|
102 | 102 | | @ 471f378eab4c |
|
103 |
|/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test, test2 |
|
|
103 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test, test2 | |
|
104 | 104 |
|
|
105 | 105 | |
|
106 | 106 | $ hg up 'desc(A1)' --hidden |
|
107 | 107 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
108 | 108 | |
|
109 | 109 | Predecessors template should show current revision as it is the working copy |
|
110 | 110 | $ hg tlog |
|
111 | 111 | o d004c8f274b9 |
|
112 | 112 | | Predecessors: 2:a468dc9b3633 |
|
113 | 113 | | semi-colon: 2:a468dc9b3633 |
|
114 | 114 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] |
|
115 | 115 | | map: 2:a468dc9b36338b14fdb7825f55ce3df4e71517ad |
|
116 | 116 | | @ a468dc9b3633 |
|
117 | 117 | |/ Successors: 3:d004c8f274b9 |
|
118 | 118 | | multi-line: 3:d004c8f274b9 |
|
119 | 119 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] |
|
120 | 120 | o ea207398892e |
|
121 | 121 | |
|
122 | 122 | $ hg fatelog |
|
123 | 123 | o d004c8f274b9 |
|
124 | 124 | | |
|
125 | 125 | | @ a468dc9b3633 |
|
126 | 126 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); |
|
127 | 127 |
|
|
128 | 128 | |
|
129 | 129 | Predecessors template should show all the predecessors as we force their display |
|
130 | 130 | with --hidden |
|
131 | 131 | $ hg tlog --hidden |
|
132 | 132 | o d004c8f274b9 |
|
133 | 133 | | Predecessors: 2:a468dc9b3633 |
|
134 | 134 | | semi-colon: 2:a468dc9b3633 |
|
135 | 135 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] |
|
136 | 136 | | map: 2:a468dc9b36338b14fdb7825f55ce3df4e71517ad |
|
137 | 137 | | @ a468dc9b3633 |
|
138 | 138 | |/ Predecessors: 1:471f378eab4c |
|
139 | 139 | | semi-colon: 1:471f378eab4c |
|
140 | 140 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
141 | 141 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
142 | 142 | | Successors: 3:d004c8f274b9 |
|
143 | 143 | | multi-line: 3:d004c8f274b9 |
|
144 | 144 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] |
|
145 | 145 | | x 471f378eab4c |
|
146 | 146 | |/ Successors: 2:a468dc9b3633 |
|
147 | 147 | | multi-line: 2:a468dc9b3633 |
|
148 | 148 | | json: [["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]] |
|
149 | 149 | o ea207398892e |
|
150 | 150 | |
|
151 | 151 | $ hg fatelog --hidden |
|
152 | 152 | o d004c8f274b9 |
|
153 | 153 | | |
|
154 | 154 | | @ a468dc9b3633 |
|
155 | 155 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); |
|
156 | 156 |
|
|
157 | 157 | |/ Obsfate: rewritten using amend as 2:a468dc9b3633 by test (at 2009-02-13 23:31 +0000); |
|
158 | 158 | o ea207398892e |
|
159 | 159 | |
|
160 | 160 | |
|
161 | 161 | Predecessors template shouldn't show anything as all obsolete commit are not |
|
162 | 162 | visible. |
|
163 | 163 | $ hg up 'desc(A2)' |
|
164 | 164 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
165 | 165 | $ hg tlog |
|
166 | 166 | @ d004c8f274b9 |
|
167 | 167 | | |
|
168 | 168 | o ea207398892e |
|
169 | 169 | |
|
170 | 170 | $ hg tlog --hidden |
|
171 | 171 | @ d004c8f274b9 |
|
172 | 172 | | Predecessors: 2:a468dc9b3633 |
|
173 | 173 | | semi-colon: 2:a468dc9b3633 |
|
174 | 174 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] |
|
175 | 175 | | map: 2:a468dc9b36338b14fdb7825f55ce3df4e71517ad |
|
176 | 176 | | x a468dc9b3633 |
|
177 | 177 | |/ Predecessors: 1:471f378eab4c |
|
178 | 178 | | semi-colon: 1:471f378eab4c |
|
179 | 179 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
180 | 180 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
181 | 181 | | Successors: 3:d004c8f274b9 |
|
182 | 182 | | multi-line: 3:d004c8f274b9 |
|
183 | 183 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] |
|
184 | 184 | | x 471f378eab4c |
|
185 | 185 | |/ Successors: 2:a468dc9b3633 |
|
186 | 186 | | multi-line: 2:a468dc9b3633 |
|
187 | 187 | | json: [["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]] |
|
188 | 188 | o ea207398892e |
|
189 | 189 | |
|
190 | 190 | $ hg fatelog |
|
191 | 191 | @ d004c8f274b9 |
|
192 | 192 | | |
|
193 | 193 | o ea207398892e |
|
194 | 194 | |
|
195 | 195 | |
|
196 | 196 | $ hg fatelog --hidden |
|
197 | 197 | @ d004c8f274b9 |
|
198 | 198 | | |
|
199 | 199 | | x a468dc9b3633 |
|
200 | 200 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); |
|
201 | 201 | | x 471f378eab4c |
|
202 | 202 | |/ Obsfate: rewritten using amend as 2:a468dc9b3633 by test (at 2009-02-13 23:31 +0000); |
|
203 | 203 | o ea207398892e |
|
204 | 204 | |
|
205 | 205 | $ hg fatelogjson --hidden |
|
206 | 206 | @ d004c8f274b9 |
|
207 | 207 | | |
|
208 | 208 | | x a468dc9b3633 |
|
209 | 209 | |/ Obsfate: [{"markers": [["a468dc9b36338b14fdb7825f55ce3df4e71517ad", ["d004c8f274b9ec480a47a93c10dac5eee63adb78"], 0, [["operation", "amend"], ["user", "test2"]], [987654321.0, 0], null]], "successors": ["d004c8f274b9ec480a47a93c10dac5eee63adb78"]}] |
|
210 | 210 | | x 471f378eab4c |
|
211 | 211 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"], 0, [["operation", "amend"], ["user", "test"]], [1234567890.0, 0], null]], "successors": ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]}] |
|
212 | 212 | o ea207398892e |
|
213 | 213 | |
|
214 | 214 | |
|
215 | 215 | Check other fatelog implementations |
|
216 | 216 | ----------------------------------- |
|
217 | 217 | |
|
218 | 218 | $ hg fatelogkw --hidden -q |
|
219 | 219 | @ d004c8f274b9 |
|
220 | 220 | | |
|
221 | 221 | | x a468dc9b3633 |
|
222 |
|/ Obsfate: rewritten using amend as 3:d004c8f274b9 |
|
|
222 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 | |
|
223 | 223 | | x 471f378eab4c |
|
224 |
|/ Obsfate: rewritten using amend as 2:a468dc9b3633 |
|
|
224 | |/ Obsfate: rewritten using amend as 2:a468dc9b3633 | |
|
225 | 225 | o ea207398892e |
|
226 | 226 | |
|
227 | 227 | $ hg fatelogkw --hidden |
|
228 | 228 | @ d004c8f274b9 |
|
229 | 229 | | |
|
230 | 230 | | x a468dc9b3633 |
|
231 |
|/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 |
|
|
231 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 | |
|
232 | 232 | | x 471f378eab4c |
|
233 |
|/ Obsfate: rewritten using amend as 2:a468dc9b3633 |
|
|
233 | |/ Obsfate: rewritten using amend as 2:a468dc9b3633 | |
|
234 | 234 | o ea207398892e |
|
235 | 235 | |
|
236 | 236 | $ hg fatelogkw --hidden -v |
|
237 | 237 | @ d004c8f274b9 |
|
238 | 238 | | |
|
239 | 239 | | x a468dc9b3633 |
|
240 | 240 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000) |
|
241 | 241 | | x 471f378eab4c |
|
242 | 242 | |/ Obsfate: rewritten using amend as 2:a468dc9b3633 by test (at 2009-02-13 23:31 +0000) |
|
243 | 243 | o ea207398892e |
|
244 | 244 | |
|
245 | 245 | Test templates with splitted commit |
|
246 | 246 | =================================== |
|
247 | 247 | |
|
248 | 248 | $ hg init $TESTTMP/templates-local-split |
|
249 | 249 | $ cd $TESTTMP/templates-local-split |
|
250 | 250 | $ mkcommit ROOT |
|
251 | 251 | $ echo 42 >> a |
|
252 | 252 | $ echo 43 >> b |
|
253 | 253 | $ hg commit -A -m "A0" |
|
254 | 254 | adding a |
|
255 | 255 | adding b |
|
256 | 256 | $ hg log --hidden -G |
|
257 | 257 | @ changeset: 1:471597cad322 |
|
258 | 258 | | tag: tip |
|
259 | 259 | | user: test |
|
260 | 260 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
261 | 261 | | summary: A0 |
|
262 | 262 | | |
|
263 | 263 | o changeset: 0:ea207398892e |
|
264 | 264 | user: test |
|
265 | 265 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
266 | 266 | summary: ROOT |
|
267 | 267 | |
|
268 | 268 | # Simulate split |
|
269 | 269 | $ hg up -r "desc(ROOT)" |
|
270 | 270 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
271 | 271 | $ echo 42 >> a |
|
272 | 272 | $ hg commit -A -m "A0" |
|
273 | 273 | adding a |
|
274 | 274 | created new head |
|
275 | 275 | $ echo 43 >> b |
|
276 | 276 | $ hg commit -A -m "A0" |
|
277 | 277 | adding b |
|
278 | 278 | $ hg debugobsolete `getid "1"` `getid "2"` `getid "3"` |
|
279 | 279 | obsoleted 1 changesets |
|
280 | 280 | |
|
281 | 281 | $ hg log --hidden -G |
|
282 | 282 | @ changeset: 3:f257fde29c7a |
|
283 | 283 | | tag: tip |
|
284 | 284 | | user: test |
|
285 | 285 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
286 | 286 | | summary: A0 |
|
287 | 287 | | |
|
288 | 288 | o changeset: 2:337fec4d2edc |
|
289 | 289 | | parent: 0:ea207398892e |
|
290 | 290 | | user: test |
|
291 | 291 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
292 | 292 | | summary: A0 |
|
293 | 293 | | |
|
294 | 294 | | x changeset: 1:471597cad322 |
|
295 | 295 | |/ user: test |
|
296 | 296 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
297 | 297 | | summary: A0 |
|
298 | 298 | | |
|
299 | 299 | o changeset: 0:ea207398892e |
|
300 | 300 | user: test |
|
301 | 301 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
302 | 302 | summary: ROOT |
|
303 | 303 | |
|
304 | 304 | Check templates |
|
305 | 305 | --------------- |
|
306 | 306 | |
|
307 | 307 | $ hg up 'obsolete()' --hidden |
|
308 | 308 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
309 | 309 | |
|
310 | 310 | Predecessors template should show current revision as it is the working copy |
|
311 | 311 | $ hg tlog |
|
312 | 312 | o f257fde29c7a |
|
313 | 313 | | Predecessors: 1:471597cad322 |
|
314 | 314 | | semi-colon: 1:471597cad322 |
|
315 | 315 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] |
|
316 | 316 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 |
|
317 | 317 | o 337fec4d2edc |
|
318 | 318 | | Predecessors: 1:471597cad322 |
|
319 | 319 | | semi-colon: 1:471597cad322 |
|
320 | 320 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] |
|
321 | 321 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 |
|
322 | 322 | | @ 471597cad322 |
|
323 | 323 | |/ Successors: 2:337fec4d2edc 3:f257fde29c7a |
|
324 | 324 | | multi-line: 2:337fec4d2edc 3:f257fde29c7a |
|
325 | 325 | | json: [["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"]] |
|
326 | 326 | o ea207398892e |
|
327 | 327 | |
|
328 | 328 | |
|
329 | 329 | $ hg fatelog |
|
330 | 330 | o f257fde29c7a |
|
331 | 331 | | |
|
332 | 332 | o 337fec4d2edc |
|
333 | 333 | | |
|
334 | 334 | | @ 471597cad322 |
|
335 | 335 | |/ Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a by test (at 1970-01-01 00:00 +0000); |
|
336 | 336 | o ea207398892e |
|
337 | 337 | |
|
338 | 338 | $ hg up f257fde29c7a |
|
339 | 339 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
340 | 340 | |
|
341 | 341 | Predecessors template should not show a predecessor as it's not displayed in |
|
342 | 342 | the log |
|
343 | 343 | $ hg tlog |
|
344 | 344 | @ f257fde29c7a |
|
345 | 345 | | |
|
346 | 346 | o 337fec4d2edc |
|
347 | 347 | | |
|
348 | 348 | o ea207398892e |
|
349 | 349 | |
|
350 | 350 | Predecessors template should show both predecessors as we force their display |
|
351 | 351 | with --hidden |
|
352 | 352 | $ hg tlog --hidden |
|
353 | 353 | @ f257fde29c7a |
|
354 | 354 | | Predecessors: 1:471597cad322 |
|
355 | 355 | | semi-colon: 1:471597cad322 |
|
356 | 356 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] |
|
357 | 357 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 |
|
358 | 358 | o 337fec4d2edc |
|
359 | 359 | | Predecessors: 1:471597cad322 |
|
360 | 360 | | semi-colon: 1:471597cad322 |
|
361 | 361 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] |
|
362 | 362 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 |
|
363 | 363 | | x 471597cad322 |
|
364 | 364 | |/ Successors: 2:337fec4d2edc 3:f257fde29c7a |
|
365 | 365 | | multi-line: 2:337fec4d2edc 3:f257fde29c7a |
|
366 | 366 | | json: [["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"]] |
|
367 | 367 | o ea207398892e |
|
368 | 368 | |
|
369 | 369 | |
|
370 | 370 | $ hg fatelog --hidden |
|
371 | 371 | @ f257fde29c7a |
|
372 | 372 | | |
|
373 | 373 | o 337fec4d2edc |
|
374 | 374 | | |
|
375 | 375 | | x 471597cad322 |
|
376 | 376 | |/ Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a by test (at 1970-01-01 00:00 +0000); |
|
377 | 377 | o ea207398892e |
|
378 | 378 | |
|
379 | 379 | $ hg fatelogjson --hidden |
|
380 | 380 | @ f257fde29c7a |
|
381 | 381 | | |
|
382 | 382 | o 337fec4d2edc |
|
383 | 383 | | |
|
384 | 384 | | x 471597cad322 |
|
385 | 385 | |/ Obsfate: [{"markers": [["471597cad322d1f659bb169751be9133dad92ef3", ["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"]}] |
|
386 | 386 | o ea207398892e |
|
387 | 387 | |
|
388 | 388 | Check other fatelog implementations |
|
389 | 389 | ----------------------------------- |
|
390 | 390 | |
|
391 | 391 | $ hg fatelogkw --hidden -q |
|
392 | 392 | @ f257fde29c7a |
|
393 | 393 | | |
|
394 | 394 | o 337fec4d2edc |
|
395 | 395 | | |
|
396 | 396 | | x 471597cad322 |
|
397 |
|/ Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a |
|
|
397 | |/ Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a | |
|
398 | 398 |
|
|
399 | 399 | |
|
400 | 400 | $ hg fatelogkw --hidden |
|
401 | 401 | @ f257fde29c7a |
|
402 | 402 | | |
|
403 | 403 | o 337fec4d2edc |
|
404 | 404 | | |
|
405 | 405 | | x 471597cad322 |
|
406 |
|/ Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a |
|
|
406 | |/ Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a | |
|
407 | 407 |
|
|
408 | 408 | |
|
409 | 409 | $ hg fatelogkw --hidden -v |
|
410 | 410 | @ f257fde29c7a |
|
411 | 411 | | |
|
412 | 412 | o 337fec4d2edc |
|
413 | 413 | | |
|
414 | 414 | | x 471597cad322 |
|
415 | 415 | |/ Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a by test (at 1970-01-01 00:00 +0000) |
|
416 | 416 | o ea207398892e |
|
417 | 417 | |
|
418 | 418 | |
|
419 | 419 | Test templates with folded commit |
|
420 | 420 | ================================= |
|
421 | 421 | |
|
422 | 422 | Test setup |
|
423 | 423 | ---------- |
|
424 | 424 | |
|
425 | 425 | $ hg init $TESTTMP/templates-local-fold |
|
426 | 426 | $ cd $TESTTMP/templates-local-fold |
|
427 | 427 | $ mkcommit ROOT |
|
428 | 428 | $ mkcommit A0 |
|
429 | 429 | $ mkcommit B0 |
|
430 | 430 | $ hg log --hidden -G |
|
431 | 431 | @ changeset: 2:0dec01379d3b |
|
432 | 432 | | tag: tip |
|
433 | 433 | | user: test |
|
434 | 434 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
435 | 435 | | summary: B0 |
|
436 | 436 | | |
|
437 | 437 | o changeset: 1:471f378eab4c |
|
438 | 438 | | user: test |
|
439 | 439 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
440 | 440 | | summary: A0 |
|
441 | 441 | | |
|
442 | 442 | o changeset: 0:ea207398892e |
|
443 | 443 | user: test |
|
444 | 444 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
445 | 445 | summary: ROOT |
|
446 | 446 | |
|
447 | 447 | Simulate a fold |
|
448 | 448 | $ hg up -r "desc(ROOT)" |
|
449 | 449 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
450 | 450 | $ echo "A0" > A0 |
|
451 | 451 | $ echo "B0" > B0 |
|
452 | 452 | $ hg commit -A -m "C0" |
|
453 | 453 | adding A0 |
|
454 | 454 | adding B0 |
|
455 | 455 | created new head |
|
456 | 456 | $ hg debugobsolete `getid "desc(A0)"` `getid "desc(C0)"` |
|
457 | 457 | obsoleted 1 changesets |
|
458 | 458 | $ hg debugobsolete `getid "desc(B0)"` `getid "desc(C0)"` |
|
459 | 459 | obsoleted 1 changesets |
|
460 | 460 | |
|
461 | 461 | $ hg log --hidden -G |
|
462 | 462 | @ changeset: 3:eb5a0daa2192 |
|
463 | 463 | | tag: tip |
|
464 | 464 | | parent: 0:ea207398892e |
|
465 | 465 | | user: test |
|
466 | 466 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
467 | 467 | | summary: C0 |
|
468 | 468 | | |
|
469 | 469 | | x changeset: 2:0dec01379d3b |
|
470 | 470 | | | user: test |
|
471 | 471 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
472 | 472 | | | summary: B0 |
|
473 | 473 | | | |
|
474 | 474 | | x changeset: 1:471f378eab4c |
|
475 | 475 | |/ user: test |
|
476 | 476 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
477 | 477 | | summary: A0 |
|
478 | 478 | | |
|
479 | 479 | o changeset: 0:ea207398892e |
|
480 | 480 | user: test |
|
481 | 481 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
482 | 482 | summary: ROOT |
|
483 | 483 | |
|
484 | 484 | Check templates |
|
485 | 485 | --------------- |
|
486 | 486 | |
|
487 | 487 | $ hg up 'desc(A0)' --hidden |
|
488 | 488 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
489 | 489 | |
|
490 | 490 | Predecessors template should show current revision as it is the working copy |
|
491 | 491 | $ hg tlog |
|
492 | 492 | o eb5a0daa2192 |
|
493 | 493 | | Predecessors: 1:471f378eab4c |
|
494 | 494 | | semi-colon: 1:471f378eab4c |
|
495 | 495 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
496 | 496 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
497 | 497 | | @ 471f378eab4c |
|
498 | 498 | |/ Successors: 3:eb5a0daa2192 |
|
499 | 499 | | multi-line: 3:eb5a0daa2192 |
|
500 | 500 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
501 | 501 | o ea207398892e |
|
502 | 502 | |
|
503 | 503 | |
|
504 | 504 | $ hg fatelog |
|
505 | 505 | o eb5a0daa2192 |
|
506 | 506 | | |
|
507 | 507 | | @ 471f378eab4c |
|
508 | 508 | |/ Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
509 | 509 | o ea207398892e |
|
510 | 510 | |
|
511 | 511 | $ hg up 'desc(B0)' --hidden |
|
512 | 512 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
513 | 513 | |
|
514 | 514 | Predecessors template should show both predecessors as they should be both |
|
515 | 515 | displayed |
|
516 | 516 | $ hg tlog |
|
517 | 517 | o eb5a0daa2192 |
|
518 | 518 | | Predecessors: 2:0dec01379d3b 1:471f378eab4c |
|
519 | 519 | | semi-colon: 2:0dec01379d3b; 1:471f378eab4c |
|
520 | 520 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", "471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
521 | 521 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
522 | 522 | | @ 0dec01379d3b |
|
523 | 523 | | | Successors: 3:eb5a0daa2192 |
|
524 | 524 | | | multi-line: 3:eb5a0daa2192 |
|
525 | 525 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
526 | 526 | | x 471f378eab4c |
|
527 | 527 | |/ Successors: 3:eb5a0daa2192 |
|
528 | 528 | | multi-line: 3:eb5a0daa2192 |
|
529 | 529 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
530 | 530 | o ea207398892e |
|
531 | 531 | |
|
532 | 532 | |
|
533 | 533 | $ hg fatelog |
|
534 | 534 | o eb5a0daa2192 |
|
535 | 535 | | |
|
536 | 536 | | @ 0dec01379d3b |
|
537 | 537 | | | Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
538 | 538 | | x 471f378eab4c |
|
539 | 539 | |/ Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
540 | 540 | o ea207398892e |
|
541 | 541 | |
|
542 | 542 | $ hg up 'desc(C0)' |
|
543 | 543 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
544 | 544 | |
|
545 | 545 | Predecessors template should not show predecessors as they are not displayed in |
|
546 | 546 | the log |
|
547 | 547 | $ hg tlog |
|
548 | 548 | @ eb5a0daa2192 |
|
549 | 549 | | |
|
550 | 550 | o ea207398892e |
|
551 | 551 | |
|
552 | 552 | Predecessors template should show both predecessors as we force their display |
|
553 | 553 | with --hidden |
|
554 | 554 | $ hg tlog --hidden |
|
555 | 555 | @ eb5a0daa2192 |
|
556 | 556 | | Predecessors: 2:0dec01379d3b 1:471f378eab4c |
|
557 | 557 | | semi-colon: 2:0dec01379d3b; 1:471f378eab4c |
|
558 | 558 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", "471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
559 | 559 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
560 | 560 | | x 0dec01379d3b |
|
561 | 561 | | | Successors: 3:eb5a0daa2192 |
|
562 | 562 | | | multi-line: 3:eb5a0daa2192 |
|
563 | 563 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
564 | 564 | | x 471f378eab4c |
|
565 | 565 | |/ Successors: 3:eb5a0daa2192 |
|
566 | 566 | | multi-line: 3:eb5a0daa2192 |
|
567 | 567 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
568 | 568 | o ea207398892e |
|
569 | 569 | |
|
570 | 570 | |
|
571 | 571 | $ hg fatelog --hidden |
|
572 | 572 | @ eb5a0daa2192 |
|
573 | 573 | | |
|
574 | 574 | | x 0dec01379d3b |
|
575 | 575 | | | Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
576 | 576 | | x 471f378eab4c |
|
577 | 577 | |/ Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
578 | 578 | o ea207398892e |
|
579 | 579 | |
|
580 | 580 | |
|
581 | 581 | $ hg fatelogjson --hidden |
|
582 | 582 | @ eb5a0daa2192 |
|
583 | 583 | | |
|
584 | 584 | | x 0dec01379d3b |
|
585 | 585 | | | Obsfate: [{"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}] |
|
586 | 586 | | x 471f378eab4c |
|
587 | 587 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}] |
|
588 | 588 | o ea207398892e |
|
589 | 589 | |
|
590 | 590 | Check other fatelog implementations |
|
591 | 591 | ----------------------------------- |
|
592 | 592 | |
|
593 | 593 | $ hg fatelogkw --hidden -q |
|
594 | 594 | @ eb5a0daa2192 |
|
595 | 595 | | |
|
596 | 596 | | x 0dec01379d3b |
|
597 |
| | Obsfate: rewritten as 3:eb5a0daa2192 |
|
|
597 | | | Obsfate: rewritten as 3:eb5a0daa2192 | |
|
598 | 598 |
|
|
599 |
|/ Obsfate: rewritten as 3:eb5a0daa2192 |
|
|
599 | |/ Obsfate: rewritten as 3:eb5a0daa2192 | |
|
600 | 600 |
|
|
601 | 601 | |
|
602 | 602 | $ hg fatelogkw --hidden |
|
603 | 603 | @ eb5a0daa2192 |
|
604 | 604 | | |
|
605 | 605 | | x 0dec01379d3b |
|
606 |
| | Obsfate: rewritten as 3:eb5a0daa2192 |
|
|
606 | | | Obsfate: rewritten as 3:eb5a0daa2192 | |
|
607 | 607 |
|
|
608 |
|/ Obsfate: rewritten as 3:eb5a0daa2192 |
|
|
608 | |/ Obsfate: rewritten as 3:eb5a0daa2192 | |
|
609 | 609 |
|
|
610 | 610 | |
|
611 | 611 | $ hg fatelogkw --hidden -v |
|
612 | 612 | @ eb5a0daa2192 |
|
613 | 613 | | |
|
614 | 614 | | x 0dec01379d3b |
|
615 | 615 | | | Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000) |
|
616 | 616 | | x 471f378eab4c |
|
617 | 617 | |/ Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000) |
|
618 | 618 | o ea207398892e |
|
619 | 619 | |
|
620 | 620 | |
|
621 | 621 | Test templates with divergence |
|
622 | 622 | ============================== |
|
623 | 623 | |
|
624 | 624 | Test setup |
|
625 | 625 | ---------- |
|
626 | 626 | |
|
627 | 627 | $ hg init $TESTTMP/templates-local-divergence |
|
628 | 628 | $ cd $TESTTMP/templates-local-divergence |
|
629 | 629 | $ mkcommit ROOT |
|
630 | 630 | $ mkcommit A0 |
|
631 | 631 | $ hg commit --amend -m "A1" |
|
632 | 632 | $ hg log --hidden -G |
|
633 | 633 | @ changeset: 2:fdf9bde5129a |
|
634 | 634 | | tag: tip |
|
635 | 635 | | parent: 0:ea207398892e |
|
636 | 636 | | user: test |
|
637 | 637 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
638 | 638 | | summary: A1 |
|
639 | 639 | | |
|
640 | 640 | | x changeset: 1:471f378eab4c |
|
641 | 641 | |/ user: test |
|
642 | 642 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
643 | 643 | | summary: A0 |
|
644 | 644 | | |
|
645 | 645 | o changeset: 0:ea207398892e |
|
646 | 646 | user: test |
|
647 | 647 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
648 | 648 | summary: ROOT |
|
649 | 649 | |
|
650 | 650 | $ hg update --hidden 'desc(A0)' |
|
651 | 651 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
652 | 652 | $ hg commit --amend -m "A2" |
|
653 | 653 | $ hg log --hidden -G |
|
654 | 654 | @ changeset: 3:65b757b745b9 |
|
655 | 655 | | tag: tip |
|
656 | 656 | | parent: 0:ea207398892e |
|
657 | 657 | | user: test |
|
658 | 658 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
659 | 659 | | instability: content-divergent |
|
660 | 660 | | summary: A2 |
|
661 | 661 | | |
|
662 | 662 | | o changeset: 2:fdf9bde5129a |
|
663 | 663 | |/ parent: 0:ea207398892e |
|
664 | 664 | | user: test |
|
665 | 665 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
666 | 666 | | instability: content-divergent |
|
667 | 667 | | summary: A1 |
|
668 | 668 | | |
|
669 | 669 | | x changeset: 1:471f378eab4c |
|
670 | 670 | |/ user: test |
|
671 | 671 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
672 | 672 | | summary: A0 |
|
673 | 673 | | |
|
674 | 674 | o changeset: 0:ea207398892e |
|
675 | 675 | user: test |
|
676 | 676 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
677 | 677 | summary: ROOT |
|
678 | 678 | |
|
679 | 679 | $ hg commit --amend -m 'A3' |
|
680 | 680 | $ hg log --hidden -G |
|
681 | 681 | @ changeset: 4:019fadeab383 |
|
682 | 682 | | tag: tip |
|
683 | 683 | | parent: 0:ea207398892e |
|
684 | 684 | | user: test |
|
685 | 685 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
686 | 686 | | instability: content-divergent |
|
687 | 687 | | summary: A3 |
|
688 | 688 | | |
|
689 | 689 | | x changeset: 3:65b757b745b9 |
|
690 | 690 | |/ parent: 0:ea207398892e |
|
691 | 691 | | user: test |
|
692 | 692 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
693 | 693 | | summary: A2 |
|
694 | 694 | | |
|
695 | 695 | | o changeset: 2:fdf9bde5129a |
|
696 | 696 | |/ parent: 0:ea207398892e |
|
697 | 697 | | user: test |
|
698 | 698 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
699 | 699 | | instability: content-divergent |
|
700 | 700 | | summary: A1 |
|
701 | 701 | | |
|
702 | 702 | | x changeset: 1:471f378eab4c |
|
703 | 703 | |/ user: test |
|
704 | 704 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
705 | 705 | | summary: A0 |
|
706 | 706 | | |
|
707 | 707 | o changeset: 0:ea207398892e |
|
708 | 708 | user: test |
|
709 | 709 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
710 | 710 | summary: ROOT |
|
711 | 711 | |
|
712 | 712 | |
|
713 | 713 | Check templates |
|
714 | 714 | --------------- |
|
715 | 715 | |
|
716 | 716 | $ hg up 'desc(A0)' --hidden |
|
717 | 717 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
718 | 718 | |
|
719 | 719 | Predecessors template should show current revision as it is the working copy |
|
720 | 720 | $ hg tlog |
|
721 | 721 | o 019fadeab383 |
|
722 | 722 | | Predecessors: 1:471f378eab4c |
|
723 | 723 | | semi-colon: 1:471f378eab4c |
|
724 | 724 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
725 | 725 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
726 | 726 | | o fdf9bde5129a |
|
727 | 727 | |/ Predecessors: 1:471f378eab4c |
|
728 | 728 | | semi-colon: 1:471f378eab4c |
|
729 | 729 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
730 | 730 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
731 | 731 | | @ 471f378eab4c |
|
732 | 732 | |/ Successors: 2:fdf9bde5129a; 4:019fadeab383 |
|
733 | 733 | | multi-line: 2:fdf9bde5129a |
|
734 | 734 | | multi-line: 4:019fadeab383 |
|
735 | 735 | | json: [["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"]] |
|
736 | 736 | o ea207398892e |
|
737 | 737 | |
|
738 | 738 | $ hg fatelog |
|
739 | 739 | o 019fadeab383 |
|
740 | 740 | | |
|
741 | 741 | | o fdf9bde5129a |
|
742 | 742 | |/ |
|
743 | 743 | | @ 471f378eab4c |
|
744 | 744 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000); rewritten using amend as 4:019fadeab383 by test (at 1970-01-01 00:00 +0000); |
|
745 | 745 | o ea207398892e |
|
746 | 746 | |
|
747 | 747 | $ hg up 'desc(A1)' |
|
748 | 748 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
749 | 749 | |
|
750 | 750 | Predecessors template should not show predecessors as they are not displayed in |
|
751 | 751 | the log |
|
752 | 752 | $ hg tlog |
|
753 | 753 | o 019fadeab383 |
|
754 | 754 | | |
|
755 | 755 | | @ fdf9bde5129a |
|
756 | 756 | |/ |
|
757 | 757 | o ea207398892e |
|
758 | 758 | |
|
759 | 759 | |
|
760 | 760 | $ hg fatelog |
|
761 | 761 | o 019fadeab383 |
|
762 | 762 | | |
|
763 | 763 | | @ fdf9bde5129a |
|
764 | 764 | |/ |
|
765 | 765 | o ea207398892e |
|
766 | 766 | |
|
767 | 767 | Predecessors template should the predecessors as we force their display with |
|
768 | 768 | --hidden |
|
769 | 769 | $ hg tlog --hidden |
|
770 | 770 | o 019fadeab383 |
|
771 | 771 | | Predecessors: 3:65b757b745b9 |
|
772 | 772 | | semi-colon: 3:65b757b745b9 |
|
773 | 773 | | json: ["65b757b745b935093c87a2bccd877521cccffcbd"] |
|
774 | 774 | | map: 3:65b757b745b935093c87a2bccd877521cccffcbd |
|
775 | 775 | | x 65b757b745b9 |
|
776 | 776 | |/ Predecessors: 1:471f378eab4c |
|
777 | 777 | | semi-colon: 1:471f378eab4c |
|
778 | 778 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
779 | 779 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
780 | 780 | | Successors: 4:019fadeab383 |
|
781 | 781 | | multi-line: 4:019fadeab383 |
|
782 | 782 | | json: [["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"]] |
|
783 | 783 | | @ fdf9bde5129a |
|
784 | 784 | |/ Predecessors: 1:471f378eab4c |
|
785 | 785 | | semi-colon: 1:471f378eab4c |
|
786 | 786 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
787 | 787 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
788 | 788 | | x 471f378eab4c |
|
789 | 789 | |/ Successors: 2:fdf9bde5129a; 3:65b757b745b9 |
|
790 | 790 | | multi-line: 2:fdf9bde5129a |
|
791 | 791 | | multi-line: 3:65b757b745b9 |
|
792 | 792 | | json: [["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], ["65b757b745b935093c87a2bccd877521cccffcbd"]] |
|
793 | 793 | o ea207398892e |
|
794 | 794 | |
|
795 | 795 | |
|
796 | 796 | $ hg fatelog --hidden |
|
797 | 797 | o 019fadeab383 |
|
798 | 798 | | |
|
799 | 799 | | x 65b757b745b9 |
|
800 | 800 | |/ Obsfate: rewritten using amend as 4:019fadeab383 by test (at 1970-01-01 00:00 +0000); |
|
801 | 801 | | @ fdf9bde5129a |
|
802 | 802 | |/ |
|
803 | 803 | | x 471f378eab4c |
|
804 | 804 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000); rewritten using amend as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000); |
|
805 | 805 | o ea207398892e |
|
806 | 806 | |
|
807 | 807 | |
|
808 | 808 | $ hg fatelogjson --hidden |
|
809 | 809 | o 019fadeab383 |
|
810 | 810 | | |
|
811 | 811 | | x 65b757b745b9 |
|
812 | 812 | |/ Obsfate: [{"markers": [["65b757b745b935093c87a2bccd877521cccffcbd", ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"]}] |
|
813 | 813 | | @ fdf9bde5129a |
|
814 | 814 | |/ |
|
815 | 815 | | x 471f378eab4c |
|
816 | 816 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"]}, {"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["65b757b745b935093c87a2bccd877521cccffcbd"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["65b757b745b935093c87a2bccd877521cccffcbd"]}] |
|
817 | 817 | o ea207398892e |
|
818 | 818 | |
|
819 | 819 | |
|
820 | 820 | Check other fatelog implementations |
|
821 | 821 | ----------------------------------- |
|
822 | 822 | |
|
823 | 823 | $ hg fatelogkw --hidden -q |
|
824 | 824 | o 019fadeab383 |
|
825 | 825 | | |
|
826 | 826 | | x 65b757b745b9 |
|
827 |
|/ Obsfate: rewritten using amend as 4:019fadeab383 |
|
|
827 | |/ Obsfate: rewritten using amend as 4:019fadeab383 | |
|
828 | 828 |
|
|
829 | 829 | |/ |
|
830 | 830 | | x 471f378eab4c |
|
831 |
|/ Obsfate: rewritten using amend as 2:fdf9bde5129a |
|
|
832 |
|
|
|
831 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a | |
|
832 | | Obsfate: rewritten using amend as 3:65b757b745b9 | |
|
833 | 833 |
|
|
834 | 834 | |
|
835 | 835 | $ hg fatelogkw --hidden |
|
836 | 836 | o 019fadeab383 |
|
837 | 837 | | |
|
838 | 838 | | x 65b757b745b9 |
|
839 |
|/ Obsfate: rewritten using amend as 4:019fadeab383 |
|
|
839 | |/ Obsfate: rewritten using amend as 4:019fadeab383 | |
|
840 | 840 |
|
|
841 | 841 | |/ |
|
842 | 842 | | x 471f378eab4c |
|
843 |
|/ Obsfate: rewritten using amend as 2:fdf9bde5129a |
|
|
844 |
|
|
|
843 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a | |
|
844 | | Obsfate: rewritten using amend as 3:65b757b745b9 | |
|
845 | 845 |
|
|
846 | 846 | |
|
847 | 847 | $ hg fatelogkw --hidden -v |
|
848 | 848 | o 019fadeab383 |
|
849 | 849 | | |
|
850 | 850 | | x 65b757b745b9 |
|
851 | 851 | |/ Obsfate: rewritten using amend as 4:019fadeab383 by test (at 1970-01-01 00:00 +0000) |
|
852 | 852 | | @ fdf9bde5129a |
|
853 | 853 | |/ |
|
854 | 854 | | x 471f378eab4c |
|
855 | 855 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000) |
|
856 | 856 | | Obsfate: rewritten using amend as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000) |
|
857 | 857 | o ea207398892e |
|
858 | 858 | |
|
859 | 859 | |
|
860 | 860 | Test templates with amended + folded commit |
|
861 | 861 | =========================================== |
|
862 | 862 | |
|
863 | 863 | Test setup |
|
864 | 864 | ---------- |
|
865 | 865 | |
|
866 | 866 | $ hg init $TESTTMP/templates-local-amend-fold |
|
867 | 867 | $ cd $TESTTMP/templates-local-amend-fold |
|
868 | 868 | $ mkcommit ROOT |
|
869 | 869 | $ mkcommit A0 |
|
870 | 870 | $ mkcommit B0 |
|
871 | 871 | $ hg commit --amend -m "B1" |
|
872 | 872 | $ hg log --hidden -G |
|
873 | 873 | @ changeset: 3:b7ea6d14e664 |
|
874 | 874 | | tag: tip |
|
875 | 875 | | parent: 1:471f378eab4c |
|
876 | 876 | | user: test |
|
877 | 877 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
878 | 878 | | summary: B1 |
|
879 | 879 | | |
|
880 | 880 | | x changeset: 2:0dec01379d3b |
|
881 | 881 | |/ user: test |
|
882 | 882 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
883 | 883 | | summary: B0 |
|
884 | 884 | | |
|
885 | 885 | o changeset: 1:471f378eab4c |
|
886 | 886 | | user: test |
|
887 | 887 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
888 | 888 | | summary: A0 |
|
889 | 889 | | |
|
890 | 890 | o changeset: 0:ea207398892e |
|
891 | 891 | user: test |
|
892 | 892 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
893 | 893 | summary: ROOT |
|
894 | 894 | |
|
895 | 895 | # Simulate a fold |
|
896 | 896 | $ hg up -r "desc(ROOT)" |
|
897 | 897 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
898 | 898 | $ echo "A0" > A0 |
|
899 | 899 | $ echo "B0" > B0 |
|
900 | 900 | $ hg commit -A -m "C0" |
|
901 | 901 | adding A0 |
|
902 | 902 | adding B0 |
|
903 | 903 | created new head |
|
904 | 904 | $ hg debugobsolete `getid "desc(A0)"` `getid "desc(C0)"` |
|
905 | 905 | obsoleted 1 changesets |
|
906 | 906 | $ hg debugobsolete `getid "desc(B1)"` `getid "desc(C0)"` |
|
907 | 907 | obsoleted 1 changesets |
|
908 | 908 | |
|
909 | 909 | $ hg log --hidden -G |
|
910 | 910 | @ changeset: 4:eb5a0daa2192 |
|
911 | 911 | | tag: tip |
|
912 | 912 | | parent: 0:ea207398892e |
|
913 | 913 | | user: test |
|
914 | 914 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
915 | 915 | | summary: C0 |
|
916 | 916 | | |
|
917 | 917 | | x changeset: 3:b7ea6d14e664 |
|
918 | 918 | | | parent: 1:471f378eab4c |
|
919 | 919 | | | user: test |
|
920 | 920 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
921 | 921 | | | summary: B1 |
|
922 | 922 | | | |
|
923 | 923 | | | x changeset: 2:0dec01379d3b |
|
924 | 924 | | |/ user: test |
|
925 | 925 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
926 | 926 | | | summary: B0 |
|
927 | 927 | | | |
|
928 | 928 | | x changeset: 1:471f378eab4c |
|
929 | 929 | |/ user: test |
|
930 | 930 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
931 | 931 | | summary: A0 |
|
932 | 932 | | |
|
933 | 933 | o changeset: 0:ea207398892e |
|
934 | 934 | user: test |
|
935 | 935 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
936 | 936 | summary: ROOT |
|
937 | 937 | |
|
938 | 938 | Check templates |
|
939 | 939 | --------------- |
|
940 | 940 | |
|
941 | 941 | $ hg up 'desc(A0)' --hidden |
|
942 | 942 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
943 | 943 | |
|
944 | 944 | Predecessors template should show current revision as it is the working copy |
|
945 | 945 | $ hg tlog |
|
946 | 946 | o eb5a0daa2192 |
|
947 | 947 | | Predecessors: 1:471f378eab4c |
|
948 | 948 | | semi-colon: 1:471f378eab4c |
|
949 | 949 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
950 | 950 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
951 | 951 | | @ 471f378eab4c |
|
952 | 952 | |/ Successors: 4:eb5a0daa2192 |
|
953 | 953 | | multi-line: 4:eb5a0daa2192 |
|
954 | 954 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
955 | 955 | o ea207398892e |
|
956 | 956 | |
|
957 | 957 | |
|
958 | 958 | $ hg fatelog |
|
959 | 959 | o eb5a0daa2192 |
|
960 | 960 | | |
|
961 | 961 | | @ 471f378eab4c |
|
962 | 962 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
963 | 963 | o ea207398892e |
|
964 | 964 | |
|
965 | 965 | $ hg up 'desc(B0)' --hidden |
|
966 | 966 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
967 | 967 | |
|
968 | 968 | Predecessors template should both predecessors as they are visible |
|
969 | 969 | $ hg tlog |
|
970 | 970 | o eb5a0daa2192 |
|
971 | 971 | | Predecessors: 2:0dec01379d3b 1:471f378eab4c |
|
972 | 972 | | semi-colon: 2:0dec01379d3b; 1:471f378eab4c |
|
973 | 973 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", "471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
974 | 974 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
975 | 975 | | @ 0dec01379d3b |
|
976 | 976 | | | Successors: 4:eb5a0daa2192 |
|
977 | 977 | | | multi-line: 4:eb5a0daa2192 |
|
978 | 978 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
979 | 979 | | x 471f378eab4c |
|
980 | 980 | |/ Successors: 4:eb5a0daa2192 |
|
981 | 981 | | multi-line: 4:eb5a0daa2192 |
|
982 | 982 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
983 | 983 | o ea207398892e |
|
984 | 984 | |
|
985 | 985 | |
|
986 | 986 | $ hg fatelog |
|
987 | 987 | o eb5a0daa2192 |
|
988 | 988 | | |
|
989 | 989 | | @ 0dec01379d3b |
|
990 | 990 | | | Obsfate: rewritten using amend as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
991 | 991 | | x 471f378eab4c |
|
992 | 992 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
993 | 993 | o ea207398892e |
|
994 | 994 | |
|
995 | 995 | $ hg up 'desc(B1)' --hidden |
|
996 | 996 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
997 | 997 | |
|
998 | 998 | Predecessors template should both predecessors as they are visible |
|
999 | 999 | $ hg tlog |
|
1000 | 1000 | o eb5a0daa2192 |
|
1001 | 1001 | | Predecessors: 1:471f378eab4c 3:b7ea6d14e664 |
|
1002 | 1002 | | semi-colon: 1:471f378eab4c; 3:b7ea6d14e664 |
|
1003 | 1003 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874", "b7ea6d14e664bdc8922221f7992631b50da3fb07"] |
|
1004 | 1004 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 3:b7ea6d14e664bdc8922221f7992631b50da3fb07 |
|
1005 | 1005 | | @ b7ea6d14e664 |
|
1006 | 1006 | | | Successors: 4:eb5a0daa2192 |
|
1007 | 1007 | | | multi-line: 4:eb5a0daa2192 |
|
1008 | 1008 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
1009 | 1009 | | x 471f378eab4c |
|
1010 | 1010 | |/ Successors: 4:eb5a0daa2192 |
|
1011 | 1011 | | multi-line: 4:eb5a0daa2192 |
|
1012 | 1012 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
1013 | 1013 | o ea207398892e |
|
1014 | 1014 | |
|
1015 | 1015 | |
|
1016 | 1016 | $ hg fatelog |
|
1017 | 1017 | o eb5a0daa2192 |
|
1018 | 1018 | | |
|
1019 | 1019 | | @ b7ea6d14e664 |
|
1020 | 1020 | | | Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
1021 | 1021 | | x 471f378eab4c |
|
1022 | 1022 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
1023 | 1023 | o ea207398892e |
|
1024 | 1024 | |
|
1025 | 1025 | $ hg up 'desc(C0)' |
|
1026 | 1026 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1027 | 1027 | |
|
1028 | 1028 | Predecessors template should show no predecessors as they are both non visible |
|
1029 | 1029 | $ hg tlog |
|
1030 | 1030 | @ eb5a0daa2192 |
|
1031 | 1031 | | |
|
1032 | 1032 | o ea207398892e |
|
1033 | 1033 | |
|
1034 | 1034 | |
|
1035 | 1035 | $ hg fatelog |
|
1036 | 1036 | @ eb5a0daa2192 |
|
1037 | 1037 | | |
|
1038 | 1038 | o ea207398892e |
|
1039 | 1039 | |
|
1040 | 1040 | Predecessors template should show all predecessors as we force their display |
|
1041 | 1041 | with --hidden |
|
1042 | 1042 | $ hg tlog --hidden |
|
1043 | 1043 | @ eb5a0daa2192 |
|
1044 | 1044 | | Predecessors: 1:471f378eab4c 3:b7ea6d14e664 |
|
1045 | 1045 | | semi-colon: 1:471f378eab4c; 3:b7ea6d14e664 |
|
1046 | 1046 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874", "b7ea6d14e664bdc8922221f7992631b50da3fb07"] |
|
1047 | 1047 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 3:b7ea6d14e664bdc8922221f7992631b50da3fb07 |
|
1048 | 1048 | | x b7ea6d14e664 |
|
1049 | 1049 | | | Predecessors: 2:0dec01379d3b |
|
1050 | 1050 | | | semi-colon: 2:0dec01379d3b |
|
1051 | 1051 | | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
1052 | 1052 | | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
1053 | 1053 | | | Successors: 4:eb5a0daa2192 |
|
1054 | 1054 | | | multi-line: 4:eb5a0daa2192 |
|
1055 | 1055 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
1056 | 1056 | | | x 0dec01379d3b |
|
1057 | 1057 | | |/ Successors: 3:b7ea6d14e664 |
|
1058 | 1058 | | | multi-line: 3:b7ea6d14e664 |
|
1059 | 1059 | | | json: [["b7ea6d14e664bdc8922221f7992631b50da3fb07"]] |
|
1060 | 1060 | | x 471f378eab4c |
|
1061 | 1061 | |/ Successors: 4:eb5a0daa2192 |
|
1062 | 1062 | | multi-line: 4:eb5a0daa2192 |
|
1063 | 1063 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
1064 | 1064 | o ea207398892e |
|
1065 | 1065 | |
|
1066 | 1066 | |
|
1067 | 1067 | $ hg fatelog --hidden |
|
1068 | 1068 | @ eb5a0daa2192 |
|
1069 | 1069 | | |
|
1070 | 1070 | | x b7ea6d14e664 |
|
1071 | 1071 | | | Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
1072 | 1072 | | | x 0dec01379d3b |
|
1073 | 1073 | | |/ Obsfate: rewritten using amend as 3:b7ea6d14e664 by test (at 1970-01-01 00:00 +0000); |
|
1074 | 1074 | | x 471f378eab4c |
|
1075 | 1075 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
1076 | 1076 | o ea207398892e |
|
1077 | 1077 | |
|
1078 | 1078 | |
|
1079 | 1079 | $ hg fatelogjson --hidden |
|
1080 | 1080 | @ eb5a0daa2192 |
|
1081 | 1081 | | |
|
1082 | 1082 | | x b7ea6d14e664 |
|
1083 | 1083 | | | Obsfate: [{"markers": [["b7ea6d14e664bdc8922221f7992631b50da3fb07", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}] |
|
1084 | 1084 | | | x 0dec01379d3b |
|
1085 | 1085 | | |/ Obsfate: [{"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["b7ea6d14e664bdc8922221f7992631b50da3fb07"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["b7ea6d14e664bdc8922221f7992631b50da3fb07"]}] |
|
1086 | 1086 | | x 471f378eab4c |
|
1087 | 1087 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}] |
|
1088 | 1088 | o ea207398892e |
|
1089 | 1089 | |
|
1090 | 1090 | |
|
1091 | 1091 | Check other fatelog implementations |
|
1092 | 1092 | ----------------------------------- |
|
1093 | 1093 | |
|
1094 | 1094 | $ hg fatelogkw --hidden -q |
|
1095 | 1095 | @ eb5a0daa2192 |
|
1096 | 1096 | | |
|
1097 | 1097 | | x b7ea6d14e664 |
|
1098 |
| | Obsfate: rewritten as 4:eb5a0daa2192 |
|
|
1098 | | | Obsfate: rewritten as 4:eb5a0daa2192 | |
|
1099 | 1099 |
|
|
1100 |
| |/ Obsfate: rewritten using amend as 3:b7ea6d14e664 |
|
|
1100 | | |/ Obsfate: rewritten using amend as 3:b7ea6d14e664 | |
|
1101 | 1101 |
|
|
1102 |
|/ Obsfate: rewritten as 4:eb5a0daa2192 |
|
|
1102 | |/ Obsfate: rewritten as 4:eb5a0daa2192 | |
|
1103 | 1103 |
|
|
1104 | 1104 | |
|
1105 | 1105 | $ hg fatelogkw --hidden |
|
1106 | 1106 | @ eb5a0daa2192 |
|
1107 | 1107 | | |
|
1108 | 1108 | | x b7ea6d14e664 |
|
1109 |
| | Obsfate: rewritten as 4:eb5a0daa2192 |
|
|
1109 | | | Obsfate: rewritten as 4:eb5a0daa2192 | |
|
1110 | 1110 |
|
|
1111 |
| |/ Obsfate: rewritten using amend as 3:b7ea6d14e664 |
|
|
1111 | | |/ Obsfate: rewritten using amend as 3:b7ea6d14e664 | |
|
1112 | 1112 |
|
|
1113 |
|/ Obsfate: rewritten as 4:eb5a0daa2192 |
|
|
1113 | |/ Obsfate: rewritten as 4:eb5a0daa2192 | |
|
1114 | 1114 |
|
|
1115 | 1115 | |
|
1116 | 1116 | $ hg fatelogkw --hidden -v |
|
1117 | 1117 | @ eb5a0daa2192 |
|
1118 | 1118 | | |
|
1119 | 1119 | | x b7ea6d14e664 |
|
1120 | 1120 | | | Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000) |
|
1121 | 1121 | | | x 0dec01379d3b |
|
1122 | 1122 | | |/ Obsfate: rewritten using amend as 3:b7ea6d14e664 by test (at 1970-01-01 00:00 +0000) |
|
1123 | 1123 | | x 471f378eab4c |
|
1124 | 1124 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000) |
|
1125 | 1125 | o ea207398892e |
|
1126 | 1126 | |
|
1127 | 1127 | |
|
1128 | 1128 | Test template with pushed and pulled obs markers |
|
1129 | 1129 | ================================================ |
|
1130 | 1130 | |
|
1131 | 1131 | Test setup |
|
1132 | 1132 | ---------- |
|
1133 | 1133 | |
|
1134 | 1134 | $ hg init $TESTTMP/templates-local-remote-markers-1 |
|
1135 | 1135 | $ cd $TESTTMP/templates-local-remote-markers-1 |
|
1136 | 1136 | $ mkcommit ROOT |
|
1137 | 1137 | $ mkcommit A0 |
|
1138 | 1138 | $ hg clone $TESTTMP/templates-local-remote-markers-1 $TESTTMP/templates-local-remote-markers-2 |
|
1139 | 1139 | updating to branch default |
|
1140 | 1140 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1141 | 1141 | $ cd $TESTTMP/templates-local-remote-markers-2 |
|
1142 | 1142 | $ hg log --hidden -G |
|
1143 | 1143 | @ changeset: 1:471f378eab4c |
|
1144 | 1144 | | tag: tip |
|
1145 | 1145 | | user: test |
|
1146 | 1146 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1147 | 1147 | | summary: A0 |
|
1148 | 1148 | | |
|
1149 | 1149 | o changeset: 0:ea207398892e |
|
1150 | 1150 | user: test |
|
1151 | 1151 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1152 | 1152 | summary: ROOT |
|
1153 | 1153 | |
|
1154 | 1154 | $ cd $TESTTMP/templates-local-remote-markers-1 |
|
1155 | 1155 | $ hg commit --amend -m "A1" |
|
1156 | 1156 | $ hg commit --amend -m "A2" |
|
1157 | 1157 | $ hg log --hidden -G |
|
1158 | 1158 | @ changeset: 3:7a230b46bf61 |
|
1159 | 1159 | | tag: tip |
|
1160 | 1160 | | parent: 0:ea207398892e |
|
1161 | 1161 | | user: test |
|
1162 | 1162 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1163 | 1163 | | summary: A2 |
|
1164 | 1164 | | |
|
1165 | 1165 | | x changeset: 2:fdf9bde5129a |
|
1166 | 1166 | |/ parent: 0:ea207398892e |
|
1167 | 1167 | | user: test |
|
1168 | 1168 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1169 | 1169 | | summary: A1 |
|
1170 | 1170 | | |
|
1171 | 1171 | | x changeset: 1:471f378eab4c |
|
1172 | 1172 | |/ user: test |
|
1173 | 1173 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1174 | 1174 | | summary: A0 |
|
1175 | 1175 | | |
|
1176 | 1176 | o changeset: 0:ea207398892e |
|
1177 | 1177 | user: test |
|
1178 | 1178 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1179 | 1179 | summary: ROOT |
|
1180 | 1180 | |
|
1181 | 1181 | $ cd $TESTTMP/templates-local-remote-markers-2 |
|
1182 | 1182 | $ hg pull |
|
1183 | 1183 | pulling from $TESTTMP/templates-local-remote-markers-1 (glob) |
|
1184 | 1184 | searching for changes |
|
1185 | 1185 | adding changesets |
|
1186 | 1186 | adding manifests |
|
1187 | 1187 | adding file changes |
|
1188 | 1188 | added 1 changesets with 0 changes to 1 files (+1 heads) |
|
1189 | 1189 | 2 new obsolescence markers |
|
1190 | 1190 | obsoleted 1 changesets |
|
1191 | 1191 | new changesets 7a230b46bf61 |
|
1192 | 1192 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
1193 | 1193 | $ hg log --hidden -G |
|
1194 | 1194 | o changeset: 2:7a230b46bf61 |
|
1195 | 1195 | | tag: tip |
|
1196 | 1196 | | parent: 0:ea207398892e |
|
1197 | 1197 | | user: test |
|
1198 | 1198 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1199 | 1199 | | summary: A2 |
|
1200 | 1200 | | |
|
1201 | 1201 | | @ changeset: 1:471f378eab4c |
|
1202 | 1202 | |/ user: test |
|
1203 | 1203 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1204 | 1204 | | summary: A0 |
|
1205 | 1205 | | |
|
1206 | 1206 | o changeset: 0:ea207398892e |
|
1207 | 1207 | user: test |
|
1208 | 1208 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1209 | 1209 | summary: ROOT |
|
1210 | 1210 | |
|
1211 | 1211 | |
|
1212 | 1212 | $ hg debugobsolete |
|
1213 | 1213 | 471f378eab4c5e25f6c77f785b27c936efb22874 fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
1214 | 1214 | fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e 7a230b46bf61e50b30308c6cfd7bd1269ef54702 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
1215 | 1215 | |
|
1216 | 1216 | Check templates |
|
1217 | 1217 | --------------- |
|
1218 | 1218 | |
|
1219 | 1219 | Predecessors template should show current revision as it is the working copy |
|
1220 | 1220 | $ hg tlog |
|
1221 | 1221 | o 7a230b46bf61 |
|
1222 | 1222 | | Predecessors: 1:471f378eab4c |
|
1223 | 1223 | | semi-colon: 1:471f378eab4c |
|
1224 | 1224 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
1225 | 1225 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
1226 | 1226 | | @ 471f378eab4c |
|
1227 | 1227 | |/ Successors: 2:7a230b46bf61 |
|
1228 | 1228 | | multi-line: 2:7a230b46bf61 |
|
1229 | 1229 | | json: [["7a230b46bf61e50b30308c6cfd7bd1269ef54702"]] |
|
1230 | 1230 | o ea207398892e |
|
1231 | 1231 | |
|
1232 | 1232 | |
|
1233 | 1233 | $ hg fatelog |
|
1234 | 1234 | o 7a230b46bf61 |
|
1235 | 1235 | | |
|
1236 | 1236 | | @ 471f378eab4c |
|
1237 | 1237 | |/ Obsfate: rewritten using amend as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000); |
|
1238 | 1238 | o ea207398892e |
|
1239 | 1239 | |
|
1240 | 1240 | $ hg up 'desc(A2)' |
|
1241 | 1241 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1242 | 1242 | |
|
1243 | 1243 | Predecessors template should show no predecessors as they are non visible |
|
1244 | 1244 | $ hg tlog |
|
1245 | 1245 | @ 7a230b46bf61 |
|
1246 | 1246 | | |
|
1247 | 1247 | o ea207398892e |
|
1248 | 1248 | |
|
1249 | 1249 | |
|
1250 | 1250 | $ hg fatelog |
|
1251 | 1251 | @ 7a230b46bf61 |
|
1252 | 1252 | | |
|
1253 | 1253 | o ea207398892e |
|
1254 | 1254 | |
|
1255 | 1255 | Predecessors template should show all predecessors as we force their display |
|
1256 | 1256 | with --hidden |
|
1257 | 1257 | $ hg tlog --hidden |
|
1258 | 1258 | @ 7a230b46bf61 |
|
1259 | 1259 | | Predecessors: 1:471f378eab4c |
|
1260 | 1260 | | semi-colon: 1:471f378eab4c |
|
1261 | 1261 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
1262 | 1262 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
1263 | 1263 | | x 471f378eab4c |
|
1264 | 1264 | |/ Successors: 2:7a230b46bf61 |
|
1265 | 1265 | | multi-line: 2:7a230b46bf61 |
|
1266 | 1266 | | json: [["7a230b46bf61e50b30308c6cfd7bd1269ef54702"]] |
|
1267 | 1267 | o ea207398892e |
|
1268 | 1268 | |
|
1269 | 1269 | |
|
1270 | 1270 | $ hg fatelog --hidden |
|
1271 | 1271 | @ 7a230b46bf61 |
|
1272 | 1272 | | |
|
1273 | 1273 | | x 471f378eab4c |
|
1274 | 1274 | |/ Obsfate: rewritten using amend as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000); |
|
1275 | 1275 | o ea207398892e |
|
1276 | 1276 | |
|
1277 | 1277 | |
|
1278 | 1278 | Check other fatelog implementations |
|
1279 | 1279 | ----------------------------------- |
|
1280 | 1280 | |
|
1281 | 1281 | $ hg fatelogkw --hidden -q |
|
1282 | 1282 | @ 7a230b46bf61 |
|
1283 | 1283 | | |
|
1284 | 1284 | | x 471f378eab4c |
|
1285 |
|/ Obsfate: rewritten using amend as 2:7a230b46bf61 |
|
|
1285 | |/ Obsfate: rewritten using amend as 2:7a230b46bf61 | |
|
1286 | 1286 |
|
|
1287 | 1287 | |
|
1288 | 1288 | $ hg fatelogkw --hidden |
|
1289 | 1289 | @ 7a230b46bf61 |
|
1290 | 1290 | | |
|
1291 | 1291 | | x 471f378eab4c |
|
1292 |
|/ Obsfate: rewritten using amend as 2:7a230b46bf61 |
|
|
1292 | |/ Obsfate: rewritten using amend as 2:7a230b46bf61 | |
|
1293 | 1293 |
|
|
1294 | 1294 | |
|
1295 | 1295 | $ hg fatelogkw --hidden -v |
|
1296 | 1296 | @ 7a230b46bf61 |
|
1297 | 1297 | | |
|
1298 | 1298 | | x 471f378eab4c |
|
1299 | 1299 | |/ Obsfate: rewritten using amend as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000) |
|
1300 | 1300 | o ea207398892e |
|
1301 | 1301 | |
|
1302 | 1302 | |
|
1303 | 1303 | Test template with obsmarkers cycle |
|
1304 | 1304 | =================================== |
|
1305 | 1305 | |
|
1306 | 1306 | Test setup |
|
1307 | 1307 | ---------- |
|
1308 | 1308 | |
|
1309 | 1309 | $ hg init $TESTTMP/templates-local-cycle |
|
1310 | 1310 | $ cd $TESTTMP/templates-local-cycle |
|
1311 | 1311 | $ mkcommit ROOT |
|
1312 | 1312 | $ mkcommit A0 |
|
1313 | 1313 | $ mkcommit B0 |
|
1314 | 1314 | $ hg up -r 0 |
|
1315 | 1315 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1316 | 1316 | $ mkcommit C0 |
|
1317 | 1317 | created new head |
|
1318 | 1318 | |
|
1319 | 1319 | Create the cycle |
|
1320 | 1320 | |
|
1321 | 1321 | $ hg debugobsolete `getid "desc(A0)"` `getid "desc(B0)"` |
|
1322 | 1322 | obsoleted 1 changesets |
|
1323 | 1323 | $ hg debugobsolete `getid "desc(B0)"` `getid "desc(C0)"` |
|
1324 | 1324 | obsoleted 1 changesets |
|
1325 | 1325 | $ hg debugobsolete `getid "desc(B0)"` `getid "desc(A0)"` |
|
1326 | 1326 | |
|
1327 | 1327 | Check templates |
|
1328 | 1328 | --------------- |
|
1329 | 1329 | |
|
1330 | 1330 | $ hg tlog |
|
1331 | 1331 | @ f897c6137566 |
|
1332 | 1332 | | |
|
1333 | 1333 | o ea207398892e |
|
1334 | 1334 | |
|
1335 | 1335 | |
|
1336 | 1336 | $ hg fatelog |
|
1337 | 1337 | @ f897c6137566 |
|
1338 | 1338 | | |
|
1339 | 1339 | o ea207398892e |
|
1340 | 1340 | |
|
1341 | 1341 | |
|
1342 | 1342 | $ hg up -r "desc(B0)" --hidden |
|
1343 | 1343 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1344 | 1344 | $ hg tlog |
|
1345 | 1345 | o f897c6137566 |
|
1346 | 1346 | | Predecessors: 2:0dec01379d3b |
|
1347 | 1347 | | semi-colon: 2:0dec01379d3b |
|
1348 | 1348 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
1349 | 1349 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
1350 | 1350 | | @ 0dec01379d3b |
|
1351 | 1351 | | | Predecessors: 1:471f378eab4c |
|
1352 | 1352 | | | semi-colon: 1:471f378eab4c |
|
1353 | 1353 | | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
1354 | 1354 | | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
1355 | 1355 | | | Successors: 3:f897c6137566; 1:471f378eab4c |
|
1356 | 1356 | | | multi-line: 3:f897c6137566 |
|
1357 | 1357 | | | multi-line: 1:471f378eab4c |
|
1358 | 1358 | | | json: [["f897c6137566320b081514b4c7227ecc3d384b39"], ["471f378eab4c5e25f6c77f785b27c936efb22874"]] |
|
1359 | 1359 | | x 471f378eab4c |
|
1360 | 1360 | |/ Predecessors: 2:0dec01379d3b |
|
1361 | 1361 | | semi-colon: 2:0dec01379d3b |
|
1362 | 1362 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
1363 | 1363 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
1364 | 1364 | | Successors: 2:0dec01379d3b |
|
1365 | 1365 | | multi-line: 2:0dec01379d3b |
|
1366 | 1366 | | json: [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]] |
|
1367 | 1367 | o ea207398892e |
|
1368 | 1368 | |
|
1369 | 1369 | |
|
1370 | 1370 | $ hg fatelog |
|
1371 | 1371 | o f897c6137566 |
|
1372 | 1372 | | |
|
1373 | 1373 | | @ 0dec01379d3b |
|
1374 | 1374 | | | Obsfate: rewritten as 3:f897c6137566 by test (at 1970-01-01 00:00 +0000); rewritten as 1:471f378eab4c by test (at 1970-01-01 00:00 +0000); |
|
1375 | 1375 | | x 471f378eab4c |
|
1376 | 1376 | |/ Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000); |
|
1377 | 1377 | o ea207398892e |
|
1378 | 1378 | |
|
1379 | 1379 | |
|
1380 | 1380 | $ hg up -r "desc(A0)" --hidden |
|
1381 | 1381 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1382 | 1382 | $ hg tlog |
|
1383 | 1383 | o f897c6137566 |
|
1384 | 1384 | | Predecessors: 1:471f378eab4c |
|
1385 | 1385 | | semi-colon: 1:471f378eab4c |
|
1386 | 1386 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
1387 | 1387 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
1388 | 1388 | | @ 471f378eab4c |
|
1389 | 1389 | |/ |
|
1390 | 1390 | o ea207398892e |
|
1391 | 1391 | |
|
1392 | 1392 | |
|
1393 | 1393 | $ hg fatelog |
|
1394 | 1394 | o f897c6137566 |
|
1395 | 1395 | | |
|
1396 | 1396 | | @ 471f378eab4c |
|
1397 | 1397 | |/ Obsfate: pruned; |
|
1398 | 1398 | o ea207398892e |
|
1399 | 1399 | |
|
1400 | 1400 | |
|
1401 | 1401 | $ hg up -r "desc(ROOT)" --hidden |
|
1402 | 1402 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1403 | 1403 | $ hg tlog |
|
1404 | 1404 | o f897c6137566 |
|
1405 | 1405 | | |
|
1406 | 1406 | @ ea207398892e |
|
1407 | 1407 | |
|
1408 | 1408 | |
|
1409 | 1409 | $ hg fatelog |
|
1410 | 1410 | o f897c6137566 |
|
1411 | 1411 | | |
|
1412 | 1412 | @ ea207398892e |
|
1413 | 1413 | |
|
1414 | 1414 | |
|
1415 | 1415 | $ hg tlog --hidden |
|
1416 | 1416 | o f897c6137566 |
|
1417 | 1417 | | Predecessors: 2:0dec01379d3b |
|
1418 | 1418 | | semi-colon: 2:0dec01379d3b |
|
1419 | 1419 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
1420 | 1420 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
1421 | 1421 | | x 0dec01379d3b |
|
1422 | 1422 | | | Predecessors: 1:471f378eab4c |
|
1423 | 1423 | | | semi-colon: 1:471f378eab4c |
|
1424 | 1424 | | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
1425 | 1425 | | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
1426 | 1426 | | | Successors: 3:f897c6137566; 1:471f378eab4c |
|
1427 | 1427 | | | multi-line: 3:f897c6137566 |
|
1428 | 1428 | | | multi-line: 1:471f378eab4c |
|
1429 | 1429 | | | json: [["f897c6137566320b081514b4c7227ecc3d384b39"], ["471f378eab4c5e25f6c77f785b27c936efb22874"]] |
|
1430 | 1430 | | x 471f378eab4c |
|
1431 | 1431 | |/ Predecessors: 2:0dec01379d3b |
|
1432 | 1432 | | semi-colon: 2:0dec01379d3b |
|
1433 | 1433 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
1434 | 1434 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
1435 | 1435 | | Successors: 2:0dec01379d3b |
|
1436 | 1436 | | multi-line: 2:0dec01379d3b |
|
1437 | 1437 | | json: [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]] |
|
1438 | 1438 | @ ea207398892e |
|
1439 | 1439 | |
|
1440 | 1440 | |
|
1441 | 1441 | Check other fatelog implementations |
|
1442 | 1442 | ----------------------------------- |
|
1443 | 1443 | |
|
1444 | 1444 | $ hg fatelogkw --hidden -q |
|
1445 | 1445 | o f897c6137566 |
|
1446 | 1446 | | |
|
1447 | 1447 | | x 0dec01379d3b |
|
1448 |
| | Obsfate: rewritten as 3:f897c6137566 |
|
|
1449 |
|
|
|
1448 | | | Obsfate: rewritten as 3:f897c6137566 | |
|
1449 | | | Obsfate: rewritten as 1:471f378eab4c | |
|
1450 | 1450 |
|
|
1451 |
|/ Obsfate: rewritten as 2:0dec01379d3b |
|
|
1451 | |/ Obsfate: rewritten as 2:0dec01379d3b | |
|
1452 | 1452 |
|
|
1453 | 1453 | |
|
1454 | 1454 |
$ |
|
1455 | 1455 | o f897c6137566 |
|
1456 | 1456 | | |
|
1457 | 1457 | | x 0dec01379d3b |
|
1458 |
| | Obsfate: rewritten as 3:f897c6137566 |
|
|
1459 |
|
|
|
1458 | | | Obsfate: rewritten as 3:f897c6137566 | |
|
1459 | | | Obsfate: rewritten as 1:471f378eab4c | |
|
1460 | 1460 |
|
|
1461 |
|/ Obsfate: rewritten as 2:0dec01379d3b |
|
|
1461 | |/ Obsfate: rewritten as 2:0dec01379d3b | |
|
1462 | 1462 |
|
|
1463 | 1463 | |
|
1464 | 1464 |
$ |
|
1465 | 1465 | o f897c6137566 |
|
1466 | 1466 | | |
|
1467 | 1467 | | x 0dec01379d3b |
|
1468 | 1468 | | | Obsfate: rewritten as 3:f897c6137566 by test (at 1970-01-01 00:00 +0000) |
|
1469 | 1469 | | | Obsfate: rewritten as 1:471f378eab4c by test (at 1970-01-01 00:00 +0000) |
|
1470 | 1470 | | x 471f378eab4c |
|
1471 | 1471 | |/ Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000) |
|
1472 | 1472 | @ ea207398892e |
|
1473 | 1473 | |
|
1474 | 1474 | |
|
1475 | 1475 | Test template with split + divergence with cycles |
|
1476 | 1476 | ================================================= |
|
1477 | 1477 | |
|
1478 | 1478 | $ hg log -G |
|
1479 | 1479 | o changeset: 3:f897c6137566 |
|
1480 | 1480 | | tag: tip |
|
1481 | 1481 | | parent: 0:ea207398892e |
|
1482 | 1482 | | user: test |
|
1483 | 1483 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1484 | 1484 | | summary: C0 |
|
1485 | 1485 | | |
|
1486 | 1486 | @ changeset: 0:ea207398892e |
|
1487 | 1487 | user: test |
|
1488 | 1488 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1489 | 1489 | summary: ROOT |
|
1490 | 1490 | |
|
1491 | 1491 | $ hg up |
|
1492 | 1492 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1493 | 1493 | |
|
1494 | 1494 | Create a commit with three files |
|
1495 | 1495 | $ touch A B C |
|
1496 | 1496 | $ hg commit -A -m "Add A,B,C" A B C |
|
1497 | 1497 | |
|
1498 | 1498 | Split it |
|
1499 | 1499 | $ hg up 3 |
|
1500 | 1500 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
1501 | 1501 | $ touch A |
|
1502 | 1502 | $ hg commit -A -m "Add A,B,C" A |
|
1503 | 1503 | created new head |
|
1504 | 1504 | |
|
1505 | 1505 | $ touch B |
|
1506 | 1506 | $ hg commit -A -m "Add A,B,C" B |
|
1507 | 1507 | |
|
1508 | 1508 | $ touch C |
|
1509 | 1509 | $ hg commit -A -m "Add A,B,C" C |
|
1510 | 1510 | |
|
1511 | 1511 | $ hg log -G |
|
1512 | 1512 | @ changeset: 7:ba2ed02b0c9a |
|
1513 | 1513 | | tag: tip |
|
1514 | 1514 | | user: test |
|
1515 | 1515 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1516 | 1516 | | summary: Add A,B,C |
|
1517 | 1517 | | |
|
1518 | 1518 | o changeset: 6:4a004186e638 |
|
1519 | 1519 | | user: test |
|
1520 | 1520 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1521 | 1521 | | summary: Add A,B,C |
|
1522 | 1522 | | |
|
1523 | 1523 | o changeset: 5:dd800401bd8c |
|
1524 | 1524 | | parent: 3:f897c6137566 |
|
1525 | 1525 | | user: test |
|
1526 | 1526 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1527 | 1527 | | summary: Add A,B,C |
|
1528 | 1528 | | |
|
1529 | 1529 | | o changeset: 4:9bd10a0775e4 |
|
1530 | 1530 | |/ user: test |
|
1531 | 1531 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1532 | 1532 | | summary: Add A,B,C |
|
1533 | 1533 | | |
|
1534 | 1534 | o changeset: 3:f897c6137566 |
|
1535 | 1535 | | parent: 0:ea207398892e |
|
1536 | 1536 | | user: test |
|
1537 | 1537 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1538 | 1538 | | summary: C0 |
|
1539 | 1539 | | |
|
1540 | 1540 | o changeset: 0:ea207398892e |
|
1541 | 1541 | user: test |
|
1542 | 1542 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1543 | 1543 | summary: ROOT |
|
1544 | 1544 | |
|
1545 | 1545 | $ hg debugobsolete `getid "4"` `getid "5"` `getid "6"` `getid "7"` |
|
1546 | 1546 | obsoleted 1 changesets |
|
1547 | 1547 | $ hg log -G |
|
1548 | 1548 | @ changeset: 7:ba2ed02b0c9a |
|
1549 | 1549 | | tag: tip |
|
1550 | 1550 | | user: test |
|
1551 | 1551 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1552 | 1552 | | summary: Add A,B,C |
|
1553 | 1553 | | |
|
1554 | 1554 | o changeset: 6:4a004186e638 |
|
1555 | 1555 | | user: test |
|
1556 | 1556 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1557 | 1557 | | summary: Add A,B,C |
|
1558 | 1558 | | |
|
1559 | 1559 | o changeset: 5:dd800401bd8c |
|
1560 | 1560 | | parent: 3:f897c6137566 |
|
1561 | 1561 | | user: test |
|
1562 | 1562 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1563 | 1563 | | summary: Add A,B,C |
|
1564 | 1564 | | |
|
1565 | 1565 | o changeset: 3:f897c6137566 |
|
1566 | 1566 | | parent: 0:ea207398892e |
|
1567 | 1567 | | user: test |
|
1568 | 1568 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1569 | 1569 | | summary: C0 |
|
1570 | 1570 | | |
|
1571 | 1571 | o changeset: 0:ea207398892e |
|
1572 | 1572 | user: test |
|
1573 | 1573 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1574 | 1574 | summary: ROOT |
|
1575 | 1575 | |
|
1576 | 1576 | Diverge one of the splitted commit |
|
1577 | 1577 | |
|
1578 | 1578 | $ hg up 6 |
|
1579 | 1579 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1580 | 1580 | $ hg commit --amend -m "Add only B" |
|
1581 | 1581 | |
|
1582 | 1582 | $ hg up 6 --hidden |
|
1583 | 1583 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1584 | 1584 | $ hg commit --amend -m "Add B only" |
|
1585 | 1585 | |
|
1586 | 1586 | $ hg log -G |
|
1587 | 1587 | @ changeset: 9:0b997eb7ceee |
|
1588 | 1588 | | tag: tip |
|
1589 | 1589 | | parent: 5:dd800401bd8c |
|
1590 | 1590 | | user: test |
|
1591 | 1591 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1592 | 1592 | | instability: content-divergent |
|
1593 | 1593 | | summary: Add B only |
|
1594 | 1594 | | |
|
1595 | 1595 | | o changeset: 8:b18bc8331526 |
|
1596 | 1596 | |/ parent: 5:dd800401bd8c |
|
1597 | 1597 | | user: test |
|
1598 | 1598 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1599 | 1599 | | instability: content-divergent |
|
1600 | 1600 | | summary: Add only B |
|
1601 | 1601 | | |
|
1602 | 1602 | | o changeset: 7:ba2ed02b0c9a |
|
1603 | 1603 | | | user: test |
|
1604 | 1604 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1605 | 1605 | | | instability: orphan, content-divergent |
|
1606 | 1606 | | | summary: Add A,B,C |
|
1607 | 1607 | | | |
|
1608 | 1608 | | x changeset: 6:4a004186e638 |
|
1609 | 1609 | |/ user: test |
|
1610 | 1610 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1611 | 1611 | | summary: Add A,B,C |
|
1612 | 1612 | | |
|
1613 | 1613 | o changeset: 5:dd800401bd8c |
|
1614 | 1614 | | parent: 3:f897c6137566 |
|
1615 | 1615 | | user: test |
|
1616 | 1616 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1617 | 1617 | | instability: content-divergent |
|
1618 | 1618 | | summary: Add A,B,C |
|
1619 | 1619 | | |
|
1620 | 1620 | o changeset: 3:f897c6137566 |
|
1621 | 1621 | | parent: 0:ea207398892e |
|
1622 | 1622 | | user: test |
|
1623 | 1623 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1624 | 1624 | | summary: C0 |
|
1625 | 1625 | | |
|
1626 | 1626 | o changeset: 0:ea207398892e |
|
1627 | 1627 | user: test |
|
1628 | 1628 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1629 | 1629 | summary: ROOT |
|
1630 | 1630 | |
|
1631 | 1631 | |
|
1632 | 1632 | Check templates |
|
1633 | 1633 | --------------- |
|
1634 | 1634 | |
|
1635 | 1635 | $ hg tlog |
|
1636 | 1636 | @ 0b997eb7ceee |
|
1637 | 1637 | | Predecessors: 6:4a004186e638 |
|
1638 | 1638 | | semi-colon: 6:4a004186e638 |
|
1639 | 1639 | | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] |
|
1640 | 1640 | | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace |
|
1641 | 1641 | | o b18bc8331526 |
|
1642 | 1642 | |/ Predecessors: 6:4a004186e638 |
|
1643 | 1643 | | semi-colon: 6:4a004186e638 |
|
1644 | 1644 | | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] |
|
1645 | 1645 | | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace |
|
1646 | 1646 | | o ba2ed02b0c9a |
|
1647 | 1647 | | | |
|
1648 | 1648 | | x 4a004186e638 |
|
1649 | 1649 | |/ Successors: 8:b18bc8331526; 9:0b997eb7ceee |
|
1650 | 1650 | | multi-line: 8:b18bc8331526 |
|
1651 | 1651 | | multi-line: 9:0b997eb7ceee |
|
1652 | 1652 | | json: [["b18bc8331526a22cbb1801022bd1555bf291c48b"], ["0b997eb7ceeee06200a02f8aab185979092d514e"]] |
|
1653 | 1653 | o dd800401bd8c |
|
1654 | 1654 | | |
|
1655 | 1655 | o f897c6137566 |
|
1656 | 1656 | | |
|
1657 | 1657 | o ea207398892e |
|
1658 | 1658 | |
|
1659 | 1659 | $ hg fatelog |
|
1660 | 1660 | @ 0b997eb7ceee |
|
1661 | 1661 | | |
|
1662 | 1662 | | o b18bc8331526 |
|
1663 | 1663 | |/ |
|
1664 | 1664 | | o ba2ed02b0c9a |
|
1665 | 1665 | | | |
|
1666 | 1666 | | x 4a004186e638 |
|
1667 | 1667 | |/ Obsfate: rewritten using amend as 8:b18bc8331526 by test (at 1970-01-01 00:00 +0000); rewritten using amend as 9:0b997eb7ceee by test (at 1970-01-01 00:00 +0000); |
|
1668 | 1668 | o dd800401bd8c |
|
1669 | 1669 | | |
|
1670 | 1670 | o f897c6137566 |
|
1671 | 1671 | | |
|
1672 | 1672 | o ea207398892e |
|
1673 | 1673 | |
|
1674 | 1674 | $ hg tlog --hidden |
|
1675 | 1675 | @ 0b997eb7ceee |
|
1676 | 1676 | | Predecessors: 6:4a004186e638 |
|
1677 | 1677 | | semi-colon: 6:4a004186e638 |
|
1678 | 1678 | | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] |
|
1679 | 1679 | | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace |
|
1680 | 1680 | | o b18bc8331526 |
|
1681 | 1681 | |/ Predecessors: 6:4a004186e638 |
|
1682 | 1682 | | semi-colon: 6:4a004186e638 |
|
1683 | 1683 | | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] |
|
1684 | 1684 | | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace |
|
1685 | 1685 | | o ba2ed02b0c9a |
|
1686 | 1686 | | | Predecessors: 4:9bd10a0775e4 |
|
1687 | 1687 | | | semi-colon: 4:9bd10a0775e4 |
|
1688 | 1688 | | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
1689 | 1689 | | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
1690 | 1690 | | x 4a004186e638 |
|
1691 | 1691 | |/ Predecessors: 4:9bd10a0775e4 |
|
1692 | 1692 | | semi-colon: 4:9bd10a0775e4 |
|
1693 | 1693 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
1694 | 1694 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
1695 | 1695 | | Successors: 8:b18bc8331526; 9:0b997eb7ceee |
|
1696 | 1696 | | multi-line: 8:b18bc8331526 |
|
1697 | 1697 | | multi-line: 9:0b997eb7ceee |
|
1698 | 1698 | | json: [["b18bc8331526a22cbb1801022bd1555bf291c48b"], ["0b997eb7ceeee06200a02f8aab185979092d514e"]] |
|
1699 | 1699 | o dd800401bd8c |
|
1700 | 1700 | | Predecessors: 4:9bd10a0775e4 |
|
1701 | 1701 | | semi-colon: 4:9bd10a0775e4 |
|
1702 | 1702 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
1703 | 1703 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
1704 | 1704 | | x 9bd10a0775e4 |
|
1705 | 1705 | |/ Successors: 5:dd800401bd8c 6:4a004186e638 7:ba2ed02b0c9a |
|
1706 | 1706 | | multi-line: 5:dd800401bd8c 6:4a004186e638 7:ba2ed02b0c9a |
|
1707 | 1707 | | json: [["dd800401bd8c79d815329277739e433e883f784e", "4a004186e63889f20cb16434fcbd72220bd1eace", "ba2ed02b0c9a56b9fdbc4e79c7e57866984d8a1f"]] |
|
1708 | 1708 | o f897c6137566 |
|
1709 | 1709 | | Predecessors: 2:0dec01379d3b |
|
1710 | 1710 | | semi-colon: 2:0dec01379d3b |
|
1711 | 1711 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
1712 | 1712 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
1713 | 1713 | | x 0dec01379d3b |
|
1714 | 1714 | | | Predecessors: 1:471f378eab4c |
|
1715 | 1715 | | | semi-colon: 1:471f378eab4c |
|
1716 | 1716 | | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
1717 | 1717 | | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
1718 | 1718 | | | Successors: 3:f897c6137566; 1:471f378eab4c |
|
1719 | 1719 | | | multi-line: 3:f897c6137566 |
|
1720 | 1720 | | | multi-line: 1:471f378eab4c |
|
1721 | 1721 | | | json: [["f897c6137566320b081514b4c7227ecc3d384b39"], ["471f378eab4c5e25f6c77f785b27c936efb22874"]] |
|
1722 | 1722 | | x 471f378eab4c |
|
1723 | 1723 | |/ Predecessors: 2:0dec01379d3b |
|
1724 | 1724 | | semi-colon: 2:0dec01379d3b |
|
1725 | 1725 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
1726 | 1726 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
1727 | 1727 | | Successors: 2:0dec01379d3b |
|
1728 | 1728 | | multi-line: 2:0dec01379d3b |
|
1729 | 1729 | | json: [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]] |
|
1730 | 1730 | o ea207398892e |
|
1731 | 1731 | |
|
1732 | 1732 | $ hg fatelog --hidden |
|
1733 | 1733 | @ 0b997eb7ceee |
|
1734 | 1734 | | |
|
1735 | 1735 | | o b18bc8331526 |
|
1736 | 1736 | |/ |
|
1737 | 1737 | | o ba2ed02b0c9a |
|
1738 | 1738 | | | |
|
1739 | 1739 | | x 4a004186e638 |
|
1740 | 1740 | |/ Obsfate: rewritten using amend as 8:b18bc8331526 by test (at 1970-01-01 00:00 +0000); rewritten using amend as 9:0b997eb7ceee by test (at 1970-01-01 00:00 +0000); |
|
1741 | 1741 | o dd800401bd8c |
|
1742 | 1742 | | |
|
1743 | 1743 | | x 9bd10a0775e4 |
|
1744 | 1744 | |/ Obsfate: split as 5:dd800401bd8c, 6:4a004186e638, 7:ba2ed02b0c9a by test (at 1970-01-01 00:00 +0000); |
|
1745 | 1745 | o f897c6137566 |
|
1746 | 1746 | | |
|
1747 | 1747 | | x 0dec01379d3b |
|
1748 | 1748 | | | Obsfate: rewritten as 3:f897c6137566 by test (at 1970-01-01 00:00 +0000); rewritten as 1:471f378eab4c by test (at 1970-01-01 00:00 +0000); |
|
1749 | 1749 | | x 471f378eab4c |
|
1750 | 1750 | |/ Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000); |
|
1751 | 1751 | o ea207398892e |
|
1752 | 1752 | |
|
1753 | 1753 | $ hg fatelogjson --hidden |
|
1754 | 1754 | @ 0b997eb7ceee |
|
1755 | 1755 | | |
|
1756 | 1756 | | o b18bc8331526 |
|
1757 | 1757 | |/ |
|
1758 | 1758 | | o ba2ed02b0c9a |
|
1759 | 1759 | | | |
|
1760 | 1760 | | x 4a004186e638 |
|
1761 | 1761 | |/ Obsfate: [{"markers": [["4a004186e63889f20cb16434fcbd72220bd1eace", ["b18bc8331526a22cbb1801022bd1555bf291c48b"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["b18bc8331526a22cbb1801022bd1555bf291c48b"]}, {"markers": [["4a004186e63889f20cb16434fcbd72220bd1eace", ["0b997eb7ceeee06200a02f8aab185979092d514e"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["0b997eb7ceeee06200a02f8aab185979092d514e"]}] |
|
1762 | 1762 | o dd800401bd8c |
|
1763 | 1763 | | |
|
1764 | 1764 | | x 9bd10a0775e4 |
|
1765 | 1765 | |/ Obsfate: [{"markers": [["9bd10a0775e478708cada5f176ec6de654359ce7", ["dd800401bd8c79d815329277739e433e883f784e", "4a004186e63889f20cb16434fcbd72220bd1eace", "ba2ed02b0c9a56b9fdbc4e79c7e57866984d8a1f"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["dd800401bd8c79d815329277739e433e883f784e", "4a004186e63889f20cb16434fcbd72220bd1eace", "ba2ed02b0c9a56b9fdbc4e79c7e57866984d8a1f"]}] |
|
1766 | 1766 | o f897c6137566 |
|
1767 | 1767 | | |
|
1768 | 1768 | | x 0dec01379d3b |
|
1769 | 1769 | | | Obsfate: [{"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["f897c6137566320b081514b4c7227ecc3d384b39"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["f897c6137566320b081514b4c7227ecc3d384b39"]}, {"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["471f378eab4c5e25f6c77f785b27c936efb22874"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["471f378eab4c5e25f6c77f785b27c936efb22874"]}] |
|
1770 | 1770 | | x 471f378eab4c |
|
1771 | 1771 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]}] |
|
1772 | 1772 | o ea207398892e |
|
1773 | 1773 | |
|
1774 | 1774 | $ hg up --hidden 4 |
|
1775 | 1775 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1776 | 1776 | $ hg rebase -r 7 -d 8 --config extensions.rebase= |
|
1777 | 1777 | rebasing 7:ba2ed02b0c9a "Add A,B,C" |
|
1778 | 1778 | $ hg tlog |
|
1779 | 1779 | o eceed8f98ffc |
|
1780 | 1780 | | Predecessors: 4:9bd10a0775e4 |
|
1781 | 1781 | | semi-colon: 4:9bd10a0775e4 |
|
1782 | 1782 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
1783 | 1783 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
1784 | 1784 | | o 0b997eb7ceee |
|
1785 | 1785 | | | Predecessors: 4:9bd10a0775e4 |
|
1786 | 1786 | | | semi-colon: 4:9bd10a0775e4 |
|
1787 | 1787 | | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
1788 | 1788 | | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
1789 | 1789 | o | b18bc8331526 |
|
1790 | 1790 | |/ Predecessors: 4:9bd10a0775e4 |
|
1791 | 1791 | | semi-colon: 4:9bd10a0775e4 |
|
1792 | 1792 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
1793 | 1793 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
1794 | 1794 | o dd800401bd8c |
|
1795 | 1795 | | Predecessors: 4:9bd10a0775e4 |
|
1796 | 1796 | | semi-colon: 4:9bd10a0775e4 |
|
1797 | 1797 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
1798 | 1798 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
1799 | 1799 | | @ 9bd10a0775e4 |
|
1800 | 1800 | |/ Successors: 5:dd800401bd8c 9:0b997eb7ceee 10:eceed8f98ffc; 5:dd800401bd8c 8:b18bc8331526 10:eceed8f98ffc |
|
1801 | 1801 | | multi-line: 5:dd800401bd8c 9:0b997eb7ceee 10:eceed8f98ffc |
|
1802 | 1802 | | multi-line: 5:dd800401bd8c 8:b18bc8331526 10:eceed8f98ffc |
|
1803 | 1803 | | json: [["dd800401bd8c79d815329277739e433e883f784e", "0b997eb7ceeee06200a02f8aab185979092d514e", "eceed8f98ffc4186032e29a6542ab98888ebf68d"], ["dd800401bd8c79d815329277739e433e883f784e", "b18bc8331526a22cbb1801022bd1555bf291c48b", "eceed8f98ffc4186032e29a6542ab98888ebf68d"]] |
|
1804 | 1804 | o f897c6137566 |
|
1805 | 1805 | | |
|
1806 | 1806 | o ea207398892e |
|
1807 | 1807 | |
|
1808 | 1808 | |
|
1809 | 1809 | $ hg fatelog |
|
1810 | 1810 | o eceed8f98ffc |
|
1811 | 1811 | | |
|
1812 | 1812 | | o 0b997eb7ceee |
|
1813 | 1813 | | | |
|
1814 | 1814 | o | b18bc8331526 |
|
1815 | 1815 | |/ |
|
1816 | 1816 | o dd800401bd8c |
|
1817 | 1817 | | |
|
1818 | 1818 | | @ 9bd10a0775e4 |
|
1819 | 1819 | |/ Obsfate: split using amend, rebase as 5:dd800401bd8c, 9:0b997eb7ceee, 10:eceed8f98ffc by test (at 1970-01-01 00:00 +0000); split using amend, rebase as 5:dd800401bd8c, 8:b18bc8331526, 10:eceed8f98ffc by test (at 1970-01-01 00:00 +0000); |
|
1820 | 1820 | o f897c6137566 |
|
1821 | 1821 | | |
|
1822 | 1822 | o ea207398892e |
|
1823 | 1823 | |
|
1824 | 1824 | Check other fatelog implementations |
|
1825 | 1825 | ----------------------------------- |
|
1826 | 1826 | |
|
1827 | 1827 | $ hg fatelogkw --hidden -q |
|
1828 | 1828 | o eceed8f98ffc |
|
1829 | 1829 | | |
|
1830 | 1830 | | o 0b997eb7ceee |
|
1831 | 1831 | | | |
|
1832 | 1832 | o | b18bc8331526 |
|
1833 | 1833 | |/ |
|
1834 | 1834 | | x ba2ed02b0c9a |
|
1835 |
| | Obsfate: rewritten using rebase as 10:eceed8f98ffc |
|
|
1835 | | | Obsfate: rewritten using rebase as 10:eceed8f98ffc | |
|
1836 | 1836 |
|
|
1837 |
|/ Obsfate: rewritten using amend as 8:b18bc8331526 |
|
|
1838 |
|
|
|
1837 | |/ Obsfate: rewritten using amend as 8:b18bc8331526 | |
|
1838 | | Obsfate: rewritten using amend as 9:0b997eb7ceee | |
|
1839 | 1839 |
|
|
1840 | 1840 | | |
|
1841 | 1841 | | @ 9bd10a0775e4 |
|
1842 |
|/ Obsfate: split as 5:dd800401bd8c, 6:4a004186e638, 7:ba2ed02b0c9a |
|
|
1842 | |/ Obsfate: split as 5:dd800401bd8c, 6:4a004186e638, 7:ba2ed02b0c9a | |
|
1843 | 1843 |
|
|
1844 | 1844 | | |
|
1845 | 1845 | | x 0dec01379d3b |
|
1846 |
| | Obsfate: rewritten as 3:f897c6137566 |
|
|
1847 |
|
|
|
1846 | | | Obsfate: rewritten as 3:f897c6137566 | |
|
1847 | | | Obsfate: rewritten as 1:471f378eab4c | |
|
1848 | 1848 |
|
|
1849 |
|/ Obsfate: rewritten as 2:0dec01379d3b |
|
|
1849 | |/ Obsfate: rewritten as 2:0dec01379d3b | |
|
1850 | 1850 |
|
|
1851 | 1851 | |
|
1852 | 1852 | $ hg fatelogkw --hidden |
|
1853 | 1853 | o eceed8f98ffc |
|
1854 | 1854 | | |
|
1855 | 1855 | | o 0b997eb7ceee |
|
1856 | 1856 | | | |
|
1857 | 1857 | o | b18bc8331526 |
|
1858 | 1858 | |/ |
|
1859 | 1859 | | x ba2ed02b0c9a |
|
1860 |
| | Obsfate: rewritten using rebase as 10:eceed8f98ffc |
|
|
1860 | | | Obsfate: rewritten using rebase as 10:eceed8f98ffc | |
|
1861 | 1861 |
|
|
1862 |
|/ Obsfate: rewritten using amend as 8:b18bc8331526 |
|
|
1863 |
|
|
|
1862 | |/ Obsfate: rewritten using amend as 8:b18bc8331526 | |
|
1863 | | Obsfate: rewritten using amend as 9:0b997eb7ceee | |
|
1864 | 1864 |
|
|
1865 | 1865 | | |
|
1866 | 1866 | | @ 9bd10a0775e4 |
|
1867 |
|/ Obsfate: split as 5:dd800401bd8c, 6:4a004186e638, 7:ba2ed02b0c9a |
|
|
1867 | |/ Obsfate: split as 5:dd800401bd8c, 6:4a004186e638, 7:ba2ed02b0c9a | |
|
1868 | 1868 |
|
|
1869 | 1869 | | |
|
1870 | 1870 | | x 0dec01379d3b |
|
1871 |
| | Obsfate: rewritten as 3:f897c6137566 |
|
|
1872 |
|
|
|
1871 | | | Obsfate: rewritten as 3:f897c6137566 | |
|
1872 | | | Obsfate: rewritten as 1:471f378eab4c | |
|
1873 | 1873 |
|
|
1874 |
|/ Obsfate: rewritten as 2:0dec01379d3b |
|
|
1874 | |/ Obsfate: rewritten as 2:0dec01379d3b | |
|
1875 | 1875 |
|
|
1876 | 1876 | |
|
1877 | 1877 | $ hg fatelogkw --hidden -v |
|
1878 | 1878 | o eceed8f98ffc |
|
1879 | 1879 | | |
|
1880 | 1880 | | o 0b997eb7ceee |
|
1881 | 1881 | | | |
|
1882 | 1882 | o | b18bc8331526 |
|
1883 | 1883 | |/ |
|
1884 | 1884 | | x ba2ed02b0c9a |
|
1885 | 1885 | | | Obsfate: rewritten using rebase as 10:eceed8f98ffc by test (at 1970-01-01 00:00 +0000) |
|
1886 | 1886 | | x 4a004186e638 |
|
1887 | 1887 | |/ Obsfate: rewritten using amend as 8:b18bc8331526 by test (at 1970-01-01 00:00 +0000) |
|
1888 | 1888 | | Obsfate: rewritten using amend as 9:0b997eb7ceee by test (at 1970-01-01 00:00 +0000) |
|
1889 | 1889 | o dd800401bd8c |
|
1890 | 1890 | | |
|
1891 | 1891 | | @ 9bd10a0775e4 |
|
1892 | 1892 | |/ Obsfate: split as 5:dd800401bd8c, 6:4a004186e638, 7:ba2ed02b0c9a by test (at 1970-01-01 00:00 +0000) |
|
1893 | 1893 | o f897c6137566 |
|
1894 | 1894 | | |
|
1895 | 1895 | | x 0dec01379d3b |
|
1896 | 1896 | | | Obsfate: rewritten as 3:f897c6137566 by test (at 1970-01-01 00:00 +0000) |
|
1897 | 1897 | | | Obsfate: rewritten as 1:471f378eab4c by test (at 1970-01-01 00:00 +0000) |
|
1898 | 1898 | | x 471f378eab4c |
|
1899 | 1899 | |/ Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000) |
|
1900 | 1900 | o ea207398892e |
|
1901 | 1901 | |
|
1902 | 1902 | Test templates with pruned commits |
|
1903 | 1903 | ================================== |
|
1904 | 1904 | |
|
1905 | 1905 | Test setup |
|
1906 | 1906 | ---------- |
|
1907 | 1907 | |
|
1908 | 1908 | $ hg init $TESTTMP/templates-local-prune |
|
1909 | 1909 | $ cd $TESTTMP/templates-local-prune |
|
1910 | 1910 | $ mkcommit ROOT |
|
1911 | 1911 | $ mkcommit A0 |
|
1912 | 1912 | $ hg debugobsolete --record-parent `getid "."` |
|
1913 | 1913 | obsoleted 1 changesets |
|
1914 | 1914 | |
|
1915 | 1915 | Check output |
|
1916 | 1916 | ------------ |
|
1917 | 1917 | |
|
1918 | 1918 | $ hg up "desc(A0)" --hidden |
|
1919 | 1919 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1920 | 1920 | $ hg tlog |
|
1921 | 1921 | @ 471f378eab4c |
|
1922 | 1922 | | |
|
1923 | 1923 | o ea207398892e |
|
1924 | 1924 | |
|
1925 | 1925 | $ hg fatelog |
|
1926 | 1926 | @ 471f378eab4c |
|
1927 | 1927 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000); |
|
1928 | 1928 | o ea207398892e |
|
1929 | 1929 | |
|
1930 | 1930 | Test templates with multiple pruned commits |
|
1931 | 1931 | =========================================== |
|
1932 | 1932 | |
|
1933 | 1933 | Test setup |
|
1934 | 1934 | ---------- |
|
1935 | 1935 | |
|
1936 | 1936 | $ hg init $TESTTMP/multiple-local-prune |
|
1937 | 1937 | $ cd $TESTTMP/multiple-local-prune |
|
1938 | 1938 | $ mkcommit ROOT |
|
1939 | 1939 | $ mkcommit A0 |
|
1940 | 1940 | $ hg commit --amend -m "A1" |
|
1941 | 1941 | $ hg debugobsolete --record-parent `getid "."` |
|
1942 | 1942 | obsoleted 1 changesets |
|
1943 | 1943 | |
|
1944 | 1944 | $ hg up -r "desc(A0)" --hidden |
|
1945 | 1945 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1946 | 1946 | $ hg commit --amend -m "A2" |
|
1947 | 1947 | $ hg debugobsolete --record-parent `getid "."` |
|
1948 | 1948 | obsoleted 1 changesets |
|
1949 | 1949 | |
|
1950 | 1950 | Check output |
|
1951 | 1951 | ------------ |
|
1952 | 1952 | |
|
1953 | 1953 | $ hg up "desc(A0)" --hidden |
|
1954 | 1954 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1955 | 1955 | $ hg tlog |
|
1956 | 1956 | @ 471f378eab4c |
|
1957 | 1957 | | |
|
1958 | 1958 | o ea207398892e |
|
1959 | 1959 | |
|
1960 | 1960 | # todo: the obsfate output is not ideal |
|
1961 | 1961 | $ hg fatelog |
|
1962 | 1962 | @ 471f378eab4c |
|
1963 | 1963 | | Obsfate: pruned; |
|
1964 | 1964 | o ea207398892e |
|
1965 | 1965 | |
|
1966 | 1966 | $ hg fatelog --hidden |
|
1967 | 1967 | x 65b757b745b9 |
|
1968 | 1968 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000); |
|
1969 | 1969 | | x fdf9bde5129a |
|
1970 | 1970 | |/ Obsfate: pruned by test (at 1970-01-01 00:00 +0000); |
|
1971 | 1971 | | @ 471f378eab4c |
|
1972 | 1972 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000); rewritten using amend as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000); |
|
1973 | 1973 | o ea207398892e |
|
1974 | 1974 | |
|
1975 | 1975 | Check other fatelog implementations |
|
1976 | 1976 | ----------------------------------- |
|
1977 | 1977 | |
|
1978 | 1978 | $ hg fatelogkw --hidden -q |
|
1979 | 1979 | x 65b757b745b9 |
|
1980 |
| Obsfate: pruned |
|
|
1980 | | Obsfate: pruned | |
|
1981 | 1981 |
|
|
1982 |
|/ Obsfate: pruned |
|
|
1982 | |/ Obsfate: pruned | |
|
1983 | 1983 |
|
|
1984 |
|/ Obsfate: rewritten using amend as 2:fdf9bde5129a |
|
|
1985 |
|
|
|
1984 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a | |
|
1985 | | Obsfate: rewritten using amend as 3:65b757b745b9 | |
|
1986 | 1986 |
|
|
1987 | 1987 | |
|
1988 | 1988 | $ hg fatelogkw --hidden |
|
1989 | 1989 | x 65b757b745b9 |
|
1990 |
| Obsfate: pruned |
|
|
1990 | | Obsfate: pruned | |
|
1991 | 1991 |
|
|
1992 |
|/ Obsfate: pruned |
|
|
1992 | |/ Obsfate: pruned | |
|
1993 | 1993 |
|
|
1994 |
|/ Obsfate: rewritten using amend as 2:fdf9bde5129a |
|
|
1995 |
|
|
|
1994 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a | |
|
1995 | | Obsfate: rewritten using amend as 3:65b757b745b9 | |
|
1996 | 1996 |
|
|
1997 | 1997 | |
|
1998 | 1998 | $ hg fatelogkw --hidden -v |
|
1999 | 1999 | x 65b757b745b9 |
|
2000 | 2000 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000) |
|
2001 | 2001 | | x fdf9bde5129a |
|
2002 | 2002 | |/ Obsfate: pruned by test (at 1970-01-01 00:00 +0000) |
|
2003 | 2003 | | @ 471f378eab4c |
|
2004 | 2004 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000) |
|
2005 | 2005 | | Obsfate: rewritten using amend as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000) |
|
2006 | 2006 | o ea207398892e |
|
2007 | 2007 | |
|
2008 | 2008 | |
|
2009 | 2009 | Test templates with splitted and pruned commit |
|
2010 | 2010 | ============================================== |
|
2011 | 2011 | |
|
2012 | 2012 | $ hg init $TESTTMP/templates-local-split-prune |
|
2013 | 2013 | $ cd $TESTTMP/templates-local-split-prune |
|
2014 | 2014 | $ mkcommit ROOT |
|
2015 | 2015 | $ echo 42 >> a |
|
2016 | 2016 | $ echo 43 >> b |
|
2017 | 2017 | $ hg commit -A -m "A0" |
|
2018 | 2018 | adding a |
|
2019 | 2019 | adding b |
|
2020 | 2020 | $ hg log --hidden -G |
|
2021 | 2021 | @ changeset: 1:471597cad322 |
|
2022 | 2022 | | tag: tip |
|
2023 | 2023 | | user: test |
|
2024 | 2024 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2025 | 2025 | | summary: A0 |
|
2026 | 2026 | | |
|
2027 | 2027 | o changeset: 0:ea207398892e |
|
2028 | 2028 | user: test |
|
2029 | 2029 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2030 | 2030 | summary: ROOT |
|
2031 | 2031 | |
|
2032 | 2032 | # Simulate split |
|
2033 | 2033 | $ hg up -r "desc(ROOT)" |
|
2034 | 2034 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
2035 | 2035 | $ echo 42 >> a |
|
2036 | 2036 | $ hg commit -A -m "A1" |
|
2037 | 2037 | adding a |
|
2038 | 2038 | created new head |
|
2039 | 2039 | $ echo 43 >> b |
|
2040 | 2040 | $ hg commit -A -m "A2" |
|
2041 | 2041 | adding b |
|
2042 | 2042 | $ hg debugobsolete `getid "1"` `getid "2"` `getid "3"` |
|
2043 | 2043 | obsoleted 1 changesets |
|
2044 | 2044 | |
|
2045 | 2045 | # Simulate prune |
|
2046 | 2046 | $ hg debugobsolete --record-parent `getid "."` |
|
2047 | 2047 | obsoleted 1 changesets |
|
2048 | 2048 | |
|
2049 | 2049 | $ hg log --hidden -G |
|
2050 | 2050 | @ changeset: 3:0d0ef4bdf70e |
|
2051 | 2051 | | tag: tip |
|
2052 | 2052 | | user: test |
|
2053 | 2053 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2054 | 2054 | | summary: A2 |
|
2055 | 2055 | | |
|
2056 | 2056 | o changeset: 2:617adc3a144c |
|
2057 | 2057 | | parent: 0:ea207398892e |
|
2058 | 2058 | | user: test |
|
2059 | 2059 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2060 | 2060 | | summary: A1 |
|
2061 | 2061 | | |
|
2062 | 2062 | | x changeset: 1:471597cad322 |
|
2063 | 2063 | |/ user: test |
|
2064 | 2064 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2065 | 2065 | | summary: A0 |
|
2066 | 2066 | | |
|
2067 | 2067 | o changeset: 0:ea207398892e |
|
2068 | 2068 | user: test |
|
2069 | 2069 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2070 | 2070 | summary: ROOT |
|
2071 | 2071 | |
|
2072 | 2072 | Check templates |
|
2073 | 2073 | --------------- |
|
2074 | 2074 | |
|
2075 | 2075 | $ hg up 'desc("A0")' --hidden |
|
2076 | 2076 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2077 | 2077 | |
|
2078 | 2078 | # todo: the obsfate output is not ideal |
|
2079 | 2079 | $ hg fatelog |
|
2080 | 2080 | o 617adc3a144c |
|
2081 | 2081 | | |
|
2082 | 2082 | | @ 471597cad322 |
|
2083 | 2083 | |/ Obsfate: pruned; |
|
2084 | 2084 | o ea207398892e |
|
2085 | 2085 | |
|
2086 | 2086 | $ hg up -r 'desc("A2")' --hidden |
|
2087 | 2087 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2088 | 2088 | |
|
2089 | 2089 | $ hg fatelog --hidden |
|
2090 | 2090 | @ 0d0ef4bdf70e |
|
2091 | 2091 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000); |
|
2092 | 2092 | o 617adc3a144c |
|
2093 | 2093 | | |
|
2094 | 2094 | | x 471597cad322 |
|
2095 | 2095 | |/ Obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e by test (at 1970-01-01 00:00 +0000); |
|
2096 | 2096 | o ea207398892e |
|
2097 | 2097 | |
|
2098 | 2098 | |
|
2099 | 2099 | Check other fatelog implementations |
|
2100 | 2100 | ----------------------------------- |
|
2101 | 2101 | |
|
2102 | 2102 | $ hg fatelogkw --hidden -q |
|
2103 | 2103 | @ 0d0ef4bdf70e |
|
2104 |
| Obsfate: pruned |
|
|
2104 | | Obsfate: pruned | |
|
2105 | 2105 |
|
|
2106 | 2106 | | |
|
2107 | 2107 | | x 471597cad322 |
|
2108 |
|/ Obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e |
|
|
2108 | |/ Obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e | |
|
2109 | 2109 |
|
|
2110 | 2110 | |
|
2111 | 2111 | $ hg fatelogkw --hidden |
|
2112 | 2112 | @ 0d0ef4bdf70e |
|
2113 |
| Obsfate: pruned |
|
|
2113 | | Obsfate: pruned | |
|
2114 | 2114 |
|
|
2115 | 2115 | | |
|
2116 | 2116 | | x 471597cad322 |
|
2117 |
|/ Obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e |
|
|
2117 | |/ Obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e | |
|
2118 | 2118 |
|
|
2119 | 2119 | |
|
2120 | 2120 | $ hg fatelogkw --hidden -v |
|
2121 | 2121 | @ 0d0ef4bdf70e |
|
2122 | 2122 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000) |
|
2123 | 2123 | o 617adc3a144c |
|
2124 | 2124 | | |
|
2125 | 2125 | | x 471597cad322 |
|
2126 | 2126 | |/ Obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e by test (at 1970-01-01 00:00 +0000) |
|
2127 | 2127 | o ea207398892e |
|
2128 | 2128 |
@@ -1,685 +1,685 b'' | |||
|
1 | 1 | Test file dedicated to testing the divergent troubles from obsolete changeset. |
|
2 | 2 | |
|
3 | 3 | This is the most complex troubles from far so we isolate it in a dedicated |
|
4 | 4 | file. |
|
5 | 5 | |
|
6 | 6 | Enable obsolete |
|
7 | 7 | |
|
8 | 8 | $ cat >> $HGRCPATH << EOF |
|
9 | 9 | > [ui] |
|
10 | 10 | > logtemplate = {rev}:{node|short} {desc}{if(obsfate, " [{join(obsfate, "; ")}]")}\n |
|
11 | 11 | > [experimental] |
|
12 | 12 | > stabilization=createmarkers |
|
13 | 13 | > [extensions] |
|
14 | 14 | > drawdag=$TESTDIR/drawdag.py |
|
15 | 15 | > [alias] |
|
16 | 16 | > debugobsolete = debugobsolete -d '0 0' |
|
17 | 17 | > [phases] |
|
18 | 18 | > publish=False |
|
19 | 19 | > EOF |
|
20 | 20 | |
|
21 | 21 | |
|
22 | 22 | $ mkcommit() { |
|
23 | 23 | > echo "$1" > "$1" |
|
24 | 24 | > hg add "$1" |
|
25 | 25 | > hg ci -m "$1" |
|
26 | 26 | > } |
|
27 | 27 | $ getid() { |
|
28 | 28 | > hg log --hidden -r "desc('$1')" -T '{node}\n' |
|
29 | 29 | > } |
|
30 | 30 | |
|
31 | 31 | setup repo |
|
32 | 32 | |
|
33 | 33 | $ hg init reference |
|
34 | 34 | $ cd reference |
|
35 | 35 | $ mkcommit base |
|
36 | 36 | $ mkcommit A_0 |
|
37 | 37 | $ hg up 0 |
|
38 | 38 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
39 | 39 | $ mkcommit A_1 |
|
40 | 40 | created new head |
|
41 | 41 | $ hg up 0 |
|
42 | 42 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
43 | 43 | $ mkcommit A_2 |
|
44 | 44 | created new head |
|
45 | 45 | $ hg up 0 |
|
46 | 46 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
47 | 47 | $ cd .. |
|
48 | 48 | |
|
49 | 49 | |
|
50 | 50 | $ newcase() { |
|
51 | 51 | > hg clone -u 0 -q reference $1 |
|
52 | 52 | > cd $1 |
|
53 | 53 | > } |
|
54 | 54 | |
|
55 | 55 | direct divergence |
|
56 | 56 | ----------------- |
|
57 | 57 | |
|
58 | 58 | A_1 have two direct and divergent successors A_1 and A_1 |
|
59 | 59 | |
|
60 | 60 | $ newcase direct |
|
61 | 61 | $ hg debugobsolete `getid A_0` `getid A_1` |
|
62 | 62 | obsoleted 1 changesets |
|
63 | 63 | $ hg debugobsolete `getid A_0` `getid A_2` |
|
64 | 64 | $ hg log -G --hidden |
|
65 | 65 | o 3:392fd25390da A_2 |
|
66 | 66 | | |
|
67 | 67 | | o 2:82623d38b9ba A_1 |
|
68 | 68 | |/ |
|
69 |
| x 1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba |
|
|
69 | | x 1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba; rewritten as 3:392fd25390da] | |
|
70 | 70 | |/ |
|
71 | 71 | @ 0:d20a80d4def3 base |
|
72 | 72 | |
|
73 | 73 | $ hg debugsuccessorssets --hidden 'all()' |
|
74 | 74 | d20a80d4def3 |
|
75 | 75 | d20a80d4def3 |
|
76 | 76 | 007dc284c1f8 |
|
77 | 77 | 82623d38b9ba |
|
78 | 78 | 392fd25390da |
|
79 | 79 | 82623d38b9ba |
|
80 | 80 | 82623d38b9ba |
|
81 | 81 | 392fd25390da |
|
82 | 82 | 392fd25390da |
|
83 | 83 | $ hg log -r 'contentdivergent()' |
|
84 | 84 | 2:82623d38b9ba A_1 |
|
85 | 85 | 3:392fd25390da A_2 |
|
86 | 86 | $ hg debugsuccessorssets 'all()' --closest |
|
87 | 87 | d20a80d4def3 |
|
88 | 88 | d20a80d4def3 |
|
89 | 89 | 82623d38b9ba |
|
90 | 90 | 82623d38b9ba |
|
91 | 91 | 392fd25390da |
|
92 | 92 | 392fd25390da |
|
93 | 93 | $ hg debugsuccessorssets 'all()' --closest --hidden |
|
94 | 94 | d20a80d4def3 |
|
95 | 95 | d20a80d4def3 |
|
96 | 96 | 007dc284c1f8 |
|
97 | 97 | 82623d38b9ba |
|
98 | 98 | 392fd25390da |
|
99 | 99 | 82623d38b9ba |
|
100 | 100 | 82623d38b9ba |
|
101 | 101 | 392fd25390da |
|
102 | 102 | 392fd25390da |
|
103 | 103 | |
|
104 | 104 | check that mercurial refuse to push |
|
105 | 105 | |
|
106 | 106 | $ hg init ../other |
|
107 | 107 | $ hg push ../other |
|
108 | 108 | pushing to ../other |
|
109 | 109 | searching for changes |
|
110 | 110 | abort: push includes content-divergent changeset: 392fd25390da! |
|
111 | 111 | [255] |
|
112 | 112 | |
|
113 | 113 | $ cd .. |
|
114 | 114 | |
|
115 | 115 | |
|
116 | 116 | indirect divergence with known changeset |
|
117 | 117 | ------------------------------------------- |
|
118 | 118 | |
|
119 | 119 | $ newcase indirect_known |
|
120 | 120 | $ hg debugobsolete `getid A_0` `getid A_1` |
|
121 | 121 | obsoleted 1 changesets |
|
122 | 122 | $ hg debugobsolete `getid A_0` `getid A_2` |
|
123 | 123 | $ mkcommit A_3 |
|
124 | 124 | created new head |
|
125 | 125 | $ hg debugobsolete `getid A_2` `getid A_3` |
|
126 | 126 | obsoleted 1 changesets |
|
127 | 127 | $ hg log -G --hidden |
|
128 | 128 | @ 4:01f36c5a8fda A_3 |
|
129 | 129 | | |
|
130 |
| x 3:392fd25390da A_2 [rewritten as 4:01f36c5a8fda |
|
|
130 | | x 3:392fd25390da A_2 [rewritten as 4:01f36c5a8fda] | |
|
131 | 131 | |/ |
|
132 | 132 | | o 2:82623d38b9ba A_1 |
|
133 | 133 | |/ |
|
134 |
| x 1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba |
|
|
134 | | x 1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba; rewritten as 3:392fd25390da] | |
|
135 | 135 | |/ |
|
136 | 136 | o 0:d20a80d4def3 base |
|
137 | 137 | |
|
138 | 138 | $ hg debugsuccessorssets --hidden 'all()' |
|
139 | 139 | d20a80d4def3 |
|
140 | 140 | d20a80d4def3 |
|
141 | 141 | 007dc284c1f8 |
|
142 | 142 | 82623d38b9ba |
|
143 | 143 | 01f36c5a8fda |
|
144 | 144 | 82623d38b9ba |
|
145 | 145 | 82623d38b9ba |
|
146 | 146 | 392fd25390da |
|
147 | 147 | 01f36c5a8fda |
|
148 | 148 | 01f36c5a8fda |
|
149 | 149 | 01f36c5a8fda |
|
150 | 150 | $ hg log -r 'contentdivergent()' |
|
151 | 151 | 2:82623d38b9ba A_1 |
|
152 | 152 | 4:01f36c5a8fda A_3 |
|
153 | 153 | $ hg debugsuccessorssets 'all()' --closest |
|
154 | 154 | d20a80d4def3 |
|
155 | 155 | d20a80d4def3 |
|
156 | 156 | 82623d38b9ba |
|
157 | 157 | 82623d38b9ba |
|
158 | 158 | 01f36c5a8fda |
|
159 | 159 | 01f36c5a8fda |
|
160 | 160 | $ hg debugsuccessorssets 'all()' --closest --hidden |
|
161 | 161 | d20a80d4def3 |
|
162 | 162 | d20a80d4def3 |
|
163 | 163 | 007dc284c1f8 |
|
164 | 164 | 82623d38b9ba |
|
165 | 165 | 392fd25390da |
|
166 | 166 | 82623d38b9ba |
|
167 | 167 | 82623d38b9ba |
|
168 | 168 | 392fd25390da |
|
169 | 169 | 392fd25390da |
|
170 | 170 | 01f36c5a8fda |
|
171 | 171 | 01f36c5a8fda |
|
172 | 172 | $ cd .. |
|
173 | 173 | |
|
174 | 174 | |
|
175 | 175 | indirect divergence with known changeset |
|
176 | 176 | ------------------------------------------- |
|
177 | 177 | |
|
178 | 178 | $ newcase indirect_unknown |
|
179 | 179 | $ hg debugobsolete `getid A_0` aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
|
180 | 180 | obsoleted 1 changesets |
|
181 | 181 | $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid A_1` |
|
182 | 182 | $ hg debugobsolete `getid A_0` `getid A_2` |
|
183 | 183 | $ hg log -G --hidden |
|
184 | 184 | o 3:392fd25390da A_2 |
|
185 | 185 | | |
|
186 | 186 | | o 2:82623d38b9ba A_1 |
|
187 | 187 | |/ |
|
188 |
| x 1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba |
|
|
188 | | x 1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba; rewritten as 3:392fd25390da] | |
|
189 | 189 | |/ |
|
190 | 190 | @ 0:d20a80d4def3 base |
|
191 | 191 | |
|
192 | 192 | $ hg debugsuccessorssets --hidden 'all()' |
|
193 | 193 | d20a80d4def3 |
|
194 | 194 | d20a80d4def3 |
|
195 | 195 | 007dc284c1f8 |
|
196 | 196 | 82623d38b9ba |
|
197 | 197 | 392fd25390da |
|
198 | 198 | 82623d38b9ba |
|
199 | 199 | 82623d38b9ba |
|
200 | 200 | 392fd25390da |
|
201 | 201 | 392fd25390da |
|
202 | 202 | $ hg log -r 'contentdivergent()' |
|
203 | 203 | 2:82623d38b9ba A_1 |
|
204 | 204 | 3:392fd25390da A_2 |
|
205 | 205 | $ hg debugsuccessorssets 'all()' --closest |
|
206 | 206 | d20a80d4def3 |
|
207 | 207 | d20a80d4def3 |
|
208 | 208 | 82623d38b9ba |
|
209 | 209 | 82623d38b9ba |
|
210 | 210 | 392fd25390da |
|
211 | 211 | 392fd25390da |
|
212 | 212 | $ hg debugsuccessorssets 'all()' --closest --hidden |
|
213 | 213 | d20a80d4def3 |
|
214 | 214 | d20a80d4def3 |
|
215 | 215 | 007dc284c1f8 |
|
216 | 216 | 82623d38b9ba |
|
217 | 217 | 392fd25390da |
|
218 | 218 | 82623d38b9ba |
|
219 | 219 | 82623d38b9ba |
|
220 | 220 | 392fd25390da |
|
221 | 221 | 392fd25390da |
|
222 | 222 | $ cd .. |
|
223 | 223 | |
|
224 | 224 | do not take unknown node in account if they are final |
|
225 | 225 | ----------------------------------------------------- |
|
226 | 226 | |
|
227 | 227 | $ newcase final-unknown |
|
228 | 228 | $ hg debugobsolete `getid A_0` `getid A_1` |
|
229 | 229 | obsoleted 1 changesets |
|
230 | 230 | $ hg debugobsolete `getid A_1` `getid A_2` |
|
231 | 231 | obsoleted 1 changesets |
|
232 | 232 | $ hg debugobsolete `getid A_0` bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
|
233 | 233 | $ hg debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb cccccccccccccccccccccccccccccccccccccccc |
|
234 | 234 | $ hg debugobsolete `getid A_1` dddddddddddddddddddddddddddddddddddddddd |
|
235 | 235 | |
|
236 | 236 | $ hg debugsuccessorssets --hidden 'desc('A_0')' |
|
237 | 237 | 007dc284c1f8 |
|
238 | 238 | 392fd25390da |
|
239 | 239 | $ hg debugsuccessorssets 'desc('A_0')' --closest |
|
240 | 240 | $ hg debugsuccessorssets 'desc('A_0')' --closest --hidden |
|
241 | 241 | 007dc284c1f8 |
|
242 | 242 | 82623d38b9ba |
|
243 | 243 | |
|
244 | 244 | $ cd .. |
|
245 | 245 | |
|
246 | 246 | divergence that converge again is not divergence anymore |
|
247 | 247 | ----------------------------------------------------- |
|
248 | 248 | |
|
249 | 249 | $ newcase converged_divergence |
|
250 | 250 | $ hg debugobsolete `getid A_0` `getid A_1` |
|
251 | 251 | obsoleted 1 changesets |
|
252 | 252 | $ hg debugobsolete `getid A_0` `getid A_2` |
|
253 | 253 | $ mkcommit A_3 |
|
254 | 254 | created new head |
|
255 | 255 | $ hg debugobsolete `getid A_1` `getid A_3` |
|
256 | 256 | obsoleted 1 changesets |
|
257 | 257 | $ hg debugobsolete `getid A_2` `getid A_3` |
|
258 | 258 | obsoleted 1 changesets |
|
259 | 259 | $ hg log -G --hidden |
|
260 | 260 | @ 4:01f36c5a8fda A_3 |
|
261 | 261 | | |
|
262 |
| x 3:392fd25390da A_2 [rewritten as 4:01f36c5a8fda |
|
|
262 | | x 3:392fd25390da A_2 [rewritten as 4:01f36c5a8fda] | |
|
263 | 263 | |/ |
|
264 |
| x 2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda |
|
|
264 | | x 2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda] | |
|
265 | 265 | |/ |
|
266 |
| x 1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba |
|
|
266 | | x 1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba; rewritten as 3:392fd25390da] | |
|
267 | 267 | |/ |
|
268 | 268 | o 0:d20a80d4def3 base |
|
269 | 269 | |
|
270 | 270 | $ hg debugsuccessorssets --hidden 'all()' |
|
271 | 271 | d20a80d4def3 |
|
272 | 272 | d20a80d4def3 |
|
273 | 273 | 007dc284c1f8 |
|
274 | 274 | 01f36c5a8fda |
|
275 | 275 | 82623d38b9ba |
|
276 | 276 | 01f36c5a8fda |
|
277 | 277 | 392fd25390da |
|
278 | 278 | 01f36c5a8fda |
|
279 | 279 | 01f36c5a8fda |
|
280 | 280 | 01f36c5a8fda |
|
281 | 281 | $ hg log -r 'contentdivergent()' |
|
282 | 282 | $ hg debugsuccessorssets 'all()' --closest |
|
283 | 283 | d20a80d4def3 |
|
284 | 284 | d20a80d4def3 |
|
285 | 285 | 01f36c5a8fda |
|
286 | 286 | 01f36c5a8fda |
|
287 | 287 | $ hg debugsuccessorssets 'all()' --closest --hidden |
|
288 | 288 | d20a80d4def3 |
|
289 | 289 | d20a80d4def3 |
|
290 | 290 | 007dc284c1f8 |
|
291 | 291 | 82623d38b9ba |
|
292 | 292 | 392fd25390da |
|
293 | 293 | 82623d38b9ba |
|
294 | 294 | 82623d38b9ba |
|
295 | 295 | 392fd25390da |
|
296 | 296 | 392fd25390da |
|
297 | 297 | 01f36c5a8fda |
|
298 | 298 | 01f36c5a8fda |
|
299 | 299 | $ cd .. |
|
300 | 300 | |
|
301 | 301 | split is not divergences |
|
302 | 302 | ----------------------------- |
|
303 | 303 | |
|
304 | 304 | $ newcase split |
|
305 | 305 | $ hg debugobsolete `getid A_0` `getid A_1` `getid A_2` |
|
306 | 306 | obsoleted 1 changesets |
|
307 | 307 | $ hg log -G --hidden |
|
308 | 308 | o 3:392fd25390da A_2 |
|
309 | 309 | | |
|
310 | 310 | | o 2:82623d38b9ba A_1 |
|
311 | 311 | |/ |
|
312 |
| x 1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da |
|
|
312 | | x 1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da] | |
|
313 | 313 | |/ |
|
314 | 314 | @ 0:d20a80d4def3 base |
|
315 | 315 | |
|
316 | 316 | $ hg debugsuccessorssets --hidden 'all()' |
|
317 | 317 | d20a80d4def3 |
|
318 | 318 | d20a80d4def3 |
|
319 | 319 | 007dc284c1f8 |
|
320 | 320 | 82623d38b9ba 392fd25390da |
|
321 | 321 | 82623d38b9ba |
|
322 | 322 | 82623d38b9ba |
|
323 | 323 | 392fd25390da |
|
324 | 324 | 392fd25390da |
|
325 | 325 | $ hg log -r 'contentdivergent()' |
|
326 | 326 | $ hg debugsuccessorssets 'all()' --closest |
|
327 | 327 | d20a80d4def3 |
|
328 | 328 | d20a80d4def3 |
|
329 | 329 | 82623d38b9ba |
|
330 | 330 | 82623d38b9ba |
|
331 | 331 | 392fd25390da |
|
332 | 332 | 392fd25390da |
|
333 | 333 | $ hg debugsuccessorssets 'all()' --closest --hidden |
|
334 | 334 | d20a80d4def3 |
|
335 | 335 | d20a80d4def3 |
|
336 | 336 | 007dc284c1f8 |
|
337 | 337 | 82623d38b9ba 392fd25390da |
|
338 | 338 | 82623d38b9ba |
|
339 | 339 | 82623d38b9ba |
|
340 | 340 | 392fd25390da |
|
341 | 341 | 392fd25390da |
|
342 | 342 | |
|
343 | 343 | Even when subsequent rewriting happen |
|
344 | 344 | |
|
345 | 345 | $ mkcommit A_3 |
|
346 | 346 | created new head |
|
347 | 347 | $ hg debugobsolete `getid A_1` `getid A_3` |
|
348 | 348 | obsoleted 1 changesets |
|
349 | 349 | $ hg up 0 |
|
350 | 350 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
351 | 351 | $ mkcommit A_4 |
|
352 | 352 | created new head |
|
353 | 353 | $ hg debugobsolete `getid A_2` `getid A_4` |
|
354 | 354 | obsoleted 1 changesets |
|
355 | 355 | $ hg up 0 |
|
356 | 356 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
357 | 357 | $ mkcommit A_5 |
|
358 | 358 | created new head |
|
359 | 359 | $ hg debugobsolete `getid A_4` `getid A_5` |
|
360 | 360 | obsoleted 1 changesets |
|
361 | 361 | $ hg log -G --hidden |
|
362 | 362 | @ 6:e442cfc57690 A_5 |
|
363 | 363 | | |
|
364 |
| x 5:6a411f0d7a0a A_4 [rewritten as 6:e442cfc57690 |
|
|
364 | | x 5:6a411f0d7a0a A_4 [rewritten as 6:e442cfc57690] | |
|
365 | 365 | |/ |
|
366 | 366 | | o 4:01f36c5a8fda A_3 |
|
367 | 367 | |/ |
|
368 |
| x 3:392fd25390da A_2 [rewritten as 5:6a411f0d7a0a |
|
|
368 | | x 3:392fd25390da A_2 [rewritten as 5:6a411f0d7a0a] | |
|
369 | 369 | |/ |
|
370 |
| x 2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda |
|
|
370 | | x 2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda] | |
|
371 | 371 | |/ |
|
372 |
| x 1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da |
|
|
372 | | x 1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da] | |
|
373 | 373 | |/ |
|
374 | 374 | o 0:d20a80d4def3 base |
|
375 | 375 | |
|
376 | 376 | $ hg debugsuccessorssets --hidden 'all()' |
|
377 | 377 | d20a80d4def3 |
|
378 | 378 | d20a80d4def3 |
|
379 | 379 | 007dc284c1f8 |
|
380 | 380 | 01f36c5a8fda e442cfc57690 |
|
381 | 381 | 82623d38b9ba |
|
382 | 382 | 01f36c5a8fda |
|
383 | 383 | 392fd25390da |
|
384 | 384 | e442cfc57690 |
|
385 | 385 | 01f36c5a8fda |
|
386 | 386 | 01f36c5a8fda |
|
387 | 387 | 6a411f0d7a0a |
|
388 | 388 | e442cfc57690 |
|
389 | 389 | e442cfc57690 |
|
390 | 390 | e442cfc57690 |
|
391 | 391 | $ hg debugsuccessorssets 'all()' --closest |
|
392 | 392 | d20a80d4def3 |
|
393 | 393 | d20a80d4def3 |
|
394 | 394 | 01f36c5a8fda |
|
395 | 395 | 01f36c5a8fda |
|
396 | 396 | e442cfc57690 |
|
397 | 397 | e442cfc57690 |
|
398 | 398 | $ hg debugsuccessorssets 'all()' --closest --hidden |
|
399 | 399 | d20a80d4def3 |
|
400 | 400 | d20a80d4def3 |
|
401 | 401 | 007dc284c1f8 |
|
402 | 402 | 82623d38b9ba 392fd25390da |
|
403 | 403 | 82623d38b9ba |
|
404 | 404 | 82623d38b9ba |
|
405 | 405 | 392fd25390da |
|
406 | 406 | 392fd25390da |
|
407 | 407 | 01f36c5a8fda |
|
408 | 408 | 01f36c5a8fda |
|
409 | 409 | 6a411f0d7a0a |
|
410 | 410 | e442cfc57690 |
|
411 | 411 | e442cfc57690 |
|
412 | 412 | e442cfc57690 |
|
413 | 413 | $ hg log -r 'contentdivergent()' |
|
414 | 414 | |
|
415 | 415 | Check more complex obsolescence graft (with divergence) |
|
416 | 416 | |
|
417 | 417 | $ mkcommit B_0; hg up 0 |
|
418 | 418 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
419 | 419 | $ hg debugobsolete `getid B_0` `getid A_2` |
|
420 | 420 | obsoleted 1 changesets |
|
421 | 421 | $ mkcommit A_7; hg up 0 |
|
422 | 422 | created new head |
|
423 | 423 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
424 | 424 | $ mkcommit A_8; hg up 0 |
|
425 | 425 | created new head |
|
426 | 426 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
427 | 427 | $ hg debugobsolete `getid A_5` `getid A_7` `getid A_8` |
|
428 | 428 | obsoleted 1 changesets |
|
429 | 429 | $ mkcommit A_9; hg up 0 |
|
430 | 430 | created new head |
|
431 | 431 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
432 | 432 | $ hg debugobsolete `getid A_5` `getid A_9` |
|
433 | 433 | $ hg log -G --hidden |
|
434 | 434 | o 10:bed64f5d2f5a A_9 |
|
435 | 435 | | |
|
436 | 436 | | o 9:14608b260df8 A_8 |
|
437 | 437 | |/ |
|
438 | 438 | | o 8:7ae126973a96 A_7 |
|
439 | 439 | |/ |
|
440 |
| x 7:3750ebee865d B_0 [rewritten as 3:392fd25390da |
|
|
440 | | x 7:3750ebee865d B_0 [rewritten as 3:392fd25390da] | |
|
441 | 441 | | | |
|
442 |
| x 6:e442cfc57690 A_5 [rewritten as 10:bed64f5d2f5a |
|
|
442 | | x 6:e442cfc57690 A_5 [rewritten as 10:bed64f5d2f5a; split as 8:7ae126973a96, 9:14608b260df8] | |
|
443 | 443 | |/ |
|
444 |
| x 5:6a411f0d7a0a A_4 [rewritten as 6:e442cfc57690 |
|
|
444 | | x 5:6a411f0d7a0a A_4 [rewritten as 6:e442cfc57690] | |
|
445 | 445 | |/ |
|
446 | 446 | | o 4:01f36c5a8fda A_3 |
|
447 | 447 | |/ |
|
448 |
| x 3:392fd25390da A_2 [rewritten as 5:6a411f0d7a0a |
|
|
448 | | x 3:392fd25390da A_2 [rewritten as 5:6a411f0d7a0a] | |
|
449 | 449 | |/ |
|
450 |
| x 2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda |
|
|
450 | | x 2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda] | |
|
451 | 451 | |/ |
|
452 |
| x 1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da |
|
|
452 | | x 1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da] | |
|
453 | 453 | |/ |
|
454 | 454 | @ 0:d20a80d4def3 base |
|
455 | 455 | |
|
456 | 456 | $ hg debugsuccessorssets --hidden 'all()' |
|
457 | 457 | d20a80d4def3 |
|
458 | 458 | d20a80d4def3 |
|
459 | 459 | 007dc284c1f8 |
|
460 | 460 | 01f36c5a8fda bed64f5d2f5a |
|
461 | 461 | 01f36c5a8fda 7ae126973a96 14608b260df8 |
|
462 | 462 | 82623d38b9ba |
|
463 | 463 | 01f36c5a8fda |
|
464 | 464 | 392fd25390da |
|
465 | 465 | bed64f5d2f5a |
|
466 | 466 | 7ae126973a96 14608b260df8 |
|
467 | 467 | 01f36c5a8fda |
|
468 | 468 | 01f36c5a8fda |
|
469 | 469 | 6a411f0d7a0a |
|
470 | 470 | bed64f5d2f5a |
|
471 | 471 | 7ae126973a96 14608b260df8 |
|
472 | 472 | e442cfc57690 |
|
473 | 473 | bed64f5d2f5a |
|
474 | 474 | 7ae126973a96 14608b260df8 |
|
475 | 475 | 3750ebee865d |
|
476 | 476 | bed64f5d2f5a |
|
477 | 477 | 7ae126973a96 14608b260df8 |
|
478 | 478 | 7ae126973a96 |
|
479 | 479 | 7ae126973a96 |
|
480 | 480 | 14608b260df8 |
|
481 | 481 | 14608b260df8 |
|
482 | 482 | bed64f5d2f5a |
|
483 | 483 | bed64f5d2f5a |
|
484 | 484 | $ hg debugsuccessorssets 'all()' --closest |
|
485 | 485 | d20a80d4def3 |
|
486 | 486 | d20a80d4def3 |
|
487 | 487 | 01f36c5a8fda |
|
488 | 488 | 01f36c5a8fda |
|
489 | 489 | 7ae126973a96 |
|
490 | 490 | 7ae126973a96 |
|
491 | 491 | 14608b260df8 |
|
492 | 492 | 14608b260df8 |
|
493 | 493 | bed64f5d2f5a |
|
494 | 494 | bed64f5d2f5a |
|
495 | 495 | $ hg debugsuccessorssets 'all()' --closest --hidden |
|
496 | 496 | d20a80d4def3 |
|
497 | 497 | d20a80d4def3 |
|
498 | 498 | 007dc284c1f8 |
|
499 | 499 | 82623d38b9ba 392fd25390da |
|
500 | 500 | 82623d38b9ba |
|
501 | 501 | 82623d38b9ba |
|
502 | 502 | 392fd25390da |
|
503 | 503 | 392fd25390da |
|
504 | 504 | 01f36c5a8fda |
|
505 | 505 | 01f36c5a8fda |
|
506 | 506 | 6a411f0d7a0a |
|
507 | 507 | e442cfc57690 |
|
508 | 508 | e442cfc57690 |
|
509 | 509 | e442cfc57690 |
|
510 | 510 | 3750ebee865d |
|
511 | 511 | 392fd25390da |
|
512 | 512 | 7ae126973a96 |
|
513 | 513 | 7ae126973a96 |
|
514 | 514 | 14608b260df8 |
|
515 | 515 | 14608b260df8 |
|
516 | 516 | bed64f5d2f5a |
|
517 | 517 | bed64f5d2f5a |
|
518 | 518 | $ hg log -r 'contentdivergent()' |
|
519 | 519 | 4:01f36c5a8fda A_3 |
|
520 | 520 | 8:7ae126973a96 A_7 |
|
521 | 521 | 9:14608b260df8 A_8 |
|
522 | 522 | 10:bed64f5d2f5a A_9 |
|
523 | 523 | |
|
524 | 524 | fix the divergence |
|
525 | 525 | |
|
526 | 526 | $ mkcommit A_A; hg up 0 |
|
527 | 527 | created new head |
|
528 | 528 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
529 | 529 | $ hg debugobsolete `getid A_9` `getid A_A` |
|
530 | 530 | obsoleted 1 changesets |
|
531 | 531 | $ hg debugobsolete `getid A_7` `getid A_A` |
|
532 | 532 | obsoleted 1 changesets |
|
533 | 533 | $ hg debugobsolete `getid A_8` `getid A_A` |
|
534 | 534 | obsoleted 1 changesets |
|
535 | 535 | $ hg log -G --hidden |
|
536 | 536 | o 11:a139f71be9da A_A |
|
537 | 537 | | |
|
538 |
| x 10:bed64f5d2f5a A_9 [rewritten as 11:a139f71be9da |
|
|
538 | | x 10:bed64f5d2f5a A_9 [rewritten as 11:a139f71be9da] | |
|
539 | 539 | |/ |
|
540 |
| x 9:14608b260df8 A_8 [rewritten as 11:a139f71be9da |
|
|
540 | | x 9:14608b260df8 A_8 [rewritten as 11:a139f71be9da] | |
|
541 | 541 | |/ |
|
542 |
| x 8:7ae126973a96 A_7 [rewritten as 11:a139f71be9da |
|
|
542 | | x 8:7ae126973a96 A_7 [rewritten as 11:a139f71be9da] | |
|
543 | 543 | |/ |
|
544 |
| x 7:3750ebee865d B_0 [rewritten as 3:392fd25390da |
|
|
544 | | x 7:3750ebee865d B_0 [rewritten as 3:392fd25390da] | |
|
545 | 545 | | | |
|
546 |
| x 6:e442cfc57690 A_5 [rewritten as 10:bed64f5d2f5a |
|
|
546 | | x 6:e442cfc57690 A_5 [rewritten as 10:bed64f5d2f5a; split as 8:7ae126973a96, 9:14608b260df8] | |
|
547 | 547 | |/ |
|
548 |
| x 5:6a411f0d7a0a A_4 [rewritten as 6:e442cfc57690 |
|
|
548 | | x 5:6a411f0d7a0a A_4 [rewritten as 6:e442cfc57690] | |
|
549 | 549 | |/ |
|
550 | 550 | | o 4:01f36c5a8fda A_3 |
|
551 | 551 | |/ |
|
552 |
| x 3:392fd25390da A_2 [rewritten as 5:6a411f0d7a0a |
|
|
552 | | x 3:392fd25390da A_2 [rewritten as 5:6a411f0d7a0a] | |
|
553 | 553 | |/ |
|
554 |
| x 2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda |
|
|
554 | | x 2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda] | |
|
555 | 555 | |/ |
|
556 |
| x 1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da |
|
|
556 | | x 1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da] | |
|
557 | 557 | |/ |
|
558 | 558 | @ 0:d20a80d4def3 base |
|
559 | 559 | |
|
560 | 560 | $ hg debugsuccessorssets --hidden 'all()' |
|
561 | 561 | d20a80d4def3 |
|
562 | 562 | d20a80d4def3 |
|
563 | 563 | 007dc284c1f8 |
|
564 | 564 | 01f36c5a8fda a139f71be9da |
|
565 | 565 | 82623d38b9ba |
|
566 | 566 | 01f36c5a8fda |
|
567 | 567 | 392fd25390da |
|
568 | 568 | a139f71be9da |
|
569 | 569 | 01f36c5a8fda |
|
570 | 570 | 01f36c5a8fda |
|
571 | 571 | 6a411f0d7a0a |
|
572 | 572 | a139f71be9da |
|
573 | 573 | e442cfc57690 |
|
574 | 574 | a139f71be9da |
|
575 | 575 | 3750ebee865d |
|
576 | 576 | a139f71be9da |
|
577 | 577 | 7ae126973a96 |
|
578 | 578 | a139f71be9da |
|
579 | 579 | 14608b260df8 |
|
580 | 580 | a139f71be9da |
|
581 | 581 | bed64f5d2f5a |
|
582 | 582 | a139f71be9da |
|
583 | 583 | a139f71be9da |
|
584 | 584 | a139f71be9da |
|
585 | 585 | $ hg debugsuccessorssets 'all()' --closest |
|
586 | 586 | d20a80d4def3 |
|
587 | 587 | d20a80d4def3 |
|
588 | 588 | 01f36c5a8fda |
|
589 | 589 | 01f36c5a8fda |
|
590 | 590 | a139f71be9da |
|
591 | 591 | a139f71be9da |
|
592 | 592 | $ hg debugsuccessorssets 'all()' --closest --hidden |
|
593 | 593 | d20a80d4def3 |
|
594 | 594 | d20a80d4def3 |
|
595 | 595 | 007dc284c1f8 |
|
596 | 596 | 82623d38b9ba 392fd25390da |
|
597 | 597 | 82623d38b9ba |
|
598 | 598 | 82623d38b9ba |
|
599 | 599 | 392fd25390da |
|
600 | 600 | 392fd25390da |
|
601 | 601 | 01f36c5a8fda |
|
602 | 602 | 01f36c5a8fda |
|
603 | 603 | 6a411f0d7a0a |
|
604 | 604 | e442cfc57690 |
|
605 | 605 | e442cfc57690 |
|
606 | 606 | e442cfc57690 |
|
607 | 607 | 3750ebee865d |
|
608 | 608 | 392fd25390da |
|
609 | 609 | 7ae126973a96 |
|
610 | 610 | a139f71be9da |
|
611 | 611 | 14608b260df8 |
|
612 | 612 | a139f71be9da |
|
613 | 613 | bed64f5d2f5a |
|
614 | 614 | a139f71be9da |
|
615 | 615 | a139f71be9da |
|
616 | 616 | a139f71be9da |
|
617 | 617 | $ hg log -r 'contentdivergent()' |
|
618 | 618 | |
|
619 | 619 | $ cd .. |
|
620 | 620 | |
|
621 | 621 | |
|
622 | 622 | Subset does not diverge |
|
623 | 623 | ------------------------------ |
|
624 | 624 | |
|
625 | 625 | Do not report divergent successors-set if it is a subset of another |
|
626 | 626 | successors-set. (report [A,B] not [A] + [A,B]) |
|
627 | 627 | |
|
628 | 628 | $ newcase subset |
|
629 | 629 | $ hg debugobsolete `getid A_0` `getid A_2` |
|
630 | 630 | obsoleted 1 changesets |
|
631 | 631 | $ hg debugobsolete `getid A_0` `getid A_1` `getid A_2` |
|
632 | 632 | $ hg debugsuccessorssets --hidden 'desc('A_0')' |
|
633 | 633 | 007dc284c1f8 |
|
634 | 634 | 82623d38b9ba 392fd25390da |
|
635 | 635 | $ hg debugsuccessorssets 'desc('A_0')' --closest |
|
636 | 636 | $ hg debugsuccessorssets 'desc('A_0')' --closest --hidden |
|
637 | 637 | 007dc284c1f8 |
|
638 | 638 | 82623d38b9ba 392fd25390da |
|
639 | 639 | |
|
640 | 640 | $ cd .. |
|
641 | 641 | |
|
642 | 642 | Use scmutil.cleanupnodes API to create divergence |
|
643 | 643 | |
|
644 | 644 | $ hg init cleanupnodes |
|
645 | 645 | $ cd cleanupnodes |
|
646 | 646 | $ hg debugdrawdag <<'EOS' |
|
647 | 647 | > B1 B3 B4 |
|
648 | 648 | > | \| |
|
649 | 649 | > A Z |
|
650 | 650 | > EOS |
|
651 | 651 | |
|
652 | 652 | $ hg update -q B1 |
|
653 | 653 | $ echo 3 >> B |
|
654 | 654 | $ hg commit --amend -m B2 |
|
655 | 655 | $ cat > $TESTTMP/scmutilcleanup.py <<EOF |
|
656 | 656 | > from mercurial import registrar, scmutil |
|
657 | 657 | > cmdtable = {} |
|
658 | 658 | > command = registrar.command(cmdtable) |
|
659 | 659 | > @command('cleanup') |
|
660 | 660 | > def cleanup(ui, repo): |
|
661 | 661 | > def node(expr): |
|
662 | 662 | > unfi = repo.unfiltered() |
|
663 | 663 | > rev = unfi.revs(expr).first() |
|
664 | 664 | > return unfi.changelog.node(rev) |
|
665 | 665 | > with repo.wlock(), repo.lock(), repo.transaction('delayedstrip'): |
|
666 | 666 | > mapping = {node('desc(B1)'): [node('desc(B3)')], |
|
667 | 667 | > node('desc(B3)'): [node('desc(B4)')]} |
|
668 | 668 | > scmutil.cleanupnodes(repo, mapping, 'test') |
|
669 | 669 | > EOF |
|
670 | 670 | |
|
671 | 671 | $ rm .hg/localtags |
|
672 | 672 | $ hg cleanup --config extensions.t=$TESTTMP/scmutilcleanup.py |
|
673 | 673 | $ hg log -G -T '{rev}:{node|short} {desc} {instabilities}' -r 'sort(all(), topo)' |
|
674 | 674 | @ 5:1a2a9b5b0030 B2 content-divergent |
|
675 | 675 | | |
|
676 | 676 | | o 4:70d5a63ca112 B4 content-divergent |
|
677 | 677 | | | |
|
678 | 678 | | o 1:48b9aae0607f Z |
|
679 | 679 | | |
|
680 | 680 | o 0:426bada5c675 A |
|
681 | 681 | |
|
682 | 682 | $ hg debugobsolete |
|
683 | 683 | a178212c3433c4e77b573f6011e29affb8aefa33 1a2a9b5b0030632400aa78e00388c20f99d3ec44 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
684 | 684 | a178212c3433c4e77b573f6011e29affb8aefa33 ad6478fb94ecec98b86daae98722865d494ac561 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'test', 'user': 'test'} |
|
685 | 685 | ad6478fb94ecec98b86daae98722865d494ac561 70d5a63ca112acb3764bc1d7320ca90ea688d671 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'test', 'user': 'test'} |
@@ -1,1508 +1,1508 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH << EOF |
|
2 | 2 | > [phases] |
|
3 | 3 | > # public changeset are not obsolete |
|
4 | 4 | > publish=false |
|
5 | 5 | > [ui] |
|
6 | 6 | > logtemplate="{rev}:{node|short} ({phase}{if(obsolete, ' *{obsolete}*')}{if(instabilities, ' {instabilities}')}) [{tags} {bookmarks}] {desc|firstline}{if(obsfate, " [{join(obsfate, "; ")}]")}\n" |
|
7 | 7 | > EOF |
|
8 | 8 | $ mkcommit() { |
|
9 | 9 | > echo "$1" > "$1" |
|
10 | 10 | > hg add "$1" |
|
11 | 11 | > hg ci -m "add $1" |
|
12 | 12 | > } |
|
13 | 13 | $ getid() { |
|
14 | 14 | > hg log -T "{node}\n" --hidden -r "desc('$1')" |
|
15 | 15 | > } |
|
16 | 16 | |
|
17 | 17 | $ cat > debugkeys.py <<EOF |
|
18 | 18 | > def reposetup(ui, repo): |
|
19 | 19 | > class debugkeysrepo(repo.__class__): |
|
20 | 20 | > def listkeys(self, namespace): |
|
21 | 21 | > ui.write('listkeys %s\n' % (namespace,)) |
|
22 | 22 | > return super(debugkeysrepo, self).listkeys(namespace) |
|
23 | 23 | > |
|
24 | 24 | > if repo.local(): |
|
25 | 25 | > repo.__class__ = debugkeysrepo |
|
26 | 26 | > EOF |
|
27 | 27 | |
|
28 | 28 | $ hg init tmpa |
|
29 | 29 | $ cd tmpa |
|
30 | 30 | $ mkcommit kill_me |
|
31 | 31 | |
|
32 | 32 | Checking that the feature is properly disabled |
|
33 | 33 | |
|
34 | 34 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar |
|
35 | 35 | abort: creating obsolete markers is not enabled on this repo |
|
36 | 36 | [255] |
|
37 | 37 | |
|
38 | 38 | Enabling it |
|
39 | 39 | |
|
40 | 40 | $ cat >> $HGRCPATH << EOF |
|
41 | 41 | > [experimental] |
|
42 | 42 | > stabilization=createmarkers,exchange |
|
43 | 43 | > EOF |
|
44 | 44 | |
|
45 | 45 | Killing a single changeset without replacement |
|
46 | 46 | |
|
47 | 47 | $ hg debugobsolete 0 |
|
48 | 48 | abort: changeset references must be full hexadecimal node identifiers |
|
49 | 49 | [255] |
|
50 | 50 | $ hg debugobsolete '00' |
|
51 | 51 | abort: changeset references must be full hexadecimal node identifiers |
|
52 | 52 | [255] |
|
53 | 53 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar |
|
54 | 54 | obsoleted 1 changesets |
|
55 | 55 | $ hg debugobsolete |
|
56 | 56 | 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'} |
|
57 | 57 | |
|
58 | 58 | (test that mercurial is not confused) |
|
59 | 59 | |
|
60 | 60 | $ hg up null --quiet # having 0 as parent prevents it to be hidden |
|
61 | 61 | $ hg tip |
|
62 | 62 | -1:000000000000 (public) [tip ] |
|
63 | 63 | $ hg up --hidden tip --quiet |
|
64 | 64 | |
|
65 | 65 | Killing a single changeset with itself should fail |
|
66 | 66 | (simple local safeguard) |
|
67 | 67 | |
|
68 | 68 | $ hg debugobsolete `getid kill_me` `getid kill_me` |
|
69 | 69 | abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0 |
|
70 | 70 | [255] |
|
71 | 71 | |
|
72 | 72 | $ cd .. |
|
73 | 73 | |
|
74 | 74 | Killing a single changeset with replacement |
|
75 | 75 | (and testing the format option) |
|
76 | 76 | |
|
77 | 77 | $ hg init tmpb |
|
78 | 78 | $ cd tmpb |
|
79 | 79 | $ mkcommit a |
|
80 | 80 | $ mkcommit b |
|
81 | 81 | $ mkcommit original_c |
|
82 | 82 | $ hg up "desc('b')" |
|
83 | 83 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
84 | 84 | $ mkcommit new_c |
|
85 | 85 | created new head |
|
86 | 86 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
|
87 | 87 | $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120' |
|
88 | 88 | obsoleted 1 changesets |
|
89 | 89 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
|
90 | 90 | 2:245bde4270cd add original_c |
|
91 | 91 | $ hg debugrevlog -cd |
|
92 | 92 | # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen |
|
93 | 93 | 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0 |
|
94 | 94 | 1 0 -1 59 118 59 59 0 0 58 116 0 1 0 |
|
95 | 95 | 2 1 -1 118 193 118 118 59 0 76 192 0 1 0 |
|
96 | 96 | 3 1 -1 193 260 193 193 59 0 66 258 0 2 0 |
|
97 | 97 | $ hg debugobsolete |
|
98 | 98 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
99 | 99 | |
|
100 | 100 | (check for version number of the obsstore) |
|
101 | 101 | |
|
102 | 102 | $ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null |
|
103 | 103 | \x00 (no-eol) (esc) |
|
104 | 104 | |
|
105 | 105 | do it again (it read the obsstore before adding new changeset) |
|
106 | 106 | |
|
107 | 107 | $ hg up '.^' |
|
108 | 108 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
109 | 109 | $ mkcommit new_2_c |
|
110 | 110 | created new head |
|
111 | 111 | $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c` |
|
112 | 112 | obsoleted 1 changesets |
|
113 | 113 | $ hg debugobsolete |
|
114 | 114 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
115 | 115 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
116 | 116 | |
|
117 | 117 | Register two markers with a missing node |
|
118 | 118 | |
|
119 | 119 | $ hg up '.^' |
|
120 | 120 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
121 | 121 | $ mkcommit new_3_c |
|
122 | 122 | created new head |
|
123 | 123 | $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337 |
|
124 | 124 | obsoleted 1 changesets |
|
125 | 125 | $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c` |
|
126 | 126 | $ hg debugobsolete |
|
127 | 127 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
128 | 128 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
129 | 129 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
130 | 130 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
131 | 131 | |
|
132 | 132 | Test the --index option of debugobsolete command |
|
133 | 133 | $ hg debugobsolete --index |
|
134 | 134 | 0 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
135 | 135 | 1 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
136 | 136 | 2 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
137 | 137 | 3 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
138 | 138 | |
|
139 | 139 | Refuse pathological nullid successors |
|
140 | 140 | $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000 |
|
141 | 141 | transaction abort! |
|
142 | 142 | rollback completed |
|
143 | 143 | abort: bad obsolescence marker detected: invalid successors nullid |
|
144 | 144 | [255] |
|
145 | 145 | |
|
146 | 146 | Check that graphlog detect that a changeset is obsolete: |
|
147 | 147 | |
|
148 | 148 | $ hg log -G |
|
149 | 149 | @ 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
150 | 150 | | |
|
151 | 151 | o 1:7c3bad9141dc (draft) [ ] add b |
|
152 | 152 | | |
|
153 | 153 | o 0:1f0dee641bb7 (draft) [ ] add a |
|
154 | 154 | |
|
155 | 155 | |
|
156 | 156 | check that heads does not report them |
|
157 | 157 | |
|
158 | 158 | $ hg heads |
|
159 | 159 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
160 | 160 | $ hg heads --hidden |
|
161 | 161 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
162 |
4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350 |
|
|
163 |
3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9 |
|
|
164 |
2:245bde4270cd (draft *obsolete*) [ ] add original_c [rewritten as 3:cdbce2fbb163 |
|
|
162 | 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350] | |
|
163 | 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9] | |
|
164 | 2:245bde4270cd (draft *obsolete*) [ ] add original_c [rewritten as 3:cdbce2fbb163] | |
|
165 | 165 | |
|
166 | 166 | |
|
167 | 167 | check that summary does not report them |
|
168 | 168 | |
|
169 | 169 | $ hg init ../sink |
|
170 | 170 | $ echo '[paths]' >> .hg/hgrc |
|
171 | 171 | $ echo 'default=../sink' >> .hg/hgrc |
|
172 | 172 | $ hg summary --remote |
|
173 | 173 | parent: 5:5601fb93a350 tip |
|
174 | 174 | add new_3_c |
|
175 | 175 | branch: default |
|
176 | 176 | commit: (clean) |
|
177 | 177 | update: (current) |
|
178 | 178 | phases: 3 draft |
|
179 | 179 | remote: 3 outgoing |
|
180 | 180 | |
|
181 | 181 | $ hg summary --remote --hidden |
|
182 | 182 | parent: 5:5601fb93a350 tip |
|
183 | 183 | add new_3_c |
|
184 | 184 | branch: default |
|
185 | 185 | commit: (clean) |
|
186 | 186 | update: 3 new changesets, 4 branch heads (merge) |
|
187 | 187 | phases: 6 draft |
|
188 | 188 | remote: 3 outgoing |
|
189 | 189 | |
|
190 | 190 | check that various commands work well with filtering |
|
191 | 191 | |
|
192 | 192 | $ hg tip |
|
193 | 193 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
194 | 194 | $ hg log -r 6 |
|
195 | 195 | abort: unknown revision '6'! |
|
196 | 196 | [255] |
|
197 | 197 | $ hg log -r 4 |
|
198 | 198 | abort: hidden revision '4'! |
|
199 | 199 | (use --hidden to access hidden revisions) |
|
200 | 200 | [255] |
|
201 | 201 | $ hg debugrevspec 'rev(6)' |
|
202 | 202 | $ hg debugrevspec 'rev(4)' |
|
203 | 203 | $ hg debugrevspec 'null' |
|
204 | 204 | -1 |
|
205 | 205 | |
|
206 | 206 | Check that public changeset are not accounted as obsolete: |
|
207 | 207 | |
|
208 | 208 | $ hg --hidden phase --public 2 |
|
209 | 209 | $ hg log -G |
|
210 | 210 | @ 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c |
|
211 | 211 | | |
|
212 | 212 | | o 2:245bde4270cd (public) [ ] add original_c |
|
213 | 213 | |/ |
|
214 | 214 | o 1:7c3bad9141dc (public) [ ] add b |
|
215 | 215 | | |
|
216 | 216 | o 0:1f0dee641bb7 (public) [ ] add a |
|
217 | 217 | |
|
218 | 218 | |
|
219 | 219 | And that bumped changeset are detected |
|
220 | 220 | -------------------------------------- |
|
221 | 221 | |
|
222 | 222 | If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also |
|
223 | 223 | note that the bumped changeset (5:5601fb93a350) is not a direct successor of |
|
224 | 224 | the public changeset |
|
225 | 225 | |
|
226 | 226 | $ hg log --hidden -r 'phasedivergent()' |
|
227 | 227 | 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c |
|
228 | 228 | |
|
229 | 229 | And that we can't push bumped changeset |
|
230 | 230 | |
|
231 | 231 | $ hg push ../tmpa -r 0 --force #(make repo related) |
|
232 | 232 | pushing to ../tmpa |
|
233 | 233 | searching for changes |
|
234 | 234 | warning: repository is unrelated |
|
235 | 235 | adding changesets |
|
236 | 236 | adding manifests |
|
237 | 237 | adding file changes |
|
238 | 238 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
239 | 239 | $ hg push ../tmpa |
|
240 | 240 | pushing to ../tmpa |
|
241 | 241 | searching for changes |
|
242 | 242 | abort: push includes phase-divergent changeset: 5601fb93a350! |
|
243 | 243 | [255] |
|
244 | 244 | |
|
245 | 245 | Fixing "bumped" situation |
|
246 | 246 | We need to create a clone of 5 and add a special marker with a flag |
|
247 | 247 | |
|
248 | 248 | $ hg summary |
|
249 | 249 | parent: 5:5601fb93a350 tip (phase-divergent) |
|
250 | 250 | add new_3_c |
|
251 | 251 | branch: default |
|
252 | 252 | commit: (clean) |
|
253 | 253 | update: 1 new changesets, 2 branch heads (merge) |
|
254 | 254 | phases: 1 draft |
|
255 | 255 | phase-divergent: 1 changesets |
|
256 | 256 | $ hg up '5^' |
|
257 | 257 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
258 | 258 | $ hg revert -ar 5 |
|
259 | 259 | adding new_3_c |
|
260 | 260 | $ hg ci -m 'add n3w_3_c' |
|
261 | 261 | created new head |
|
262 | 262 | $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c` |
|
263 | 263 | obsoleted 1 changesets |
|
264 | 264 | $ hg log -r 'phasedivergent()' |
|
265 | 265 | $ hg log -G |
|
266 | 266 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
267 | 267 | | |
|
268 | 268 | | o 2:245bde4270cd (public) [ ] add original_c |
|
269 | 269 | |/ |
|
270 | 270 | o 1:7c3bad9141dc (public) [ ] add b |
|
271 | 271 | | |
|
272 | 272 | o 0:1f0dee641bb7 (public) [ ] add a |
|
273 | 273 | |
|
274 | 274 | |
|
275 | 275 | Basic exclusive testing |
|
276 | 276 | |
|
277 | 277 | $ hg log -G --hidden |
|
278 | 278 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
279 | 279 | | |
|
280 |
| x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072 |
|
|
280 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072] | |
|
281 | 281 | |/ |
|
282 |
| x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350 |
|
|
282 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350] | |
|
283 | 283 | |/ |
|
284 |
| x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9 |
|
|
284 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9] | |
|
285 | 285 | |/ |
|
286 | 286 | | o 2:245bde4270cd (public) [ ] add original_c |
|
287 | 287 | |/ |
|
288 | 288 | o 1:7c3bad9141dc (public) [ ] add b |
|
289 | 289 | | |
|
290 | 290 | o 0:1f0dee641bb7 (public) [ ] add a |
|
291 | 291 | |
|
292 | 292 | $ hg debugobsolete --rev 6f9641995072 |
|
293 | 293 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
294 | 294 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
295 | 295 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
296 | 296 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
297 | 297 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
298 | 298 | $ hg debugobsolete --rev 6f9641995072 --exclusive |
|
299 | 299 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
300 | 300 | $ hg debugobsolete --rev 5601fb93a350 --hidden |
|
301 | 301 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
302 | 302 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
303 | 303 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
304 | 304 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
305 | 305 | $ hg debugobsolete --rev 5601fb93a350 --hidden --exclusive |
|
306 | 306 | $ hg debugobsolete --rev 5601fb93a350+6f9641995072 --hidden --exclusive |
|
307 | 307 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
308 | 308 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
309 | 309 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
310 | 310 | |
|
311 | 311 | $ cd .. |
|
312 | 312 | |
|
313 | 313 | Revision 0 is hidden |
|
314 | 314 | -------------------- |
|
315 | 315 | |
|
316 | 316 | $ hg init rev0hidden |
|
317 | 317 | $ cd rev0hidden |
|
318 | 318 | |
|
319 | 319 | $ mkcommit kill0 |
|
320 | 320 | $ hg up -q null |
|
321 | 321 | $ hg debugobsolete `getid kill0` |
|
322 | 322 | obsoleted 1 changesets |
|
323 | 323 | $ mkcommit a |
|
324 | 324 | $ mkcommit b |
|
325 | 325 | |
|
326 | 326 | Should pick the first visible revision as "repo" node |
|
327 | 327 | |
|
328 | 328 | $ hg archive ../archive-null |
|
329 | 329 | $ cat ../archive-null/.hg_archival.txt |
|
330 | 330 | repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e |
|
331 | 331 | node: 7c3bad9141dcb46ff89abf5f61856facd56e476c |
|
332 | 332 | branch: default |
|
333 | 333 | latesttag: null |
|
334 | 334 | latesttagdistance: 2 |
|
335 | 335 | changessincelatesttag: 2 |
|
336 | 336 | |
|
337 | 337 | |
|
338 | 338 | $ cd .. |
|
339 | 339 | |
|
340 | 340 | Exchange Test |
|
341 | 341 | ============================ |
|
342 | 342 | |
|
343 | 343 | Destination repo does not have any data |
|
344 | 344 | --------------------------------------- |
|
345 | 345 | |
|
346 | 346 | Simple incoming test |
|
347 | 347 | |
|
348 | 348 | $ hg init tmpc |
|
349 | 349 | $ cd tmpc |
|
350 | 350 | $ hg incoming ../tmpb |
|
351 | 351 | comparing with ../tmpb |
|
352 | 352 | 0:1f0dee641bb7 (public) [ ] add a |
|
353 | 353 | 1:7c3bad9141dc (public) [ ] add b |
|
354 | 354 | 2:245bde4270cd (public) [ ] add original_c |
|
355 | 355 | 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
356 | 356 | |
|
357 | 357 | Try to pull markers |
|
358 | 358 | (extinct changeset are excluded but marker are pushed) |
|
359 | 359 | |
|
360 | 360 | $ hg pull ../tmpb |
|
361 | 361 | pulling from ../tmpb |
|
362 | 362 | requesting all changes |
|
363 | 363 | adding changesets |
|
364 | 364 | adding manifests |
|
365 | 365 | adding file changes |
|
366 | 366 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
367 | 367 | 5 new obsolescence markers |
|
368 | 368 | new changesets 1f0dee641bb7:6f9641995072 |
|
369 | 369 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
370 | 370 | $ hg debugobsolete |
|
371 | 371 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
372 | 372 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
373 | 373 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
374 | 374 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
375 | 375 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
376 | 376 | |
|
377 | 377 | Rollback//Transaction support |
|
378 | 378 | |
|
379 | 379 | $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
|
380 | 380 | $ hg debugobsolete |
|
381 | 381 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
382 | 382 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
383 | 383 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
384 | 384 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
385 | 385 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
386 | 386 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'} |
|
387 | 387 | $ hg rollback -n |
|
388 | 388 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
389 | 389 | $ hg rollback |
|
390 | 390 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
391 | 391 | $ hg debugobsolete |
|
392 | 392 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
393 | 393 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
394 | 394 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
395 | 395 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
396 | 396 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
397 | 397 | |
|
398 | 398 | $ cd .. |
|
399 | 399 | |
|
400 | 400 | Try to push markers |
|
401 | 401 | |
|
402 | 402 | $ hg init tmpd |
|
403 | 403 | $ hg -R tmpb push tmpd |
|
404 | 404 | pushing to tmpd |
|
405 | 405 | searching for changes |
|
406 | 406 | adding changesets |
|
407 | 407 | adding manifests |
|
408 | 408 | adding file changes |
|
409 | 409 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
410 | 410 | 5 new obsolescence markers |
|
411 | 411 | $ hg -R tmpd debugobsolete | sort |
|
412 | 412 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
413 | 413 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
414 | 414 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
415 | 415 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
416 | 416 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
417 | 417 | |
|
418 | 418 | Check obsolete keys are exchanged only if source has an obsolete store |
|
419 | 419 | |
|
420 | 420 | $ hg init empty |
|
421 | 421 | $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd |
|
422 | 422 | pushing to tmpd |
|
423 | 423 | listkeys phases |
|
424 | 424 | listkeys bookmarks |
|
425 | 425 | no changes found |
|
426 | 426 | listkeys phases |
|
427 | 427 | [1] |
|
428 | 428 | |
|
429 | 429 | clone support |
|
430 | 430 | (markers are copied and extinct changesets are included to allow hardlinks) |
|
431 | 431 | |
|
432 | 432 | $ hg clone tmpb clone-dest |
|
433 | 433 | updating to branch default |
|
434 | 434 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
435 | 435 | $ hg -R clone-dest log -G --hidden |
|
436 | 436 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
437 | 437 | | |
|
438 |
| x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072 |
|
|
438 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072] | |
|
439 | 439 | |/ |
|
440 |
| x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350 |
|
|
440 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350] | |
|
441 | 441 | |/ |
|
442 |
| x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9 |
|
|
442 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9] | |
|
443 | 443 | |/ |
|
444 | 444 | | o 2:245bde4270cd (public) [ ] add original_c |
|
445 | 445 | |/ |
|
446 | 446 | o 1:7c3bad9141dc (public) [ ] add b |
|
447 | 447 | | |
|
448 | 448 | o 0:1f0dee641bb7 (public) [ ] add a |
|
449 | 449 | |
|
450 | 450 | $ hg -R clone-dest debugobsolete |
|
451 | 451 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
452 | 452 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
453 | 453 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
454 | 454 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
455 | 455 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
456 | 456 | |
|
457 | 457 | |
|
458 | 458 | Destination repo have existing data |
|
459 | 459 | --------------------------------------- |
|
460 | 460 | |
|
461 | 461 | On pull |
|
462 | 462 | |
|
463 | 463 | $ hg init tmpe |
|
464 | 464 | $ cd tmpe |
|
465 | 465 | $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 |
|
466 | 466 | $ hg pull ../tmpb |
|
467 | 467 | pulling from ../tmpb |
|
468 | 468 | requesting all changes |
|
469 | 469 | adding changesets |
|
470 | 470 | adding manifests |
|
471 | 471 | adding file changes |
|
472 | 472 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
473 | 473 | 5 new obsolescence markers |
|
474 | 474 | new changesets 1f0dee641bb7:6f9641995072 |
|
475 | 475 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
476 | 476 | $ hg debugobsolete |
|
477 | 477 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
478 | 478 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
479 | 479 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
480 | 480 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
481 | 481 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
482 | 482 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
483 | 483 | |
|
484 | 484 | |
|
485 | 485 | On push |
|
486 | 486 | |
|
487 | 487 | $ hg push ../tmpc |
|
488 | 488 | pushing to ../tmpc |
|
489 | 489 | searching for changes |
|
490 | 490 | no changes found |
|
491 | 491 | 1 new obsolescence markers |
|
492 | 492 | [1] |
|
493 | 493 | $ hg -R ../tmpc debugobsolete |
|
494 | 494 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
495 | 495 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
496 | 496 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
497 | 497 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
498 | 498 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
499 | 499 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
500 | 500 | |
|
501 | 501 | detect outgoing obsolete and unstable |
|
502 | 502 | --------------------------------------- |
|
503 | 503 | |
|
504 | 504 | |
|
505 | 505 | $ hg log -G |
|
506 | 506 | o 3:6f9641995072 (draft) [tip ] add n3w_3_c |
|
507 | 507 | | |
|
508 | 508 | | o 2:245bde4270cd (public) [ ] add original_c |
|
509 | 509 | |/ |
|
510 | 510 | o 1:7c3bad9141dc (public) [ ] add b |
|
511 | 511 | | |
|
512 | 512 | o 0:1f0dee641bb7 (public) [ ] add a |
|
513 | 513 | |
|
514 | 514 | $ hg up 'desc("n3w_3_c")' |
|
515 | 515 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
516 | 516 | $ mkcommit original_d |
|
517 | 517 | $ mkcommit original_e |
|
518 | 518 | $ hg debugobsolete --record-parents `getid original_d` -d '0 0' |
|
519 | 519 | obsoleted 1 changesets |
|
520 | 520 | $ hg debugobsolete | grep `getid original_d` |
|
521 | 521 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
522 | 522 | $ hg log -r 'obsolete()' |
|
523 |
4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned |
|
|
523 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] | |
|
524 | 524 | $ hg summary |
|
525 | 525 | parent: 5:cda648ca50f5 tip (orphan) |
|
526 | 526 | add original_e |
|
527 | 527 | branch: default |
|
528 | 528 | commit: (clean) |
|
529 | 529 | update: 1 new changesets, 2 branch heads (merge) |
|
530 | 530 | phases: 3 draft |
|
531 | 531 | orphan: 1 changesets |
|
532 | 532 | $ hg log -G -r '::orphan()' |
|
533 | 533 | @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e |
|
534 | 534 | | |
|
535 |
x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned |
|
|
535 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] | |
|
536 | 536 | | |
|
537 | 537 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
538 | 538 | | |
|
539 | 539 | o 1:7c3bad9141dc (public) [ ] add b |
|
540 | 540 | | |
|
541 | 541 | o 0:1f0dee641bb7 (public) [ ] add a |
|
542 | 542 | |
|
543 | 543 | |
|
544 | 544 | refuse to push obsolete changeset |
|
545 | 545 | |
|
546 | 546 | $ hg push ../tmpc/ -r 'desc("original_d")' |
|
547 | 547 | pushing to ../tmpc/ |
|
548 | 548 | searching for changes |
|
549 | 549 | abort: push includes obsolete changeset: 94b33453f93b! |
|
550 | 550 | [255] |
|
551 | 551 | |
|
552 | 552 | refuse to push unstable changeset |
|
553 | 553 | |
|
554 | 554 | $ hg push ../tmpc/ |
|
555 | 555 | pushing to ../tmpc/ |
|
556 | 556 | searching for changes |
|
557 | 557 | abort: push includes orphan changeset: cda648ca50f5! |
|
558 | 558 | [255] |
|
559 | 559 | |
|
560 | 560 | Test that extinct changeset are properly detected |
|
561 | 561 | |
|
562 | 562 | $ hg log -r 'extinct()' |
|
563 | 563 | |
|
564 | 564 | Don't try to push extinct changeset |
|
565 | 565 | |
|
566 | 566 | $ hg init ../tmpf |
|
567 | 567 | $ hg out ../tmpf |
|
568 | 568 | comparing with ../tmpf |
|
569 | 569 | searching for changes |
|
570 | 570 | 0:1f0dee641bb7 (public) [ ] add a |
|
571 | 571 | 1:7c3bad9141dc (public) [ ] add b |
|
572 | 572 | 2:245bde4270cd (public) [ ] add original_c |
|
573 | 573 | 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
574 |
4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned |
|
|
574 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] | |
|
575 | 575 | 5:cda648ca50f5 (draft orphan) [tip ] add original_e |
|
576 | 576 | $ hg push ../tmpf -f # -f because be push unstable too |
|
577 | 577 | pushing to ../tmpf |
|
578 | 578 | searching for changes |
|
579 | 579 | adding changesets |
|
580 | 580 | adding manifests |
|
581 | 581 | adding file changes |
|
582 | 582 | added 6 changesets with 6 changes to 6 files (+1 heads) |
|
583 | 583 | 7 new obsolescence markers |
|
584 | 584 | |
|
585 | 585 | no warning displayed |
|
586 | 586 | |
|
587 | 587 | $ hg push ../tmpf |
|
588 | 588 | pushing to ../tmpf |
|
589 | 589 | searching for changes |
|
590 | 590 | no changes found |
|
591 | 591 | [1] |
|
592 | 592 | |
|
593 | 593 | Do not warn about new head when the new head is a successors of a remote one |
|
594 | 594 | |
|
595 | 595 | $ hg log -G |
|
596 | 596 | @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e |
|
597 | 597 | | |
|
598 |
x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned |
|
|
598 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] | |
|
599 | 599 | | |
|
600 | 600 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
601 | 601 | | |
|
602 | 602 | | o 2:245bde4270cd (public) [ ] add original_c |
|
603 | 603 | |/ |
|
604 | 604 | o 1:7c3bad9141dc (public) [ ] add b |
|
605 | 605 | | |
|
606 | 606 | o 0:1f0dee641bb7 (public) [ ] add a |
|
607 | 607 | |
|
608 | 608 | $ hg up -q 'desc(n3w_3_c)' |
|
609 | 609 | $ mkcommit obsolete_e |
|
610 | 610 | created new head |
|
611 | 611 | $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` \ |
|
612 | 612 | > -u 'test <test@example.net>' |
|
613 | 613 | obsoleted 1 changesets |
|
614 | 614 | $ hg outgoing ../tmpf # parasite hg outgoing testin |
|
615 | 615 | comparing with ../tmpf |
|
616 | 616 | searching for changes |
|
617 | 617 | 6:3de5eca88c00 (draft) [tip ] add obsolete_e |
|
618 | 618 | $ hg push ../tmpf |
|
619 | 619 | pushing to ../tmpf |
|
620 | 620 | searching for changes |
|
621 | 621 | adding changesets |
|
622 | 622 | adding manifests |
|
623 | 623 | adding file changes |
|
624 | 624 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
625 | 625 | 1 new obsolescence markers |
|
626 | 626 | obsoleted 1 changesets |
|
627 | 627 | |
|
628 | 628 | test relevance computation |
|
629 | 629 | --------------------------------------- |
|
630 | 630 | |
|
631 | 631 | Checking simple case of "marker relevance". |
|
632 | 632 | |
|
633 | 633 | |
|
634 | 634 | Reminder of the repo situation |
|
635 | 635 | |
|
636 | 636 | $ hg log --hidden --graph |
|
637 | 637 | @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e |
|
638 | 638 | | |
|
639 |
| x 5:cda648ca50f5 (draft *obsolete*) [ ] add original_e [rewritten as 6:3de5eca88c00 by test <test@example.net> |
|
|
639 | | x 5:cda648ca50f5 (draft *obsolete*) [ ] add original_e [rewritten as 6:3de5eca88c00 by test <test@example.net>] | |
|
640 | 640 | | | |
|
641 |
| x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned |
|
|
641 | | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] | |
|
642 | 642 | |/ |
|
643 | 643 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
644 | 644 | | |
|
645 | 645 | | o 2:245bde4270cd (public) [ ] add original_c |
|
646 | 646 | |/ |
|
647 | 647 | o 1:7c3bad9141dc (public) [ ] add b |
|
648 | 648 | | |
|
649 | 649 | o 0:1f0dee641bb7 (public) [ ] add a |
|
650 | 650 | |
|
651 | 651 | |
|
652 | 652 | List of all markers |
|
653 | 653 | |
|
654 | 654 | $ hg debugobsolete |
|
655 | 655 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
656 | 656 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
657 | 657 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
658 | 658 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
659 | 659 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
660 | 660 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
661 | 661 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
662 | 662 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) |
|
663 | 663 | |
|
664 | 664 | List of changesets with no chain |
|
665 | 665 | |
|
666 | 666 | $ hg debugobsolete --hidden --rev ::2 |
|
667 | 667 | |
|
668 | 668 | List of changesets that are included on marker chain |
|
669 | 669 | |
|
670 | 670 | $ hg debugobsolete --hidden --rev 6 |
|
671 | 671 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) |
|
672 | 672 | |
|
673 | 673 | List of changesets with a longer chain, (including a pruned children) |
|
674 | 674 | |
|
675 | 675 | $ hg debugobsolete --hidden --rev 3 |
|
676 | 676 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
677 | 677 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
678 | 678 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
679 | 679 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
680 | 680 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
681 | 681 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
682 | 682 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
683 | 683 | |
|
684 | 684 | List of both |
|
685 | 685 | |
|
686 | 686 | $ hg debugobsolete --hidden --rev 3::6 |
|
687 | 687 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
688 | 688 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
689 | 689 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
690 | 690 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
691 | 691 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
692 | 692 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
693 | 693 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) |
|
694 | 694 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
695 | 695 | |
|
696 | 696 | List of all markers in JSON |
|
697 | 697 | |
|
698 | 698 | $ hg debugobsolete -Tjson |
|
699 | 699 | [ |
|
700 | 700 | { |
|
701 | 701 | "date": [1339.0, 0], |
|
702 | 702 | "flag": 0, |
|
703 | 703 | "metadata": {"user": "test"}, |
|
704 | 704 | "prednode": "1339133913391339133913391339133913391339", |
|
705 | 705 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] |
|
706 | 706 | }, |
|
707 | 707 | { |
|
708 | 708 | "date": [1339.0, 0], |
|
709 | 709 | "flag": 0, |
|
710 | 710 | "metadata": {"user": "test"}, |
|
711 | 711 | "prednode": "1337133713371337133713371337133713371337", |
|
712 | 712 | "succnodes": ["5601fb93a350734d935195fee37f4054c529ff39"] |
|
713 | 713 | }, |
|
714 | 714 | { |
|
715 | 715 | "date": [121.0, 120], |
|
716 | 716 | "flag": 12, |
|
717 | 717 | "metadata": {"user": "test"}, |
|
718 | 718 | "prednode": "245bde4270cd1072a27757984f9cda8ba26f08ca", |
|
719 | 719 | "succnodes": ["cdbce2fbb16313928851e97e0d85413f3f7eb77f"] |
|
720 | 720 | }, |
|
721 | 721 | { |
|
722 | 722 | "date": [1338.0, 0], |
|
723 | 723 | "flag": 1, |
|
724 | 724 | "metadata": {"user": "test"}, |
|
725 | 725 | "prednode": "5601fb93a350734d935195fee37f4054c529ff39", |
|
726 | 726 | "succnodes": ["6f96419950729f3671185b847352890f074f7557"] |
|
727 | 727 | }, |
|
728 | 728 | { |
|
729 | 729 | "date": [1338.0, 0], |
|
730 | 730 | "flag": 0, |
|
731 | 731 | "metadata": {"user": "test"}, |
|
732 | 732 | "prednode": "ca819180edb99ed25ceafb3e9584ac287e240b00", |
|
733 | 733 | "succnodes": ["1337133713371337133713371337133713371337"] |
|
734 | 734 | }, |
|
735 | 735 | { |
|
736 | 736 | "date": [1337.0, 0], |
|
737 | 737 | "flag": 0, |
|
738 | 738 | "metadata": {"user": "test"}, |
|
739 | 739 | "prednode": "cdbce2fbb16313928851e97e0d85413f3f7eb77f", |
|
740 | 740 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] |
|
741 | 741 | }, |
|
742 | 742 | { |
|
743 | 743 | "date": [0.0, 0], |
|
744 | 744 | "flag": 0, |
|
745 | 745 | "metadata": {"user": "test"}, |
|
746 | 746 | "parentnodes": ["6f96419950729f3671185b847352890f074f7557"], |
|
747 | 747 | "prednode": "94b33453f93bdb8d457ef9b770851a618bf413e1", |
|
748 | 748 | "succnodes": [] |
|
749 | 749 | }, |
|
750 | 750 | { |
|
751 | 751 | "date": *, (glob) |
|
752 | 752 | "flag": 0, |
|
753 | 753 | "metadata": {"user": "test <test@example.net>"}, |
|
754 | 754 | "prednode": "cda648ca50f50482b7055c0b0c4c117bba6733d9", |
|
755 | 755 | "succnodes": ["3de5eca88c00aa039da7399a220f4a5221faa585"] |
|
756 | 756 | } |
|
757 | 757 | ] |
|
758 | 758 | |
|
759 | 759 | Template keywords |
|
760 | 760 | |
|
761 | 761 | $ hg debugobsolete -r6 -T '{succnodes % "{node|short}"} {date|shortdate}\n' |
|
762 | 762 | 3de5eca88c00 ????-??-?? (glob) |
|
763 | 763 | $ hg debugobsolete -r6 -T '{join(metadata % "{key}={value}", " ")}\n' |
|
764 | 764 | user=test <test@example.net> |
|
765 | 765 | $ hg debugobsolete -r6 -T '{metadata}\n{metadata}\n' |
|
766 | 766 | 'user': 'test <test@example.net>' |
|
767 | 767 | 'user': 'test <test@example.net>' |
|
768 | 768 | $ hg debugobsolete -r6 -T '{succnodes}\n{succnodes}\n' |
|
769 | 769 | 3de5eca88c00aa039da7399a220f4a5221faa585 |
|
770 | 770 | 3de5eca88c00aa039da7399a220f4a5221faa585 |
|
771 | 771 | $ hg debugobsolete -r6 -T '{flag} {get(metadata, "user")}\n' |
|
772 | 772 | 0 test <test@example.net> |
|
773 | 773 | |
|
774 | 774 | Test the debug output for exchange |
|
775 | 775 | ---------------------------------- |
|
776 | 776 | |
|
777 | 777 | $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' # bundle2 |
|
778 | 778 | pulling from ../tmpb |
|
779 | 779 | searching for changes |
|
780 | 780 | no changes found |
|
781 | 781 | obsmarker-exchange: 346 bytes received |
|
782 | 782 | |
|
783 | 783 | check hgweb does not explode |
|
784 | 784 | ==================================== |
|
785 | 785 | |
|
786 | 786 | $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg |
|
787 | 787 | adding changesets |
|
788 | 788 | adding manifests |
|
789 | 789 | adding file changes |
|
790 | 790 | added 62 changesets with 63 changes to 9 files (+60 heads) |
|
791 | 791 | new changesets 50c51b361e60:c15e9edfca13 |
|
792 | 792 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
793 | 793 | $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`; |
|
794 | 794 | > do |
|
795 | 795 | > hg debugobsolete $node |
|
796 | 796 | > done |
|
797 | 797 | obsoleted 1 changesets |
|
798 | 798 | obsoleted 1 changesets |
|
799 | 799 | obsoleted 1 changesets |
|
800 | 800 | obsoleted 1 changesets |
|
801 | 801 | obsoleted 1 changesets |
|
802 | 802 | obsoleted 1 changesets |
|
803 | 803 | obsoleted 1 changesets |
|
804 | 804 | obsoleted 1 changesets |
|
805 | 805 | obsoleted 1 changesets |
|
806 | 806 | obsoleted 1 changesets |
|
807 | 807 | obsoleted 1 changesets |
|
808 | 808 | obsoleted 1 changesets |
|
809 | 809 | obsoleted 1 changesets |
|
810 | 810 | obsoleted 1 changesets |
|
811 | 811 | obsoleted 1 changesets |
|
812 | 812 | obsoleted 1 changesets |
|
813 | 813 | obsoleted 1 changesets |
|
814 | 814 | obsoleted 1 changesets |
|
815 | 815 | obsoleted 1 changesets |
|
816 | 816 | obsoleted 1 changesets |
|
817 | 817 | obsoleted 1 changesets |
|
818 | 818 | obsoleted 1 changesets |
|
819 | 819 | obsoleted 1 changesets |
|
820 | 820 | obsoleted 1 changesets |
|
821 | 821 | obsoleted 1 changesets |
|
822 | 822 | obsoleted 1 changesets |
|
823 | 823 | obsoleted 1 changesets |
|
824 | 824 | obsoleted 1 changesets |
|
825 | 825 | obsoleted 1 changesets |
|
826 | 826 | obsoleted 1 changesets |
|
827 | 827 | obsoleted 1 changesets |
|
828 | 828 | obsoleted 1 changesets |
|
829 | 829 | obsoleted 1 changesets |
|
830 | 830 | obsoleted 1 changesets |
|
831 | 831 | obsoleted 1 changesets |
|
832 | 832 | obsoleted 1 changesets |
|
833 | 833 | obsoleted 1 changesets |
|
834 | 834 | obsoleted 1 changesets |
|
835 | 835 | obsoleted 1 changesets |
|
836 | 836 | obsoleted 1 changesets |
|
837 | 837 | obsoleted 1 changesets |
|
838 | 838 | obsoleted 1 changesets |
|
839 | 839 | obsoleted 1 changesets |
|
840 | 840 | obsoleted 1 changesets |
|
841 | 841 | obsoleted 1 changesets |
|
842 | 842 | obsoleted 1 changesets |
|
843 | 843 | obsoleted 1 changesets |
|
844 | 844 | obsoleted 1 changesets |
|
845 | 845 | obsoleted 1 changesets |
|
846 | 846 | obsoleted 1 changesets |
|
847 | 847 | obsoleted 1 changesets |
|
848 | 848 | obsoleted 1 changesets |
|
849 | 849 | obsoleted 1 changesets |
|
850 | 850 | obsoleted 1 changesets |
|
851 | 851 | obsoleted 1 changesets |
|
852 | 852 | obsoleted 1 changesets |
|
853 | 853 | obsoleted 1 changesets |
|
854 | 854 | obsoleted 1 changesets |
|
855 | 855 | obsoleted 1 changesets |
|
856 | 856 | obsoleted 1 changesets |
|
857 | 857 | $ hg up tip |
|
858 | 858 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
859 | 859 | |
|
860 | 860 | #if serve |
|
861 | 861 | |
|
862 | 862 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
863 | 863 | $ cat hg.pid >> $DAEMON_PIDS |
|
864 | 864 | |
|
865 | 865 | check changelog view |
|
866 | 866 | |
|
867 | 867 | $ get-with-headers.py --headeronly localhost:$HGPORT 'shortlog/' |
|
868 | 868 | 200 Script output follows |
|
869 | 869 | |
|
870 | 870 | check graph view |
|
871 | 871 | |
|
872 | 872 | $ get-with-headers.py --headeronly localhost:$HGPORT 'graph' |
|
873 | 873 | 200 Script output follows |
|
874 | 874 | |
|
875 | 875 | check filelog view |
|
876 | 876 | |
|
877 | 877 | $ get-with-headers.py --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar' |
|
878 | 878 | 200 Script output follows |
|
879 | 879 | |
|
880 | 880 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/68' |
|
881 | 881 | 200 Script output follows |
|
882 | 882 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' |
|
883 | 883 | 404 Not Found |
|
884 | 884 | [1] |
|
885 | 885 | |
|
886 | 886 | check that web.view config option: |
|
887 | 887 | |
|
888 | 888 | $ killdaemons.py hg.pid |
|
889 | 889 | $ cat >> .hg/hgrc << EOF |
|
890 | 890 | > [web] |
|
891 | 891 | > view=all |
|
892 | 892 | > EOF |
|
893 | 893 | $ wait |
|
894 | 894 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
895 | 895 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' |
|
896 | 896 | 200 Script output follows |
|
897 | 897 | $ killdaemons.py hg.pid |
|
898 | 898 | |
|
899 | 899 | Checking _enable=False warning if obsolete marker exists |
|
900 | 900 | |
|
901 | 901 | $ echo '[experimental]' >> $HGRCPATH |
|
902 | 902 | $ echo "stabilization=" >> $HGRCPATH |
|
903 | 903 | $ hg log -r tip |
|
904 | 904 | obsolete feature not enabled but 68 markers found! |
|
905 | 905 | 68:c15e9edfca13 (draft) [tip ] add celestine |
|
906 | 906 | |
|
907 | 907 | reenable for later test |
|
908 | 908 | |
|
909 | 909 | $ echo '[experimental]' >> $HGRCPATH |
|
910 | 910 | $ echo "stabilization=createmarkers,exchange" >> $HGRCPATH |
|
911 | 911 | |
|
912 | 912 | $ rm hg.pid access.log errors.log |
|
913 | 913 | #endif |
|
914 | 914 | |
|
915 | 915 | Several troubles on the same changeset (create an unstable and bumped changeset) |
|
916 | 916 | |
|
917 | 917 | $ hg debugobsolete `getid obsolete_e` |
|
918 | 918 | obsoleted 1 changesets |
|
919 | 919 | $ hg debugobsolete `getid original_c` `getid babar` |
|
920 | 920 | $ hg log --config ui.logtemplate= -r 'phasedivergent() and orphan()' |
|
921 | 921 | changeset: 7:50c51b361e60 |
|
922 | 922 | user: test |
|
923 | 923 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
924 | 924 | instability: orphan, phase-divergent |
|
925 | 925 | summary: add babar |
|
926 | 926 | |
|
927 | 927 | |
|
928 | 928 | test the "obsolete" templatekw |
|
929 | 929 | |
|
930 | 930 | $ hg log -r 'obsolete()' |
|
931 |
6:3de5eca88c00 (draft *obsolete*) [ ] add obsolete_e [pruned |
|
|
931 | 6:3de5eca88c00 (draft *obsolete*) [ ] add obsolete_e [pruned] | |
|
932 | 932 | |
|
933 | 933 | test the "troubles" templatekw |
|
934 | 934 | |
|
935 | 935 | $ hg log -r 'phasedivergent() and orphan()' |
|
936 | 936 | 7:50c51b361e60 (draft orphan phase-divergent) [ ] add babar |
|
937 | 937 | |
|
938 | 938 | test the default cmdline template |
|
939 | 939 | |
|
940 | 940 | $ hg log -T default -r 'phasedivergent()' |
|
941 | 941 | changeset: 7:50c51b361e60 |
|
942 | 942 | user: test |
|
943 | 943 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
944 | 944 | instability: orphan, phase-divergent |
|
945 | 945 | summary: add babar |
|
946 | 946 | |
|
947 | 947 | $ hg log -T default -r 'obsolete()' |
|
948 | 948 | changeset: 6:3de5eca88c00 |
|
949 | 949 | parent: 3:6f9641995072 |
|
950 | 950 | user: test |
|
951 | 951 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
952 | 952 | summary: add obsolete_e |
|
953 | 953 | |
|
954 | 954 | |
|
955 | 955 | test the obsolete labels |
|
956 | 956 | |
|
957 | 957 | $ hg log --config ui.logtemplate= --color=debug -r 'phasedivergent()' |
|
958 | 958 | [log.changeset changeset.draft changeset.unstable instability.orphan instability.phase-divergent|changeset: 7:50c51b361e60] |
|
959 | 959 | [log.user|user: test] |
|
960 | 960 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
961 | 961 | [log.instability|instability: orphan, phase-divergent] |
|
962 | 962 | [log.summary|summary: add babar] |
|
963 | 963 | |
|
964 | 964 | |
|
965 | 965 | $ hg log -T default -r 'phasedivergent()' --color=debug |
|
966 | 966 | [log.changeset changeset.draft changeset.unstable instability.orphan instability.phase-divergent|changeset: 7:50c51b361e60] |
|
967 | 967 | [log.user|user: test] |
|
968 | 968 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
969 | 969 | [log.instability|instability: orphan, phase-divergent] |
|
970 | 970 | [log.summary|summary: add babar] |
|
971 | 971 | |
|
972 | 972 | |
|
973 | 973 | $ hg log --config ui.logtemplate= --color=debug -r "obsolete()" |
|
974 | 974 | [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00] |
|
975 | 975 | [log.parent changeset.draft|parent: 3:6f9641995072] |
|
976 | 976 | [log.user|user: test] |
|
977 | 977 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
978 | 978 | [log.summary|summary: add obsolete_e] |
|
979 | 979 | |
|
980 | 980 | |
|
981 | 981 | $ hg log -T default -r 'obsolete()' --color=debug |
|
982 | 982 | [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00] |
|
983 | 983 | [log.parent changeset.draft|parent: 3:6f9641995072] |
|
984 | 984 | [log.user|user: test] |
|
985 | 985 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
986 | 986 | [log.summary|summary: add obsolete_e] |
|
987 | 987 | |
|
988 | 988 | |
|
989 | 989 | test summary output |
|
990 | 990 | |
|
991 | 991 | $ hg up -r 'phasedivergent() and orphan()' |
|
992 | 992 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
993 | 993 | $ hg summary |
|
994 | 994 | parent: 7:50c51b361e60 (orphan, phase-divergent) |
|
995 | 995 | add babar |
|
996 | 996 | branch: default |
|
997 | 997 | commit: (clean) |
|
998 | 998 | update: 2 new changesets (update) |
|
999 | 999 | phases: 4 draft |
|
1000 | 1000 | orphan: 2 changesets |
|
1001 | 1001 | phase-divergent: 1 changesets |
|
1002 | 1002 | $ hg up -r 'obsolete()' |
|
1003 | 1003 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1004 | 1004 | $ hg summary |
|
1005 | 1005 | parent: 6:3de5eca88c00 (obsolete) |
|
1006 | 1006 | add obsolete_e |
|
1007 | 1007 | branch: default |
|
1008 | 1008 | commit: (clean) |
|
1009 | 1009 | update: 3 new changesets (update) |
|
1010 | 1010 | phases: 4 draft |
|
1011 | 1011 | orphan: 2 changesets |
|
1012 | 1012 | phase-divergent: 1 changesets |
|
1013 | 1013 | |
|
1014 | 1014 | Test incoming/outcoming with changesets obsoleted remotely, known locally |
|
1015 | 1015 | =============================================================================== |
|
1016 | 1016 | |
|
1017 | 1017 | This test issue 3805 |
|
1018 | 1018 | |
|
1019 | 1019 | $ hg init repo-issue3805 |
|
1020 | 1020 | $ cd repo-issue3805 |
|
1021 | 1021 | $ echo "base" > base |
|
1022 | 1022 | $ hg ci -Am "base" |
|
1023 | 1023 | adding base |
|
1024 | 1024 | $ echo "foo" > foo |
|
1025 | 1025 | $ hg ci -Am "A" |
|
1026 | 1026 | adding foo |
|
1027 | 1027 | $ hg clone . ../other-issue3805 |
|
1028 | 1028 | updating to branch default |
|
1029 | 1029 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1030 | 1030 | $ echo "bar" >> foo |
|
1031 | 1031 | $ hg ci --amend |
|
1032 | 1032 | $ cd ../other-issue3805 |
|
1033 | 1033 | $ hg log -G |
|
1034 | 1034 | @ 1:29f0c6921ddd (draft) [tip ] A |
|
1035 | 1035 | | |
|
1036 | 1036 | o 0:d20a80d4def3 (draft) [ ] base |
|
1037 | 1037 | |
|
1038 | 1038 | $ hg log -G -R ../repo-issue3805 |
|
1039 | 1039 | @ 2:323a9c3ddd91 (draft) [tip ] A |
|
1040 | 1040 | | |
|
1041 | 1041 | o 0:d20a80d4def3 (draft) [ ] base |
|
1042 | 1042 | |
|
1043 | 1043 | $ hg incoming |
|
1044 | 1044 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
1045 | 1045 | searching for changes |
|
1046 | 1046 | 2:323a9c3ddd91 (draft) [tip ] A |
|
1047 | 1047 | $ hg incoming --bundle ../issue3805.hg |
|
1048 | 1048 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
1049 | 1049 | searching for changes |
|
1050 | 1050 | 2:323a9c3ddd91 (draft) [tip ] A |
|
1051 | 1051 | $ hg outgoing |
|
1052 | 1052 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
1053 | 1053 | searching for changes |
|
1054 | 1054 | 1:29f0c6921ddd (draft) [tip ] A |
|
1055 | 1055 | |
|
1056 | 1056 | #if serve |
|
1057 | 1057 | |
|
1058 | 1058 | $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
1059 | 1059 | $ cat hg.pid >> $DAEMON_PIDS |
|
1060 | 1060 | |
|
1061 | 1061 | $ hg incoming http://localhost:$HGPORT |
|
1062 | 1062 | comparing with http://localhost:$HGPORT/ |
|
1063 | 1063 | searching for changes |
|
1064 | 1064 | 2:323a9c3ddd91 (draft) [tip ] A |
|
1065 | 1065 | $ hg outgoing http://localhost:$HGPORT |
|
1066 | 1066 | comparing with http://localhost:$HGPORT/ |
|
1067 | 1067 | searching for changes |
|
1068 | 1068 | 1:29f0c6921ddd (draft) [tip ] A |
|
1069 | 1069 | |
|
1070 | 1070 | $ killdaemons.py |
|
1071 | 1071 | |
|
1072 | 1072 | #endif |
|
1073 | 1073 | |
|
1074 | 1074 | This test issue 3814 |
|
1075 | 1075 | |
|
1076 | 1076 | (nothing to push but locally hidden changeset) |
|
1077 | 1077 | |
|
1078 | 1078 | $ cd .. |
|
1079 | 1079 | $ hg init repo-issue3814 |
|
1080 | 1080 | $ cd repo-issue3805 |
|
1081 | 1081 | $ hg push -r 323a9c3ddd91 ../repo-issue3814 |
|
1082 | 1082 | pushing to ../repo-issue3814 |
|
1083 | 1083 | searching for changes |
|
1084 | 1084 | adding changesets |
|
1085 | 1085 | adding manifests |
|
1086 | 1086 | adding file changes |
|
1087 | 1087 | added 2 changesets with 2 changes to 2 files |
|
1088 | 1088 | 1 new obsolescence markers |
|
1089 | 1089 | $ hg out ../repo-issue3814 |
|
1090 | 1090 | comparing with ../repo-issue3814 |
|
1091 | 1091 | searching for changes |
|
1092 | 1092 | no changes found |
|
1093 | 1093 | [1] |
|
1094 | 1094 | |
|
1095 | 1095 | Test that a local tag blocks a changeset from being hidden |
|
1096 | 1096 | |
|
1097 | 1097 | $ hg tag -l visible -r 1 --hidden |
|
1098 | 1098 | $ hg log -G |
|
1099 | 1099 | @ 2:323a9c3ddd91 (draft) [tip ] A |
|
1100 | 1100 | | |
|
1101 |
| x 1:29f0c6921ddd (draft *obsolete*) [visible ] A [rewritten using amend as 2:323a9c3ddd91 |
|
|
1101 | | x 1:29f0c6921ddd (draft *obsolete*) [visible ] A [rewritten using amend as 2:323a9c3ddd91] | |
|
1102 | 1102 | |/ |
|
1103 | 1103 | o 0:d20a80d4def3 (draft) [ ] base |
|
1104 | 1104 | |
|
1105 | 1105 | Test that removing a local tag does not cause some commands to fail |
|
1106 | 1106 | |
|
1107 | 1107 | $ hg tag -l -r tip tiptag |
|
1108 | 1108 | $ hg tags |
|
1109 | 1109 | tiptag 2:323a9c3ddd91 |
|
1110 | 1110 | tip 2:323a9c3ddd91 |
|
1111 | 1111 | visible 1:29f0c6921ddd |
|
1112 | 1112 | $ hg --config extensions.strip= strip -r tip --no-backup |
|
1113 | 1113 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1114 | 1114 | $ hg tags |
|
1115 | 1115 | visible 1:29f0c6921ddd |
|
1116 | 1116 | tip 1:29f0c6921ddd |
|
1117 | 1117 | |
|
1118 | 1118 | Test bundle overlay onto hidden revision |
|
1119 | 1119 | |
|
1120 | 1120 | $ cd .. |
|
1121 | 1121 | $ hg init repo-bundleoverlay |
|
1122 | 1122 | $ cd repo-bundleoverlay |
|
1123 | 1123 | $ echo "A" > foo |
|
1124 | 1124 | $ hg ci -Am "A" |
|
1125 | 1125 | adding foo |
|
1126 | 1126 | $ echo "B" >> foo |
|
1127 | 1127 | $ hg ci -m "B" |
|
1128 | 1128 | $ hg up 0 |
|
1129 | 1129 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1130 | 1130 | $ echo "C" >> foo |
|
1131 | 1131 | $ hg ci -m "C" |
|
1132 | 1132 | created new head |
|
1133 | 1133 | $ hg log -G |
|
1134 | 1134 | @ 2:c186d7714947 (draft) [tip ] C |
|
1135 | 1135 | | |
|
1136 | 1136 | | o 1:44526ebb0f98 (draft) [ ] B |
|
1137 | 1137 | |/ |
|
1138 | 1138 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1139 | 1139 | |
|
1140 | 1140 | |
|
1141 | 1141 | $ hg clone -r1 . ../other-bundleoverlay |
|
1142 | 1142 | adding changesets |
|
1143 | 1143 | adding manifests |
|
1144 | 1144 | adding file changes |
|
1145 | 1145 | added 2 changesets with 2 changes to 1 files |
|
1146 | 1146 | new changesets 4b34ecfb0d56:44526ebb0f98 |
|
1147 | 1147 | updating to branch default |
|
1148 | 1148 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1149 | 1149 | $ cd ../other-bundleoverlay |
|
1150 | 1150 | $ echo "B+" >> foo |
|
1151 | 1151 | $ hg ci --amend -m "B+" |
|
1152 | 1152 | $ hg log -G --hidden |
|
1153 | 1153 | @ 2:b7d587542d40 (draft) [tip ] B+ |
|
1154 | 1154 | | |
|
1155 |
| x 1:44526ebb0f98 (draft *obsolete*) [ ] B [rewritten using amend as 2:b7d587542d40 |
|
|
1155 | | x 1:44526ebb0f98 (draft *obsolete*) [ ] B [rewritten using amend as 2:b7d587542d40] | |
|
1156 | 1156 | |/ |
|
1157 | 1157 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1158 | 1158 | |
|
1159 | 1159 | |
|
1160 | 1160 | $ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg |
|
1161 | 1161 | comparing with ../repo-bundleoverlay |
|
1162 | 1162 | searching for changes |
|
1163 | 1163 | 1:44526ebb0f98 (draft) [ ] B |
|
1164 | 1164 | 2:c186d7714947 (draft) [tip ] C |
|
1165 | 1165 | $ hg log -G -R ../bundleoverlay.hg |
|
1166 | 1166 | o 3:c186d7714947 (draft) [tip ] C |
|
1167 | 1167 | | |
|
1168 | 1168 | | @ 2:b7d587542d40 (draft) [ ] B+ |
|
1169 | 1169 | |/ |
|
1170 | 1170 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1171 | 1171 | |
|
1172 | 1172 | |
|
1173 | 1173 | #if serve |
|
1174 | 1174 | |
|
1175 | 1175 | Test issue 4506 |
|
1176 | 1176 | |
|
1177 | 1177 | $ cd .. |
|
1178 | 1178 | $ hg init repo-issue4506 |
|
1179 | 1179 | $ cd repo-issue4506 |
|
1180 | 1180 | $ echo "0" > foo |
|
1181 | 1181 | $ hg add foo |
|
1182 | 1182 | $ hg ci -m "content-0" |
|
1183 | 1183 | |
|
1184 | 1184 | $ hg up null |
|
1185 | 1185 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1186 | 1186 | $ echo "1" > bar |
|
1187 | 1187 | $ hg add bar |
|
1188 | 1188 | $ hg ci -m "content-1" |
|
1189 | 1189 | created new head |
|
1190 | 1190 | $ hg up 0 |
|
1191 | 1191 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1192 | 1192 | $ hg graft 1 |
|
1193 | 1193 | grafting 1:1c9eddb02162 "content-1" (tip) |
|
1194 | 1194 | |
|
1195 | 1195 | $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'` |
|
1196 | 1196 | obsoleted 1 changesets |
|
1197 | 1197 | |
|
1198 | 1198 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
1199 | 1199 | $ cat hg.pid >> $DAEMON_PIDS |
|
1200 | 1200 | |
|
1201 | 1201 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1' |
|
1202 | 1202 | 404 Not Found |
|
1203 | 1203 | [1] |
|
1204 | 1204 | $ get-with-headers.py --headeronly localhost:$HGPORT 'file/tip/bar' |
|
1205 | 1205 | 200 Script output follows |
|
1206 | 1206 | $ get-with-headers.py --headeronly localhost:$HGPORT 'annotate/tip/bar' |
|
1207 | 1207 | 200 Script output follows |
|
1208 | 1208 | |
|
1209 | 1209 | $ killdaemons.py |
|
1210 | 1210 | |
|
1211 | 1211 | #endif |
|
1212 | 1212 | |
|
1213 | 1213 | Test heads computation on pending index changes with obsolescence markers |
|
1214 | 1214 | $ cd .. |
|
1215 | 1215 | $ cat >$TESTTMP/test_extension.py << EOF |
|
1216 | 1216 | > from __future__ import absolute_import |
|
1217 | 1217 | > from mercurial.i18n import _ |
|
1218 | 1218 | > from mercurial import cmdutil, registrar |
|
1219 | 1219 | > |
|
1220 | 1220 | > cmdtable = {} |
|
1221 | 1221 | > command = registrar.command(cmdtable) |
|
1222 | 1222 | > @command(b"amendtransient",[], _('hg amendtransient [rev]')) |
|
1223 | 1223 | > def amend(ui, repo, *pats, **opts): |
|
1224 | 1224 | > opts['message'] = 'Test' |
|
1225 | 1225 | > opts['logfile'] = None |
|
1226 | 1226 | > cmdutil.amend(ui, repo, repo['.'], {}, pats, opts) |
|
1227 | 1227 | > ui.write('%s\n' % repo.changelog.headrevs()) |
|
1228 | 1228 | > EOF |
|
1229 | 1229 | $ cat >> $HGRCPATH << EOF |
|
1230 | 1230 | > [extensions] |
|
1231 | 1231 | > testextension=$TESTTMP/test_extension.py |
|
1232 | 1232 | > EOF |
|
1233 | 1233 | $ hg init repo-issue-nativerevs-pending-changes |
|
1234 | 1234 | $ cd repo-issue-nativerevs-pending-changes |
|
1235 | 1235 | $ mkcommit a |
|
1236 | 1236 | $ mkcommit b |
|
1237 | 1237 | $ hg up ".^" |
|
1238 | 1238 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1239 | 1239 | $ echo aa > a |
|
1240 | 1240 | $ hg amendtransient |
|
1241 | 1241 | [1, 2] |
|
1242 | 1242 | |
|
1243 | 1243 | Test cache consistency for the visible filter |
|
1244 | 1244 | 1) We want to make sure that the cached filtered revs are invalidated when |
|
1245 | 1245 | bookmarks change |
|
1246 | 1246 | $ cd .. |
|
1247 | 1247 | $ cat >$TESTTMP/test_extension.py << EOF |
|
1248 | 1248 | > from __future__ import absolute_import, print_function |
|
1249 | 1249 | > import weakref |
|
1250 | 1250 | > from mercurial import ( |
|
1251 | 1251 | > bookmarks, |
|
1252 | 1252 | > cmdutil, |
|
1253 | 1253 | > extensions, |
|
1254 | 1254 | > repoview, |
|
1255 | 1255 | > ) |
|
1256 | 1256 | > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs): |
|
1257 | 1257 | > reporef = weakref.ref(bkmstoreinst._repo) |
|
1258 | 1258 | > def trhook(tr): |
|
1259 | 1259 | > repo = reporef() |
|
1260 | 1260 | > hidden1 = repoview.computehidden(repo) |
|
1261 | 1261 | > hidden = repoview.filterrevs(repo, 'visible') |
|
1262 | 1262 | > if sorted(hidden1) != sorted(hidden): |
|
1263 | 1263 | > print("cache inconsistency") |
|
1264 | 1264 | > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook) |
|
1265 | 1265 | > orig(bkmstoreinst, *args, **kwargs) |
|
1266 | 1266 | > def extsetup(ui): |
|
1267 | 1267 | > extensions.wrapfunction(bookmarks.bmstore, '_recordchange', |
|
1268 | 1268 | > _bookmarkchanged) |
|
1269 | 1269 | > EOF |
|
1270 | 1270 | |
|
1271 | 1271 | $ hg init repo-cache-inconsistency |
|
1272 | 1272 | $ cd repo-issue-nativerevs-pending-changes |
|
1273 | 1273 | $ mkcommit a |
|
1274 | 1274 | a already tracked! |
|
1275 | 1275 | $ mkcommit b |
|
1276 | 1276 | $ hg id |
|
1277 | 1277 | 13bedc178fce tip |
|
1278 | 1278 | $ echo "hello" > b |
|
1279 | 1279 | $ hg commit --amend -m "message" |
|
1280 | 1280 | $ hg book bookb -r 13bedc178fce --hidden |
|
1281 | 1281 | $ hg log -r 13bedc178fce |
|
1282 |
4:13bedc178fce (draft *obsolete*) [ bookb] add b [rewritten using amend as 5:a9b1f8652753 |
|
|
1282 | 4:13bedc178fce (draft *obsolete*) [ bookb] add b [rewritten using amend as 5:a9b1f8652753] | |
|
1283 | 1283 | $ hg book -d bookb |
|
1284 | 1284 | $ hg log -r 13bedc178fce |
|
1285 | 1285 | abort: hidden revision '13bedc178fce'! |
|
1286 | 1286 | (use --hidden to access hidden revisions) |
|
1287 | 1287 | [255] |
|
1288 | 1288 | |
|
1289 | 1289 | Empty out the test extension, as it isn't compatible with later parts |
|
1290 | 1290 | of the test. |
|
1291 | 1291 | $ echo > $TESTTMP/test_extension.py |
|
1292 | 1292 | |
|
1293 | 1293 | Test ability to pull changeset with locally applying obsolescence markers |
|
1294 | 1294 | (issue4945) |
|
1295 | 1295 | |
|
1296 | 1296 | $ cd .. |
|
1297 | 1297 | $ hg init issue4845 |
|
1298 | 1298 | $ cd issue4845 |
|
1299 | 1299 | |
|
1300 | 1300 | $ echo foo > f0 |
|
1301 | 1301 | $ hg add f0 |
|
1302 | 1302 | $ hg ci -m '0' |
|
1303 | 1303 | $ echo foo > f1 |
|
1304 | 1304 | $ hg add f1 |
|
1305 | 1305 | $ hg ci -m '1' |
|
1306 | 1306 | $ echo foo > f2 |
|
1307 | 1307 | $ hg add f2 |
|
1308 | 1308 | $ hg ci -m '2' |
|
1309 | 1309 | |
|
1310 | 1310 | $ echo bar > f2 |
|
1311 | 1311 | $ hg commit --amend --config experimetnal.stabilization=createmarkers |
|
1312 | 1312 | $ hg log -G |
|
1313 | 1313 | @ 3:b0551702f918 (draft) [tip ] 2 |
|
1314 | 1314 | | |
|
1315 | 1315 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1316 | 1316 | | |
|
1317 | 1317 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1318 | 1318 | |
|
1319 | 1319 | $ hg log -G --hidden |
|
1320 | 1320 | @ 3:b0551702f918 (draft) [tip ] 2 |
|
1321 | 1321 | | |
|
1322 |
| x 2:e008cf283490 (draft *obsolete*) [ ] 2 [rewritten using amend as 3:b0551702f918 |
|
|
1322 | | x 2:e008cf283490 (draft *obsolete*) [ ] 2 [rewritten using amend as 3:b0551702f918] | |
|
1323 | 1323 | |/ |
|
1324 | 1324 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1325 | 1325 | | |
|
1326 | 1326 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1327 | 1327 | |
|
1328 | 1328 | |
|
1329 | 1329 | $ hg strip --hidden -r 2 --config extensions.strip= --config devel.strip-obsmarkers=no |
|
1330 | 1330 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e008cf283490-ede36964-backup.hg (glob) |
|
1331 | 1331 | $ hg debugobsolete |
|
1332 | 1332 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
1333 | 1333 | $ hg log -G |
|
1334 | 1334 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1335 | 1335 | | |
|
1336 | 1336 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1337 | 1337 | | |
|
1338 | 1338 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1339 | 1339 | |
|
1340 | 1340 | $ hg log -G --hidden |
|
1341 | 1341 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1342 | 1342 | | |
|
1343 | 1343 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1344 | 1344 | | |
|
1345 | 1345 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1346 | 1346 | |
|
1347 | 1347 | $ hg debugbundle .hg/strip-backup/e008cf283490-*-backup.hg |
|
1348 | 1348 | Stream params: {Compression: BZ} |
|
1349 | 1349 | changegroup -- {nbchanges: 1, version: 02} |
|
1350 | 1350 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 |
|
1351 | 1351 | phase-heads -- {} |
|
1352 | 1352 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 draft |
|
1353 | 1353 | |
|
1354 | 1354 | $ hg pull .hg/strip-backup/e008cf283490-*-backup.hg |
|
1355 | 1355 | pulling from .hg/strip-backup/e008cf283490-ede36964-backup.hg |
|
1356 | 1356 | searching for changes |
|
1357 | 1357 | no changes found |
|
1358 | 1358 | $ hg debugobsolete |
|
1359 | 1359 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
1360 | 1360 | $ hg log -G |
|
1361 | 1361 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1362 | 1362 | | |
|
1363 | 1363 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1364 | 1364 | | |
|
1365 | 1365 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1366 | 1366 | |
|
1367 | 1367 | $ hg log -G --hidden |
|
1368 | 1368 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1369 | 1369 | | |
|
1370 | 1370 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1371 | 1371 | | |
|
1372 | 1372 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1373 | 1373 | |
|
1374 | 1374 | |
|
1375 | 1375 | Testing that strip remove markers: |
|
1376 | 1376 | |
|
1377 | 1377 | $ hg strip -r 1 --config extensions.strip= |
|
1378 | 1378 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1379 | 1379 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e016b03fd86f-65ede734-backup.hg (glob) |
|
1380 | 1380 | $ hg debugobsolete |
|
1381 | 1381 | $ hg log -G |
|
1382 | 1382 | @ 0:a78f55e5508c (draft) [tip ] 0 |
|
1383 | 1383 | |
|
1384 | 1384 | $ hg log -G --hidden |
|
1385 | 1385 | @ 0:a78f55e5508c (draft) [tip ] 0 |
|
1386 | 1386 | |
|
1387 | 1387 | $ hg debugbundle .hg/strip-backup/e016b03fd86f-*-backup.hg |
|
1388 | 1388 | Stream params: {Compression: BZ} |
|
1389 | 1389 | changegroup -- {nbchanges: 2, version: 02} |
|
1390 | 1390 | e016b03fd86fcccc54817d120b90b751aaf367d6 |
|
1391 | 1391 | b0551702f918510f01ae838ab03a463054c67b46 |
|
1392 | 1392 | obsmarkers -- {} |
|
1393 | 1393 | version: 1 (86 bytes) |
|
1394 | 1394 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
1395 | 1395 | phase-heads -- {} |
|
1396 | 1396 | b0551702f918510f01ae838ab03a463054c67b46 draft |
|
1397 | 1397 | |
|
1398 | 1398 | $ hg unbundle .hg/strip-backup/e016b03fd86f-*-backup.hg |
|
1399 | 1399 | adding changesets |
|
1400 | 1400 | adding manifests |
|
1401 | 1401 | adding file changes |
|
1402 | 1402 | added 2 changesets with 2 changes to 2 files |
|
1403 | 1403 | 1 new obsolescence markers |
|
1404 | 1404 | new changesets e016b03fd86f:b0551702f918 |
|
1405 | 1405 | (run 'hg update' to get a working copy) |
|
1406 | 1406 | $ hg debugobsolete | sort |
|
1407 | 1407 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
1408 | 1408 | $ hg log -G |
|
1409 | 1409 | o 2:b0551702f918 (draft) [tip ] 2 |
|
1410 | 1410 | | |
|
1411 | 1411 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1412 | 1412 | | |
|
1413 | 1413 | @ 0:a78f55e5508c (draft) [ ] 0 |
|
1414 | 1414 | |
|
1415 | 1415 | $ hg log -G --hidden |
|
1416 | 1416 | o 2:b0551702f918 (draft) [tip ] 2 |
|
1417 | 1417 | | |
|
1418 | 1418 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1419 | 1419 | | |
|
1420 | 1420 | @ 0:a78f55e5508c (draft) [ ] 0 |
|
1421 | 1421 | |
|
1422 | 1422 | Test that 'hg debugobsolete --index --rev' can show indices of obsmarkers when |
|
1423 | 1423 | only a subset of those are displayed (because of --rev option) |
|
1424 | 1424 | $ hg init doindexrev |
|
1425 | 1425 | $ cd doindexrev |
|
1426 | 1426 | $ echo a > a |
|
1427 | 1427 | $ hg ci -Am a |
|
1428 | 1428 | adding a |
|
1429 | 1429 | $ hg ci --amend -m aa |
|
1430 | 1430 | $ echo b > b |
|
1431 | 1431 | $ hg ci -Am b |
|
1432 | 1432 | adding b |
|
1433 | 1433 | $ hg ci --amend -m bb |
|
1434 | 1434 | $ echo c > c |
|
1435 | 1435 | $ hg ci -Am c |
|
1436 | 1436 | adding c |
|
1437 | 1437 | $ hg ci --amend -m cc |
|
1438 | 1438 | $ echo d > d |
|
1439 | 1439 | $ hg ci -Am d |
|
1440 | 1440 | adding d |
|
1441 | 1441 | $ hg ci --amend -m dd --config experimental.stabilization.track-operation=1 |
|
1442 | 1442 | $ hg debugobsolete --index --rev "3+7" |
|
1443 | 1443 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
1444 | 1444 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 \(.*\) {'operation': 'amend', 'user': 'test'} (re) |
|
1445 | 1445 | $ hg debugobsolete --index --rev "3+7" -Tjson |
|
1446 | 1446 | [ |
|
1447 | 1447 | { |
|
1448 | 1448 | "date": [0.0, 0], |
|
1449 | 1449 | "flag": 0, |
|
1450 | 1450 | "index": 1, |
|
1451 | 1451 | "metadata": {"operation": "amend", "user": "test"}, |
|
1452 | 1452 | "prednode": "6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1", |
|
1453 | 1453 | "succnodes": ["d27fb9b066076fd921277a4b9e8b9cb48c95bc6a"] |
|
1454 | 1454 | }, |
|
1455 | 1455 | { |
|
1456 | 1456 | "date": [0.0, 0], |
|
1457 | 1457 | "flag": 0, |
|
1458 | 1458 | "index": 3, |
|
1459 | 1459 | "metadata": {"operation": "amend", "user": "test"}, |
|
1460 | 1460 | "prednode": "4715cf767440ed891755448016c2b8cf70760c30", |
|
1461 | 1461 | "succnodes": ["7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d"] |
|
1462 | 1462 | } |
|
1463 | 1463 | ] |
|
1464 | 1464 | |
|
1465 | 1465 | Test the --delete option of debugobsolete command |
|
1466 | 1466 | $ hg debugobsolete --index |
|
1467 | 1467 | 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
1468 | 1468 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
1469 | 1469 | 2 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
1470 | 1470 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
1471 | 1471 | $ hg debugobsolete --delete 1 --delete 3 |
|
1472 | 1472 | deleted 2 obsolescence markers |
|
1473 | 1473 | $ hg debugobsolete |
|
1474 | 1474 | cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
1475 | 1475 | 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
1476 | 1476 | |
|
1477 | 1477 | Test adding changeset after obsmarkers affecting it |
|
1478 | 1478 | (eg: during pull, or unbundle) |
|
1479 | 1479 | |
|
1480 | 1480 | $ mkcommit e |
|
1481 | 1481 | $ hg bundle -r . --base .~1 ../bundle-2.hg |
|
1482 | 1482 | 1 changesets found |
|
1483 | 1483 | $ getid . |
|
1484 | 1484 | $ hg --config extensions.strip= strip -r . |
|
1485 | 1485 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1486 | 1486 | saved backup bundle to $TESTTMP/tmpe/issue4845/doindexrev/.hg/strip-backup/9bc153528424-ee80edd4-backup.hg (glob) |
|
1487 | 1487 | $ hg debugobsolete 9bc153528424ea266d13e57f9ff0d799dfe61e4b |
|
1488 | 1488 | $ hg unbundle ../bundle-2.hg |
|
1489 | 1489 | adding changesets |
|
1490 | 1490 | adding manifests |
|
1491 | 1491 | adding file changes |
|
1492 | 1492 | added 1 changesets with 1 changes to 1 files |
|
1493 | 1493 | (run 'hg update' to get a working copy) |
|
1494 | 1494 | $ hg log -G |
|
1495 | 1495 | @ 7:7ae79c5d60f0 (draft) [tip ] dd |
|
1496 | 1496 | | |
|
1497 | 1497 | | o 6:4715cf767440 (draft) [ ] d |
|
1498 | 1498 | |/ |
|
1499 | 1499 | o 5:29346082e4a9 (draft) [ ] cc |
|
1500 | 1500 | | |
|
1501 | 1501 | o 3:d27fb9b06607 (draft) [ ] bb |
|
1502 | 1502 | | |
|
1503 | 1503 | | o 2:6fdef60fcbab (draft) [ ] b |
|
1504 | 1504 | |/ |
|
1505 | 1505 | o 1:f9bd49731b0b (draft) [ ] aa |
|
1506 | 1506 | |
|
1507 | 1507 | |
|
1508 | 1508 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now