Show More
@@ -1,884 +1,892 | |||
|
1 | 1 | # templatekw.py - common changeset template keywords |
|
2 | 2 | # |
|
3 | 3 | # Copyright 2005-2009 Matt Mackall <mpm@selenic.com> |
|
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 | from .i18n import _ |
|
11 | 11 | from .node import ( |
|
12 | 12 | hex, |
|
13 | 13 | nullid, |
|
14 | 14 | wdirid, |
|
15 | 15 | wdirrev, |
|
16 | 16 | ) |
|
17 | 17 | |
|
18 | 18 | from . import ( |
|
19 | 19 | diffutil, |
|
20 | 20 | encoding, |
|
21 | 21 | error, |
|
22 | 22 | hbisect, |
|
23 | 23 | i18n, |
|
24 | 24 | obsutil, |
|
25 | 25 | patch, |
|
26 | 26 | pycompat, |
|
27 | 27 | registrar, |
|
28 | 28 | scmutil, |
|
29 | 29 | templateutil, |
|
30 | 30 | util, |
|
31 | 31 | ) |
|
32 | 32 | from .utils import ( |
|
33 | 33 | stringutil, |
|
34 | 34 | ) |
|
35 | 35 | |
|
36 | 36 | _hybrid = templateutil.hybrid |
|
37 | 37 | hybriddict = templateutil.hybriddict |
|
38 | 38 | hybridlist = templateutil.hybridlist |
|
39 | 39 | compatdict = templateutil.compatdict |
|
40 | 40 | compatlist = templateutil.compatlist |
|
41 | 41 | _showcompatlist = templateutil._showcompatlist |
|
42 | 42 | |
|
43 | 43 | def getlatesttags(context, mapping, pattern=None): |
|
44 | 44 | '''return date, distance and name for the latest tag of rev''' |
|
45 | 45 | repo = context.resource(mapping, 'repo') |
|
46 | 46 | ctx = context.resource(mapping, 'ctx') |
|
47 | 47 | cache = context.resource(mapping, 'cache') |
|
48 | 48 | |
|
49 | 49 | cachename = 'latesttags' |
|
50 | 50 | if pattern is not None: |
|
51 | 51 | cachename += '-' + pattern |
|
52 | 52 | match = stringutil.stringmatcher(pattern)[2] |
|
53 | 53 | else: |
|
54 | 54 | match = util.always |
|
55 | 55 | |
|
56 | 56 | if cachename not in cache: |
|
57 | 57 | # Cache mapping from rev to a tuple with tag date, tag |
|
58 | 58 | # distance and tag name |
|
59 | 59 | cache[cachename] = {-1: (0, 0, ['null'])} |
|
60 | 60 | latesttags = cache[cachename] |
|
61 | 61 | |
|
62 | 62 | rev = ctx.rev() |
|
63 | 63 | todo = [rev] |
|
64 | 64 | while todo: |
|
65 | 65 | rev = todo.pop() |
|
66 | 66 | if rev in latesttags: |
|
67 | 67 | continue |
|
68 | 68 | ctx = repo[rev] |
|
69 | 69 | tags = [t for t in ctx.tags() |
|
70 | 70 | if (repo.tagtype(t) and repo.tagtype(t) != 'local' |
|
71 | 71 | and match(t))] |
|
72 | 72 | if tags: |
|
73 | 73 | latesttags[rev] = ctx.date()[0], 0, [t for t in sorted(tags)] |
|
74 | 74 | continue |
|
75 | 75 | try: |
|
76 | 76 | ptags = [latesttags[p.rev()] for p in ctx.parents()] |
|
77 | 77 | if len(ptags) > 1: |
|
78 | 78 | if ptags[0][2] == ptags[1][2]: |
|
79 | 79 | # The tuples are laid out so the right one can be found by |
|
80 | 80 | # comparison in this case. |
|
81 | 81 | pdate, pdist, ptag = max(ptags) |
|
82 | 82 | else: |
|
83 | 83 | def key(x): |
|
84 | 84 | tag = x[2][0] |
|
85 | 85 | if ctx.rev() is None: |
|
86 | 86 | # only() doesn't support wdir |
|
87 | 87 | prevs = [c.rev() for c in ctx.parents()] |
|
88 | 88 | changes = repo.revs('only(%ld, %s)', prevs, tag) |
|
89 | 89 | changessincetag = len(changes) + 1 |
|
90 | 90 | else: |
|
91 | 91 | changes = repo.revs('only(%d, %s)', ctx.rev(), tag) |
|
92 | 92 | changessincetag = len(changes) |
|
93 | 93 | # Smallest number of changes since tag wins. Date is |
|
94 | 94 | # used as tiebreaker. |
|
95 | 95 | return [-changessincetag, x[0]] |
|
96 | 96 | pdate, pdist, ptag = max(ptags, key=key) |
|
97 | 97 | else: |
|
98 | 98 | pdate, pdist, ptag = ptags[0] |
|
99 | 99 | except KeyError: |
|
100 | 100 | # Cache miss - recurse |
|
101 | 101 | todo.append(rev) |
|
102 | 102 | todo.extend(p.rev() for p in ctx.parents()) |
|
103 | 103 | continue |
|
104 | 104 | latesttags[rev] = pdate, pdist + 1, ptag |
|
105 | 105 | return latesttags[rev] |
|
106 | 106 | |
|
107 | 107 | def getrenamedfn(repo, endrev=None): |
|
108 | 108 | rcache = {} |
|
109 | 109 | if endrev is None: |
|
110 | 110 | endrev = len(repo) |
|
111 | 111 | |
|
112 | 112 | def getrenamed(fn, rev): |
|
113 | 113 | '''looks up all renames for a file (up to endrev) the first |
|
114 | 114 | time the file is given. It indexes on the changerev and only |
|
115 | 115 | parses the manifest if linkrev != changerev. |
|
116 | 116 | Returns rename info for fn at changerev rev.''' |
|
117 | 117 | if fn not in rcache: |
|
118 | 118 | rcache[fn] = {} |
|
119 | 119 | fl = repo.file(fn) |
|
120 | 120 | for i in fl: |
|
121 | 121 | lr = fl.linkrev(i) |
|
122 | 122 | renamed = fl.renamed(fl.node(i)) |
|
123 | 123 | rcache[fn][lr] = renamed and renamed[0] |
|
124 | 124 | if lr >= endrev: |
|
125 | 125 | break |
|
126 | 126 | if rev in rcache[fn]: |
|
127 | 127 | return rcache[fn][rev] |
|
128 | 128 | |
|
129 | 129 | # If linkrev != rev (i.e. rev not found in rcache) fallback to |
|
130 | 130 | # filectx logic. |
|
131 | 131 | try: |
|
132 | 132 | renamed = repo[rev][fn].renamed() |
|
133 | 133 | return renamed and renamed[0] |
|
134 | 134 | except error.LookupError: |
|
135 | 135 | return None |
|
136 | 136 | |
|
137 | 137 | return getrenamed |
|
138 | 138 | |
|
139 | 139 | def getlogcolumns(): |
|
140 | 140 | """Return a dict of log column labels""" |
|
141 | 141 | _ = pycompat.identity # temporarily disable gettext |
|
142 | 142 | # i18n: column positioning for "hg log" |
|
143 | 143 | columns = _('bookmark: %s\n' |
|
144 | 144 | 'branch: %s\n' |
|
145 | 145 | 'changeset: %s\n' |
|
146 | 146 | 'copies: %s\n' |
|
147 | 147 | 'date: %s\n' |
|
148 | 148 | 'extra: %s=%s\n' |
|
149 | 149 | 'files+: %s\n' |
|
150 | 150 | 'files-: %s\n' |
|
151 | 151 | 'files: %s\n' |
|
152 | 152 | 'instability: %s\n' |
|
153 | 153 | 'manifest: %s\n' |
|
154 | 154 | 'obsolete: %s\n' |
|
155 | 155 | 'parent: %s\n' |
|
156 | 156 | 'phase: %s\n' |
|
157 | 157 | 'summary: %s\n' |
|
158 | 158 | 'tag: %s\n' |
|
159 | 159 | 'user: %s\n') |
|
160 | 160 | return dict(zip([s.split(':', 1)[0] for s in columns.splitlines()], |
|
161 | 161 | i18n._(columns).splitlines(True))) |
|
162 | 162 | |
|
163 | 163 | # basic internal templates |
|
164 | 164 | _changeidtmpl = '{rev}:{node|formatnode}' |
|
165 | 165 | |
|
166 | 166 | # default templates internally used for rendering of lists |
|
167 | 167 | defaulttempl = { |
|
168 | 168 | 'parent': _changeidtmpl + ' ', |
|
169 | 169 | 'manifest': _changeidtmpl, |
|
170 | 170 | 'file_copy': '{name} ({source})', |
|
171 | 171 | 'envvar': '{key}={value}', |
|
172 | 172 | 'extra': '{key}={value|stringescape}' |
|
173 | 173 | } |
|
174 | 174 | # filecopy is preserved for compatibility reasons |
|
175 | 175 | defaulttempl['filecopy'] = defaulttempl['file_copy'] |
|
176 | 176 | |
|
177 | 177 | # keywords are callables (see registrar.templatekeyword for details) |
|
178 | 178 | keywords = {} |
|
179 | 179 | templatekeyword = registrar.templatekeyword(keywords) |
|
180 | 180 | |
|
181 | 181 | @templatekeyword('author', requires={'ctx'}) |
|
182 | 182 | def showauthor(context, mapping): |
|
183 | 183 | """Alias for ``{user}``""" |
|
184 | 184 | return showuser(context, mapping) |
|
185 | 185 | |
|
186 | 186 | @templatekeyword('bisect', requires={'repo', 'ctx'}) |
|
187 | 187 | def showbisect(context, mapping): |
|
188 | 188 | """String. The changeset bisection status.""" |
|
189 | 189 | repo = context.resource(mapping, 'repo') |
|
190 | 190 | ctx = context.resource(mapping, 'ctx') |
|
191 | 191 | return hbisect.label(repo, ctx.node()) |
|
192 | 192 | |
|
193 | 193 | @templatekeyword('branch', requires={'ctx'}) |
|
194 | 194 | def showbranch(context, mapping): |
|
195 | 195 | """String. The name of the branch on which the changeset was |
|
196 | 196 | committed. |
|
197 | 197 | """ |
|
198 | 198 | ctx = context.resource(mapping, 'ctx') |
|
199 | 199 | return ctx.branch() |
|
200 | 200 | |
|
201 | 201 | @templatekeyword('branches', requires={'ctx'}) |
|
202 | 202 | def showbranches(context, mapping): |
|
203 | 203 | """List of strings. The name of the branch on which the |
|
204 | 204 | changeset was committed. Will be empty if the branch name was |
|
205 | 205 | default. (DEPRECATED) |
|
206 | 206 | """ |
|
207 | 207 | ctx = context.resource(mapping, 'ctx') |
|
208 | 208 | branch = ctx.branch() |
|
209 | 209 | if branch != 'default': |
|
210 | 210 | return compatlist(context, mapping, 'branch', [branch], |
|
211 | 211 | plural='branches') |
|
212 | 212 | return compatlist(context, mapping, 'branch', [], plural='branches') |
|
213 | 213 | |
|
214 | 214 | @templatekeyword('bookmarks', requires={'repo', 'ctx'}) |
|
215 | 215 | def showbookmarks(context, mapping): |
|
216 | 216 | """List of strings. Any bookmarks associated with the |
|
217 | 217 | changeset. Also sets 'active', the name of the active bookmark. |
|
218 | 218 | """ |
|
219 | 219 | repo = context.resource(mapping, 'repo') |
|
220 | 220 | ctx = context.resource(mapping, 'ctx') |
|
221 | 221 | bookmarks = ctx.bookmarks() |
|
222 | 222 | active = repo._activebookmark |
|
223 | 223 | makemap = lambda v: {'bookmark': v, 'active': active, 'current': active} |
|
224 | 224 | f = _showcompatlist(context, mapping, 'bookmark', bookmarks) |
|
225 | 225 | return _hybrid(f, bookmarks, makemap, pycompat.identity) |
|
226 | 226 | |
|
227 | 227 | @templatekeyword('children', requires={'ctx'}) |
|
228 | 228 | def showchildren(context, mapping): |
|
229 | 229 | """List of strings. The children of the changeset.""" |
|
230 | 230 | ctx = context.resource(mapping, 'ctx') |
|
231 | 231 | childrevs = ['%d:%s' % (cctx.rev(), cctx) for cctx in ctx.children()] |
|
232 | 232 | return compatlist(context, mapping, 'children', childrevs, element='child') |
|
233 | 233 | |
|
234 | 234 | # Deprecated, but kept alive for help generation a purpose. |
|
235 | 235 | @templatekeyword('currentbookmark', requires={'repo', 'ctx'}) |
|
236 | 236 | def showcurrentbookmark(context, mapping): |
|
237 | 237 | """String. The active bookmark, if it is associated with the changeset. |
|
238 | 238 | (DEPRECATED)""" |
|
239 | 239 | return showactivebookmark(context, mapping) |
|
240 | 240 | |
|
241 | 241 | @templatekeyword('activebookmark', requires={'repo', 'ctx'}) |
|
242 | 242 | def showactivebookmark(context, mapping): |
|
243 | 243 | """String. The active bookmark, if it is associated with the changeset.""" |
|
244 | 244 | repo = context.resource(mapping, 'repo') |
|
245 | 245 | ctx = context.resource(mapping, 'ctx') |
|
246 | 246 | active = repo._activebookmark |
|
247 | 247 | if active and active in ctx.bookmarks(): |
|
248 | 248 | return active |
|
249 | 249 | return '' |
|
250 | 250 | |
|
251 | 251 | @templatekeyword('date', requires={'ctx'}) |
|
252 | 252 | def showdate(context, mapping): |
|
253 | 253 | """Date information. The date when the changeset was committed.""" |
|
254 | 254 | ctx = context.resource(mapping, 'ctx') |
|
255 | 255 | # the default string format is '<float(unixtime)><tzoffset>' because |
|
256 | 256 | # python-hglib splits date at decimal separator. |
|
257 | 257 | return templateutil.date(ctx.date(), showfmt='%d.0%d') |
|
258 | 258 | |
|
259 | 259 | @templatekeyword('desc', requires={'ctx'}) |
|
260 | 260 | def showdescription(context, mapping): |
|
261 | 261 | """String. The text of the changeset description.""" |
|
262 | 262 | ctx = context.resource(mapping, 'ctx') |
|
263 | 263 | s = ctx.description() |
|
264 | 264 | if isinstance(s, encoding.localstr): |
|
265 | 265 | # try hard to preserve utf-8 bytes |
|
266 | 266 | return encoding.tolocal(encoding.fromlocal(s).strip()) |
|
267 | 267 | elif isinstance(s, encoding.safelocalstr): |
|
268 | 268 | return encoding.safelocalstr(s.strip()) |
|
269 | 269 | else: |
|
270 | 270 | return s.strip() |
|
271 | 271 | |
|
272 | 272 | @templatekeyword('diffstat', requires={'ui', 'ctx'}) |
|
273 | 273 | def showdiffstat(context, mapping): |
|
274 | 274 | """String. Statistics of changes with the following format: |
|
275 | 275 | "modified files: +added/-removed lines" |
|
276 | 276 | """ |
|
277 | 277 | ui = context.resource(mapping, 'ui') |
|
278 | 278 | ctx = context.resource(mapping, 'ctx') |
|
279 | 279 | diffopts = diffutil.diffallopts(ui, {'noprefix': False}) |
|
280 | 280 | diff = ctx.diff(opts=diffopts) |
|
281 | 281 | stats = patch.diffstatdata(util.iterlines(diff)) |
|
282 | 282 | maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats) |
|
283 | 283 | return '%d: +%d/-%d' % (len(stats), adds, removes) |
|
284 | 284 | |
|
285 | 285 | @templatekeyword('envvars', requires={'ui'}) |
|
286 | 286 | def showenvvars(context, mapping): |
|
287 | 287 | """A dictionary of environment variables. (EXPERIMENTAL)""" |
|
288 | 288 | ui = context.resource(mapping, 'ui') |
|
289 | 289 | env = ui.exportableenviron() |
|
290 | 290 | env = util.sortdict((k, env[k]) for k in sorted(env)) |
|
291 | 291 | return compatdict(context, mapping, 'envvar', env, plural='envvars') |
|
292 | 292 | |
|
293 | 293 | @templatekeyword('extras', requires={'ctx'}) |
|
294 | 294 | def showextras(context, mapping): |
|
295 | 295 | """List of dicts with key, value entries of the 'extras' |
|
296 | 296 | field of this changeset.""" |
|
297 | 297 | ctx = context.resource(mapping, 'ctx') |
|
298 | 298 | extras = ctx.extra() |
|
299 | 299 | extras = util.sortdict((k, extras[k]) for k in sorted(extras)) |
|
300 | 300 | makemap = lambda k: {'key': k, 'value': extras[k]} |
|
301 | 301 | c = [makemap(k) for k in extras] |
|
302 | 302 | f = _showcompatlist(context, mapping, 'extra', c, plural='extras') |
|
303 | 303 | return _hybrid(f, extras, makemap, |
|
304 | 304 | lambda k: '%s=%s' % (k, stringutil.escapestr(extras[k]))) |
|
305 | 305 | |
|
306 | 306 | def _getfilestatus(context, mapping, listall=False): |
|
307 | 307 | ctx = context.resource(mapping, 'ctx') |
|
308 | 308 | revcache = context.resource(mapping, 'revcache') |
|
309 | 309 | if 'filestatus' not in revcache or revcache['filestatusall'] < listall: |
|
310 | 310 | stat = ctx.p1().status(ctx, listignored=listall, listclean=listall, |
|
311 | 311 | listunknown=listall) |
|
312 | 312 | revcache['filestatus'] = stat |
|
313 | 313 | revcache['filestatusall'] = listall |
|
314 | 314 | return revcache['filestatus'] |
|
315 | 315 | |
|
316 | 316 | def _getfilestatusmap(context, mapping, listall=False): |
|
317 | 317 | revcache = context.resource(mapping, 'revcache') |
|
318 | 318 | if 'filestatusmap' not in revcache or revcache['filestatusall'] < listall: |
|
319 | 319 | stat = _getfilestatus(context, mapping, listall=listall) |
|
320 | 320 | revcache['filestatusmap'] = statmap = {} |
|
321 | 321 | for char, files in zip(pycompat.iterbytestr('MAR!?IC'), stat): |
|
322 | 322 | statmap.update((f, char) for f in files) |
|
323 | 323 | return revcache['filestatusmap'] # {path: statchar} |
|
324 | 324 | |
|
325 | 325 | def _showfilesbystat(context, mapping, name, index): |
|
326 | 326 | stat = _getfilestatus(context, mapping) |
|
327 | 327 | files = stat[index] |
|
328 | 328 | return templateutil.compatfileslist(context, mapping, name, files) |
|
329 | 329 | |
|
330 | 330 | @templatekeyword('file_adds', requires={'ctx', 'revcache'}) |
|
331 | 331 | def showfileadds(context, mapping): |
|
332 | 332 | """List of strings. Files added by this changeset.""" |
|
333 | 333 | return _showfilesbystat(context, mapping, 'file_add', 1) |
|
334 | 334 | |
|
335 | 335 | @templatekeyword('file_copies', |
|
336 | 336 | requires={'repo', 'ctx', 'cache', 'revcache'}) |
|
337 | 337 | def showfilecopies(context, mapping): |
|
338 | 338 | """List of strings. Files copied in this changeset with |
|
339 | 339 | their sources. |
|
340 | 340 | """ |
|
341 | 341 | repo = context.resource(mapping, 'repo') |
|
342 | 342 | ctx = context.resource(mapping, 'ctx') |
|
343 | 343 | cache = context.resource(mapping, 'cache') |
|
344 | 344 | copies = context.resource(mapping, 'revcache').get('copies') |
|
345 | 345 | if copies is None: |
|
346 | 346 | if 'getrenamed' not in cache: |
|
347 | 347 | cache['getrenamed'] = getrenamedfn(repo) |
|
348 | 348 | copies = [] |
|
349 | 349 | getrenamed = cache['getrenamed'] |
|
350 | 350 | for fn in ctx.files(): |
|
351 | 351 | rename = getrenamed(fn, ctx.rev()) |
|
352 | 352 | if rename: |
|
353 | 353 | copies.append((fn, rename)) |
|
354 | 354 | return templateutil.compatfilecopiesdict(context, mapping, 'file_copy', |
|
355 | 355 | copies) |
|
356 | 356 | |
|
357 | 357 | # showfilecopiesswitch() displays file copies only if copy records are |
|
358 | 358 | # provided before calling the templater, usually with a --copies |
|
359 | 359 | # command line switch. |
|
360 | 360 | @templatekeyword('file_copies_switch', requires={'revcache'}) |
|
361 | 361 | def showfilecopiesswitch(context, mapping): |
|
362 | 362 | """List of strings. Like "file_copies" but displayed |
|
363 | 363 | only if the --copied switch is set. |
|
364 | 364 | """ |
|
365 | 365 | copies = context.resource(mapping, 'revcache').get('copies') or [] |
|
366 | 366 | return templateutil.compatfilecopiesdict(context, mapping, 'file_copy', |
|
367 | 367 | copies) |
|
368 | 368 | |
|
369 | 369 | @templatekeyword('file_dels', requires={'ctx', 'revcache'}) |
|
370 | 370 | def showfiledels(context, mapping): |
|
371 | 371 | """List of strings. Files removed by this changeset.""" |
|
372 | 372 | return _showfilesbystat(context, mapping, 'file_del', 2) |
|
373 | 373 | |
|
374 | 374 | @templatekeyword('file_mods', requires={'ctx', 'revcache'}) |
|
375 | 375 | def showfilemods(context, mapping): |
|
376 | 376 | """List of strings. Files modified by this changeset.""" |
|
377 | 377 | return _showfilesbystat(context, mapping, 'file_mod', 0) |
|
378 | 378 | |
|
379 | 379 | @templatekeyword('files', requires={'ctx'}) |
|
380 | 380 | def showfiles(context, mapping): |
|
381 | 381 | """List of strings. All files modified, added, or removed by this |
|
382 | 382 | changeset. |
|
383 | 383 | """ |
|
384 | 384 | ctx = context.resource(mapping, 'ctx') |
|
385 | 385 | return templateutil.compatfileslist(context, mapping, 'file', ctx.files()) |
|
386 | 386 | |
|
387 | 387 | @templatekeyword('graphnode', requires={'repo', 'ctx'}) |
|
388 | 388 | def showgraphnode(context, mapping): |
|
389 | 389 | """String. The character representing the changeset node in an ASCII |
|
390 | 390 | revision graph.""" |
|
391 | 391 | repo = context.resource(mapping, 'repo') |
|
392 | 392 | ctx = context.resource(mapping, 'ctx') |
|
393 | 393 | return getgraphnode(repo, ctx) |
|
394 | 394 | |
|
395 | 395 | def getgraphnode(repo, ctx): |
|
396 | 396 | return getgraphnodecurrent(repo, ctx) or getgraphnodesymbol(ctx) |
|
397 | 397 | |
|
398 | 398 | def getgraphnodecurrent(repo, ctx): |
|
399 | 399 | wpnodes = repo.dirstate.parents() |
|
400 | 400 | if wpnodes[1] == nullid: |
|
401 | 401 | wpnodes = wpnodes[:1] |
|
402 | 402 | if ctx.node() in wpnodes: |
|
403 | 403 | return '@' |
|
404 | 404 | else: |
|
405 | 405 | return '' |
|
406 | 406 | |
|
407 | 407 | def getgraphnodesymbol(ctx): |
|
408 | 408 | if ctx.obsolete(): |
|
409 | 409 | return 'x' |
|
410 | 410 | elif ctx.isunstable(): |
|
411 | 411 | return '*' |
|
412 | 412 | elif ctx.closesbranch(): |
|
413 | 413 | return '_' |
|
414 | 414 | else: |
|
415 | 415 | return 'o' |
|
416 | 416 | |
|
417 | 417 | @templatekeyword('graphwidth', requires=()) |
|
418 | 418 | def showgraphwidth(context, mapping): |
|
419 | 419 | """Integer. The width of the graph drawn by 'log --graph' or zero.""" |
|
420 | 420 | # just hosts documentation; should be overridden by template mapping |
|
421 | 421 | return 0 |
|
422 | 422 | |
|
423 | 423 | @templatekeyword('index', requires=()) |
|
424 | 424 | def showindex(context, mapping): |
|
425 | 425 | """Integer. The current iteration of the loop. (0 indexed)""" |
|
426 | 426 | # just hosts documentation; should be overridden by template mapping |
|
427 | 427 | raise error.Abort(_("can't use index in this context")) |
|
428 | 428 | |
|
429 | 429 | @templatekeyword('latesttag', requires={'repo', 'ctx', 'cache'}) |
|
430 | 430 | def showlatesttag(context, mapping): |
|
431 | 431 | """List of strings. The global tags on the most recent globally |
|
432 | 432 | tagged ancestor of this changeset. If no such tags exist, the list |
|
433 | 433 | consists of the single string "null". |
|
434 | 434 | """ |
|
435 | 435 | return showlatesttags(context, mapping, None) |
|
436 | 436 | |
|
437 | 437 | def showlatesttags(context, mapping, pattern): |
|
438 | 438 | """helper method for the latesttag keyword and function""" |
|
439 | 439 | latesttags = getlatesttags(context, mapping, pattern) |
|
440 | 440 | |
|
441 | 441 | # latesttag[0] is an implementation detail for sorting csets on different |
|
442 | 442 | # branches in a stable manner- it is the date the tagged cset was created, |
|
443 | 443 | # not the date the tag was created. Therefore it isn't made visible here. |
|
444 | 444 | makemap = lambda v: { |
|
445 | 445 | 'changes': _showchangessincetag, |
|
446 | 446 | 'distance': latesttags[1], |
|
447 | 447 | 'latesttag': v, # BC with {latesttag % '{latesttag}'} |
|
448 | 448 | 'tag': v |
|
449 | 449 | } |
|
450 | 450 | |
|
451 | 451 | tags = latesttags[2] |
|
452 | 452 | f = _showcompatlist(context, mapping, 'latesttag', tags, separator=':') |
|
453 | 453 | return _hybrid(f, tags, makemap, pycompat.identity) |
|
454 | 454 | |
|
455 | 455 | @templatekeyword('latesttagdistance', requires={'repo', 'ctx', 'cache'}) |
|
456 | 456 | def showlatesttagdistance(context, mapping): |
|
457 | 457 | """Integer. Longest path to the latest tag.""" |
|
458 | 458 | return getlatesttags(context, mapping)[1] |
|
459 | 459 | |
|
460 | 460 | @templatekeyword('changessincelatesttag', requires={'repo', 'ctx', 'cache'}) |
|
461 | 461 | def showchangessincelatesttag(context, mapping): |
|
462 | 462 | """Integer. All ancestors not in the latest tag.""" |
|
463 | 463 | tag = getlatesttags(context, mapping)[2][0] |
|
464 | 464 | mapping = context.overlaymap(mapping, {'tag': tag}) |
|
465 | 465 | return _showchangessincetag(context, mapping) |
|
466 | 466 | |
|
467 | 467 | def _showchangessincetag(context, mapping): |
|
468 | 468 | repo = context.resource(mapping, 'repo') |
|
469 | 469 | ctx = context.resource(mapping, 'ctx') |
|
470 | 470 | offset = 0 |
|
471 | 471 | revs = [ctx.rev()] |
|
472 | 472 | tag = context.symbol(mapping, 'tag') |
|
473 | 473 | |
|
474 | 474 | # The only() revset doesn't currently support wdir() |
|
475 | 475 | if ctx.rev() is None: |
|
476 | 476 | offset = 1 |
|
477 | 477 | revs = [p.rev() for p in ctx.parents()] |
|
478 | 478 | |
|
479 | 479 | return len(repo.revs('only(%ld, %s)', revs, tag)) + offset |
|
480 | 480 | |
|
481 | 481 | # teach templater latesttags.changes is switched to (context, mapping) API |
|
482 | 482 | _showchangessincetag._requires = {'repo', 'ctx'} |
|
483 | 483 | |
|
484 | 484 | @templatekeyword('manifest', requires={'repo', 'ctx'}) |
|
485 | 485 | def showmanifest(context, mapping): |
|
486 | 486 | repo = context.resource(mapping, 'repo') |
|
487 | 487 | ctx = context.resource(mapping, 'ctx') |
|
488 | 488 | mnode = ctx.manifestnode() |
|
489 | 489 | if mnode is None: |
|
490 | 490 | mnode = wdirid |
|
491 | 491 | mrev = wdirrev |
|
492 | 492 | else: |
|
493 | 493 | mrev = repo.manifestlog.rev(mnode) |
|
494 | 494 | mhex = hex(mnode) |
|
495 | 495 | mapping = context.overlaymap(mapping, {'rev': mrev, 'node': mhex}) |
|
496 | 496 | f = context.process('manifest', mapping) |
|
497 | 497 | return templateutil.hybriditem(f, None, f, |
|
498 | 498 | lambda x: {'rev': mrev, 'node': mhex}) |
|
499 | 499 | |
|
500 | 500 | @templatekeyword('obsfate', requires={'ui', 'repo', 'ctx'}) |
|
501 | 501 | def showobsfate(context, mapping): |
|
502 | 502 | # this function returns a list containing pre-formatted obsfate strings. |
|
503 | 503 | # |
|
504 | 504 | # This function will be replaced by templates fragments when we will have |
|
505 | 505 | # the verbosity templatekw available. |
|
506 | 506 | succsandmarkers = showsuccsandmarkers(context, mapping) |
|
507 | 507 | |
|
508 | 508 | ui = context.resource(mapping, 'ui') |
|
509 | 509 | repo = context.resource(mapping, 'repo') |
|
510 | 510 | values = [] |
|
511 | 511 | |
|
512 | 512 | for x in succsandmarkers.tovalue(context, mapping): |
|
513 | 513 | v = obsutil.obsfateprinter(ui, repo, x['successors'], x['markers'], |
|
514 | 514 | scmutil.formatchangeid) |
|
515 | 515 | values.append(v) |
|
516 | 516 | |
|
517 | 517 | return compatlist(context, mapping, "fate", values) |
|
518 | 518 | |
|
519 | 519 | def shownames(context, mapping, namespace): |
|
520 | 520 | """helper method to generate a template keyword for a namespace""" |
|
521 | 521 | repo = context.resource(mapping, 'repo') |
|
522 | 522 | ctx = context.resource(mapping, 'ctx') |
|
523 | 523 | ns = repo.names[namespace] |
|
524 | 524 | names = ns.names(repo, ctx.node()) |
|
525 | 525 | return compatlist(context, mapping, ns.templatename, names, |
|
526 | 526 | plural=namespace) |
|
527 | 527 | |
|
528 | 528 | @templatekeyword('namespaces', requires={'repo', 'ctx'}) |
|
529 | 529 | def shownamespaces(context, mapping): |
|
530 | 530 | """Dict of lists. Names attached to this changeset per |
|
531 | 531 | namespace.""" |
|
532 | 532 | repo = context.resource(mapping, 'repo') |
|
533 | 533 | ctx = context.resource(mapping, 'ctx') |
|
534 | 534 | |
|
535 | 535 | namespaces = util.sortdict() |
|
536 | 536 | def makensmapfn(ns): |
|
537 | 537 | # 'name' for iterating over namespaces, templatename for local reference |
|
538 | 538 | return lambda v: {'name': v, ns.templatename: v} |
|
539 | 539 | |
|
540 | 540 | for k, ns in repo.names.iteritems(): |
|
541 | 541 | names = ns.names(repo, ctx.node()) |
|
542 | 542 | f = _showcompatlist(context, mapping, 'name', names) |
|
543 | 543 | namespaces[k] = _hybrid(f, names, makensmapfn(ns), pycompat.identity) |
|
544 | 544 | |
|
545 | 545 | f = _showcompatlist(context, mapping, 'namespace', list(namespaces)) |
|
546 | 546 | |
|
547 | 547 | def makemap(ns): |
|
548 | 548 | return { |
|
549 | 549 | 'namespace': ns, |
|
550 | 550 | 'names': namespaces[ns], |
|
551 | 551 | 'builtin': repo.names[ns].builtin, |
|
552 | 552 | 'colorname': repo.names[ns].colorname, |
|
553 | 553 | } |
|
554 | 554 | |
|
555 | 555 | return _hybrid(f, namespaces, makemap, pycompat.identity) |
|
556 | 556 | |
|
557 | @templatekeyword('negrev', requires={'repo', 'ctx'}) | |
|
558 | def shownegrev(context, mapping): | |
|
559 | """Integer. The repository-local changeset negative revision number, | |
|
560 | which counts in the opposite direction.""" | |
|
561 | ctx = context.resource(mapping, 'ctx') | |
|
562 | repo = context.resource(mapping, 'repo') | |
|
563 | return scmutil.intrev(ctx) - len(repo) | |
|
564 | ||
|
557 | 565 | @templatekeyword('node', requires={'ctx'}) |
|
558 | 566 | def shownode(context, mapping): |
|
559 | 567 | """String. The changeset identification hash, as a 40 hexadecimal |
|
560 | 568 | digit string. |
|
561 | 569 | """ |
|
562 | 570 | ctx = context.resource(mapping, 'ctx') |
|
563 | 571 | return ctx.hex() |
|
564 | 572 | |
|
565 | 573 | @templatekeyword('obsolete', requires={'ctx'}) |
|
566 | 574 | def showobsolete(context, mapping): |
|
567 | 575 | """String. Whether the changeset is obsolete. (EXPERIMENTAL)""" |
|
568 | 576 | ctx = context.resource(mapping, 'ctx') |
|
569 | 577 | if ctx.obsolete(): |
|
570 | 578 | return 'obsolete' |
|
571 | 579 | return '' |
|
572 | 580 | |
|
573 | 581 | @templatekeyword('path', requires={'fctx'}) |
|
574 | 582 | def showpath(context, mapping): |
|
575 | 583 | """String. Repository-absolute path of the current file. (EXPERIMENTAL)""" |
|
576 | 584 | fctx = context.resource(mapping, 'fctx') |
|
577 | 585 | return fctx.path() |
|
578 | 586 | |
|
579 | 587 | @templatekeyword('peerurls', requires={'repo'}) |
|
580 | 588 | def showpeerurls(context, mapping): |
|
581 | 589 | """A dictionary of repository locations defined in the [paths] section |
|
582 | 590 | of your configuration file.""" |
|
583 | 591 | repo = context.resource(mapping, 'repo') |
|
584 | 592 | # see commands.paths() for naming of dictionary keys |
|
585 | 593 | paths = repo.ui.paths |
|
586 | 594 | urls = util.sortdict((k, p.rawloc) for k, p in sorted(paths.iteritems())) |
|
587 | 595 | def makemap(k): |
|
588 | 596 | p = paths[k] |
|
589 | 597 | d = {'name': k, 'url': p.rawloc} |
|
590 | 598 | d.update((o, v) for o, v in sorted(p.suboptions.iteritems())) |
|
591 | 599 | return d |
|
592 | 600 | return _hybrid(None, urls, makemap, lambda k: '%s=%s' % (k, urls[k])) |
|
593 | 601 | |
|
594 | 602 | @templatekeyword("predecessors", requires={'repo', 'ctx'}) |
|
595 | 603 | def showpredecessors(context, mapping): |
|
596 | 604 | """Returns the list of the closest visible successors. (EXPERIMENTAL)""" |
|
597 | 605 | repo = context.resource(mapping, 'repo') |
|
598 | 606 | ctx = context.resource(mapping, 'ctx') |
|
599 | 607 | predecessors = sorted(obsutil.closestpredecessors(repo, ctx.node())) |
|
600 | 608 | predecessors = pycompat.maplist(hex, predecessors) |
|
601 | 609 | |
|
602 | 610 | return _hybrid(None, predecessors, |
|
603 | 611 | lambda x: {'ctx': repo[x]}, |
|
604 | 612 | lambda x: scmutil.formatchangeid(repo[x])) |
|
605 | 613 | |
|
606 | 614 | @templatekeyword('reporoot', requires={'repo'}) |
|
607 | 615 | def showreporoot(context, mapping): |
|
608 | 616 | """String. The root directory of the current repository.""" |
|
609 | 617 | repo = context.resource(mapping, 'repo') |
|
610 | 618 | return repo.root |
|
611 | 619 | |
|
612 | 620 | @templatekeyword('size', requires={'fctx'}) |
|
613 | 621 | def showsize(context, mapping): |
|
614 | 622 | """Integer. Size of the current file in bytes. (EXPERIMENTAL)""" |
|
615 | 623 | fctx = context.resource(mapping, 'fctx') |
|
616 | 624 | return fctx.size() |
|
617 | 625 | |
|
618 | 626 | # requires 'fctx' to denote {status} depends on (ctx, path) pair |
|
619 | 627 | @templatekeyword('status', requires={'ctx', 'fctx', 'revcache'}) |
|
620 | 628 | def showstatus(context, mapping): |
|
621 | 629 | """String. Status code of the current file. (EXPERIMENTAL)""" |
|
622 | 630 | path = templateutil.runsymbol(context, mapping, 'path') |
|
623 | 631 | path = templateutil.stringify(context, mapping, path) |
|
624 | 632 | if not path: |
|
625 | 633 | return |
|
626 | 634 | statmap = _getfilestatusmap(context, mapping) |
|
627 | 635 | if path not in statmap: |
|
628 | 636 | statmap = _getfilestatusmap(context, mapping, listall=True) |
|
629 | 637 | return statmap.get(path) |
|
630 | 638 | |
|
631 | 639 | @templatekeyword("successorssets", requires={'repo', 'ctx'}) |
|
632 | 640 | def showsuccessorssets(context, mapping): |
|
633 | 641 | """Returns a string of sets of successors for a changectx. Format used |
|
634 | 642 | is: [ctx1, ctx2], [ctx3] if ctx has been split into ctx1 and ctx2 |
|
635 | 643 | while also diverged into ctx3. (EXPERIMENTAL)""" |
|
636 | 644 | repo = context.resource(mapping, 'repo') |
|
637 | 645 | ctx = context.resource(mapping, 'ctx') |
|
638 | 646 | if not ctx.obsolete(): |
|
639 | 647 | return '' |
|
640 | 648 | |
|
641 | 649 | ssets = obsutil.successorssets(repo, ctx.node(), closest=True) |
|
642 | 650 | ssets = [[hex(n) for n in ss] for ss in ssets] |
|
643 | 651 | |
|
644 | 652 | data = [] |
|
645 | 653 | for ss in ssets: |
|
646 | 654 | h = _hybrid(None, ss, lambda x: {'ctx': repo[x]}, |
|
647 | 655 | lambda x: scmutil.formatchangeid(repo[x])) |
|
648 | 656 | data.append(h) |
|
649 | 657 | |
|
650 | 658 | # Format the successorssets |
|
651 | 659 | def render(d): |
|
652 | 660 | return templateutil.stringify(context, mapping, d) |
|
653 | 661 | |
|
654 | 662 | def gen(data): |
|
655 | 663 | yield "; ".join(render(d) for d in data) |
|
656 | 664 | |
|
657 | 665 | return _hybrid(gen(data), data, lambda x: {'successorset': x}, |
|
658 | 666 | pycompat.identity) |
|
659 | 667 | |
|
660 | 668 | @templatekeyword("succsandmarkers", requires={'repo', 'ctx'}) |
|
661 | 669 | def showsuccsandmarkers(context, mapping): |
|
662 | 670 | """Returns a list of dict for each final successor of ctx. The dict |
|
663 | 671 | contains successors node id in "successors" keys and the list of |
|
664 | 672 | obs-markers from ctx to the set of successors in "markers". |
|
665 | 673 | (EXPERIMENTAL) |
|
666 | 674 | """ |
|
667 | 675 | repo = context.resource(mapping, 'repo') |
|
668 | 676 | ctx = context.resource(mapping, 'ctx') |
|
669 | 677 | |
|
670 | 678 | values = obsutil.successorsandmarkers(repo, ctx) |
|
671 | 679 | |
|
672 | 680 | if values is None: |
|
673 | 681 | values = [] |
|
674 | 682 | |
|
675 | 683 | # Format successors and markers to avoid exposing binary to templates |
|
676 | 684 | data = [] |
|
677 | 685 | for i in values: |
|
678 | 686 | # Format successors |
|
679 | 687 | successors = i['successors'] |
|
680 | 688 | |
|
681 | 689 | successors = [hex(n) for n in successors] |
|
682 | 690 | successors = _hybrid(None, successors, |
|
683 | 691 | lambda x: {'ctx': repo[x]}, |
|
684 | 692 | lambda x: scmutil.formatchangeid(repo[x])) |
|
685 | 693 | |
|
686 | 694 | # Format markers |
|
687 | 695 | finalmarkers = [] |
|
688 | 696 | for m in i['markers']: |
|
689 | 697 | hexprec = hex(m[0]) |
|
690 | 698 | hexsucs = tuple(hex(n) for n in m[1]) |
|
691 | 699 | hexparents = None |
|
692 | 700 | if m[5] is not None: |
|
693 | 701 | hexparents = tuple(hex(n) for n in m[5]) |
|
694 | 702 | newmarker = (hexprec, hexsucs) + m[2:5] + (hexparents,) + m[6:] |
|
695 | 703 | finalmarkers.append(newmarker) |
|
696 | 704 | |
|
697 | 705 | data.append({'successors': successors, 'markers': finalmarkers}) |
|
698 | 706 | |
|
699 | 707 | return templateutil.mappinglist(data) |
|
700 | 708 | |
|
701 | 709 | @templatekeyword('p1', requires={'ctx'}) |
|
702 | 710 | def showp1(context, mapping): |
|
703 | 711 | """Changeset. The changeset's first parent. ``{p1.rev}`` for the revision |
|
704 | 712 | number, and ``{p1.node}`` for the identification hash.""" |
|
705 | 713 | ctx = context.resource(mapping, 'ctx') |
|
706 | 714 | return templateutil.mappingdict({'ctx': ctx.p1()}, tmpl=_changeidtmpl) |
|
707 | 715 | |
|
708 | 716 | @templatekeyword('p2', requires={'ctx'}) |
|
709 | 717 | def showp2(context, mapping): |
|
710 | 718 | """Changeset. The changeset's second parent. ``{p2.rev}`` for the revision |
|
711 | 719 | number, and ``{p2.node}`` for the identification hash.""" |
|
712 | 720 | ctx = context.resource(mapping, 'ctx') |
|
713 | 721 | return templateutil.mappingdict({'ctx': ctx.p2()}, tmpl=_changeidtmpl) |
|
714 | 722 | |
|
715 | 723 | @templatekeyword('p1rev', requires={'ctx'}) |
|
716 | 724 | def showp1rev(context, mapping): |
|
717 | 725 | """Integer. The repository-local revision number of the changeset's |
|
718 | 726 | first parent, or -1 if the changeset has no parents. (DEPRECATED)""" |
|
719 | 727 | ctx = context.resource(mapping, 'ctx') |
|
720 | 728 | return ctx.p1().rev() |
|
721 | 729 | |
|
722 | 730 | @templatekeyword('p2rev', requires={'ctx'}) |
|
723 | 731 | def showp2rev(context, mapping): |
|
724 | 732 | """Integer. The repository-local revision number of the changeset's |
|
725 | 733 | second parent, or -1 if the changeset has no second parent. (DEPRECATED)""" |
|
726 | 734 | ctx = context.resource(mapping, 'ctx') |
|
727 | 735 | return ctx.p2().rev() |
|
728 | 736 | |
|
729 | 737 | @templatekeyword('p1node', requires={'ctx'}) |
|
730 | 738 | def showp1node(context, mapping): |
|
731 | 739 | """String. The identification hash of the changeset's first parent, |
|
732 | 740 | as a 40 digit hexadecimal string. If the changeset has no parents, all |
|
733 | 741 | digits are 0. (DEPRECATED)""" |
|
734 | 742 | ctx = context.resource(mapping, 'ctx') |
|
735 | 743 | return ctx.p1().hex() |
|
736 | 744 | |
|
737 | 745 | @templatekeyword('p2node', requires={'ctx'}) |
|
738 | 746 | def showp2node(context, mapping): |
|
739 | 747 | """String. The identification hash of the changeset's second |
|
740 | 748 | parent, as a 40 digit hexadecimal string. If the changeset has no second |
|
741 | 749 | parent, all digits are 0. (DEPRECATED)""" |
|
742 | 750 | ctx = context.resource(mapping, 'ctx') |
|
743 | 751 | return ctx.p2().hex() |
|
744 | 752 | |
|
745 | 753 | @templatekeyword('parents', requires={'repo', 'ctx'}) |
|
746 | 754 | def showparents(context, mapping): |
|
747 | 755 | """List of strings. The parents of the changeset in "rev:node" |
|
748 | 756 | format. If the changeset has only one "natural" parent (the predecessor |
|
749 | 757 | revision) nothing is shown.""" |
|
750 | 758 | repo = context.resource(mapping, 'repo') |
|
751 | 759 | ctx = context.resource(mapping, 'ctx') |
|
752 | 760 | pctxs = scmutil.meaningfulparents(repo, ctx) |
|
753 | 761 | prevs = [p.rev() for p in pctxs] |
|
754 | 762 | parents = [[('rev', p.rev()), |
|
755 | 763 | ('node', p.hex()), |
|
756 | 764 | ('phase', p.phasestr())] |
|
757 | 765 | for p in pctxs] |
|
758 | 766 | f = _showcompatlist(context, mapping, 'parent', parents) |
|
759 | 767 | return _hybrid(f, prevs, lambda x: {'ctx': repo[x]}, |
|
760 | 768 | lambda x: scmutil.formatchangeid(repo[x]), keytype=int) |
|
761 | 769 | |
|
762 | 770 | @templatekeyword('phase', requires={'ctx'}) |
|
763 | 771 | def showphase(context, mapping): |
|
764 | 772 | """String. The changeset phase name.""" |
|
765 | 773 | ctx = context.resource(mapping, 'ctx') |
|
766 | 774 | return ctx.phasestr() |
|
767 | 775 | |
|
768 | 776 | @templatekeyword('phaseidx', requires={'ctx'}) |
|
769 | 777 | def showphaseidx(context, mapping): |
|
770 | 778 | """Integer. The changeset phase index. (ADVANCED)""" |
|
771 | 779 | ctx = context.resource(mapping, 'ctx') |
|
772 | 780 | return ctx.phase() |
|
773 | 781 | |
|
774 | 782 | @templatekeyword('rev', requires={'ctx'}) |
|
775 | 783 | def showrev(context, mapping): |
|
776 | 784 | """Integer. The repository-local changeset revision number.""" |
|
777 | 785 | ctx = context.resource(mapping, 'ctx') |
|
778 | 786 | return scmutil.intrev(ctx) |
|
779 | 787 | |
|
780 | 788 | def showrevslist(context, mapping, name, revs): |
|
781 | 789 | """helper to generate a list of revisions in which a mapped template will |
|
782 | 790 | be evaluated""" |
|
783 | 791 | repo = context.resource(mapping, 'repo') |
|
784 | 792 | # revs may be a smartset; don't compute it until f() has to be evaluated |
|
785 | 793 | def f(): |
|
786 | 794 | srevs = ['%d' % r for r in revs] |
|
787 | 795 | return _showcompatlist(context, mapping, name, srevs) |
|
788 | 796 | return _hybrid(f, revs, |
|
789 | 797 | lambda x: {name: x, 'ctx': repo[x]}, |
|
790 | 798 | pycompat.identity, keytype=int) |
|
791 | 799 | |
|
792 | 800 | @templatekeyword('subrepos', requires={'ctx'}) |
|
793 | 801 | def showsubrepos(context, mapping): |
|
794 | 802 | """List of strings. Updated subrepositories in the changeset.""" |
|
795 | 803 | ctx = context.resource(mapping, 'ctx') |
|
796 | 804 | substate = ctx.substate |
|
797 | 805 | if not substate: |
|
798 | 806 | return compatlist(context, mapping, 'subrepo', []) |
|
799 | 807 | psubstate = ctx.p1().substate or {} |
|
800 | 808 | subrepos = [] |
|
801 | 809 | for sub in substate: |
|
802 | 810 | if sub not in psubstate or substate[sub] != psubstate[sub]: |
|
803 | 811 | subrepos.append(sub) # modified or newly added in ctx |
|
804 | 812 | for sub in psubstate: |
|
805 | 813 | if sub not in substate: |
|
806 | 814 | subrepos.append(sub) # removed in ctx |
|
807 | 815 | return compatlist(context, mapping, 'subrepo', sorted(subrepos)) |
|
808 | 816 | |
|
809 | 817 | # don't remove "showtags" definition, even though namespaces will put |
|
810 | 818 | # a helper function for "tags" keyword into "keywords" map automatically, |
|
811 | 819 | # because online help text is built without namespaces initialization |
|
812 | 820 | @templatekeyword('tags', requires={'repo', 'ctx'}) |
|
813 | 821 | def showtags(context, mapping): |
|
814 | 822 | """List of strings. Any tags associated with the changeset.""" |
|
815 | 823 | return shownames(context, mapping, 'tags') |
|
816 | 824 | |
|
817 | 825 | @templatekeyword('termwidth', requires={'ui'}) |
|
818 | 826 | def showtermwidth(context, mapping): |
|
819 | 827 | """Integer. The width of the current terminal.""" |
|
820 | 828 | ui = context.resource(mapping, 'ui') |
|
821 | 829 | return ui.termwidth() |
|
822 | 830 | |
|
823 | 831 | @templatekeyword('user', requires={'ctx'}) |
|
824 | 832 | def showuser(context, mapping): |
|
825 | 833 | """String. The unmodified author of the changeset.""" |
|
826 | 834 | ctx = context.resource(mapping, 'ctx') |
|
827 | 835 | return ctx.user() |
|
828 | 836 | |
|
829 | 837 | @templatekeyword('instabilities', requires={'ctx'}) |
|
830 | 838 | def showinstabilities(context, mapping): |
|
831 | 839 | """List of strings. Evolution instabilities affecting the changeset. |
|
832 | 840 | (EXPERIMENTAL) |
|
833 | 841 | """ |
|
834 | 842 | ctx = context.resource(mapping, 'ctx') |
|
835 | 843 | return compatlist(context, mapping, 'instability', ctx.instabilities(), |
|
836 | 844 | plural='instabilities') |
|
837 | 845 | |
|
838 | 846 | @templatekeyword('verbosity', requires={'ui'}) |
|
839 | 847 | def showverbosity(context, mapping): |
|
840 | 848 | """String. The current output verbosity in 'debug', 'quiet', 'verbose', |
|
841 | 849 | or ''.""" |
|
842 | 850 | ui = context.resource(mapping, 'ui') |
|
843 | 851 | # see logcmdutil.changesettemplater for priority of these flags |
|
844 | 852 | if ui.debugflag: |
|
845 | 853 | return 'debug' |
|
846 | 854 | elif ui.quiet: |
|
847 | 855 | return 'quiet' |
|
848 | 856 | elif ui.verbose: |
|
849 | 857 | return 'verbose' |
|
850 | 858 | return '' |
|
851 | 859 | |
|
852 | 860 | @templatekeyword('whyunstable', requires={'repo', 'ctx'}) |
|
853 | 861 | def showwhyunstable(context, mapping): |
|
854 | 862 | """List of dicts explaining all instabilities of a changeset. |
|
855 | 863 | (EXPERIMENTAL) |
|
856 | 864 | """ |
|
857 | 865 | repo = context.resource(mapping, 'repo') |
|
858 | 866 | ctx = context.resource(mapping, 'ctx') |
|
859 | 867 | |
|
860 | 868 | def formatnode(ctx): |
|
861 | 869 | return '%s (%s)' % (scmutil.formatchangeid(ctx), ctx.phasestr()) |
|
862 | 870 | |
|
863 | 871 | entries = obsutil.whyunstable(repo, ctx) |
|
864 | 872 | |
|
865 | 873 | for entry in entries: |
|
866 | 874 | if entry.get('divergentnodes'): |
|
867 | 875 | dnodes = entry['divergentnodes'] |
|
868 | 876 | dnhybrid = _hybrid(None, [dnode.hex() for dnode in dnodes], |
|
869 | 877 | lambda x: {'ctx': repo[x]}, |
|
870 | 878 | lambda x: formatnode(repo[x])) |
|
871 | 879 | entry['divergentnodes'] = dnhybrid |
|
872 | 880 | |
|
873 | 881 | tmpl = ('{instability}:{if(divergentnodes, " ")}{divergentnodes} ' |
|
874 | 882 | '{reason} {node|short}') |
|
875 | 883 | return templateutil.mappinglist(entries, tmpl=tmpl, sep='\n') |
|
876 | 884 | |
|
877 | 885 | def loadkeyword(ui, extname, registrarobj): |
|
878 | 886 | """Load template keyword from specified registrarobj |
|
879 | 887 | """ |
|
880 | 888 | for name, func in registrarobj._table.iteritems(): |
|
881 | 889 | keywords[name] = func |
|
882 | 890 | |
|
883 | 891 | # tell hggettext to extract docstrings from these functions: |
|
884 | 892 | i18nfunctions = keywords.values() |
@@ -1,2641 +1,2665 | |||
|
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 | > evolution=true |
|
14 | 14 | > [templates] |
|
15 | 15 | > obsfatesuccessors = "{if(successors, " as ")}{join(successors, ", ")}" |
|
16 | 16 | > obsfateverb = "{obsfateverb(successors, markers)}" |
|
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 | | obsolete: rewritten using amend as 3:d004c8f274b9 by test2 |
|
62 | 62 | | summary: A1 |
|
63 | 63 | | |
|
64 | 64 | | x changeset: 1:471f378eab4c |
|
65 | 65 | |/ user: test |
|
66 | 66 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
67 | 67 | | obsolete: rewritten using amend as 2:a468dc9b3633 |
|
68 | 68 | | summary: A0 |
|
69 | 69 | | |
|
70 | 70 | o changeset: 0:ea207398892e |
|
71 | 71 | user: test |
|
72 | 72 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
73 | 73 | summary: ROOT |
|
74 | 74 | |
|
75 | 75 | Check templates |
|
76 | 76 | --------------- |
|
77 | 77 | $ hg up 'desc(A0)' --hidden |
|
78 | 78 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
79 | 79 | updated to hidden changeset 471f378eab4c |
|
80 | 80 | (hidden revision '471f378eab4c' was rewritten as: d004c8f274b9) |
|
81 | 81 | |
|
82 | 82 | Predecessors template should show current revision as it is the working copy |
|
83 | 83 | $ hg tlog |
|
84 | 84 | o d004c8f274b9 |
|
85 | 85 | | Predecessors: 1:471f378eab4c |
|
86 | 86 | | semi-colon: 1:471f378eab4c |
|
87 | 87 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
88 | 88 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
89 | 89 | | @ 471f378eab4c |
|
90 | 90 | |/ Successors: 3:d004c8f274b9 |
|
91 | 91 | | multi-line: 3:d004c8f274b9 |
|
92 | 92 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] |
|
93 | 93 | o ea207398892e |
|
94 | 94 | |
|
95 | 95 | $ hg fatelog |
|
96 | 96 | o d004c8f274b9 |
|
97 | 97 | | |
|
98 | 98 | | @ 471f378eab4c |
|
99 | 99 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000); |
|
100 | 100 | o ea207398892e |
|
101 | 101 | |
|
102 | 102 | |
|
103 | 103 | $ hg fatelogkw |
|
104 | 104 | o d004c8f274b9 |
|
105 | 105 | | |
|
106 | 106 | | @ 471f378eab4c |
|
107 | 107 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test, test2 |
|
108 | 108 | o ea207398892e |
|
109 | 109 | |
|
110 | 110 | |
|
111 | 111 | $ hg log -G --config ui.logtemplate= |
|
112 | 112 | o changeset: 3:d004c8f274b9 |
|
113 | 113 | | tag: tip |
|
114 | 114 | | parent: 0:ea207398892e |
|
115 | 115 | | user: test |
|
116 | 116 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
117 | 117 | | summary: A2 |
|
118 | 118 | | |
|
119 | 119 | | @ changeset: 1:471f378eab4c |
|
120 | 120 | |/ user: test |
|
121 | 121 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
122 | 122 | | obsolete: rewritten using amend as 3:d004c8f274b9 by test, test2 |
|
123 | 123 | | summary: A0 |
|
124 | 124 | | |
|
125 | 125 | o changeset: 0:ea207398892e |
|
126 | 126 | user: test |
|
127 | 127 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
128 | 128 | summary: ROOT |
|
129 | 129 | |
|
130 | 130 | |
|
131 | 131 | $ hg log -G -T "default" |
|
132 | 132 | o changeset: 3:d004c8f274b9 |
|
133 | 133 | | tag: tip |
|
134 | 134 | | parent: 0:ea207398892e |
|
135 | 135 | | user: test |
|
136 | 136 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
137 | 137 | | summary: A2 |
|
138 | 138 | | |
|
139 | 139 | | @ changeset: 1:471f378eab4c |
|
140 | 140 | |/ user: test |
|
141 | 141 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
142 | 142 | | obsolete: rewritten using amend as 3:d004c8f274b9 by test, test2 |
|
143 | 143 | | summary: A0 |
|
144 | 144 | | |
|
145 | 145 | o changeset: 0:ea207398892e |
|
146 | 146 | user: test |
|
147 | 147 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
148 | 148 | summary: ROOT |
|
149 | 149 | |
|
150 | 150 | $ hg up 'desc(A1)' --hidden |
|
151 | 151 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
152 | 152 | updated to hidden changeset a468dc9b3633 |
|
153 | 153 | (hidden revision 'a468dc9b3633' was rewritten as: d004c8f274b9) |
|
154 | 154 | |
|
155 | 155 | Predecessors template should show current revision as it is the working copy |
|
156 | 156 | $ hg tlog |
|
157 | 157 | o d004c8f274b9 |
|
158 | 158 | | Predecessors: 2:a468dc9b3633 |
|
159 | 159 | | semi-colon: 2:a468dc9b3633 |
|
160 | 160 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] |
|
161 | 161 | | map: 2:a468dc9b36338b14fdb7825f55ce3df4e71517ad |
|
162 | 162 | | @ a468dc9b3633 |
|
163 | 163 | |/ Successors: 3:d004c8f274b9 |
|
164 | 164 | | multi-line: 3:d004c8f274b9 |
|
165 | 165 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] |
|
166 | 166 | o ea207398892e |
|
167 | 167 | |
|
168 | 168 | $ hg fatelog |
|
169 | 169 | o d004c8f274b9 |
|
170 | 170 | | |
|
171 | 171 | | @ a468dc9b3633 |
|
172 | 172 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); |
|
173 | 173 | o ea207398892e |
|
174 | 174 | |
|
175 | 175 | Predecessors template should show all the predecessors as we force their display |
|
176 | 176 | with --hidden |
|
177 | 177 | $ hg tlog --hidden |
|
178 | 178 | o d004c8f274b9 |
|
179 | 179 | | Predecessors: 2:a468dc9b3633 |
|
180 | 180 | | semi-colon: 2:a468dc9b3633 |
|
181 | 181 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] |
|
182 | 182 | | map: 2:a468dc9b36338b14fdb7825f55ce3df4e71517ad |
|
183 | 183 | | @ a468dc9b3633 |
|
184 | 184 | |/ Predecessors: 1:471f378eab4c |
|
185 | 185 | | semi-colon: 1:471f378eab4c |
|
186 | 186 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
187 | 187 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
188 | 188 | | Successors: 3:d004c8f274b9 |
|
189 | 189 | | multi-line: 3:d004c8f274b9 |
|
190 | 190 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] |
|
191 | 191 | | x 471f378eab4c |
|
192 | 192 | |/ Successors: 2:a468dc9b3633 |
|
193 | 193 | | multi-line: 2:a468dc9b3633 |
|
194 | 194 | | json: [["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]] |
|
195 | 195 | o ea207398892e |
|
196 | 196 | |
|
197 | 197 | $ hg fatelog --hidden |
|
198 | 198 | o d004c8f274b9 |
|
199 | 199 | | |
|
200 | 200 | | @ a468dc9b3633 |
|
201 | 201 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); |
|
202 | 202 | | x 471f378eab4c |
|
203 | 203 | |/ Obsfate: rewritten using amend as 2:a468dc9b3633 by test (at 2009-02-13 23:31 +0000); |
|
204 | 204 | o ea207398892e |
|
205 | 205 | |
|
206 | 206 | |
|
207 | 207 | Predecessors template shouldn't show anything as all obsolete commit are not |
|
208 | 208 | visible. |
|
209 | 209 | $ hg up 'desc(A2)' |
|
210 | 210 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
211 | 211 | $ hg tlog |
|
212 | 212 | @ d004c8f274b9 |
|
213 | 213 | | |
|
214 | 214 | o ea207398892e |
|
215 | 215 | |
|
216 | 216 | $ hg tlog --hidden |
|
217 | 217 | @ d004c8f274b9 |
|
218 | 218 | | Predecessors: 2:a468dc9b3633 |
|
219 | 219 | | semi-colon: 2:a468dc9b3633 |
|
220 | 220 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] |
|
221 | 221 | | map: 2:a468dc9b36338b14fdb7825f55ce3df4e71517ad |
|
222 | 222 | | x a468dc9b3633 |
|
223 | 223 | |/ Predecessors: 1:471f378eab4c |
|
224 | 224 | | semi-colon: 1:471f378eab4c |
|
225 | 225 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
226 | 226 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
227 | 227 | | Successors: 3:d004c8f274b9 |
|
228 | 228 | | multi-line: 3:d004c8f274b9 |
|
229 | 229 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] |
|
230 | 230 | | x 471f378eab4c |
|
231 | 231 | |/ Successors: 2:a468dc9b3633 |
|
232 | 232 | | multi-line: 2:a468dc9b3633 |
|
233 | 233 | | json: [["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]] |
|
234 | 234 | o ea207398892e |
|
235 | 235 | |
|
236 | 236 | $ hg fatelog |
|
237 | 237 | @ d004c8f274b9 |
|
238 | 238 | | |
|
239 | 239 | o ea207398892e |
|
240 | 240 | |
|
241 | 241 | |
|
242 | 242 | $ hg fatelog --hidden |
|
243 | 243 | @ d004c8f274b9 |
|
244 | 244 | | |
|
245 | 245 | | x a468dc9b3633 |
|
246 | 246 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); |
|
247 | 247 | | x 471f378eab4c |
|
248 | 248 | |/ Obsfate: rewritten using amend as 2:a468dc9b3633 by test (at 2009-02-13 23:31 +0000); |
|
249 | 249 | o ea207398892e |
|
250 | 250 | |
|
251 | 251 | $ hg fatelogjson --hidden |
|
252 | 252 | @ d004c8f274b9 |
|
253 | 253 | | |
|
254 | 254 | | x a468dc9b3633 |
|
255 | 255 | |/ Obsfate: [{"markers": [["a468dc9b36338b14fdb7825f55ce3df4e71517ad", ["d004c8f274b9ec480a47a93c10dac5eee63adb78"], 0, [["ef1", "1"], ["operation", "amend"], ["user", "test2"]], [987654321.0, 0], null]], "successors": ["d004c8f274b9ec480a47a93c10dac5eee63adb78"]}] |
|
256 | 256 | | x 471f378eab4c |
|
257 | 257 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"], 0, [["ef1", "9"], ["operation", "amend"], ["user", "test"]], [1234567890.0, 0], null]], "successors": ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]}] |
|
258 | 258 | o ea207398892e |
|
259 | 259 | |
|
260 | 260 | |
|
261 | 261 | Check other fatelog implementations |
|
262 | 262 | ----------------------------------- |
|
263 | 263 | |
|
264 | 264 | $ hg fatelogkw --hidden -q |
|
265 | 265 | @ d004c8f274b9 |
|
266 | 266 | | |
|
267 | 267 | | x a468dc9b3633 |
|
268 | 268 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 |
|
269 | 269 | | x 471f378eab4c |
|
270 | 270 | |/ Obsfate: rewritten using amend as 2:a468dc9b3633 |
|
271 | 271 | o ea207398892e |
|
272 | 272 | |
|
273 | 273 | $ hg fatelogkw --hidden |
|
274 | 274 | @ d004c8f274b9 |
|
275 | 275 | | |
|
276 | 276 | | x a468dc9b3633 |
|
277 | 277 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 |
|
278 | 278 | | x 471f378eab4c |
|
279 | 279 | |/ Obsfate: rewritten using amend as 2:a468dc9b3633 |
|
280 | 280 | o ea207398892e |
|
281 | 281 | |
|
282 | 282 | $ hg fatelogkw --hidden -v |
|
283 | 283 | @ d004c8f274b9 |
|
284 | 284 | | |
|
285 | 285 | | x a468dc9b3633 |
|
286 | 286 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000) |
|
287 | 287 | | x 471f378eab4c |
|
288 | 288 | |/ Obsfate: rewritten using amend as 2:a468dc9b3633 by test (at 2009-02-13 23:31 +0000) |
|
289 | 289 | o ea207398892e |
|
290 | 290 | |
|
291 | 291 | |
|
292 | 292 | $ hg log -G -T "default" --hidden |
|
293 | 293 | @ changeset: 3:d004c8f274b9 |
|
294 | 294 | | tag: tip |
|
295 | 295 | | parent: 0:ea207398892e |
|
296 | 296 | | user: test |
|
297 | 297 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
298 | 298 | | summary: A2 |
|
299 | 299 | | |
|
300 | 300 | | x changeset: 2:a468dc9b3633 |
|
301 | 301 | |/ parent: 0:ea207398892e |
|
302 | 302 | | user: test |
|
303 | 303 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
304 | 304 | | obsolete: rewritten using amend as 3:d004c8f274b9 by test2 |
|
305 | 305 | | summary: A1 |
|
306 | 306 | | |
|
307 | 307 | | x changeset: 1:471f378eab4c |
|
308 | 308 | |/ user: test |
|
309 | 309 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
310 | 310 | | obsolete: rewritten using amend as 2:a468dc9b3633 |
|
311 | 311 | | summary: A0 |
|
312 | 312 | | |
|
313 | 313 | o changeset: 0:ea207398892e |
|
314 | 314 | user: test |
|
315 | 315 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
316 | 316 | summary: ROOT |
|
317 | 317 | |
|
318 | 318 | $ hg log -G -T "default" --hidden -v |
|
319 | 319 | @ changeset: 3:d004c8f274b9 |
|
320 | 320 | | tag: tip |
|
321 | 321 | | parent: 0:ea207398892e |
|
322 | 322 | | user: test |
|
323 | 323 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
324 | 324 | | files: A0 |
|
325 | 325 | | description: |
|
326 | 326 | | A2 |
|
327 | 327 | | |
|
328 | 328 | | |
|
329 | 329 | | x changeset: 2:a468dc9b3633 |
|
330 | 330 | |/ parent: 0:ea207398892e |
|
331 | 331 | | user: test |
|
332 | 332 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
333 | 333 | | obsolete: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000) |
|
334 | 334 | | files: A0 |
|
335 | 335 | | description: |
|
336 | 336 | | A1 |
|
337 | 337 | | |
|
338 | 338 | | |
|
339 | 339 | | x changeset: 1:471f378eab4c |
|
340 | 340 | |/ user: test |
|
341 | 341 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
342 | 342 | | obsolete: rewritten using amend as 2:a468dc9b3633 by test (at 2009-02-13 23:31 +0000) |
|
343 | 343 | | files: A0 |
|
344 | 344 | | description: |
|
345 | 345 | | A0 |
|
346 | 346 | | |
|
347 | 347 | | |
|
348 | 348 | o changeset: 0:ea207398892e |
|
349 | 349 | user: test |
|
350 | 350 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
351 | 351 | files: ROOT |
|
352 | 352 | description: |
|
353 | 353 | ROOT |
|
354 | 354 | |
|
355 | 355 | |
|
356 | 356 | Test templates with splitted commit |
|
357 | 357 | =================================== |
|
358 | 358 | |
|
359 | 359 | $ hg init $TESTTMP/templates-local-split |
|
360 | 360 | $ cd $TESTTMP/templates-local-split |
|
361 | 361 | $ mkcommit ROOT |
|
362 | 362 | $ echo 42 >> a |
|
363 | 363 | $ echo 43 >> b |
|
364 | 364 | $ hg commit -A -m "A0" |
|
365 | 365 | adding a |
|
366 | 366 | adding b |
|
367 | 367 | $ hg log --hidden -G |
|
368 | 368 | @ changeset: 1:471597cad322 |
|
369 | 369 | | tag: tip |
|
370 | 370 | | user: test |
|
371 | 371 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
372 | 372 | | summary: A0 |
|
373 | 373 | | |
|
374 | 374 | o changeset: 0:ea207398892e |
|
375 | 375 | user: test |
|
376 | 376 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
377 | 377 | summary: ROOT |
|
378 | 378 | |
|
379 | 379 | # Simulate split |
|
380 | 380 | $ hg up -r "desc(ROOT)" |
|
381 | 381 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
382 | 382 | $ echo 42 >> a |
|
383 | 383 | $ hg commit -A -m "A0" |
|
384 | 384 | adding a |
|
385 | 385 | created new head |
|
386 | 386 | $ echo 43 >> b |
|
387 | 387 | $ hg commit -A -m "A0" |
|
388 | 388 | adding b |
|
389 | 389 | $ hg debugobsolete `getid "1"` `getid "2"` `getid "3"` |
|
390 | 390 | obsoleted 1 changesets |
|
391 | 391 | |
|
392 | 392 | $ hg log --hidden -G |
|
393 | 393 | @ changeset: 3:f257fde29c7a |
|
394 | 394 | | tag: tip |
|
395 | 395 | | user: test |
|
396 | 396 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
397 | 397 | | summary: A0 |
|
398 | 398 | | |
|
399 | 399 | o changeset: 2:337fec4d2edc |
|
400 | 400 | | parent: 0:ea207398892e |
|
401 | 401 | | user: test |
|
402 | 402 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
403 | 403 | | summary: A0 |
|
404 | 404 | | |
|
405 | 405 | | x changeset: 1:471597cad322 |
|
406 | 406 | |/ user: test |
|
407 | 407 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
408 | 408 | | obsolete: split as 2:337fec4d2edc, 3:f257fde29c7a |
|
409 | 409 | | summary: A0 |
|
410 | 410 | | |
|
411 | 411 | o changeset: 0:ea207398892e |
|
412 | 412 | user: test |
|
413 | 413 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
414 | 414 | summary: ROOT |
|
415 | 415 | |
|
416 | 416 | Check templates |
|
417 | 417 | --------------- |
|
418 | 418 | |
|
419 | 419 | $ hg up 'obsolete()' --hidden |
|
420 | 420 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
421 | 421 | updated to hidden changeset 471597cad322 |
|
422 | 422 | (hidden revision '471597cad322' was split as: 337fec4d2edc, f257fde29c7a) |
|
423 | 423 | |
|
424 | 424 | Predecessors template should show current revision as it is the working copy |
|
425 | 425 | $ hg tlog |
|
426 | 426 | o f257fde29c7a |
|
427 | 427 | | Predecessors: 1:471597cad322 |
|
428 | 428 | | semi-colon: 1:471597cad322 |
|
429 | 429 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] |
|
430 | 430 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 |
|
431 | 431 | o 337fec4d2edc |
|
432 | 432 | | Predecessors: 1:471597cad322 |
|
433 | 433 | | semi-colon: 1:471597cad322 |
|
434 | 434 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] |
|
435 | 435 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 |
|
436 | 436 | | @ 471597cad322 |
|
437 | 437 | |/ Successors: 2:337fec4d2edc 3:f257fde29c7a |
|
438 | 438 | | multi-line: 2:337fec4d2edc 3:f257fde29c7a |
|
439 | 439 | | json: [["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"]] |
|
440 | 440 | o ea207398892e |
|
441 | 441 | |
|
442 | 442 | |
|
443 | 443 | $ hg fatelog |
|
444 | 444 | o f257fde29c7a |
|
445 | 445 | | |
|
446 | 446 | o 337fec4d2edc |
|
447 | 447 | | |
|
448 | 448 | | @ 471597cad322 |
|
449 | 449 | |/ Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a by test (at 1970-01-01 00:00 +0000); |
|
450 | 450 | o ea207398892e |
|
451 | 451 | |
|
452 | 452 | $ hg up f257fde29c7a |
|
453 | 453 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
454 | 454 | |
|
455 | 455 | Predecessors template should not show a predecessor as it's not displayed in |
|
456 | 456 | the log |
|
457 | 457 | $ hg tlog |
|
458 | 458 | @ f257fde29c7a |
|
459 | 459 | | |
|
460 | 460 | o 337fec4d2edc |
|
461 | 461 | | |
|
462 | 462 | o ea207398892e |
|
463 | 463 | |
|
464 | 464 | Predecessors template should show both predecessors as we force their display |
|
465 | 465 | with --hidden |
|
466 | 466 | $ hg tlog --hidden |
|
467 | 467 | @ f257fde29c7a |
|
468 | 468 | | Predecessors: 1:471597cad322 |
|
469 | 469 | | semi-colon: 1:471597cad322 |
|
470 | 470 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] |
|
471 | 471 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 |
|
472 | 472 | o 337fec4d2edc |
|
473 | 473 | | Predecessors: 1:471597cad322 |
|
474 | 474 | | semi-colon: 1:471597cad322 |
|
475 | 475 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] |
|
476 | 476 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 |
|
477 | 477 | | x 471597cad322 |
|
478 | 478 | |/ Successors: 2:337fec4d2edc 3:f257fde29c7a |
|
479 | 479 | | multi-line: 2:337fec4d2edc 3:f257fde29c7a |
|
480 | 480 | | json: [["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"]] |
|
481 | 481 | o ea207398892e |
|
482 | 482 | |
|
483 | 483 | |
|
484 | 484 | $ hg fatelog --hidden |
|
485 | 485 | @ f257fde29c7a |
|
486 | 486 | | |
|
487 | 487 | o 337fec4d2edc |
|
488 | 488 | | |
|
489 | 489 | | x 471597cad322 |
|
490 | 490 | |/ Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a by test (at 1970-01-01 00:00 +0000); |
|
491 | 491 | o ea207398892e |
|
492 | 492 | |
|
493 | 493 | $ hg fatelogjson --hidden |
|
494 | 494 | @ f257fde29c7a |
|
495 | 495 | | |
|
496 | 496 | o 337fec4d2edc |
|
497 | 497 | | |
|
498 | 498 | | x 471597cad322 |
|
499 | 499 | |/ Obsfate: [{"markers": [["471597cad322d1f659bb169751be9133dad92ef3", ["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"]}] |
|
500 | 500 | o ea207398892e |
|
501 | 501 | |
|
502 | 502 | Check other fatelog implementations |
|
503 | 503 | ----------------------------------- |
|
504 | 504 | |
|
505 | 505 | $ hg fatelogkw --hidden -q |
|
506 | 506 | @ f257fde29c7a |
|
507 | 507 | | |
|
508 | 508 | o 337fec4d2edc |
|
509 | 509 | | |
|
510 | 510 | | x 471597cad322 |
|
511 | 511 | |/ Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a |
|
512 | 512 | o ea207398892e |
|
513 | 513 | |
|
514 | 514 | $ hg fatelogkw --hidden |
|
515 | 515 | @ f257fde29c7a |
|
516 | 516 | | |
|
517 | 517 | o 337fec4d2edc |
|
518 | 518 | | |
|
519 | 519 | | x 471597cad322 |
|
520 | 520 | |/ Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a |
|
521 | 521 | o ea207398892e |
|
522 | 522 | |
|
523 | 523 | $ hg fatelogkw --hidden -v |
|
524 | 524 | @ f257fde29c7a |
|
525 | 525 | | |
|
526 | 526 | o 337fec4d2edc |
|
527 | 527 | | |
|
528 | 528 | | x 471597cad322 |
|
529 | 529 | |/ Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a by test (at 1970-01-01 00:00 +0000) |
|
530 | 530 | o ea207398892e |
|
531 | 531 | |
|
532 | 532 | |
|
533 | 533 | $ hg log -G -T "default" --hidden |
|
534 | 534 | @ changeset: 3:f257fde29c7a |
|
535 | 535 | | tag: tip |
|
536 | 536 | | user: test |
|
537 | 537 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
538 | 538 | | summary: A0 |
|
539 | 539 | | |
|
540 | 540 | o changeset: 2:337fec4d2edc |
|
541 | 541 | | parent: 0:ea207398892e |
|
542 | 542 | | user: test |
|
543 | 543 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
544 | 544 | | summary: A0 |
|
545 | 545 | | |
|
546 | 546 | | x changeset: 1:471597cad322 |
|
547 | 547 | |/ user: test |
|
548 | 548 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
549 | 549 | | obsolete: split as 2:337fec4d2edc, 3:f257fde29c7a |
|
550 | 550 | | summary: A0 |
|
551 | 551 | | |
|
552 | 552 | o changeset: 0:ea207398892e |
|
553 | 553 | user: test |
|
554 | 554 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
555 | 555 | summary: ROOT |
|
556 | 556 | |
|
557 | 557 | |
|
558 | 558 | Test templates with folded commit |
|
559 | 559 | ================================= |
|
560 | 560 | |
|
561 | 561 | Test setup |
|
562 | 562 | ---------- |
|
563 | 563 | |
|
564 | 564 | $ hg init $TESTTMP/templates-local-fold |
|
565 | 565 | $ cd $TESTTMP/templates-local-fold |
|
566 | 566 | $ mkcommit ROOT |
|
567 | 567 | $ mkcommit A0 |
|
568 | 568 | $ mkcommit B0 |
|
569 | 569 | $ hg log --hidden -G |
|
570 | 570 | @ changeset: 2:0dec01379d3b |
|
571 | 571 | | tag: tip |
|
572 | 572 | | user: test |
|
573 | 573 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
574 | 574 | | summary: B0 |
|
575 | 575 | | |
|
576 | 576 | o changeset: 1:471f378eab4c |
|
577 | 577 | | user: test |
|
578 | 578 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
579 | 579 | | summary: A0 |
|
580 | 580 | | |
|
581 | 581 | o changeset: 0:ea207398892e |
|
582 | 582 | user: test |
|
583 | 583 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
584 | 584 | summary: ROOT |
|
585 | 585 | |
|
586 | 586 | Simulate a fold |
|
587 | 587 | $ hg up -r "desc(ROOT)" |
|
588 | 588 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
589 | 589 | $ echo "A0" > A0 |
|
590 | 590 | $ echo "B0" > B0 |
|
591 | 591 | $ hg commit -A -m "C0" |
|
592 | 592 | adding A0 |
|
593 | 593 | adding B0 |
|
594 | 594 | created new head |
|
595 | 595 | $ hg debugobsolete `getid "desc(A0)"` `getid "desc(C0)"` |
|
596 | 596 | obsoleted 1 changesets |
|
597 | 597 | 1 new orphan changesets |
|
598 | 598 | $ hg debugobsolete `getid "desc(B0)"` `getid "desc(C0)"` |
|
599 | 599 | obsoleted 1 changesets |
|
600 | 600 | |
|
601 | 601 | $ hg log --hidden -G |
|
602 | 602 | @ changeset: 3:eb5a0daa2192 |
|
603 | 603 | | tag: tip |
|
604 | 604 | | parent: 0:ea207398892e |
|
605 | 605 | | user: test |
|
606 | 606 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
607 | 607 | | summary: C0 |
|
608 | 608 | | |
|
609 | 609 | | x changeset: 2:0dec01379d3b |
|
610 | 610 | | | user: test |
|
611 | 611 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
612 | 612 | | | obsolete: rewritten as 3:eb5a0daa2192 |
|
613 | 613 | | | summary: B0 |
|
614 | 614 | | | |
|
615 | 615 | | x changeset: 1:471f378eab4c |
|
616 | 616 | |/ user: test |
|
617 | 617 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
618 | 618 | | obsolete: rewritten as 3:eb5a0daa2192 |
|
619 | 619 | | summary: A0 |
|
620 | 620 | | |
|
621 | 621 | o changeset: 0:ea207398892e |
|
622 | 622 | user: test |
|
623 | 623 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
624 | 624 | summary: ROOT |
|
625 | 625 | |
|
626 | 626 | Check templates |
|
627 | 627 | --------------- |
|
628 | 628 | |
|
629 | 629 | $ hg up 'desc(A0)' --hidden |
|
630 | 630 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
631 | 631 | updated to hidden changeset 471f378eab4c |
|
632 | 632 | (hidden revision '471f378eab4c' was rewritten as: eb5a0daa2192) |
|
633 | 633 | |
|
634 | 634 | Predecessors template should show current revision as it is the working copy |
|
635 | 635 | $ hg tlog |
|
636 | 636 | o eb5a0daa2192 |
|
637 | 637 | | Predecessors: 1:471f378eab4c |
|
638 | 638 | | semi-colon: 1:471f378eab4c |
|
639 | 639 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
640 | 640 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
641 | 641 | | @ 471f378eab4c |
|
642 | 642 | |/ Successors: 3:eb5a0daa2192 |
|
643 | 643 | | multi-line: 3:eb5a0daa2192 |
|
644 | 644 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
645 | 645 | o ea207398892e |
|
646 | 646 | |
|
647 | 647 | |
|
648 | 648 | $ hg fatelog |
|
649 | 649 | o eb5a0daa2192 |
|
650 | 650 | | |
|
651 | 651 | | @ 471f378eab4c |
|
652 | 652 | |/ Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
653 | 653 | o ea207398892e |
|
654 | 654 | |
|
655 | 655 | $ hg up 'desc(B0)' --hidden |
|
656 | 656 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
657 | 657 | updated to hidden changeset 0dec01379d3b |
|
658 | 658 | (hidden revision '0dec01379d3b' was rewritten as: eb5a0daa2192) |
|
659 | 659 | |
|
660 | 660 | Predecessors template should show both predecessors as they should be both |
|
661 | 661 | displayed |
|
662 | 662 | $ hg tlog |
|
663 | 663 | o eb5a0daa2192 |
|
664 | 664 | | Predecessors: 2:0dec01379d3b 1:471f378eab4c |
|
665 | 665 | | semi-colon: 2:0dec01379d3b; 1:471f378eab4c |
|
666 | 666 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", "471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
667 | 667 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
668 | 668 | | @ 0dec01379d3b |
|
669 | 669 | | | Successors: 3:eb5a0daa2192 |
|
670 | 670 | | | multi-line: 3:eb5a0daa2192 |
|
671 | 671 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
672 | 672 | | x 471f378eab4c |
|
673 | 673 | |/ Successors: 3:eb5a0daa2192 |
|
674 | 674 | | multi-line: 3:eb5a0daa2192 |
|
675 | 675 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
676 | 676 | o ea207398892e |
|
677 | 677 | |
|
678 | 678 | |
|
679 | 679 | $ hg fatelog |
|
680 | 680 | o eb5a0daa2192 |
|
681 | 681 | | |
|
682 | 682 | | @ 0dec01379d3b |
|
683 | 683 | | | Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
684 | 684 | | x 471f378eab4c |
|
685 | 685 | |/ Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
686 | 686 | o ea207398892e |
|
687 | 687 | |
|
688 | 688 | $ hg up 'desc(C0)' |
|
689 | 689 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
690 | 690 | |
|
691 | 691 | Predecessors template should not show predecessors as they are not displayed in |
|
692 | 692 | the log |
|
693 | 693 | $ hg tlog |
|
694 | 694 | @ eb5a0daa2192 |
|
695 | 695 | | |
|
696 | 696 | o ea207398892e |
|
697 | 697 | |
|
698 | 698 | Predecessors template should show both predecessors as we force their display |
|
699 | 699 | with --hidden |
|
700 | 700 | $ hg tlog --hidden |
|
701 | 701 | @ eb5a0daa2192 |
|
702 | 702 | | Predecessors: 2:0dec01379d3b 1:471f378eab4c |
|
703 | 703 | | semi-colon: 2:0dec01379d3b; 1:471f378eab4c |
|
704 | 704 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", "471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
705 | 705 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
706 | 706 | | x 0dec01379d3b |
|
707 | 707 | | | Successors: 3:eb5a0daa2192 |
|
708 | 708 | | | multi-line: 3:eb5a0daa2192 |
|
709 | 709 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
710 | 710 | | x 471f378eab4c |
|
711 | 711 | |/ Successors: 3:eb5a0daa2192 |
|
712 | 712 | | multi-line: 3:eb5a0daa2192 |
|
713 | 713 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
714 | 714 | o ea207398892e |
|
715 | 715 | |
|
716 | 716 | |
|
717 | 717 | $ hg fatelog --hidden |
|
718 | 718 | @ eb5a0daa2192 |
|
719 | 719 | | |
|
720 | 720 | | x 0dec01379d3b |
|
721 | 721 | | | Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
722 | 722 | | x 471f378eab4c |
|
723 | 723 | |/ Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
724 | 724 | o ea207398892e |
|
725 | 725 | |
|
726 | 726 | |
|
727 | 727 | $ hg fatelogjson --hidden |
|
728 | 728 | @ eb5a0daa2192 |
|
729 | 729 | | |
|
730 | 730 | | x 0dec01379d3b |
|
731 | 731 | | | Obsfate: [{"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}] |
|
732 | 732 | | x 471f378eab4c |
|
733 | 733 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}] |
|
734 | 734 | o ea207398892e |
|
735 | 735 | |
|
736 | 736 | Check other fatelog implementations |
|
737 | 737 | ----------------------------------- |
|
738 | 738 | |
|
739 | 739 | $ hg fatelogkw --hidden -q |
|
740 | 740 | @ eb5a0daa2192 |
|
741 | 741 | | |
|
742 | 742 | | x 0dec01379d3b |
|
743 | 743 | | | Obsfate: rewritten as 3:eb5a0daa2192 |
|
744 | 744 | | x 471f378eab4c |
|
745 | 745 | |/ Obsfate: rewritten as 3:eb5a0daa2192 |
|
746 | 746 | o ea207398892e |
|
747 | 747 | |
|
748 | 748 | $ hg fatelogkw --hidden |
|
749 | 749 | @ eb5a0daa2192 |
|
750 | 750 | | |
|
751 | 751 | | x 0dec01379d3b |
|
752 | 752 | | | Obsfate: rewritten as 3:eb5a0daa2192 |
|
753 | 753 | | x 471f378eab4c |
|
754 | 754 | |/ Obsfate: rewritten as 3:eb5a0daa2192 |
|
755 | 755 | o ea207398892e |
|
756 | 756 | |
|
757 | 757 | $ hg fatelogkw --hidden -v |
|
758 | 758 | @ eb5a0daa2192 |
|
759 | 759 | | |
|
760 | 760 | | x 0dec01379d3b |
|
761 | 761 | | | Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000) |
|
762 | 762 | | x 471f378eab4c |
|
763 | 763 | |/ Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000) |
|
764 | 764 | o ea207398892e |
|
765 | 765 | |
|
766 | 766 | $ hg log -G -T "default" --hidden |
|
767 | 767 | @ changeset: 3:eb5a0daa2192 |
|
768 | 768 | | tag: tip |
|
769 | 769 | | parent: 0:ea207398892e |
|
770 | 770 | | user: test |
|
771 | 771 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
772 | 772 | | summary: C0 |
|
773 | 773 | | |
|
774 | 774 | | x changeset: 2:0dec01379d3b |
|
775 | 775 | | | user: test |
|
776 | 776 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
777 | 777 | | | obsolete: rewritten as 3:eb5a0daa2192 |
|
778 | 778 | | | summary: B0 |
|
779 | 779 | | | |
|
780 | 780 | | x changeset: 1:471f378eab4c |
|
781 | 781 | |/ user: test |
|
782 | 782 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
783 | 783 | | obsolete: rewritten as 3:eb5a0daa2192 |
|
784 | 784 | | summary: A0 |
|
785 | 785 | | |
|
786 | 786 | o changeset: 0:ea207398892e |
|
787 | 787 | user: test |
|
788 | 788 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
789 | 789 | summary: ROOT |
|
790 | 790 | |
|
791 | 791 | |
|
792 | 792 | Test templates with divergence |
|
793 | 793 | ============================== |
|
794 | 794 | |
|
795 | 795 | Test setup |
|
796 | 796 | ---------- |
|
797 | 797 | |
|
798 | 798 | $ hg init $TESTTMP/templates-local-divergence |
|
799 | 799 | $ cd $TESTTMP/templates-local-divergence |
|
800 | 800 | $ mkcommit ROOT |
|
801 | 801 | $ mkcommit A0 |
|
802 | 802 | $ hg commit --amend -m "A1" |
|
803 | 803 | $ hg log --hidden -G |
|
804 | 804 | @ changeset: 2:fdf9bde5129a |
|
805 | 805 | | tag: tip |
|
806 | 806 | | parent: 0:ea207398892e |
|
807 | 807 | | user: test |
|
808 | 808 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
809 | 809 | | summary: A1 |
|
810 | 810 | | |
|
811 | 811 | | x changeset: 1:471f378eab4c |
|
812 | 812 | |/ user: test |
|
813 | 813 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
814 | 814 | | obsolete: rewritten using amend as 2:fdf9bde5129a |
|
815 | 815 | | summary: A0 |
|
816 | 816 | | |
|
817 | 817 | o changeset: 0:ea207398892e |
|
818 | 818 | user: test |
|
819 | 819 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
820 | 820 | summary: ROOT |
|
821 | 821 | |
|
822 | 822 | $ hg update --hidden 'desc(A0)' |
|
823 | 823 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
824 | 824 | updated to hidden changeset 471f378eab4c |
|
825 | 825 | (hidden revision '471f378eab4c' was rewritten as: fdf9bde5129a) |
|
826 | 826 | $ hg commit --amend -m "A2" |
|
827 | 827 | 2 new content-divergent changesets |
|
828 | 828 | $ hg log --hidden -G |
|
829 | 829 | @ changeset: 3:65b757b745b9 |
|
830 | 830 | | tag: tip |
|
831 | 831 | | parent: 0:ea207398892e |
|
832 | 832 | | user: test |
|
833 | 833 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
834 | 834 | | instability: content-divergent |
|
835 | 835 | | summary: A2 |
|
836 | 836 | | |
|
837 | 837 | | * changeset: 2:fdf9bde5129a |
|
838 | 838 | |/ parent: 0:ea207398892e |
|
839 | 839 | | user: test |
|
840 | 840 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
841 | 841 | | instability: content-divergent |
|
842 | 842 | | summary: A1 |
|
843 | 843 | | |
|
844 | 844 | | x changeset: 1:471f378eab4c |
|
845 | 845 | |/ user: test |
|
846 | 846 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
847 | 847 | | obsolete: rewritten using amend as 2:fdf9bde5129a |
|
848 | 848 | | obsolete: rewritten using amend as 3:65b757b745b9 |
|
849 | 849 | | summary: A0 |
|
850 | 850 | | |
|
851 | 851 | o changeset: 0:ea207398892e |
|
852 | 852 | user: test |
|
853 | 853 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
854 | 854 | summary: ROOT |
|
855 | 855 | |
|
856 | 856 | $ hg commit --amend -m 'A3' |
|
857 | 857 | $ hg log --hidden -G |
|
858 | 858 | @ changeset: 4:019fadeab383 |
|
859 | 859 | | tag: tip |
|
860 | 860 | | parent: 0:ea207398892e |
|
861 | 861 | | user: test |
|
862 | 862 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
863 | 863 | | instability: content-divergent |
|
864 | 864 | | summary: A3 |
|
865 | 865 | | |
|
866 | 866 | | x changeset: 3:65b757b745b9 |
|
867 | 867 | |/ parent: 0:ea207398892e |
|
868 | 868 | | user: test |
|
869 | 869 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
870 | 870 | | obsolete: rewritten using amend as 4:019fadeab383 |
|
871 | 871 | | summary: A2 |
|
872 | 872 | | |
|
873 | 873 | | * changeset: 2:fdf9bde5129a |
|
874 | 874 | |/ parent: 0:ea207398892e |
|
875 | 875 | | user: test |
|
876 | 876 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
877 | 877 | | instability: content-divergent |
|
878 | 878 | | summary: A1 |
|
879 | 879 | | |
|
880 | 880 | | x changeset: 1:471f378eab4c |
|
881 | 881 | |/ user: test |
|
882 | 882 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
883 | 883 | | obsolete: rewritten using amend as 2:fdf9bde5129a |
|
884 | 884 | | obsolete: rewritten using amend as 3:65b757b745b9 |
|
885 | 885 | | summary: A0 |
|
886 | 886 | | |
|
887 | 887 | o changeset: 0:ea207398892e |
|
888 | 888 | user: test |
|
889 | 889 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
890 | 890 | summary: ROOT |
|
891 | 891 | |
|
892 | 892 | |
|
893 | 893 | Check templates |
|
894 | 894 | --------------- |
|
895 | 895 | |
|
896 | 896 | $ hg up 'desc(A0)' --hidden |
|
897 | 897 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
898 | 898 | updated to hidden changeset 471f378eab4c |
|
899 | 899 | (hidden revision '471f378eab4c' has diverged) |
|
900 | 900 | |
|
901 | 901 | Predecessors template should show current revision as it is the working copy |
|
902 | 902 | $ hg tlog |
|
903 | 903 | * 019fadeab383 |
|
904 | 904 | | Predecessors: 1:471f378eab4c |
|
905 | 905 | | semi-colon: 1:471f378eab4c |
|
906 | 906 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
907 | 907 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
908 | 908 | | * fdf9bde5129a |
|
909 | 909 | |/ Predecessors: 1:471f378eab4c |
|
910 | 910 | | semi-colon: 1:471f378eab4c |
|
911 | 911 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
912 | 912 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
913 | 913 | | @ 471f378eab4c |
|
914 | 914 | |/ Successors: 2:fdf9bde5129a; 4:019fadeab383 |
|
915 | 915 | | multi-line: 2:fdf9bde5129a |
|
916 | 916 | | multi-line: 4:019fadeab383 |
|
917 | 917 | | json: [["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"]] |
|
918 | 918 | o ea207398892e |
|
919 | 919 | |
|
920 | 920 | $ hg fatelog |
|
921 | 921 | * 019fadeab383 |
|
922 | 922 | | |
|
923 | 923 | | * fdf9bde5129a |
|
924 | 924 | |/ |
|
925 | 925 | | @ 471f378eab4c |
|
926 | 926 | |/ 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); |
|
927 | 927 | o ea207398892e |
|
928 | 928 | |
|
929 | 929 | $ hg up 'desc(A1)' |
|
930 | 930 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
931 | 931 | |
|
932 | 932 | Predecessors template should not show predecessors as they are not displayed in |
|
933 | 933 | the log |
|
934 | 934 | $ hg tlog |
|
935 | 935 | * 019fadeab383 |
|
936 | 936 | | |
|
937 | 937 | | @ fdf9bde5129a |
|
938 | 938 | |/ |
|
939 | 939 | o ea207398892e |
|
940 | 940 | |
|
941 | 941 | |
|
942 | 942 | $ hg fatelog |
|
943 | 943 | * 019fadeab383 |
|
944 | 944 | | |
|
945 | 945 | | @ fdf9bde5129a |
|
946 | 946 | |/ |
|
947 | 947 | o ea207398892e |
|
948 | 948 | |
|
949 | 949 | Predecessors template should the predecessors as we force their display with |
|
950 | 950 | --hidden |
|
951 | 951 | $ hg tlog --hidden |
|
952 | 952 | * 019fadeab383 |
|
953 | 953 | | Predecessors: 3:65b757b745b9 |
|
954 | 954 | | semi-colon: 3:65b757b745b9 |
|
955 | 955 | | json: ["65b757b745b935093c87a2bccd877521cccffcbd"] |
|
956 | 956 | | map: 3:65b757b745b935093c87a2bccd877521cccffcbd |
|
957 | 957 | | x 65b757b745b9 |
|
958 | 958 | |/ Predecessors: 1:471f378eab4c |
|
959 | 959 | | semi-colon: 1:471f378eab4c |
|
960 | 960 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
961 | 961 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
962 | 962 | | Successors: 4:019fadeab383 |
|
963 | 963 | | multi-line: 4:019fadeab383 |
|
964 | 964 | | json: [["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"]] |
|
965 | 965 | | @ fdf9bde5129a |
|
966 | 966 | |/ Predecessors: 1:471f378eab4c |
|
967 | 967 | | semi-colon: 1:471f378eab4c |
|
968 | 968 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
969 | 969 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
970 | 970 | | x 471f378eab4c |
|
971 | 971 | |/ Successors: 2:fdf9bde5129a; 3:65b757b745b9 |
|
972 | 972 | | multi-line: 2:fdf9bde5129a |
|
973 | 973 | | multi-line: 3:65b757b745b9 |
|
974 | 974 | | json: [["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], ["65b757b745b935093c87a2bccd877521cccffcbd"]] |
|
975 | 975 | o ea207398892e |
|
976 | 976 | |
|
977 | 977 | |
|
978 | 978 | $ hg fatelog --hidden |
|
979 | 979 | * 019fadeab383 |
|
980 | 980 | | |
|
981 | 981 | | x 65b757b745b9 |
|
982 | 982 | |/ Obsfate: rewritten using amend as 4:019fadeab383 by test (at 1970-01-01 00:00 +0000); |
|
983 | 983 | | @ fdf9bde5129a |
|
984 | 984 | |/ |
|
985 | 985 | | x 471f378eab4c |
|
986 | 986 | |/ 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); |
|
987 | 987 | o ea207398892e |
|
988 | 988 | |
|
989 | 989 | |
|
990 | 990 | $ hg fatelogjson --hidden |
|
991 | 991 | * 019fadeab383 |
|
992 | 992 | | |
|
993 | 993 | | x 65b757b745b9 |
|
994 | 994 | |/ Obsfate: [{"markers": [["65b757b745b935093c87a2bccd877521cccffcbd", ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"], 0, [["ef1", "1"], ["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"]}] |
|
995 | 995 | | @ fdf9bde5129a |
|
996 | 996 | |/ |
|
997 | 997 | | x 471f378eab4c |
|
998 | 998 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], 0, [["ef1", "1"], ["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"]}, {"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["65b757b745b935093c87a2bccd877521cccffcbd"], 0, [["ef1", "1"], ["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["65b757b745b935093c87a2bccd877521cccffcbd"]}] |
|
999 | 999 | o ea207398892e |
|
1000 | 1000 | |
|
1001 | 1001 | |
|
1002 | 1002 | Check other fatelog implementations |
|
1003 | 1003 | ----------------------------------- |
|
1004 | 1004 | |
|
1005 | 1005 | $ hg fatelogkw --hidden -q |
|
1006 | 1006 | * 019fadeab383 |
|
1007 | 1007 | | |
|
1008 | 1008 | | x 65b757b745b9 |
|
1009 | 1009 | |/ Obsfate: rewritten using amend as 4:019fadeab383 |
|
1010 | 1010 | | @ fdf9bde5129a |
|
1011 | 1011 | |/ |
|
1012 | 1012 | | x 471f378eab4c |
|
1013 | 1013 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a |
|
1014 | 1014 | | Obsfate: rewritten using amend as 3:65b757b745b9 |
|
1015 | 1015 | o ea207398892e |
|
1016 | 1016 | |
|
1017 | 1017 | $ hg fatelogkw --hidden |
|
1018 | 1018 | * 019fadeab383 |
|
1019 | 1019 | | |
|
1020 | 1020 | | x 65b757b745b9 |
|
1021 | 1021 | |/ Obsfate: rewritten using amend as 4:019fadeab383 |
|
1022 | 1022 | | @ fdf9bde5129a |
|
1023 | 1023 | |/ |
|
1024 | 1024 | | x 471f378eab4c |
|
1025 | 1025 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a |
|
1026 | 1026 | | Obsfate: rewritten using amend as 3:65b757b745b9 |
|
1027 | 1027 | o ea207398892e |
|
1028 | 1028 | |
|
1029 | 1029 | $ hg fatelogkw --hidden -v |
|
1030 | 1030 | * 019fadeab383 |
|
1031 | 1031 | | |
|
1032 | 1032 | | x 65b757b745b9 |
|
1033 | 1033 | |/ Obsfate: rewritten using amend as 4:019fadeab383 by test (at 1970-01-01 00:00 +0000) |
|
1034 | 1034 | | @ fdf9bde5129a |
|
1035 | 1035 | |/ |
|
1036 | 1036 | | x 471f378eab4c |
|
1037 | 1037 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000) |
|
1038 | 1038 | | Obsfate: rewritten using amend as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000) |
|
1039 | 1039 | o ea207398892e |
|
1040 | 1040 | |
|
1041 | 1041 | $ hg log -G -T "default" --hidden |
|
1042 | 1042 | * changeset: 4:019fadeab383 |
|
1043 | 1043 | | tag: tip |
|
1044 | 1044 | | parent: 0:ea207398892e |
|
1045 | 1045 | | user: test |
|
1046 | 1046 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1047 | 1047 | | instability: content-divergent |
|
1048 | 1048 | | summary: A3 |
|
1049 | 1049 | | |
|
1050 | 1050 | | x changeset: 3:65b757b745b9 |
|
1051 | 1051 | |/ parent: 0:ea207398892e |
|
1052 | 1052 | | user: test |
|
1053 | 1053 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1054 | 1054 | | obsolete: rewritten using amend as 4:019fadeab383 |
|
1055 | 1055 | | summary: A2 |
|
1056 | 1056 | | |
|
1057 | 1057 | | @ changeset: 2:fdf9bde5129a |
|
1058 | 1058 | |/ parent: 0:ea207398892e |
|
1059 | 1059 | | user: test |
|
1060 | 1060 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1061 | 1061 | | instability: content-divergent |
|
1062 | 1062 | | summary: A1 |
|
1063 | 1063 | | |
|
1064 | 1064 | | x changeset: 1:471f378eab4c |
|
1065 | 1065 | |/ user: test |
|
1066 | 1066 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1067 | 1067 | | obsolete: rewritten using amend as 2:fdf9bde5129a |
|
1068 | 1068 | | obsolete: rewritten using amend as 3:65b757b745b9 |
|
1069 | 1069 | | summary: A0 |
|
1070 | 1070 | | |
|
1071 | 1071 | o changeset: 0:ea207398892e |
|
1072 | 1072 | user: test |
|
1073 | 1073 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1074 | 1074 | summary: ROOT |
|
1075 | 1075 | |
|
1076 | 1076 | |
|
1077 | 1077 | Test templates with amended + folded commit |
|
1078 | 1078 | =========================================== |
|
1079 | 1079 | |
|
1080 | 1080 | Test setup |
|
1081 | 1081 | ---------- |
|
1082 | 1082 | |
|
1083 | 1083 | $ hg init $TESTTMP/templates-local-amend-fold |
|
1084 | 1084 | $ cd $TESTTMP/templates-local-amend-fold |
|
1085 | 1085 | $ mkcommit ROOT |
|
1086 | 1086 | $ mkcommit A0 |
|
1087 | 1087 | $ mkcommit B0 |
|
1088 | 1088 | $ hg commit --amend -m "B1" |
|
1089 | 1089 | $ hg log --hidden -G |
|
1090 | 1090 | @ changeset: 3:b7ea6d14e664 |
|
1091 | 1091 | | tag: tip |
|
1092 | 1092 | | parent: 1:471f378eab4c |
|
1093 | 1093 | | user: test |
|
1094 | 1094 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1095 | 1095 | | summary: B1 |
|
1096 | 1096 | | |
|
1097 | 1097 | | x changeset: 2:0dec01379d3b |
|
1098 | 1098 | |/ user: test |
|
1099 | 1099 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1100 | 1100 | | obsolete: rewritten using amend as 3:b7ea6d14e664 |
|
1101 | 1101 | | summary: B0 |
|
1102 | 1102 | | |
|
1103 | 1103 | o changeset: 1:471f378eab4c |
|
1104 | 1104 | | user: test |
|
1105 | 1105 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1106 | 1106 | | summary: A0 |
|
1107 | 1107 | | |
|
1108 | 1108 | o changeset: 0:ea207398892e |
|
1109 | 1109 | user: test |
|
1110 | 1110 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1111 | 1111 | summary: ROOT |
|
1112 | 1112 | |
|
1113 | 1113 | # Simulate a fold |
|
1114 | 1114 | $ hg up -r "desc(ROOT)" |
|
1115 | 1115 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1116 | 1116 | $ echo "A0" > A0 |
|
1117 | 1117 | $ echo "B0" > B0 |
|
1118 | 1118 | $ hg commit -A -m "C0" |
|
1119 | 1119 | adding A0 |
|
1120 | 1120 | adding B0 |
|
1121 | 1121 | created new head |
|
1122 | 1122 | $ hg debugobsolete `getid "desc(A0)"` `getid "desc(C0)"` |
|
1123 | 1123 | obsoleted 1 changesets |
|
1124 | 1124 | 1 new orphan changesets |
|
1125 | 1125 | $ hg debugobsolete `getid "desc(B1)"` `getid "desc(C0)"` |
|
1126 | 1126 | obsoleted 1 changesets |
|
1127 | 1127 | |
|
1128 | 1128 | $ hg log --hidden -G |
|
1129 | 1129 | @ changeset: 4:eb5a0daa2192 |
|
1130 | 1130 | | tag: tip |
|
1131 | 1131 | | parent: 0:ea207398892e |
|
1132 | 1132 | | user: test |
|
1133 | 1133 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1134 | 1134 | | summary: C0 |
|
1135 | 1135 | | |
|
1136 | 1136 | | x changeset: 3:b7ea6d14e664 |
|
1137 | 1137 | | | parent: 1:471f378eab4c |
|
1138 | 1138 | | | user: test |
|
1139 | 1139 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1140 | 1140 | | | obsolete: rewritten as 4:eb5a0daa2192 |
|
1141 | 1141 | | | summary: B1 |
|
1142 | 1142 | | | |
|
1143 | 1143 | | | x changeset: 2:0dec01379d3b |
|
1144 | 1144 | | |/ user: test |
|
1145 | 1145 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1146 | 1146 | | | obsolete: rewritten using amend as 3:b7ea6d14e664 |
|
1147 | 1147 | | | summary: B0 |
|
1148 | 1148 | | | |
|
1149 | 1149 | | x changeset: 1:471f378eab4c |
|
1150 | 1150 | |/ user: test |
|
1151 | 1151 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1152 | 1152 | | obsolete: rewritten as 4:eb5a0daa2192 |
|
1153 | 1153 | | summary: A0 |
|
1154 | 1154 | | |
|
1155 | 1155 | o changeset: 0:ea207398892e |
|
1156 | 1156 | user: test |
|
1157 | 1157 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1158 | 1158 | summary: ROOT |
|
1159 | 1159 | |
|
1160 | 1160 | Check templates |
|
1161 | 1161 | --------------- |
|
1162 | 1162 | |
|
1163 | 1163 | $ hg up 'desc(A0)' --hidden |
|
1164 | 1164 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1165 | 1165 | updated to hidden changeset 471f378eab4c |
|
1166 | 1166 | (hidden revision '471f378eab4c' was rewritten as: eb5a0daa2192) |
|
1167 | 1167 | |
|
1168 | 1168 | Predecessors template should show current revision as it is the working copy |
|
1169 | 1169 | $ hg tlog |
|
1170 | 1170 | o eb5a0daa2192 |
|
1171 | 1171 | | Predecessors: 1:471f378eab4c |
|
1172 | 1172 | | semi-colon: 1:471f378eab4c |
|
1173 | 1173 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
1174 | 1174 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
1175 | 1175 | | @ 471f378eab4c |
|
1176 | 1176 | |/ Successors: 4:eb5a0daa2192 |
|
1177 | 1177 | | multi-line: 4:eb5a0daa2192 |
|
1178 | 1178 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
1179 | 1179 | o ea207398892e |
|
1180 | 1180 | |
|
1181 | 1181 | |
|
1182 | 1182 | $ hg fatelog |
|
1183 | 1183 | o eb5a0daa2192 |
|
1184 | 1184 | | |
|
1185 | 1185 | | @ 471f378eab4c |
|
1186 | 1186 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
1187 | 1187 | o ea207398892e |
|
1188 | 1188 | |
|
1189 | 1189 | $ hg up 'desc(B0)' --hidden |
|
1190 | 1190 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1191 | 1191 | updated to hidden changeset 0dec01379d3b |
|
1192 | 1192 | (hidden revision '0dec01379d3b' was rewritten as: eb5a0daa2192) |
|
1193 | 1193 | |
|
1194 | 1194 | Predecessors template should both predecessors as they are visible |
|
1195 | 1195 | $ hg tlog |
|
1196 | 1196 | o eb5a0daa2192 |
|
1197 | 1197 | | Predecessors: 2:0dec01379d3b 1:471f378eab4c |
|
1198 | 1198 | | semi-colon: 2:0dec01379d3b; 1:471f378eab4c |
|
1199 | 1199 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", "471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
1200 | 1200 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
1201 | 1201 | | @ 0dec01379d3b |
|
1202 | 1202 | | | Successors: 4:eb5a0daa2192 |
|
1203 | 1203 | | | multi-line: 4:eb5a0daa2192 |
|
1204 | 1204 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
1205 | 1205 | | x 471f378eab4c |
|
1206 | 1206 | |/ Successors: 4:eb5a0daa2192 |
|
1207 | 1207 | | multi-line: 4:eb5a0daa2192 |
|
1208 | 1208 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
1209 | 1209 | o ea207398892e |
|
1210 | 1210 | |
|
1211 | 1211 | |
|
1212 | 1212 | $ hg fatelog |
|
1213 | 1213 | o eb5a0daa2192 |
|
1214 | 1214 | | |
|
1215 | 1215 | | @ 0dec01379d3b |
|
1216 | 1216 | | | Obsfate: rewritten using amend as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
1217 | 1217 | | x 471f378eab4c |
|
1218 | 1218 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
1219 | 1219 | o ea207398892e |
|
1220 | 1220 | |
|
1221 | 1221 | $ hg up 'desc(B1)' --hidden |
|
1222 | 1222 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1223 | 1223 | updated to hidden changeset b7ea6d14e664 |
|
1224 | 1224 | (hidden revision 'b7ea6d14e664' was rewritten as: eb5a0daa2192) |
|
1225 | 1225 | |
|
1226 | 1226 | Predecessors template should both predecessors as they are visible |
|
1227 | 1227 | $ hg tlog |
|
1228 | 1228 | o eb5a0daa2192 |
|
1229 | 1229 | | Predecessors: 1:471f378eab4c 3:b7ea6d14e664 |
|
1230 | 1230 | | semi-colon: 1:471f378eab4c; 3:b7ea6d14e664 |
|
1231 | 1231 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874", "b7ea6d14e664bdc8922221f7992631b50da3fb07"] |
|
1232 | 1232 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 3:b7ea6d14e664bdc8922221f7992631b50da3fb07 |
|
1233 | 1233 | | @ b7ea6d14e664 |
|
1234 | 1234 | | | Successors: 4:eb5a0daa2192 |
|
1235 | 1235 | | | multi-line: 4:eb5a0daa2192 |
|
1236 | 1236 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
1237 | 1237 | | x 471f378eab4c |
|
1238 | 1238 | |/ Successors: 4:eb5a0daa2192 |
|
1239 | 1239 | | multi-line: 4:eb5a0daa2192 |
|
1240 | 1240 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
1241 | 1241 | o ea207398892e |
|
1242 | 1242 | |
|
1243 | 1243 | |
|
1244 | 1244 | $ hg fatelog |
|
1245 | 1245 | o eb5a0daa2192 |
|
1246 | 1246 | | |
|
1247 | 1247 | | @ b7ea6d14e664 |
|
1248 | 1248 | | | Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
1249 | 1249 | | x 471f378eab4c |
|
1250 | 1250 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
1251 | 1251 | o ea207398892e |
|
1252 | 1252 | |
|
1253 | 1253 | $ hg up 'desc(C0)' |
|
1254 | 1254 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1255 | 1255 | |
|
1256 | 1256 | Predecessors template should show no predecessors as they are both non visible |
|
1257 | 1257 | $ hg tlog |
|
1258 | 1258 | @ eb5a0daa2192 |
|
1259 | 1259 | | |
|
1260 | 1260 | o ea207398892e |
|
1261 | 1261 | |
|
1262 | 1262 | |
|
1263 | 1263 | $ hg fatelog |
|
1264 | 1264 | @ eb5a0daa2192 |
|
1265 | 1265 | | |
|
1266 | 1266 | o ea207398892e |
|
1267 | 1267 | |
|
1268 | 1268 | Predecessors template should show all predecessors as we force their display |
|
1269 | 1269 | with --hidden |
|
1270 | 1270 | $ hg tlog --hidden |
|
1271 | 1271 | @ eb5a0daa2192 |
|
1272 | 1272 | | Predecessors: 1:471f378eab4c 3:b7ea6d14e664 |
|
1273 | 1273 | | semi-colon: 1:471f378eab4c; 3:b7ea6d14e664 |
|
1274 | 1274 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874", "b7ea6d14e664bdc8922221f7992631b50da3fb07"] |
|
1275 | 1275 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 3:b7ea6d14e664bdc8922221f7992631b50da3fb07 |
|
1276 | 1276 | | x b7ea6d14e664 |
|
1277 | 1277 | | | Predecessors: 2:0dec01379d3b |
|
1278 | 1278 | | | semi-colon: 2:0dec01379d3b |
|
1279 | 1279 | | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
1280 | 1280 | | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
1281 | 1281 | | | Successors: 4:eb5a0daa2192 |
|
1282 | 1282 | | | multi-line: 4:eb5a0daa2192 |
|
1283 | 1283 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
1284 | 1284 | | | x 0dec01379d3b |
|
1285 | 1285 | | |/ Successors: 3:b7ea6d14e664 |
|
1286 | 1286 | | | multi-line: 3:b7ea6d14e664 |
|
1287 | 1287 | | | json: [["b7ea6d14e664bdc8922221f7992631b50da3fb07"]] |
|
1288 | 1288 | | x 471f378eab4c |
|
1289 | 1289 | |/ Successors: 4:eb5a0daa2192 |
|
1290 | 1290 | | multi-line: 4:eb5a0daa2192 |
|
1291 | 1291 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
1292 | 1292 | o ea207398892e |
|
1293 | 1293 | |
|
1294 | 1294 | |
|
1295 | 1295 | $ hg fatelog --hidden |
|
1296 | 1296 | @ eb5a0daa2192 |
|
1297 | 1297 | | |
|
1298 | 1298 | | x b7ea6d14e664 |
|
1299 | 1299 | | | Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
1300 | 1300 | | | x 0dec01379d3b |
|
1301 | 1301 | | |/ Obsfate: rewritten using amend as 3:b7ea6d14e664 by test (at 1970-01-01 00:00 +0000); |
|
1302 | 1302 | | x 471f378eab4c |
|
1303 | 1303 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
1304 | 1304 | o ea207398892e |
|
1305 | 1305 | |
|
1306 | 1306 | |
|
1307 | 1307 | $ hg fatelogjson --hidden |
|
1308 | 1308 | @ eb5a0daa2192 |
|
1309 | 1309 | | |
|
1310 | 1310 | | x b7ea6d14e664 |
|
1311 | 1311 | | | Obsfate: [{"markers": [["b7ea6d14e664bdc8922221f7992631b50da3fb07", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}] |
|
1312 | 1312 | | | x 0dec01379d3b |
|
1313 | 1313 | | |/ Obsfate: [{"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["b7ea6d14e664bdc8922221f7992631b50da3fb07"], 0, [["ef1", "1"], ["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["b7ea6d14e664bdc8922221f7992631b50da3fb07"]}] |
|
1314 | 1314 | | x 471f378eab4c |
|
1315 | 1315 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}] |
|
1316 | 1316 | o ea207398892e |
|
1317 | 1317 | |
|
1318 | 1318 | |
|
1319 | 1319 | Check other fatelog implementations |
|
1320 | 1320 | ----------------------------------- |
|
1321 | 1321 | |
|
1322 | 1322 | $ hg fatelogkw --hidden -q |
|
1323 | 1323 | @ eb5a0daa2192 |
|
1324 | 1324 | | |
|
1325 | 1325 | | x b7ea6d14e664 |
|
1326 | 1326 | | | Obsfate: rewritten as 4:eb5a0daa2192 |
|
1327 | 1327 | | | x 0dec01379d3b |
|
1328 | 1328 | | |/ Obsfate: rewritten using amend as 3:b7ea6d14e664 |
|
1329 | 1329 | | x 471f378eab4c |
|
1330 | 1330 | |/ Obsfate: rewritten as 4:eb5a0daa2192 |
|
1331 | 1331 | o ea207398892e |
|
1332 | 1332 | |
|
1333 | 1333 | $ hg fatelogkw --hidden |
|
1334 | 1334 | @ eb5a0daa2192 |
|
1335 | 1335 | | |
|
1336 | 1336 | | x b7ea6d14e664 |
|
1337 | 1337 | | | Obsfate: rewritten as 4:eb5a0daa2192 |
|
1338 | 1338 | | | x 0dec01379d3b |
|
1339 | 1339 | | |/ Obsfate: rewritten using amend as 3:b7ea6d14e664 |
|
1340 | 1340 | | x 471f378eab4c |
|
1341 | 1341 | |/ Obsfate: rewritten as 4:eb5a0daa2192 |
|
1342 | 1342 | o ea207398892e |
|
1343 | 1343 | |
|
1344 | 1344 | $ hg fatelogkw --hidden -v |
|
1345 | 1345 | @ eb5a0daa2192 |
|
1346 | 1346 | | |
|
1347 | 1347 | | x b7ea6d14e664 |
|
1348 | 1348 | | | Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000) |
|
1349 | 1349 | | | x 0dec01379d3b |
|
1350 | 1350 | | |/ Obsfate: rewritten using amend as 3:b7ea6d14e664 by test (at 1970-01-01 00:00 +0000) |
|
1351 | 1351 | | x 471f378eab4c |
|
1352 | 1352 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000) |
|
1353 | 1353 | o ea207398892e |
|
1354 | 1354 | |
|
1355 | 1355 | $ hg log -G -T "default" --hidden |
|
1356 | 1356 | @ changeset: 4:eb5a0daa2192 |
|
1357 | 1357 | | tag: tip |
|
1358 | 1358 | | parent: 0:ea207398892e |
|
1359 | 1359 | | user: test |
|
1360 | 1360 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1361 | 1361 | | summary: C0 |
|
1362 | 1362 | | |
|
1363 | 1363 | | x changeset: 3:b7ea6d14e664 |
|
1364 | 1364 | | | parent: 1:471f378eab4c |
|
1365 | 1365 | | | user: test |
|
1366 | 1366 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1367 | 1367 | | | obsolete: rewritten as 4:eb5a0daa2192 |
|
1368 | 1368 | | | summary: B1 |
|
1369 | 1369 | | | |
|
1370 | 1370 | | | x changeset: 2:0dec01379d3b |
|
1371 | 1371 | | |/ user: test |
|
1372 | 1372 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1373 | 1373 | | | obsolete: rewritten using amend as 3:b7ea6d14e664 |
|
1374 | 1374 | | | summary: B0 |
|
1375 | 1375 | | | |
|
1376 | 1376 | | x changeset: 1:471f378eab4c |
|
1377 | 1377 | |/ user: test |
|
1378 | 1378 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1379 | 1379 | | obsolete: rewritten as 4:eb5a0daa2192 |
|
1380 | 1380 | | summary: A0 |
|
1381 | 1381 | | |
|
1382 | 1382 | o changeset: 0:ea207398892e |
|
1383 | 1383 | user: test |
|
1384 | 1384 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1385 | 1385 | summary: ROOT |
|
1386 | 1386 | |
|
1387 | 1387 | |
|
1388 | 1388 | Test template with pushed and pulled obs markers |
|
1389 | 1389 | ================================================ |
|
1390 | 1390 | |
|
1391 | 1391 | Test setup |
|
1392 | 1392 | ---------- |
|
1393 | 1393 | |
|
1394 | 1394 | $ hg init $TESTTMP/templates-local-remote-markers-1 |
|
1395 | 1395 | $ cd $TESTTMP/templates-local-remote-markers-1 |
|
1396 | 1396 | $ mkcommit ROOT |
|
1397 | 1397 | $ mkcommit A0 |
|
1398 | 1398 | $ hg clone $TESTTMP/templates-local-remote-markers-1 $TESTTMP/templates-local-remote-markers-2 |
|
1399 | 1399 | updating to branch default |
|
1400 | 1400 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1401 | 1401 | $ cd $TESTTMP/templates-local-remote-markers-2 |
|
1402 | 1402 | $ hg log --hidden -G |
|
1403 | 1403 | @ changeset: 1:471f378eab4c |
|
1404 | 1404 | | tag: tip |
|
1405 | 1405 | | user: test |
|
1406 | 1406 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1407 | 1407 | | summary: A0 |
|
1408 | 1408 | | |
|
1409 | 1409 | o changeset: 0:ea207398892e |
|
1410 | 1410 | user: test |
|
1411 | 1411 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1412 | 1412 | summary: ROOT |
|
1413 | 1413 | |
|
1414 | 1414 | $ cd $TESTTMP/templates-local-remote-markers-1 |
|
1415 | 1415 | $ hg commit --amend -m "A1" |
|
1416 | 1416 | $ hg commit --amend -m "A2" |
|
1417 | 1417 | $ hg log --hidden -G |
|
1418 | 1418 | @ changeset: 3:7a230b46bf61 |
|
1419 | 1419 | | tag: tip |
|
1420 | 1420 | | parent: 0:ea207398892e |
|
1421 | 1421 | | user: test |
|
1422 | 1422 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1423 | 1423 | | summary: A2 |
|
1424 | 1424 | | |
|
1425 | 1425 | | x changeset: 2:fdf9bde5129a |
|
1426 | 1426 | |/ parent: 0:ea207398892e |
|
1427 | 1427 | | user: test |
|
1428 | 1428 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1429 | 1429 | | obsolete: rewritten using amend as 3:7a230b46bf61 |
|
1430 | 1430 | | summary: A1 |
|
1431 | 1431 | | |
|
1432 | 1432 | | x changeset: 1:471f378eab4c |
|
1433 | 1433 | |/ user: test |
|
1434 | 1434 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1435 | 1435 | | obsolete: rewritten using amend as 2:fdf9bde5129a |
|
1436 | 1436 | | summary: A0 |
|
1437 | 1437 | | |
|
1438 | 1438 | o changeset: 0:ea207398892e |
|
1439 | 1439 | user: test |
|
1440 | 1440 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1441 | 1441 | summary: ROOT |
|
1442 | 1442 | |
|
1443 | 1443 | $ cd $TESTTMP/templates-local-remote-markers-2 |
|
1444 | 1444 | $ hg pull |
|
1445 | 1445 | pulling from $TESTTMP/templates-local-remote-markers-1 |
|
1446 | 1446 | searching for changes |
|
1447 | 1447 | adding changesets |
|
1448 | 1448 | adding manifests |
|
1449 | 1449 | adding file changes |
|
1450 | 1450 | added 1 changesets with 0 changes to 1 files (+1 heads) |
|
1451 | 1451 | 2 new obsolescence markers |
|
1452 | 1452 | obsoleted 1 changesets |
|
1453 | 1453 | new changesets 7a230b46bf61 (1 drafts) |
|
1454 | 1454 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
1455 | 1455 | $ hg log --hidden -G |
|
1456 | 1456 | o changeset: 2:7a230b46bf61 |
|
1457 | 1457 | | tag: tip |
|
1458 | 1458 | | parent: 0:ea207398892e |
|
1459 | 1459 | | user: test |
|
1460 | 1460 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1461 | 1461 | | summary: A2 |
|
1462 | 1462 | | |
|
1463 | 1463 | | @ changeset: 1:471f378eab4c |
|
1464 | 1464 | |/ user: test |
|
1465 | 1465 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1466 | 1466 | | obsolete: rewritten using amend as 2:7a230b46bf61 |
|
1467 | 1467 | | summary: A0 |
|
1468 | 1468 | | |
|
1469 | 1469 | o changeset: 0:ea207398892e |
|
1470 | 1470 | user: test |
|
1471 | 1471 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1472 | 1472 | summary: ROOT |
|
1473 | 1473 | |
|
1474 | 1474 | |
|
1475 | 1475 | $ hg debugobsolete |
|
1476 | 1476 | 471f378eab4c5e25f6c77f785b27c936efb22874 fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1477 | 1477 | fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e 7a230b46bf61e50b30308c6cfd7bd1269ef54702 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1478 | 1478 | |
|
1479 | 1479 | Check templates |
|
1480 | 1480 | --------------- |
|
1481 | 1481 | |
|
1482 | 1482 | Predecessors template should show current revision as it is the working copy |
|
1483 | 1483 | $ hg tlog |
|
1484 | 1484 | o 7a230b46bf61 |
|
1485 | 1485 | | Predecessors: 1:471f378eab4c |
|
1486 | 1486 | | semi-colon: 1:471f378eab4c |
|
1487 | 1487 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
1488 | 1488 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
1489 | 1489 | | @ 471f378eab4c |
|
1490 | 1490 | |/ Successors: 2:7a230b46bf61 |
|
1491 | 1491 | | multi-line: 2:7a230b46bf61 |
|
1492 | 1492 | | json: [["7a230b46bf61e50b30308c6cfd7bd1269ef54702"]] |
|
1493 | 1493 | o ea207398892e |
|
1494 | 1494 | |
|
1495 | 1495 | |
|
1496 | 1496 | $ hg fatelog |
|
1497 | 1497 | o 7a230b46bf61 |
|
1498 | 1498 | | |
|
1499 | 1499 | | @ 471f378eab4c |
|
1500 | 1500 | |/ Obsfate: rewritten using amend as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000); |
|
1501 | 1501 | o ea207398892e |
|
1502 | 1502 | |
|
1503 | 1503 | $ hg up 'desc(A2)' |
|
1504 | 1504 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1505 | 1505 | |
|
1506 | 1506 | Predecessors template should show no predecessors as they are non visible |
|
1507 | 1507 | $ hg tlog |
|
1508 | 1508 | @ 7a230b46bf61 |
|
1509 | 1509 | | |
|
1510 | 1510 | o ea207398892e |
|
1511 | 1511 | |
|
1512 | 1512 | |
|
1513 | 1513 | $ hg fatelog |
|
1514 | 1514 | @ 7a230b46bf61 |
|
1515 | 1515 | | |
|
1516 | 1516 | o ea207398892e |
|
1517 | 1517 | |
|
1518 | 1518 | Predecessors template should show all predecessors as we force their display |
|
1519 | 1519 | with --hidden |
|
1520 | 1520 | $ hg tlog --hidden |
|
1521 | 1521 | @ 7a230b46bf61 |
|
1522 | 1522 | | Predecessors: 1:471f378eab4c |
|
1523 | 1523 | | semi-colon: 1:471f378eab4c |
|
1524 | 1524 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
1525 | 1525 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
1526 | 1526 | | x 471f378eab4c |
|
1527 | 1527 | |/ Successors: 2:7a230b46bf61 |
|
1528 | 1528 | | multi-line: 2:7a230b46bf61 |
|
1529 | 1529 | | json: [["7a230b46bf61e50b30308c6cfd7bd1269ef54702"]] |
|
1530 | 1530 | o ea207398892e |
|
1531 | 1531 | |
|
1532 | 1532 | |
|
1533 | 1533 | $ hg fatelog --hidden |
|
1534 | 1534 | @ 7a230b46bf61 |
|
1535 | 1535 | | |
|
1536 | 1536 | | x 471f378eab4c |
|
1537 | 1537 | |/ Obsfate: rewritten using amend as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000); |
|
1538 | 1538 | o ea207398892e |
|
1539 | 1539 | |
|
1540 | 1540 | |
|
1541 | 1541 | Check other fatelog implementations |
|
1542 | 1542 | ----------------------------------- |
|
1543 | 1543 | |
|
1544 | 1544 | $ hg fatelogkw --hidden -q |
|
1545 | 1545 | @ 7a230b46bf61 |
|
1546 | 1546 | | |
|
1547 | 1547 | | x 471f378eab4c |
|
1548 | 1548 | |/ Obsfate: rewritten using amend as 2:7a230b46bf61 |
|
1549 | 1549 | o ea207398892e |
|
1550 | 1550 | |
|
1551 | 1551 | $ hg fatelogkw --hidden |
|
1552 | 1552 | @ 7a230b46bf61 |
|
1553 | 1553 | | |
|
1554 | 1554 | | x 471f378eab4c |
|
1555 | 1555 | |/ Obsfate: rewritten using amend as 2:7a230b46bf61 |
|
1556 | 1556 | o ea207398892e |
|
1557 | 1557 | |
|
1558 | 1558 | $ hg fatelogkw --hidden -v |
|
1559 | 1559 | @ 7a230b46bf61 |
|
1560 | 1560 | | |
|
1561 | 1561 | | x 471f378eab4c |
|
1562 | 1562 | |/ Obsfate: rewritten using amend as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000) |
|
1563 | 1563 | o ea207398892e |
|
1564 | 1564 | |
|
1565 | 1565 | $ hg log -G -T "default" --hidden |
|
1566 | 1566 | @ changeset: 2:7a230b46bf61 |
|
1567 | 1567 | | tag: tip |
|
1568 | 1568 | | parent: 0:ea207398892e |
|
1569 | 1569 | | user: test |
|
1570 | 1570 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1571 | 1571 | | summary: A2 |
|
1572 | 1572 | | |
|
1573 | 1573 | | x changeset: 1:471f378eab4c |
|
1574 | 1574 | |/ user: test |
|
1575 | 1575 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1576 | 1576 | | obsolete: rewritten using amend as 2:7a230b46bf61 |
|
1577 | 1577 | | summary: A0 |
|
1578 | 1578 | | |
|
1579 | 1579 | o changeset: 0:ea207398892e |
|
1580 | 1580 | user: test |
|
1581 | 1581 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1582 | 1582 | summary: ROOT |
|
1583 | 1583 | |
|
1584 | 1584 | |
|
1585 | 1585 | Test template with obsmarkers cycle |
|
1586 | 1586 | =================================== |
|
1587 | 1587 | |
|
1588 | 1588 | Test setup |
|
1589 | 1589 | ---------- |
|
1590 | 1590 | |
|
1591 | 1591 | $ hg init $TESTTMP/templates-local-cycle |
|
1592 | 1592 | $ cd $TESTTMP/templates-local-cycle |
|
1593 | 1593 | $ mkcommit ROOT |
|
1594 | 1594 | $ mkcommit A0 |
|
1595 | 1595 | $ mkcommit B0 |
|
1596 | 1596 | $ hg up -r 0 |
|
1597 | 1597 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1598 | 1598 | $ mkcommit C0 |
|
1599 | 1599 | created new head |
|
1600 | 1600 | |
|
1601 | 1601 | Create the cycle |
|
1602 | 1602 | |
|
1603 | 1603 | $ hg debugobsolete `getid "desc(A0)"` `getid "desc(B0)"` |
|
1604 | 1604 | obsoleted 1 changesets |
|
1605 | 1605 | 1 new orphan changesets |
|
1606 | 1606 | $ hg debugobsolete `getid "desc(B0)"` `getid "desc(C0)"` |
|
1607 | 1607 | obsoleted 1 changesets |
|
1608 | 1608 | $ hg debugobsolete `getid "desc(B0)"` `getid "desc(A0)"` |
|
1609 | 1609 | |
|
1610 | 1610 | Check templates |
|
1611 | 1611 | --------------- |
|
1612 | 1612 | |
|
1613 | 1613 | $ hg tlog |
|
1614 | 1614 | @ f897c6137566 |
|
1615 | 1615 | | |
|
1616 | 1616 | o ea207398892e |
|
1617 | 1617 | |
|
1618 | 1618 | |
|
1619 | 1619 | $ hg fatelog |
|
1620 | 1620 | @ f897c6137566 |
|
1621 | 1621 | | |
|
1622 | 1622 | o ea207398892e |
|
1623 | 1623 | |
|
1624 | 1624 | |
|
1625 | 1625 | $ hg up -r "desc(B0)" --hidden |
|
1626 | 1626 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1627 | 1627 | updated to hidden changeset 0dec01379d3b |
|
1628 | 1628 | (hidden revision '0dec01379d3b' is pruned) |
|
1629 | 1629 | $ hg tlog |
|
1630 | 1630 | o f897c6137566 |
|
1631 | 1631 | | Predecessors: 2:0dec01379d3b |
|
1632 | 1632 | | semi-colon: 2:0dec01379d3b |
|
1633 | 1633 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
1634 | 1634 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
1635 | 1635 | | @ 0dec01379d3b |
|
1636 | 1636 | | | Predecessors: 1:471f378eab4c |
|
1637 | 1637 | | | semi-colon: 1:471f378eab4c |
|
1638 | 1638 | | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
1639 | 1639 | | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
1640 | 1640 | | | Successors: 3:f897c6137566; 1:471f378eab4c |
|
1641 | 1641 | | | multi-line: 3:f897c6137566 |
|
1642 | 1642 | | | multi-line: 1:471f378eab4c |
|
1643 | 1643 | | | json: [["f897c6137566320b081514b4c7227ecc3d384b39"], ["471f378eab4c5e25f6c77f785b27c936efb22874"]] |
|
1644 | 1644 | | x 471f378eab4c |
|
1645 | 1645 | |/ Predecessors: 2:0dec01379d3b |
|
1646 | 1646 | | semi-colon: 2:0dec01379d3b |
|
1647 | 1647 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
1648 | 1648 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
1649 | 1649 | | Successors: 2:0dec01379d3b |
|
1650 | 1650 | | multi-line: 2:0dec01379d3b |
|
1651 | 1651 | | json: [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]] |
|
1652 | 1652 | o ea207398892e |
|
1653 | 1653 | |
|
1654 | 1654 | |
|
1655 | 1655 | $ hg fatelog |
|
1656 | 1656 | o f897c6137566 |
|
1657 | 1657 | | |
|
1658 | 1658 | | @ 0dec01379d3b |
|
1659 | 1659 | | | 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); |
|
1660 | 1660 | | x 471f378eab4c |
|
1661 | 1661 | |/ Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000); |
|
1662 | 1662 | o ea207398892e |
|
1663 | 1663 | |
|
1664 | 1664 | |
|
1665 | 1665 | $ hg up -r "desc(A0)" --hidden |
|
1666 | 1666 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1667 | 1667 | $ hg tlog |
|
1668 | 1668 | o f897c6137566 |
|
1669 | 1669 | | Predecessors: 1:471f378eab4c |
|
1670 | 1670 | | semi-colon: 1:471f378eab4c |
|
1671 | 1671 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
1672 | 1672 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
1673 | 1673 | | @ 471f378eab4c |
|
1674 | 1674 | |/ |
|
1675 | 1675 | o ea207398892e |
|
1676 | 1676 | |
|
1677 | 1677 | |
|
1678 | 1678 | $ hg fatelog |
|
1679 | 1679 | o f897c6137566 |
|
1680 | 1680 | | |
|
1681 | 1681 | | @ 471f378eab4c |
|
1682 | 1682 | |/ Obsfate: pruned; |
|
1683 | 1683 | o ea207398892e |
|
1684 | 1684 | |
|
1685 | 1685 | |
|
1686 | 1686 | $ hg up -r "desc(ROOT)" --hidden |
|
1687 | 1687 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1688 | 1688 | $ hg tlog |
|
1689 | 1689 | o f897c6137566 |
|
1690 | 1690 | | |
|
1691 | 1691 | @ ea207398892e |
|
1692 | 1692 | |
|
1693 | 1693 | |
|
1694 | 1694 | $ hg fatelog |
|
1695 | 1695 | o f897c6137566 |
|
1696 | 1696 | | |
|
1697 | 1697 | @ ea207398892e |
|
1698 | 1698 | |
|
1699 | 1699 | |
|
1700 | 1700 | $ hg tlog --hidden |
|
1701 | 1701 | o f897c6137566 |
|
1702 | 1702 | | Predecessors: 2:0dec01379d3b |
|
1703 | 1703 | | semi-colon: 2:0dec01379d3b |
|
1704 | 1704 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
1705 | 1705 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
1706 | 1706 | | x 0dec01379d3b |
|
1707 | 1707 | | | Predecessors: 1:471f378eab4c |
|
1708 | 1708 | | | semi-colon: 1:471f378eab4c |
|
1709 | 1709 | | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
1710 | 1710 | | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
1711 | 1711 | | | Successors: 3:f897c6137566; 1:471f378eab4c |
|
1712 | 1712 | | | multi-line: 3:f897c6137566 |
|
1713 | 1713 | | | multi-line: 1:471f378eab4c |
|
1714 | 1714 | | | json: [["f897c6137566320b081514b4c7227ecc3d384b39"], ["471f378eab4c5e25f6c77f785b27c936efb22874"]] |
|
1715 | 1715 | | x 471f378eab4c |
|
1716 | 1716 | |/ Predecessors: 2:0dec01379d3b |
|
1717 | 1717 | | semi-colon: 2:0dec01379d3b |
|
1718 | 1718 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
1719 | 1719 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
1720 | 1720 | | Successors: 2:0dec01379d3b |
|
1721 | 1721 | | multi-line: 2:0dec01379d3b |
|
1722 | 1722 | | json: [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]] |
|
1723 | 1723 | @ ea207398892e |
|
1724 | 1724 | |
|
1725 | 1725 | |
|
1726 | 1726 | Check other fatelog implementations |
|
1727 | 1727 | ----------------------------------- |
|
1728 | 1728 | |
|
1729 | 1729 | $ hg fatelogkw --hidden -q |
|
1730 | 1730 | o f897c6137566 |
|
1731 | 1731 | | |
|
1732 | 1732 | | x 0dec01379d3b |
|
1733 | 1733 | | | Obsfate: rewritten as 3:f897c6137566 |
|
1734 | 1734 | | | Obsfate: rewritten as 1:471f378eab4c |
|
1735 | 1735 | | x 471f378eab4c |
|
1736 | 1736 | |/ Obsfate: rewritten as 2:0dec01379d3b |
|
1737 | 1737 | @ ea207398892e |
|
1738 | 1738 | |
|
1739 | 1739 | $ hg fatelogkw --hidden |
|
1740 | 1740 | o f897c6137566 |
|
1741 | 1741 | | |
|
1742 | 1742 | | x 0dec01379d3b |
|
1743 | 1743 | | | Obsfate: rewritten as 3:f897c6137566 |
|
1744 | 1744 | | | Obsfate: rewritten as 1:471f378eab4c |
|
1745 | 1745 | | x 471f378eab4c |
|
1746 | 1746 | |/ Obsfate: rewritten as 2:0dec01379d3b |
|
1747 | 1747 | @ ea207398892e |
|
1748 | 1748 | |
|
1749 | 1749 | $ hg fatelogkw --hidden -v |
|
1750 | 1750 | o f897c6137566 |
|
1751 | 1751 | | |
|
1752 | 1752 | | x 0dec01379d3b |
|
1753 | 1753 | | | Obsfate: rewritten as 3:f897c6137566 by test (at 1970-01-01 00:00 +0000) |
|
1754 | 1754 | | | Obsfate: rewritten as 1:471f378eab4c by test (at 1970-01-01 00:00 +0000) |
|
1755 | 1755 | | x 471f378eab4c |
|
1756 | 1756 | |/ Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000) |
|
1757 | 1757 | @ ea207398892e |
|
1758 | 1758 | |
|
1759 | 1759 | $ hg log -G -T "default" --hidden |
|
1760 | 1760 | o changeset: 3:f897c6137566 |
|
1761 | 1761 | | tag: tip |
|
1762 | 1762 | | parent: 0:ea207398892e |
|
1763 | 1763 | | user: test |
|
1764 | 1764 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1765 | 1765 | | summary: C0 |
|
1766 | 1766 | | |
|
1767 | 1767 | | x changeset: 2:0dec01379d3b |
|
1768 | 1768 | | | user: test |
|
1769 | 1769 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1770 | 1770 | | | obsolete: rewritten as 3:f897c6137566 |
|
1771 | 1771 | | | obsolete: rewritten as 1:471f378eab4c |
|
1772 | 1772 | | | summary: B0 |
|
1773 | 1773 | | | |
|
1774 | 1774 | | x changeset: 1:471f378eab4c |
|
1775 | 1775 | |/ user: test |
|
1776 | 1776 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1777 | 1777 | | obsolete: rewritten as 2:0dec01379d3b |
|
1778 | 1778 | | summary: A0 |
|
1779 | 1779 | | |
|
1780 | 1780 | @ changeset: 0:ea207398892e |
|
1781 | 1781 | user: test |
|
1782 | 1782 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1783 | 1783 | summary: ROOT |
|
1784 | 1784 | |
|
1785 | 1785 | |
|
1786 | 1786 | Test template with split + divergence with cycles |
|
1787 | 1787 | ================================================= |
|
1788 | 1788 | |
|
1789 | 1789 | $ hg log -G |
|
1790 | 1790 | o changeset: 3:f897c6137566 |
|
1791 | 1791 | | tag: tip |
|
1792 | 1792 | | parent: 0:ea207398892e |
|
1793 | 1793 | | user: test |
|
1794 | 1794 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1795 | 1795 | | summary: C0 |
|
1796 | 1796 | | |
|
1797 | 1797 | @ changeset: 0:ea207398892e |
|
1798 | 1798 | user: test |
|
1799 | 1799 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1800 | 1800 | summary: ROOT |
|
1801 | 1801 | |
|
1802 | 1802 | $ hg up |
|
1803 | 1803 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1804 | 1804 | |
|
1805 | 1805 | Create a commit with three files |
|
1806 | 1806 | $ touch A B C |
|
1807 | 1807 | $ hg commit -A -m "Add A,B,C" A B C |
|
1808 | 1808 | |
|
1809 | 1809 | Split it |
|
1810 | 1810 | $ hg up 3 |
|
1811 | 1811 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
1812 | 1812 | $ touch A |
|
1813 | 1813 | $ hg commit -A -m "Add A,B,C" A |
|
1814 | 1814 | created new head |
|
1815 | 1815 | |
|
1816 | 1816 | $ touch B |
|
1817 | 1817 | $ hg commit -A -m "Add A,B,C" B |
|
1818 | 1818 | |
|
1819 | 1819 | $ touch C |
|
1820 | 1820 | $ hg commit -A -m "Add A,B,C" C |
|
1821 | 1821 | |
|
1822 | 1822 | $ hg log -G |
|
1823 | 1823 | @ changeset: 7:ba2ed02b0c9a |
|
1824 | 1824 | | tag: tip |
|
1825 | 1825 | | user: test |
|
1826 | 1826 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1827 | 1827 | | summary: Add A,B,C |
|
1828 | 1828 | | |
|
1829 | 1829 | o changeset: 6:4a004186e638 |
|
1830 | 1830 | | user: test |
|
1831 | 1831 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1832 | 1832 | | summary: Add A,B,C |
|
1833 | 1833 | | |
|
1834 | 1834 | o changeset: 5:dd800401bd8c |
|
1835 | 1835 | | parent: 3:f897c6137566 |
|
1836 | 1836 | | user: test |
|
1837 | 1837 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1838 | 1838 | | summary: Add A,B,C |
|
1839 | 1839 | | |
|
1840 | 1840 | | o changeset: 4:9bd10a0775e4 |
|
1841 | 1841 | |/ user: test |
|
1842 | 1842 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1843 | 1843 | | summary: Add A,B,C |
|
1844 | 1844 | | |
|
1845 | 1845 | o changeset: 3:f897c6137566 |
|
1846 | 1846 | | parent: 0:ea207398892e |
|
1847 | 1847 | | user: test |
|
1848 | 1848 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1849 | 1849 | | summary: C0 |
|
1850 | 1850 | | |
|
1851 | 1851 | o changeset: 0:ea207398892e |
|
1852 | 1852 | user: test |
|
1853 | 1853 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1854 | 1854 | summary: ROOT |
|
1855 | 1855 | |
|
1856 | 1856 | $ hg debugobsolete `getid "4"` `getid "5"` `getid "6"` `getid "7"` |
|
1857 | 1857 | obsoleted 1 changesets |
|
1858 | 1858 | $ hg log -G |
|
1859 | 1859 | @ changeset: 7:ba2ed02b0c9a |
|
1860 | 1860 | | tag: tip |
|
1861 | 1861 | | user: test |
|
1862 | 1862 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1863 | 1863 | | summary: Add A,B,C |
|
1864 | 1864 | | |
|
1865 | 1865 | o changeset: 6:4a004186e638 |
|
1866 | 1866 | | user: test |
|
1867 | 1867 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1868 | 1868 | | summary: Add A,B,C |
|
1869 | 1869 | | |
|
1870 | 1870 | o changeset: 5:dd800401bd8c |
|
1871 | 1871 | | parent: 3:f897c6137566 |
|
1872 | 1872 | | user: test |
|
1873 | 1873 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1874 | 1874 | | summary: Add A,B,C |
|
1875 | 1875 | | |
|
1876 | 1876 | o changeset: 3:f897c6137566 |
|
1877 | 1877 | | parent: 0:ea207398892e |
|
1878 | 1878 | | user: test |
|
1879 | 1879 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1880 | 1880 | | summary: C0 |
|
1881 | 1881 | | |
|
1882 | 1882 | o changeset: 0:ea207398892e |
|
1883 | 1883 | user: test |
|
1884 | 1884 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1885 | 1885 | summary: ROOT |
|
1886 | 1886 | |
|
1887 | 1887 | Diverge one of the splitted commit |
|
1888 | 1888 | |
|
1889 | 1889 | $ hg up 6 |
|
1890 | 1890 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1891 | 1891 | $ hg commit --amend -m "Add only B" |
|
1892 | 1892 | 1 new orphan changesets |
|
1893 | 1893 | |
|
1894 | 1894 | $ hg up 6 --hidden |
|
1895 | 1895 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1896 | 1896 | $ hg commit --amend -m "Add B only" |
|
1897 | 1897 | 4 new content-divergent changesets |
|
1898 | 1898 | |
|
1899 | 1899 | $ hg log -G |
|
1900 | 1900 | @ changeset: 9:0b997eb7ceee |
|
1901 | 1901 | | tag: tip |
|
1902 | 1902 | | parent: 5:dd800401bd8c |
|
1903 | 1903 | | user: test |
|
1904 | 1904 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1905 | 1905 | | instability: content-divergent |
|
1906 | 1906 | | summary: Add B only |
|
1907 | 1907 | | |
|
1908 | 1908 | | * changeset: 8:b18bc8331526 |
|
1909 | 1909 | |/ parent: 5:dd800401bd8c |
|
1910 | 1910 | | user: test |
|
1911 | 1911 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1912 | 1912 | | instability: content-divergent |
|
1913 | 1913 | | summary: Add only B |
|
1914 | 1914 | | |
|
1915 | 1915 | | * changeset: 7:ba2ed02b0c9a |
|
1916 | 1916 | | | user: test |
|
1917 | 1917 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1918 | 1918 | | | instability: orphan, content-divergent |
|
1919 | 1919 | | | summary: Add A,B,C |
|
1920 | 1920 | | | |
|
1921 | 1921 | | x changeset: 6:4a004186e638 |
|
1922 | 1922 | |/ user: test |
|
1923 | 1923 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1924 | 1924 | | obsolete: rewritten using amend as 8:b18bc8331526 |
|
1925 | 1925 | | obsolete: rewritten using amend as 9:0b997eb7ceee |
|
1926 | 1926 | | summary: Add A,B,C |
|
1927 | 1927 | | |
|
1928 | 1928 | * changeset: 5:dd800401bd8c |
|
1929 | 1929 | | parent: 3:f897c6137566 |
|
1930 | 1930 | | user: test |
|
1931 | 1931 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1932 | 1932 | | instability: content-divergent |
|
1933 | 1933 | | summary: Add A,B,C |
|
1934 | 1934 | | |
|
1935 | 1935 | o changeset: 3:f897c6137566 |
|
1936 | 1936 | | parent: 0:ea207398892e |
|
1937 | 1937 | | user: test |
|
1938 | 1938 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1939 | 1939 | | summary: C0 |
|
1940 | 1940 | | |
|
1941 | 1941 | o changeset: 0:ea207398892e |
|
1942 | 1942 | user: test |
|
1943 | 1943 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1944 | 1944 | summary: ROOT |
|
1945 | 1945 | |
|
1946 | 1946 | |
|
1947 | 1947 | Check templates |
|
1948 | 1948 | --------------- |
|
1949 | 1949 | |
|
1950 | 1950 | $ hg tlog |
|
1951 | 1951 | @ 0b997eb7ceee |
|
1952 | 1952 | | Predecessors: 6:4a004186e638 |
|
1953 | 1953 | | semi-colon: 6:4a004186e638 |
|
1954 | 1954 | | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] |
|
1955 | 1955 | | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace |
|
1956 | 1956 | | * b18bc8331526 |
|
1957 | 1957 | |/ Predecessors: 6:4a004186e638 |
|
1958 | 1958 | | semi-colon: 6:4a004186e638 |
|
1959 | 1959 | | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] |
|
1960 | 1960 | | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace |
|
1961 | 1961 | | * ba2ed02b0c9a |
|
1962 | 1962 | | | |
|
1963 | 1963 | | x 4a004186e638 |
|
1964 | 1964 | |/ Successors: 8:b18bc8331526; 9:0b997eb7ceee |
|
1965 | 1965 | | multi-line: 8:b18bc8331526 |
|
1966 | 1966 | | multi-line: 9:0b997eb7ceee |
|
1967 | 1967 | | json: [["b18bc8331526a22cbb1801022bd1555bf291c48b"], ["0b997eb7ceeee06200a02f8aab185979092d514e"]] |
|
1968 | 1968 | * dd800401bd8c |
|
1969 | 1969 | | |
|
1970 | 1970 | o f897c6137566 |
|
1971 | 1971 | | |
|
1972 | 1972 | o ea207398892e |
|
1973 | 1973 | |
|
1974 | 1974 | $ hg fatelog |
|
1975 | 1975 | @ 0b997eb7ceee |
|
1976 | 1976 | | |
|
1977 | 1977 | | * b18bc8331526 |
|
1978 | 1978 | |/ |
|
1979 | 1979 | | * ba2ed02b0c9a |
|
1980 | 1980 | | | |
|
1981 | 1981 | | x 4a004186e638 |
|
1982 | 1982 | |/ 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); |
|
1983 | 1983 | * dd800401bd8c |
|
1984 | 1984 | | |
|
1985 | 1985 | o f897c6137566 |
|
1986 | 1986 | | |
|
1987 | 1987 | o ea207398892e |
|
1988 | 1988 | |
|
1989 | 1989 | $ hg tlog --hidden |
|
1990 | 1990 | @ 0b997eb7ceee |
|
1991 | 1991 | | Predecessors: 6:4a004186e638 |
|
1992 | 1992 | | semi-colon: 6:4a004186e638 |
|
1993 | 1993 | | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] |
|
1994 | 1994 | | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace |
|
1995 | 1995 | | * b18bc8331526 |
|
1996 | 1996 | |/ Predecessors: 6:4a004186e638 |
|
1997 | 1997 | | semi-colon: 6:4a004186e638 |
|
1998 | 1998 | | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] |
|
1999 | 1999 | | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace |
|
2000 | 2000 | | * ba2ed02b0c9a |
|
2001 | 2001 | | | Predecessors: 4:9bd10a0775e4 |
|
2002 | 2002 | | | semi-colon: 4:9bd10a0775e4 |
|
2003 | 2003 | | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
2004 | 2004 | | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
2005 | 2005 | | x 4a004186e638 |
|
2006 | 2006 | |/ Predecessors: 4:9bd10a0775e4 |
|
2007 | 2007 | | semi-colon: 4:9bd10a0775e4 |
|
2008 | 2008 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
2009 | 2009 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
2010 | 2010 | | Successors: 8:b18bc8331526; 9:0b997eb7ceee |
|
2011 | 2011 | | multi-line: 8:b18bc8331526 |
|
2012 | 2012 | | multi-line: 9:0b997eb7ceee |
|
2013 | 2013 | | json: [["b18bc8331526a22cbb1801022bd1555bf291c48b"], ["0b997eb7ceeee06200a02f8aab185979092d514e"]] |
|
2014 | 2014 | * dd800401bd8c |
|
2015 | 2015 | | Predecessors: 4:9bd10a0775e4 |
|
2016 | 2016 | | semi-colon: 4:9bd10a0775e4 |
|
2017 | 2017 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
2018 | 2018 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
2019 | 2019 | | x 9bd10a0775e4 |
|
2020 | 2020 | |/ Successors: 5:dd800401bd8c 6:4a004186e638 7:ba2ed02b0c9a |
|
2021 | 2021 | | multi-line: 5:dd800401bd8c 6:4a004186e638 7:ba2ed02b0c9a |
|
2022 | 2022 | | json: [["dd800401bd8c79d815329277739e433e883f784e", "4a004186e63889f20cb16434fcbd72220bd1eace", "ba2ed02b0c9a56b9fdbc4e79c7e57866984d8a1f"]] |
|
2023 | 2023 | o f897c6137566 |
|
2024 | 2024 | | Predecessors: 2:0dec01379d3b |
|
2025 | 2025 | | semi-colon: 2:0dec01379d3b |
|
2026 | 2026 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
2027 | 2027 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
2028 | 2028 | | x 0dec01379d3b |
|
2029 | 2029 | | | Predecessors: 1:471f378eab4c |
|
2030 | 2030 | | | semi-colon: 1:471f378eab4c |
|
2031 | 2031 | | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
2032 | 2032 | | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
2033 | 2033 | | | Successors: 3:f897c6137566; 1:471f378eab4c |
|
2034 | 2034 | | | multi-line: 3:f897c6137566 |
|
2035 | 2035 | | | multi-line: 1:471f378eab4c |
|
2036 | 2036 | | | json: [["f897c6137566320b081514b4c7227ecc3d384b39"], ["471f378eab4c5e25f6c77f785b27c936efb22874"]] |
|
2037 | 2037 | | x 471f378eab4c |
|
2038 | 2038 | |/ Predecessors: 2:0dec01379d3b |
|
2039 | 2039 | | semi-colon: 2:0dec01379d3b |
|
2040 | 2040 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
2041 | 2041 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
2042 | 2042 | | Successors: 2:0dec01379d3b |
|
2043 | 2043 | | multi-line: 2:0dec01379d3b |
|
2044 | 2044 | | json: [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]] |
|
2045 | 2045 | o ea207398892e |
|
2046 | 2046 | |
|
2047 | 2047 | $ hg fatelog --hidden |
|
2048 | 2048 | @ 0b997eb7ceee |
|
2049 | 2049 | | |
|
2050 | 2050 | | * b18bc8331526 |
|
2051 | 2051 | |/ |
|
2052 | 2052 | | * ba2ed02b0c9a |
|
2053 | 2053 | | | |
|
2054 | 2054 | | x 4a004186e638 |
|
2055 | 2055 | |/ 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); |
|
2056 | 2056 | * dd800401bd8c |
|
2057 | 2057 | | |
|
2058 | 2058 | | x 9bd10a0775e4 |
|
2059 | 2059 | |/ Obsfate: split as 5:dd800401bd8c, 6:4a004186e638, 7:ba2ed02b0c9a by test (at 1970-01-01 00:00 +0000); |
|
2060 | 2060 | o f897c6137566 |
|
2061 | 2061 | | |
|
2062 | 2062 | | x 0dec01379d3b |
|
2063 | 2063 | | | 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); |
|
2064 | 2064 | | x 471f378eab4c |
|
2065 | 2065 | |/ Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000); |
|
2066 | 2066 | o ea207398892e |
|
2067 | 2067 | |
|
2068 | 2068 | $ hg fatelogjson --hidden |
|
2069 | 2069 | @ 0b997eb7ceee |
|
2070 | 2070 | | |
|
2071 | 2071 | | * b18bc8331526 |
|
2072 | 2072 | |/ |
|
2073 | 2073 | | * ba2ed02b0c9a |
|
2074 | 2074 | | | |
|
2075 | 2075 | | x 4a004186e638 |
|
2076 | 2076 | |/ Obsfate: [{"markers": [["4a004186e63889f20cb16434fcbd72220bd1eace", ["b18bc8331526a22cbb1801022bd1555bf291c48b"], 0, [["ef1", "1"], ["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["b18bc8331526a22cbb1801022bd1555bf291c48b"]}, {"markers": [["4a004186e63889f20cb16434fcbd72220bd1eace", ["0b997eb7ceeee06200a02f8aab185979092d514e"], 0, [["ef1", "1"], ["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["0b997eb7ceeee06200a02f8aab185979092d514e"]}] |
|
2077 | 2077 | * dd800401bd8c |
|
2078 | 2078 | | |
|
2079 | 2079 | | x 9bd10a0775e4 |
|
2080 | 2080 | |/ Obsfate: [{"markers": [["9bd10a0775e478708cada5f176ec6de654359ce7", ["dd800401bd8c79d815329277739e433e883f784e", "4a004186e63889f20cb16434fcbd72220bd1eace", "ba2ed02b0c9a56b9fdbc4e79c7e57866984d8a1f"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["dd800401bd8c79d815329277739e433e883f784e", "4a004186e63889f20cb16434fcbd72220bd1eace", "ba2ed02b0c9a56b9fdbc4e79c7e57866984d8a1f"]}] |
|
2081 | 2081 | o f897c6137566 |
|
2082 | 2082 | | |
|
2083 | 2083 | | x 0dec01379d3b |
|
2084 | 2084 | | | 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"]}] |
|
2085 | 2085 | | x 471f378eab4c |
|
2086 | 2086 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]}] |
|
2087 | 2087 | o ea207398892e |
|
2088 | 2088 | |
|
2089 | 2089 | $ hg up --hidden 4 |
|
2090 | 2090 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2091 | 2091 | updated to hidden changeset 9bd10a0775e4 |
|
2092 | 2092 | (hidden revision '9bd10a0775e4' has diverged) |
|
2093 | 2093 | $ hg rebase -r 7 -d 8 --config extensions.rebase= |
|
2094 | 2094 | rebasing 7:ba2ed02b0c9a "Add A,B,C" |
|
2095 | 2095 | $ hg tlog |
|
2096 | 2096 | * eceed8f98ffc |
|
2097 | 2097 | | Predecessors: 4:9bd10a0775e4 |
|
2098 | 2098 | | semi-colon: 4:9bd10a0775e4 |
|
2099 | 2099 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
2100 | 2100 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
2101 | 2101 | | * 0b997eb7ceee |
|
2102 | 2102 | | | Predecessors: 4:9bd10a0775e4 |
|
2103 | 2103 | | | semi-colon: 4:9bd10a0775e4 |
|
2104 | 2104 | | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
2105 | 2105 | | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
2106 | 2106 | * | b18bc8331526 |
|
2107 | 2107 | |/ Predecessors: 4:9bd10a0775e4 |
|
2108 | 2108 | | semi-colon: 4:9bd10a0775e4 |
|
2109 | 2109 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
2110 | 2110 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
2111 | 2111 | * dd800401bd8c |
|
2112 | 2112 | | Predecessors: 4:9bd10a0775e4 |
|
2113 | 2113 | | semi-colon: 4:9bd10a0775e4 |
|
2114 | 2114 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
2115 | 2115 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
2116 | 2116 | | @ 9bd10a0775e4 |
|
2117 | 2117 | |/ Successors: 5:dd800401bd8c 9:0b997eb7ceee 10:eceed8f98ffc; 5:dd800401bd8c 8:b18bc8331526 10:eceed8f98ffc |
|
2118 | 2118 | | multi-line: 5:dd800401bd8c 9:0b997eb7ceee 10:eceed8f98ffc |
|
2119 | 2119 | | multi-line: 5:dd800401bd8c 8:b18bc8331526 10:eceed8f98ffc |
|
2120 | 2120 | | json: [["dd800401bd8c79d815329277739e433e883f784e", "0b997eb7ceeee06200a02f8aab185979092d514e", "eceed8f98ffc4186032e29a6542ab98888ebf68d"], ["dd800401bd8c79d815329277739e433e883f784e", "b18bc8331526a22cbb1801022bd1555bf291c48b", "eceed8f98ffc4186032e29a6542ab98888ebf68d"]] |
|
2121 | 2121 | o f897c6137566 |
|
2122 | 2122 | | |
|
2123 | 2123 | o ea207398892e |
|
2124 | 2124 | |
|
2125 | 2125 | |
|
2126 | 2126 | $ hg fatelog |
|
2127 | 2127 | * eceed8f98ffc |
|
2128 | 2128 | | |
|
2129 | 2129 | | * 0b997eb7ceee |
|
2130 | 2130 | | | |
|
2131 | 2131 | * | b18bc8331526 |
|
2132 | 2132 | |/ |
|
2133 | 2133 | * dd800401bd8c |
|
2134 | 2134 | | |
|
2135 | 2135 | | @ 9bd10a0775e4 |
|
2136 | 2136 | |/ 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); |
|
2137 | 2137 | o f897c6137566 |
|
2138 | 2138 | | |
|
2139 | 2139 | o ea207398892e |
|
2140 | 2140 | |
|
2141 | 2141 | Check other fatelog implementations |
|
2142 | 2142 | ----------------------------------- |
|
2143 | 2143 | |
|
2144 | 2144 | $ hg fatelogkw --hidden -q |
|
2145 | 2145 | * eceed8f98ffc |
|
2146 | 2146 | | |
|
2147 | 2147 | | * 0b997eb7ceee |
|
2148 | 2148 | | | |
|
2149 | 2149 | * | b18bc8331526 |
|
2150 | 2150 | |/ |
|
2151 | 2151 | | x ba2ed02b0c9a |
|
2152 | 2152 | | | Obsfate: rewritten using rebase as 10:eceed8f98ffc |
|
2153 | 2153 | | x 4a004186e638 |
|
2154 | 2154 | |/ Obsfate: rewritten using amend as 8:b18bc8331526 |
|
2155 | 2155 | | Obsfate: rewritten using amend as 9:0b997eb7ceee |
|
2156 | 2156 | * dd800401bd8c |
|
2157 | 2157 | | |
|
2158 | 2158 | | @ 9bd10a0775e4 |
|
2159 | 2159 | |/ Obsfate: split as 5:dd800401bd8c, 6:4a004186e638, 7:ba2ed02b0c9a |
|
2160 | 2160 | o f897c6137566 |
|
2161 | 2161 | | |
|
2162 | 2162 | | x 0dec01379d3b |
|
2163 | 2163 | | | Obsfate: rewritten as 3:f897c6137566 |
|
2164 | 2164 | | | Obsfate: rewritten as 1:471f378eab4c |
|
2165 | 2165 | | x 471f378eab4c |
|
2166 | 2166 | |/ Obsfate: rewritten as 2:0dec01379d3b |
|
2167 | 2167 | o ea207398892e |
|
2168 | 2168 | |
|
2169 | 2169 | $ hg fatelogkw --hidden |
|
2170 | 2170 | * eceed8f98ffc |
|
2171 | 2171 | | |
|
2172 | 2172 | | * 0b997eb7ceee |
|
2173 | 2173 | | | |
|
2174 | 2174 | * | b18bc8331526 |
|
2175 | 2175 | |/ |
|
2176 | 2176 | | x ba2ed02b0c9a |
|
2177 | 2177 | | | Obsfate: rewritten using rebase as 10:eceed8f98ffc |
|
2178 | 2178 | | x 4a004186e638 |
|
2179 | 2179 | |/ Obsfate: rewritten using amend as 8:b18bc8331526 |
|
2180 | 2180 | | Obsfate: rewritten using amend as 9:0b997eb7ceee |
|
2181 | 2181 | * dd800401bd8c |
|
2182 | 2182 | | |
|
2183 | 2183 | | @ 9bd10a0775e4 |
|
2184 | 2184 | |/ Obsfate: split as 5:dd800401bd8c, 6:4a004186e638, 7:ba2ed02b0c9a |
|
2185 | 2185 | o f897c6137566 |
|
2186 | 2186 | | |
|
2187 | 2187 | | x 0dec01379d3b |
|
2188 | 2188 | | | Obsfate: rewritten as 3:f897c6137566 |
|
2189 | 2189 | | | Obsfate: rewritten as 1:471f378eab4c |
|
2190 | 2190 | | x 471f378eab4c |
|
2191 | 2191 | |/ Obsfate: rewritten as 2:0dec01379d3b |
|
2192 | 2192 | o ea207398892e |
|
2193 | 2193 | |
|
2194 | 2194 | $ hg fatelogkw --hidden -v |
|
2195 | 2195 | * eceed8f98ffc |
|
2196 | 2196 | | |
|
2197 | 2197 | | * 0b997eb7ceee |
|
2198 | 2198 | | | |
|
2199 | 2199 | * | b18bc8331526 |
|
2200 | 2200 | |/ |
|
2201 | 2201 | | x ba2ed02b0c9a |
|
2202 | 2202 | | | Obsfate: rewritten using rebase as 10:eceed8f98ffc by test (at 1970-01-01 00:00 +0000) |
|
2203 | 2203 | | x 4a004186e638 |
|
2204 | 2204 | |/ Obsfate: rewritten using amend as 8:b18bc8331526 by test (at 1970-01-01 00:00 +0000) |
|
2205 | 2205 | | Obsfate: rewritten using amend as 9:0b997eb7ceee by test (at 1970-01-01 00:00 +0000) |
|
2206 | 2206 | * dd800401bd8c |
|
2207 | 2207 | | |
|
2208 | 2208 | | @ 9bd10a0775e4 |
|
2209 | 2209 | |/ Obsfate: split as 5:dd800401bd8c, 6:4a004186e638, 7:ba2ed02b0c9a by test (at 1970-01-01 00:00 +0000) |
|
2210 | 2210 | o f897c6137566 |
|
2211 | 2211 | | |
|
2212 | 2212 | | x 0dec01379d3b |
|
2213 | 2213 | | | Obsfate: rewritten as 3:f897c6137566 by test (at 1970-01-01 00:00 +0000) |
|
2214 | 2214 | | | Obsfate: rewritten as 1:471f378eab4c by test (at 1970-01-01 00:00 +0000) |
|
2215 | 2215 | | x 471f378eab4c |
|
2216 | 2216 | |/ Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000) |
|
2217 | 2217 | o ea207398892e |
|
2218 | 2218 | |
|
2219 | 2219 | $ hg log -G -T "default" --hidden |
|
2220 | 2220 | * changeset: 10:eceed8f98ffc |
|
2221 | 2221 | | tag: tip |
|
2222 | 2222 | | parent: 8:b18bc8331526 |
|
2223 | 2223 | | user: test |
|
2224 | 2224 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2225 | 2225 | | instability: content-divergent |
|
2226 | 2226 | | summary: Add A,B,C |
|
2227 | 2227 | | |
|
2228 | 2228 | | * changeset: 9:0b997eb7ceee |
|
2229 | 2229 | | | parent: 5:dd800401bd8c |
|
2230 | 2230 | | | user: test |
|
2231 | 2231 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2232 | 2232 | | | instability: content-divergent |
|
2233 | 2233 | | | summary: Add B only |
|
2234 | 2234 | | | |
|
2235 | 2235 | * | changeset: 8:b18bc8331526 |
|
2236 | 2236 | |/ parent: 5:dd800401bd8c |
|
2237 | 2237 | | user: test |
|
2238 | 2238 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2239 | 2239 | | instability: content-divergent |
|
2240 | 2240 | | summary: Add only B |
|
2241 | 2241 | | |
|
2242 | 2242 | | x changeset: 7:ba2ed02b0c9a |
|
2243 | 2243 | | | user: test |
|
2244 | 2244 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2245 | 2245 | | | obsolete: rewritten using rebase as 10:eceed8f98ffc |
|
2246 | 2246 | | | summary: Add A,B,C |
|
2247 | 2247 | | | |
|
2248 | 2248 | | x changeset: 6:4a004186e638 |
|
2249 | 2249 | |/ user: test |
|
2250 | 2250 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2251 | 2251 | | obsolete: rewritten using amend as 8:b18bc8331526 |
|
2252 | 2252 | | obsolete: rewritten using amend as 9:0b997eb7ceee |
|
2253 | 2253 | | summary: Add A,B,C |
|
2254 | 2254 | | |
|
2255 | 2255 | * changeset: 5:dd800401bd8c |
|
2256 | 2256 | | parent: 3:f897c6137566 |
|
2257 | 2257 | | user: test |
|
2258 | 2258 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2259 | 2259 | | instability: content-divergent |
|
2260 | 2260 | | summary: Add A,B,C |
|
2261 | 2261 | | |
|
2262 | 2262 | | @ changeset: 4:9bd10a0775e4 |
|
2263 | 2263 | |/ user: test |
|
2264 | 2264 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2265 | 2265 | | obsolete: split as 5:dd800401bd8c, 6:4a004186e638, 7:ba2ed02b0c9a |
|
2266 | 2266 | | summary: Add A,B,C |
|
2267 | 2267 | | |
|
2268 | 2268 | o changeset: 3:f897c6137566 |
|
2269 | 2269 | | parent: 0:ea207398892e |
|
2270 | 2270 | | user: test |
|
2271 | 2271 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2272 | 2272 | | summary: C0 |
|
2273 | 2273 | | |
|
2274 | 2274 | | x changeset: 2:0dec01379d3b |
|
2275 | 2275 | | | user: test |
|
2276 | 2276 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2277 | 2277 | | | obsolete: rewritten as 3:f897c6137566 |
|
2278 | 2278 | | | obsolete: rewritten as 1:471f378eab4c |
|
2279 | 2279 | | | summary: B0 |
|
2280 | 2280 | | | |
|
2281 | 2281 | | x changeset: 1:471f378eab4c |
|
2282 | 2282 | |/ user: test |
|
2283 | 2283 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2284 | 2284 | | obsolete: rewritten as 2:0dec01379d3b |
|
2285 | 2285 | | summary: A0 |
|
2286 | 2286 | | |
|
2287 | 2287 | o changeset: 0:ea207398892e |
|
2288 | 2288 | user: test |
|
2289 | 2289 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2290 | 2290 | summary: ROOT |
|
2291 | 2291 | |
|
2292 | 2292 | |
|
2293 | 2293 | Test templates with pruned commits |
|
2294 | 2294 | ================================== |
|
2295 | 2295 | |
|
2296 | 2296 | Test setup |
|
2297 | 2297 | ---------- |
|
2298 | 2298 | |
|
2299 | 2299 | $ hg init $TESTTMP/templates-local-prune |
|
2300 | 2300 | $ cd $TESTTMP/templates-local-prune |
|
2301 | 2301 | $ mkcommit ROOT |
|
2302 | 2302 | $ mkcommit A0 |
|
2303 | 2303 | $ hg debugobsolete --record-parent `getid "."` |
|
2304 | 2304 | obsoleted 1 changesets |
|
2305 | 2305 | |
|
2306 | 2306 | Check output |
|
2307 | 2307 | ------------ |
|
2308 | 2308 | |
|
2309 | 2309 | $ hg up "desc(A0)" --hidden |
|
2310 | 2310 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2311 | 2311 | $ hg tlog |
|
2312 | 2312 | @ 471f378eab4c |
|
2313 | 2313 | | |
|
2314 | 2314 | o ea207398892e |
|
2315 | 2315 | |
|
2316 | 2316 | $ hg fatelog |
|
2317 | 2317 | @ 471f378eab4c |
|
2318 | 2318 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000); |
|
2319 | 2319 | o ea207398892e |
|
2320 | 2320 | |
|
2321 | 2321 | Test templates with multiple pruned commits |
|
2322 | 2322 | =========================================== |
|
2323 | 2323 | |
|
2324 | 2324 | Test setup |
|
2325 | 2325 | ---------- |
|
2326 | 2326 | |
|
2327 | 2327 | $ hg init $TESTTMP/multiple-local-prune |
|
2328 | 2328 | $ cd $TESTTMP/multiple-local-prune |
|
2329 | 2329 | $ mkcommit ROOT |
|
2330 | 2330 | $ mkcommit A0 |
|
2331 | 2331 | $ hg commit --amend -m "A1" |
|
2332 | 2332 | $ hg debugobsolete --record-parent `getid "."` |
|
2333 | 2333 | obsoleted 1 changesets |
|
2334 | 2334 | |
|
2335 | 2335 | $ hg up -r "desc(A0)" --hidden |
|
2336 | 2336 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2337 | 2337 | updated to hidden changeset 471f378eab4c |
|
2338 | 2338 | (hidden revision '471f378eab4c' is pruned) |
|
2339 | 2339 | $ hg commit --amend -m "A2" |
|
2340 | 2340 | $ hg debugobsolete --record-parent `getid "."` |
|
2341 | 2341 | obsoleted 1 changesets |
|
2342 | 2342 | |
|
2343 | 2343 | Check output |
|
2344 | 2344 | ------------ |
|
2345 | 2345 | |
|
2346 | 2346 | $ hg up "desc(A0)" --hidden |
|
2347 | 2347 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2348 | 2348 | updated to hidden changeset 471f378eab4c |
|
2349 | 2349 | (hidden revision '471f378eab4c' is pruned) |
|
2350 | 2350 | $ hg tlog |
|
2351 | 2351 | @ 471f378eab4c |
|
2352 | 2352 | | |
|
2353 | 2353 | o ea207398892e |
|
2354 | 2354 | |
|
2355 | 2355 | # todo: the obsfate output is not ideal |
|
2356 | 2356 | $ hg fatelog |
|
2357 | 2357 | @ 471f378eab4c |
|
2358 | 2358 | | Obsfate: pruned; |
|
2359 | 2359 | o ea207398892e |
|
2360 | 2360 | |
|
2361 | 2361 | $ hg fatelog --hidden |
|
2362 | 2362 | x 65b757b745b9 |
|
2363 | 2363 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000); |
|
2364 | 2364 | | x fdf9bde5129a |
|
2365 | 2365 | |/ Obsfate: pruned by test (at 1970-01-01 00:00 +0000); |
|
2366 | 2366 | | @ 471f378eab4c |
|
2367 | 2367 | |/ 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); |
|
2368 | 2368 | o ea207398892e |
|
2369 | 2369 | |
|
2370 | 2370 | Check other fatelog implementations |
|
2371 | 2371 | ----------------------------------- |
|
2372 | 2372 | |
|
2373 | 2373 | $ hg fatelogkw --hidden -q |
|
2374 | 2374 | x 65b757b745b9 |
|
2375 | 2375 | | Obsfate: pruned |
|
2376 | 2376 | | x fdf9bde5129a |
|
2377 | 2377 | |/ Obsfate: pruned |
|
2378 | 2378 | | @ 471f378eab4c |
|
2379 | 2379 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a |
|
2380 | 2380 | | Obsfate: rewritten using amend as 3:65b757b745b9 |
|
2381 | 2381 | o ea207398892e |
|
2382 | 2382 | |
|
2383 | 2383 | $ hg fatelogkw --hidden |
|
2384 | 2384 | x 65b757b745b9 |
|
2385 | 2385 | | Obsfate: pruned |
|
2386 | 2386 | | x fdf9bde5129a |
|
2387 | 2387 | |/ Obsfate: pruned |
|
2388 | 2388 | | @ 471f378eab4c |
|
2389 | 2389 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a |
|
2390 | 2390 | | Obsfate: rewritten using amend as 3:65b757b745b9 |
|
2391 | 2391 | o ea207398892e |
|
2392 | 2392 | |
|
2393 | 2393 | $ hg fatelogkw --hidden -v |
|
2394 | 2394 | x 65b757b745b9 |
|
2395 | 2395 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000) |
|
2396 | 2396 | | x fdf9bde5129a |
|
2397 | 2397 | |/ Obsfate: pruned by test (at 1970-01-01 00:00 +0000) |
|
2398 | 2398 | | @ 471f378eab4c |
|
2399 | 2399 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000) |
|
2400 | 2400 | | Obsfate: rewritten using amend as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000) |
|
2401 | 2401 | o ea207398892e |
|
2402 | 2402 | |
|
2403 | 2403 | |
|
2404 | 2404 | $ hg log -G -T "default" --hidden |
|
2405 | 2405 | x changeset: 3:65b757b745b9 |
|
2406 | 2406 | | tag: tip |
|
2407 | 2407 | | parent: 0:ea207398892e |
|
2408 | 2408 | | user: test |
|
2409 | 2409 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2410 | 2410 | | obsolete: pruned |
|
2411 | 2411 | | summary: A2 |
|
2412 | 2412 | | |
|
2413 | 2413 | | x changeset: 2:fdf9bde5129a |
|
2414 | 2414 | |/ parent: 0:ea207398892e |
|
2415 | 2415 | | user: test |
|
2416 | 2416 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2417 | 2417 | | obsolete: pruned |
|
2418 | 2418 | | summary: A1 |
|
2419 | 2419 | | |
|
2420 | 2420 | | @ changeset: 1:471f378eab4c |
|
2421 | 2421 | |/ user: test |
|
2422 | 2422 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2423 | 2423 | | obsolete: rewritten using amend as 2:fdf9bde5129a |
|
2424 | 2424 | | obsolete: rewritten using amend as 3:65b757b745b9 |
|
2425 | 2425 | | summary: A0 |
|
2426 | 2426 | | |
|
2427 | 2427 | o changeset: 0:ea207398892e |
|
2428 | 2428 | user: test |
|
2429 | 2429 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2430 | 2430 | summary: ROOT |
|
2431 | 2431 | |
|
2432 | Check that {negrev} shows usable negative revisions despite hidden commits | |
|
2433 | ||
|
2434 | $ hg log -G -T "{negrev}\n" | |
|
2435 | @ -3 | |
|
2436 | | | |
|
2437 | o -4 | |
|
2438 | ||
|
2439 | ||
|
2440 | $ hg log -G -T "{negrev}\n" --hidden | |
|
2441 | x -1 | |
|
2442 | | | |
|
2443 | | x -2 | |
|
2444 | |/ | |
|
2445 | | @ -3 | |
|
2446 | |/ | |
|
2447 | o -4 | |
|
2448 | ||
|
2432 | 2449 | |
|
2433 | 2450 | Test templates with splitted and pruned commit |
|
2434 | 2451 | ============================================== |
|
2435 | 2452 | |
|
2436 | 2453 | $ hg init $TESTTMP/templates-local-split-prune |
|
2437 | 2454 | $ cd $TESTTMP/templates-local-split-prune |
|
2438 | 2455 | $ mkcommit ROOT |
|
2439 | 2456 | $ echo 42 >> a |
|
2440 | 2457 | $ echo 43 >> b |
|
2441 | 2458 | $ hg commit -A -m "A0" |
|
2442 | 2459 | adding a |
|
2443 | 2460 | adding b |
|
2444 | 2461 | $ hg log --hidden -G |
|
2445 | 2462 | @ changeset: 1:471597cad322 |
|
2446 | 2463 | | tag: tip |
|
2447 | 2464 | | user: test |
|
2448 | 2465 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2449 | 2466 | | summary: A0 |
|
2450 | 2467 | | |
|
2451 | 2468 | o changeset: 0:ea207398892e |
|
2452 | 2469 | user: test |
|
2453 | 2470 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2454 | 2471 | summary: ROOT |
|
2455 | 2472 | |
|
2456 | 2473 | # Simulate split |
|
2457 | 2474 | $ hg up -r "desc(ROOT)" |
|
2458 | 2475 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
2459 | 2476 | $ echo 42 >> a |
|
2460 | 2477 | $ hg commit -A -m "A1" |
|
2461 | 2478 | adding a |
|
2462 | 2479 | created new head |
|
2463 | 2480 | $ echo 43 >> b |
|
2464 | 2481 | $ hg commit -A -m "A2" |
|
2465 | 2482 | adding b |
|
2466 | 2483 | $ hg debugobsolete `getid "1"` `getid "2"` `getid "3"` |
|
2467 | 2484 | obsoleted 1 changesets |
|
2468 | 2485 | |
|
2469 | 2486 | # Simulate prune |
|
2470 | 2487 | $ hg debugobsolete --record-parent `getid "."` |
|
2471 | 2488 | obsoleted 1 changesets |
|
2472 | 2489 | |
|
2473 | 2490 | $ hg log --hidden -G |
|
2474 | 2491 | @ changeset: 3:0d0ef4bdf70e |
|
2475 | 2492 | | tag: tip |
|
2476 | 2493 | | user: test |
|
2477 | 2494 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2478 | 2495 | | obsolete: pruned |
|
2479 | 2496 | | summary: A2 |
|
2480 | 2497 | | |
|
2481 | 2498 | o changeset: 2:617adc3a144c |
|
2482 | 2499 | | parent: 0:ea207398892e |
|
2483 | 2500 | | user: test |
|
2484 | 2501 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2485 | 2502 | | summary: A1 |
|
2486 | 2503 | | |
|
2487 | 2504 | | x changeset: 1:471597cad322 |
|
2488 | 2505 | |/ user: test |
|
2489 | 2506 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2490 | 2507 | | obsolete: split as 2:617adc3a144c, 3:0d0ef4bdf70e |
|
2491 | 2508 | | summary: A0 |
|
2492 | 2509 | | |
|
2493 | 2510 | o changeset: 0:ea207398892e |
|
2494 | 2511 | user: test |
|
2495 | 2512 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2496 | 2513 | summary: ROOT |
|
2497 | 2514 | |
|
2498 | 2515 | Check templates |
|
2499 | 2516 | --------------- |
|
2500 | 2517 | |
|
2501 | 2518 | $ hg up 'desc("A0")' --hidden |
|
2502 | 2519 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2503 | 2520 | updated to hidden changeset 471597cad322 |
|
2504 | 2521 | (hidden revision '471597cad322' was rewritten as: 617adc3a144c) |
|
2505 | 2522 | |
|
2506 | 2523 | # todo: the obsfate output is not ideal |
|
2507 | 2524 | $ hg fatelog |
|
2508 | 2525 | o 617adc3a144c |
|
2509 | 2526 | | |
|
2510 | 2527 | | @ 471597cad322 |
|
2511 | 2528 | |/ Obsfate: rewritten as 2:617adc3a144c by test (at 1970-01-01 00:00 +0000); |
|
2512 | 2529 | o ea207398892e |
|
2513 | 2530 | |
|
2514 | 2531 | $ hg up -r 'desc("A2")' --hidden |
|
2515 | 2532 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2516 | 2533 | updated to hidden changeset 0d0ef4bdf70e |
|
2517 | 2534 | (hidden revision '0d0ef4bdf70e' is pruned) |
|
2518 | 2535 | |
|
2519 | 2536 | $ hg fatelog --hidden |
|
2520 | 2537 | @ 0d0ef4bdf70e |
|
2521 | 2538 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000); |
|
2522 | 2539 | o 617adc3a144c |
|
2523 | 2540 | | |
|
2524 | 2541 | | x 471597cad322 |
|
2525 | 2542 | |/ Obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e by test (at 1970-01-01 00:00 +0000); |
|
2526 | 2543 | o ea207398892e |
|
2527 | 2544 | |
|
2528 | 2545 | |
|
2529 | 2546 | Check other fatelog implementations |
|
2530 | 2547 | ----------------------------------- |
|
2531 | 2548 | |
|
2532 | 2549 | $ hg fatelogkw --hidden -q |
|
2533 | 2550 | @ 0d0ef4bdf70e |
|
2534 | 2551 | | Obsfate: pruned |
|
2535 | 2552 | o 617adc3a144c |
|
2536 | 2553 | | |
|
2537 | 2554 | | x 471597cad322 |
|
2538 | 2555 | |/ Obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e |
|
2539 | 2556 | o ea207398892e |
|
2540 | 2557 | |
|
2541 | 2558 | $ hg fatelogkw --hidden |
|
2542 | 2559 | @ 0d0ef4bdf70e |
|
2543 | 2560 | | Obsfate: pruned |
|
2544 | 2561 | o 617adc3a144c |
|
2545 | 2562 | | |
|
2546 | 2563 | | x 471597cad322 |
|
2547 | 2564 | |/ Obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e |
|
2548 | 2565 | o ea207398892e |
|
2549 | 2566 | |
|
2550 | 2567 | $ hg fatelogkw --hidden -v |
|
2551 | 2568 | @ 0d0ef4bdf70e |
|
2552 | 2569 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000) |
|
2553 | 2570 | o 617adc3a144c |
|
2554 | 2571 | | |
|
2555 | 2572 | | x 471597cad322 |
|
2556 | 2573 | |/ Obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e by test (at 1970-01-01 00:00 +0000) |
|
2557 | 2574 | o ea207398892e |
|
2558 | 2575 | |
|
2559 | 2576 | $ hg log -G -T "default" --hidden |
|
2560 | 2577 | @ changeset: 3:0d0ef4bdf70e |
|
2561 | 2578 | | tag: tip |
|
2562 | 2579 | | user: test |
|
2563 | 2580 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2564 | 2581 | | obsolete: pruned |
|
2565 | 2582 | | summary: A2 |
|
2566 | 2583 | | |
|
2567 | 2584 | o changeset: 2:617adc3a144c |
|
2568 | 2585 | | parent: 0:ea207398892e |
|
2569 | 2586 | | user: test |
|
2570 | 2587 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2571 | 2588 | | summary: A1 |
|
2572 | 2589 | | |
|
2573 | 2590 | | x changeset: 1:471597cad322 |
|
2574 | 2591 | |/ user: test |
|
2575 | 2592 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2576 | 2593 | | obsolete: split as 2:617adc3a144c, 3:0d0ef4bdf70e |
|
2577 | 2594 | | summary: A0 |
|
2578 | 2595 | | |
|
2579 | 2596 | o changeset: 0:ea207398892e |
|
2580 | 2597 | user: test |
|
2581 | 2598 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2582 | 2599 | summary: ROOT |
|
2583 | 2600 | |
|
2584 | 2601 | |
|
2585 | 2602 | Test metadata encoding (issue5754) |
|
2586 | 2603 | ================================== |
|
2587 | 2604 | |
|
2588 | 2605 | $ hg init $TESTTMP/metadata-encoding |
|
2589 | 2606 | $ cd $TESTTMP/metadata-encoding |
|
2590 | 2607 | $ cat <<'EOF' >> .hg/hgrc |
|
2591 | 2608 | > [extensions] |
|
2592 | 2609 | > amend = |
|
2593 | 2610 | > EOF |
|
2594 | 2611 | $ "$PYTHON" <<'EOF' |
|
2595 | 2612 | > with open('test1', 'wb') as f: |
|
2596 | 2613 | > f.write(b't\xe8st1') and None |
|
2597 | 2614 | > with open('test2', 'wb') as f: |
|
2598 | 2615 | > f.write(b't\xe8st2') and None |
|
2599 | 2616 | > EOF |
|
2600 | 2617 | $ mkcommit ROOT |
|
2601 | 2618 | $ ( HGENCODING=latin-1 HGUSER="`cat test1`" mkcommit A0 ) |
|
2602 | 2619 | $ echo 42 >> A0 |
|
2603 | 2620 | $ HGENCODING=latin-1 hg amend -m "A1" --note "`cat test2`" |
|
2604 | 2621 | $ HGENCODING=latin-1 hg amend -m "A2" \ |
|
2605 | 2622 | > --config devel.user.obsmarker="`cat test2`" |
|
2606 | 2623 | $ mkcommit B0 |
|
2607 | 2624 | $ HGENCODING=latin-1 hg debugobsolete -u "`cat test2`" "`getid 'desc(B0)'`" |
|
2608 | 2625 | obsoleted 1 changesets |
|
2609 | 2626 | |
|
2610 | 2627 | metadata should be stored in UTF-8, and debugobsolete doesn't decode it to |
|
2611 | 2628 | local encoding since the command is supposed to show unmodified content: |
|
2612 | 2629 | |
|
2613 | 2630 | $ HGENCODING=latin-1 hg debugobsolete |
|
2614 | 2631 | 5f66a482f0bb2fcaccfc215554ad5eb9f40b50f5 718c0d00cee1429bdb73064e0d88908c601507a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'note': 't\xc3\xa8st2', 'operation': 'amend', 'user': 'test'} |
|
2615 | 2632 | 718c0d00cee1429bdb73064e0d88908c601507a8 1132562159b35bb27e1d6b80c80ee94a1659a4da 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 't\xc3\xa8st2'} |
|
2616 | 2633 | 8f82db6f991db367fdbb3b6dba5e187ecc3ebd96 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 't\xc3\xa8st2'} |
|
2617 | 2634 | |
|
2618 | 2635 | metadata should be converted back to local encoding when displaying: |
|
2619 | 2636 | |
|
2620 | 2637 | $ HGENCODING=latin-1 hg fatelog --hidden |
|
2621 | 2638 | @ 8f82db6f991d |
|
2622 | 2639 | | Obsfate: pruned by t\xe8st2 (at 1970-01-01 00:00 +0000); (esc) |
|
2623 | 2640 | o 1132562159b3 |
|
2624 | 2641 | | |
|
2625 | 2642 | | x 718c0d00cee1 |
|
2626 | 2643 | |/ Obsfate: rewritten using amend as 3:1132562159b3 by t\xe8st2 (at 1970-01-01 00:00 +0000); (esc) |
|
2627 | 2644 | | x 5f66a482f0bb |
|
2628 | 2645 | |/ Obsfate: rewritten using amend as 2:718c0d00cee1 by test (at 1970-01-01 00:00 +0000); |
|
2629 | 2646 | o ea207398892e |
|
2630 | 2647 | |
|
2631 | 2648 | $ HGENCODING=utf-8 hg fatelog --hidden |
|
2632 | 2649 | @ 8f82db6f991d |
|
2633 | 2650 | | Obsfate: pruned by t\xc3\xa8st2 (at 1970-01-01 00:00 +0000); (esc) |
|
2634 | 2651 | o 1132562159b3 |
|
2635 | 2652 | | |
|
2636 | 2653 | | x 718c0d00cee1 |
|
2637 | 2654 | |/ Obsfate: rewritten using amend as 3:1132562159b3 by t\xc3\xa8st2 (at 1970-01-01 00:00 +0000); (esc) |
|
2638 | 2655 | | x 5f66a482f0bb |
|
2639 | 2656 | |/ Obsfate: rewritten using amend as 2:718c0d00cee1 by test (at 1970-01-01 00:00 +0000); |
|
2640 | 2657 | o ea207398892e |
|
2641 | 2658 | |
|
2659 | $ hg log -G -T "{negrev}\n" | |
|
2660 | @ -1 | |
|
2661 | | | |
|
2662 | o -2 | |
|
2663 | | | |
|
2664 | o -5 | |
|
2665 |
General Comments 0
You need to be logged in to leave comments.
Login now