--- a/hgext3rd/evolve/templatekw.py Thu Oct 19 18:18:43 2017 +0200
+++ b/hgext3rd/evolve/templatekw.py Fri Oct 20 12:04:45 2017 +0200
@@ -47,69 +47,78 @@
return templatekw.showlist('trouble', ctx.instabilities(), plural='troubles',
**args)
-def closestprecursors(repo, nodeid):
- """ Yield the list of next precursors pointing on visible changectx nodes
- """
-
- precursors = repo.obsstore.predecessors
- stack = [nodeid]
+if util.safehasattr(templatekw, 'showpredecessors'):
+ eh.templatekw("precursors")(templatekw.showpredecessors)
+else:
+ # for version <= hg4.3
+ def closestprecursors(repo, nodeid):
+ """ Yield the list of next precursors pointing on visible changectx nodes
+ """
- while stack:
- current = stack.pop()
- currentpreccs = precursors.get(current, ())
+ precursors = repo.obsstore.predecessors
+ stack = [nodeid]
- for prec in currentpreccs:
- precnodeid = prec[0]
+ while stack:
+ current = stack.pop()
+ currentpreccs = precursors.get(current, ())
+
+ for prec in currentpreccs:
+ precnodeid = prec[0]
- if precnodeid in repo:
- yield precnodeid
- else:
- stack.append(precnodeid)
+ if precnodeid in repo:
+ yield precnodeid
+ else:
+ stack.append(precnodeid)
-@eh.templatekw("precursors")
-def shownextvisibleprecursors(repo, ctx, **args):
- """Returns a string containing the list of the closest precursors
- """
- precursors = sorted(closestprecursors(repo, ctx.node()))
- precursors = [node.hex(p) for p in precursors]
+ @eh.templatekw("precursors")
+ def shownextvisibleprecursors(repo, ctx, **args):
+ """Returns a string containing the list of the closest precursors
+ """
+ precursors = sorted(closestprecursors(repo, ctx.node()))
+ precursors = [node.hex(p) for p in precursors]
- # <= hg-4.1 requires an explicite gen.
- # we can use None once the support is dropped
- #
- # They also requires an iterator instead of an iterable.
- gen = iter(" ".join(p[:12] for p in precursors))
- return templatekw._hybrid(gen.__iter__(), precursors, lambda x: {'precursor': x},
- lambda d: d['precursor'][:12])
+ # <= hg-4.1 requires an explicite gen.
+ # we can use None once the support is dropped
+ #
+ # They also requires an iterator instead of an iterable.
+ gen = iter(" ".join(p[:12] for p in precursors))
+ return templatekw._hybrid(gen.__iter__(), precursors, lambda x: {'precursor': x},
+ lambda d: d['precursor'][:12])
def closestsuccessors(repo, nodeid):
""" returns the closest visible successors sets instead.
"""
return directsuccessorssets(repo, nodeid)
-@eh.templatekw("successors")
-def shownextvisiblesuccessors(repo, ctx, templ, **args):
- """Returns a string of sets of successors for a changectx
+if util.safehasattr(templatekw, 'showsuccessorssets'):
+ eh.templatekw("successors")(templatekw.showsuccessorssets)
+else:
+ # for version <= hg4.3
- Format used is: [ctx1, ctx2], [ctx3] if ctx has been splitted into ctx1 and
- ctx2 while also diverged into ctx3"""
- if not ctx.obsolete():
- return ''
+ @eh.templatekw("successors")
+ def shownextvisiblesuccessors(repo, ctx, templ, **args):
+ """Returns a string of sets of successors for a changectx
- ssets, _ = closestsuccessors(repo, ctx.node())
- ssets = [[node.hex(n) for n in ss] for ss in ssets]
+ Format used is: [ctx1, ctx2], [ctx3] if ctx has been splitted into ctx1 and
+ ctx2 while also diverged into ctx3"""
+ if not ctx.obsolete():
+ return ''
- data = []
- gen = []
- for ss in ssets:
- subgen = '[%s]' % ', '.join(n[:12] for n in ss)
- gen.append(subgen)
- h = templatekw._hybrid(iter(subgen), ss, lambda x: {'successor': x},
- lambda d: "%s" % d["successor"])
- data.append(h)
+ ssets, _ = closestsuccessors(repo, ctx.node())
+ ssets = [[node.hex(n) for n in ss] for ss in ssets]
- gen = ', '.join(gen)
- return templatekw._hybrid(iter(gen), data, lambda x: {'successorset': x},
- lambda d: d["successorset"])
+ data = []
+ gen = []
+ for ss in ssets:
+ subgen = '[%s]' % ', '.join(n[:12] for n in ss)
+ gen.append(subgen)
+ h = templatekw._hybrid(iter(subgen), ss, lambda x: {'successor': x},
+ lambda d: "%s" % d["successor"])
+ data.append(h)
+
+ gen = ', '.join(gen)
+ return templatekw._hybrid(iter(gen), data, lambda x: {'successorset': x},
+ lambda d: d["successorset"])
def _getusername(ui):
"""the default username in the config or None"""
@@ -237,13 +246,13 @@
return "\n".join(lines)
-@eh.templatekw("obsfate")
-def showobsfate(repo, ctx, **args):
+@eh.templatekw("obsfatedata")
+def showobsfatedata(repo, ctx, **args):
# Get the needed obsfate data
values = obsfatedata(repo, ctx)
if values is None:
- return ''
+ return templatekw.showlist("obsfatedata", [], args)
# Format each successorset successors list
for raw in values:
@@ -294,8 +303,16 @@
return templatekw._hybrid(gen, values, lambda x: {name: x}, fmt)
-# Check if we can hook directly on the changeset_printer
-if util.safehasattr(cmdutil.changeset_printer, '_exthook'):
+# rely on core mercurial starting from 4.4 for the obsfate template
+if not util.safehasattr(templatekw, 'showobsfate'):
+
+ @eh.templatekw("obsfate")
+ def showobsfate(*args, **kwargs):
+ return showobsfatedata(*args, **kwargs)
+
+if util.safehasattr(cmdutil.changeset_printer, '_showobsfate'):
+ pass # already included by default
+elif util.safehasattr(cmdutil.changeset_printer, '_exthook'):
@eh.wrapfunction(cmdutil.changeset_printer, '_exthook')
def exthook(original, self, ctx):
# Call potential other extensions
--- a/tests/test-evolve-templates.t Thu Oct 19 18:18:43 2017 +0200
+++ b/tests/test-evolve-templates.t Fri Oct 20 12:04:45 2017 +0200
@@ -19,7 +19,7 @@
> {if(successors, "\n semi-colon: {join(successors, "; ")}")}\
> {if(obsfate, "\n Fate: {join(obsfate, "\n Fate: ")}\n")}\n'
> fatelog = log -G -T '{node|short}\n{if(obsfate, " Obsfate: {join(obsfate, "; ")}\n\n")}'
- > fatelogjson = log -G -T '{node|short} {obsfate|json}\n'
+ > fatelogjson = log -G -T '{node|short} {obsfatedata|json}\n'
> EOF
Test templates on amended commit
@@ -47,13 +47,13 @@
|/ parent: 0:ea207398892e
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
- | obsolete: reworded as d004c8f274b9 by test2
+ | obsolete: reworded as 3:d004c8f274b9 by test2
| summary: A1
|
| x changeset: 1:471f378eab4c
|/ user: test
| date: Thu Jan 01 00:00:00 1970 +0000
- | obsolete: rewritten as a468dc9b3633
+ | obsolete: rewritten as 2:a468dc9b3633
| summary: A0
|
o changeset: 0:ea207398892e
@@ -80,12 +80,12 @@
$ hg tlog
o d004c8f274b9
- | Precursors: 471f378eab4c
- | semi-colon: 471f378eab4c
+ | Precursors: 1:471f378eab4c
+ | semi-colon: 1:471f378eab4c
| @ 471f378eab4c
- |/ Successors: [d004c8f274b9]
- | semi-colon: [d004c8f274b9]
- | Fate: rewritten as d004c8f274b9 by test, test2
+ |/ Successors: 3:d004c8f274b9
+ | semi-colon: 3:d004c8f274b9
+ | Fate: rewritten as 3:d004c8f274b9 by test, test2
|
o ea207398892e
@@ -101,7 +101,7 @@
| @ changeset: 1:471f378eab4c
|/ user: test
| date: Thu Jan 01 00:00:00 1970 +0000
- | obsolete: rewritten as d004c8f274b9 by test, test2
+ | obsolete: rewritten as 3:d004c8f274b9 by test, test2
| summary: A0
|
o changeset: 0:ea207398892e
@@ -114,7 +114,7 @@
o d004c8f274b9
|
| @ 471f378eab4c
- |/ Obsfate: rewritten as d004c8f274b9
+ |/ Obsfate: rewritten as 3:d004c8f274b9
|
o ea207398892e
@@ -123,7 +123,7 @@
o d004c8f274b9
|
| @ 471f378eab4c
- |/ Obsfate: rewritten as d004c8f274b9 by test, test2
+ |/ Obsfate: rewritten as 3:d004c8f274b9 by test, test2
|
o ea207398892e
@@ -131,7 +131,7 @@
o d004c8f274b9
|
| @ 471f378eab4c
- |/ Obsfate: rewritten as d004c8f274b9 by test, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000)
+ |/ Obsfate: rewritten as 3:d004c8f274b9 by test, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000)
|
o ea207398892e
@@ -162,12 +162,12 @@
Precursors template should show current revision as it is the working copy
$ hg tlog
o d004c8f274b9
- | Precursors: a468dc9b3633
- | semi-colon: a468dc9b3633
+ | Precursors: 2:a468dc9b3633
+ | semi-colon: 2:a468dc9b3633
| @ a468dc9b3633
- |/ Successors: [d004c8f274b9]
- | semi-colon: [d004c8f274b9]
- | Fate: reworded as d004c8f274b9 by test2
+ |/ Successors: 3:d004c8f274b9
+ | semi-colon: 3:d004c8f274b9
+ | Fate: reworded as 3:d004c8f274b9 by test2
|
o ea207398892e
@@ -175,19 +175,19 @@
--hidden
$ hg tlog --hidden
o d004c8f274b9
- | Precursors: a468dc9b3633
- | semi-colon: a468dc9b3633
+ | Precursors: 2:a468dc9b3633
+ | semi-colon: 2:a468dc9b3633
| @ a468dc9b3633
- |/ Precursors: 471f378eab4c
- | semi-colon: 471f378eab4c
- | Successors: [d004c8f274b9]
- | semi-colon: [d004c8f274b9]
- | Fate: reworded as d004c8f274b9 by test2
+ |/ Precursors: 1:471f378eab4c
+ | semi-colon: 1:471f378eab4c
+ | Successors: 3:d004c8f274b9
+ | semi-colon: 3:d004c8f274b9
+ | Fate: reworded as 3:d004c8f274b9 by test2
|
| x 471f378eab4c
- |/ Successors: [a468dc9b3633]
- | semi-colon: [a468dc9b3633]
- | Fate: rewritten as a468dc9b3633
+ |/ Successors: 2:a468dc9b3633
+ | semi-colon: 2:a468dc9b3633
+ | Fate: rewritten as 2:a468dc9b3633
|
o ea207398892e
@@ -195,7 +195,7 @@
o d004c8f274b9
|
| @ a468dc9b3633
- |/ Obsfate: reworded as d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000)
+ |/ Obsfate: reworded as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000)
|
o ea207398892e
@@ -208,19 +208,19 @@
$ hg tlog --hidden
@ d004c8f274b9
- | Precursors: a468dc9b3633
- | semi-colon: a468dc9b3633
+ | Precursors: 2:a468dc9b3633
+ | semi-colon: 2:a468dc9b3633
| x a468dc9b3633
- |/ Precursors: 471f378eab4c
- | semi-colon: 471f378eab4c
- | Successors: [d004c8f274b9]
- | semi-colon: [d004c8f274b9]
- | Fate: reworded as d004c8f274b9 by test2
+ |/ Precursors: 1:471f378eab4c
+ | semi-colon: 1:471f378eab4c
+ | Successors: 3:d004c8f274b9
+ | semi-colon: 3:d004c8f274b9
+ | Fate: reworded as 3:d004c8f274b9 by test2
|
| x 471f378eab4c
- |/ Successors: [a468dc9b3633]
- | semi-colon: [a468dc9b3633]
- | Fate: rewritten as a468dc9b3633
+ |/ Successors: 2:a468dc9b3633
+ | semi-colon: 2:a468dc9b3633
+ | Fate: rewritten as 2:a468dc9b3633
|
o ea207398892e
@@ -234,22 +234,22 @@
@ d004c8f274b9
|
| x a468dc9b3633
- |/ Obsfate: reworded as d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000)
+ |/ Obsfate: reworded as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000)
|
| x 471f378eab4c
- |/ Obsfate: rewritten as a468dc9b3633 by test (at 2009-02-13 23:31 +0000)
+ |/ Obsfate: rewritten as 2:a468dc9b3633 by test (at 2009-02-13 23:31 +0000)
|
o ea207398892e
$ hg fatelogjson --hidden
- @ d004c8f274b9 ""
+ @ d004c8f274b9 []
|
| x a468dc9b3633 [{"markers": [["a468dc9b36338b14fdb7825f55ce3df4e71517ad", ["d004c8f274b9ec480a47a93c10dac5eee63adb78"], 0, [["ef1", "1"], ["operation", "amend"], ["user", "test2"]], [987654321.0, 0], null]], "max_date": [987654321.0, 0], "min_date": [987654321.0, 0], "successors": ["d004c8f274b9ec480a47a93c10dac5eee63adb78"], "users": ["test2"], "verb": "reworded"}]
|/
| x 471f378eab4c [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"], 0, [["ef1", "9"], ["operation", "amend"], ["user", "test"]], [1234567890.0, 0], null]], "max_date": [1234567890.0, 0], "min_date": [1234567890.0, 0], "successors": ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"], "users": ["test"], "verb": "rewritten"}]
|/
- o ea207398892e ""
+ o ea207398892e []
Test templates with splitted commit
@@ -326,7 +326,7 @@
| x changeset: 1:471597cad322
|/ user: test
| date: Thu Jan 01 00:00:00 1970 +0000
- | obsolete: split as 337fec4d2edc, f257fde29c7a
+ | obsolete: split as 2:337fec4d2edc, 3:f257fde29c7a
| summary: A0
|
o changeset: 0:ea207398892e
@@ -346,15 +346,15 @@
Precursors template should show current revision as it is the working copy
$ hg tlog
o f257fde29c7a
- | Precursors: 471597cad322
- | semi-colon: 471597cad322
+ | Precursors: 1:471597cad322
+ | semi-colon: 1:471597cad322
o 337fec4d2edc
- | Precursors: 471597cad322
- | semi-colon: 471597cad322
+ | Precursors: 1:471597cad322
+ | semi-colon: 1:471597cad322
| @ 471597cad322
- |/ Successors: [337fec4d2edc, f257fde29c7a]
- | semi-colon: [337fec4d2edc, f257fde29c7a]
- | Fate: split as 337fec4d2edc, f257fde29c7a
+ |/ Successors: 2:337fec4d2edc 3:f257fde29c7a
+ | semi-colon: 2:337fec4d2edc 3:f257fde29c7a
+ | Fate: split as 2:337fec4d2edc, 3:f257fde29c7a
|
o ea207398892e
@@ -364,7 +364,7 @@
o 337fec4d2edc
|
| @ 471597cad322
- |/ Obsfate: split as 337fec4d2edc, f257fde29c7a
+ |/ Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a
|
o ea207398892e
@@ -385,15 +385,15 @@
--hidden
$ hg tlog --hidden
@ f257fde29c7a
- | Precursors: 471597cad322
- | semi-colon: 471597cad322
+ | Precursors: 1:471597cad322
+ | semi-colon: 1:471597cad322
o 337fec4d2edc
- | Precursors: 471597cad322
- | semi-colon: 471597cad322
+ | Precursors: 1:471597cad322
+ | semi-colon: 1:471597cad322
| x 471597cad322
- |/ Successors: [337fec4d2edc, f257fde29c7a]
- | semi-colon: [337fec4d2edc, f257fde29c7a]
- | Fate: split as 337fec4d2edc, f257fde29c7a
+ |/ Successors: 2:337fec4d2edc 3:f257fde29c7a
+ | semi-colon: 2:337fec4d2edc 3:f257fde29c7a
+ | Fate: split as 2:337fec4d2edc, 3:f257fde29c7a
|
o ea207398892e
@@ -403,19 +403,19 @@
o 337fec4d2edc
|
| x 471597cad322
- |/ Obsfate: split as 337fec4d2edc, f257fde29c7a
+ |/ Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a
|
o ea207398892e
$ hg fatelogjson --hidden
- @ f257fde29c7a ""
+ @ f257fde29c7a []
|
- o 337fec4d2edc ""
+ o 337fec4d2edc []
|
| x 471597cad322 [{"markers": [["471597cad322d1f659bb169751be9133dad92ef3", ["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"], 0, [["ef1", "12"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"], "users": ["test"], "verb": "split"}]
|/
- o ea207398892e ""
+ o ea207398892e []
Test templates with folded commit
@@ -460,13 +460,13 @@
| x changeset: 2:0dec01379d3b
| | user: test
| | date: Thu Jan 01 00:00:00 1970 +0000
- | | obsolete: rewritten as eb5a0daa2192
+ | | obsolete: rewritten as 3:eb5a0daa2192
| | summary: B0
| |
| x changeset: 1:471f378eab4c
|/ user: test
| date: Thu Jan 01 00:00:00 1970 +0000
- | obsolete: rewritten as eb5a0daa2192
+ | obsolete: rewritten as 3:eb5a0daa2192
| summary: A0
|
o changeset: 0:ea207398892e
@@ -485,12 +485,12 @@
Precursors template should show current revision as it is the working copy
$ hg tlog
o eb5a0daa2192
- | Precursors: 471f378eab4c
- | semi-colon: 471f378eab4c
+ | Precursors: 1:471f378eab4c
+ | semi-colon: 1:471f378eab4c
| @ 471f378eab4c
- |/ Successors: [eb5a0daa2192]
- | semi-colon: [eb5a0daa2192]
- | Fate: rewritten as eb5a0daa2192
+ |/ Successors: 3:eb5a0daa2192
+ | semi-colon: 3:eb5a0daa2192
+ | Fate: rewritten as 3:eb5a0daa2192
|
o ea207398892e
@@ -498,7 +498,7 @@
o eb5a0daa2192
|
| @ 471f378eab4c
- |/ Obsfate: rewritten as eb5a0daa2192
+ |/ Obsfate: rewritten as 3:eb5a0daa2192
|
o ea207398892e
@@ -511,17 +511,17 @@
displayed
$ hg tlog
o eb5a0daa2192
- | Precursors: 0dec01379d3b 471f378eab4c
- | semi-colon: 0dec01379d3b; 471f378eab4c
+ | Precursors: 2:0dec01379d3b 1:471f378eab4c
+ | semi-colon: 2:0dec01379d3b; 1:471f378eab4c
| @ 0dec01379d3b
- | | Successors: [eb5a0daa2192]
- | | semi-colon: [eb5a0daa2192]
- | | Fate: rewritten as eb5a0daa2192
+ | | Successors: 3:eb5a0daa2192
+ | | semi-colon: 3:eb5a0daa2192
+ | | Fate: rewritten as 3:eb5a0daa2192
| |
| x 471f378eab4c
- |/ Successors: [eb5a0daa2192]
- | semi-colon: [eb5a0daa2192]
- | Fate: rewritten as eb5a0daa2192
+ |/ Successors: 3:eb5a0daa2192
+ | semi-colon: 3:eb5a0daa2192
+ | Fate: rewritten as 3:eb5a0daa2192
|
o ea207398892e
@@ -529,10 +529,10 @@
o eb5a0daa2192
|
| @ 0dec01379d3b
- | | Obsfate: rewritten as eb5a0daa2192
+ | | Obsfate: rewritten as 3:eb5a0daa2192
| |
| x 471f378eab4c
- |/ Obsfate: rewritten as eb5a0daa2192
+ |/ Obsfate: rewritten as 3:eb5a0daa2192
|
o ea207398892e
@@ -551,17 +551,17 @@
--hidden
$ hg tlog --hidden
@ eb5a0daa2192
- | Precursors: 0dec01379d3b 471f378eab4c
- | semi-colon: 0dec01379d3b; 471f378eab4c
+ | Precursors: 2:0dec01379d3b 1:471f378eab4c
+ | semi-colon: 2:0dec01379d3b; 1:471f378eab4c
| x 0dec01379d3b
- | | Successors: [eb5a0daa2192]
- | | semi-colon: [eb5a0daa2192]
- | | Fate: rewritten as eb5a0daa2192
+ | | Successors: 3:eb5a0daa2192
+ | | semi-colon: 3:eb5a0daa2192
+ | | Fate: rewritten as 3:eb5a0daa2192
| |
| x 471f378eab4c
- |/ Successors: [eb5a0daa2192]
- | semi-colon: [eb5a0daa2192]
- | Fate: rewritten as eb5a0daa2192
+ |/ Successors: 3:eb5a0daa2192
+ | semi-colon: 3:eb5a0daa2192
+ | Fate: rewritten as 3:eb5a0daa2192
|
o ea207398892e
@@ -569,22 +569,22 @@
@ eb5a0daa2192
|
| x 0dec01379d3b
- | | Obsfate: rewritten as eb5a0daa2192
+ | | Obsfate: rewritten as 3:eb5a0daa2192
| |
| x 471f378eab4c
- |/ Obsfate: rewritten as eb5a0daa2192
+ |/ Obsfate: rewritten as 3:eb5a0daa2192
|
o ea207398892e
$ hg fatelogjson --hidden
- @ eb5a0daa2192 ""
+ @ eb5a0daa2192 []
|
| x 0dec01379d3b [{"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["ef1", "13"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], "users": ["test"], "verb": "rewritten"}]
| |
| x 471f378eab4c [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["ef1", "9"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], "users": ["test"], "verb": "rewritten"}]
|/
- o ea207398892e ""
+ o ea207398892e []
Test templates with divergence
@@ -609,7 +609,7 @@
| x changeset: 1:471f378eab4c
|/ user: test
| date: Thu Jan 01 00:00:00 1970 +0000
- | obsolete: reworded as fdf9bde5129a
+ | obsolete: reworded as 2:fdf9bde5129a
| summary: A0
|
o changeset: 0:ea207398892e
@@ -642,8 +642,8 @@
| x changeset: 1:471f378eab4c
|/ user: test
| date: Thu Jan 01 00:00:00 1970 +0000
- | obsolete: reworded as fdf9bde5129a
- | obsolete: reworded as 65b757b745b9
+ | obsolete: reworded as 2:fdf9bde5129a
+ | obsolete: reworded as 3:65b757b745b9
| summary: A0
|
o changeset: 0:ea207398892e
@@ -664,16 +664,16 @@
Precursors template should show current revision as it is the working copy
$ hg tlog
o 019fadeab383
- | Precursors: 471f378eab4c
- | semi-colon: 471f378eab4c
+ | Precursors: 1:471f378eab4c
+ | semi-colon: 1:471f378eab4c
| o fdf9bde5129a
- |/ Precursors: 471f378eab4c
- | semi-colon: 471f378eab4c
+ |/ Precursors: 1:471f378eab4c
+ | semi-colon: 1:471f378eab4c
| @ 471f378eab4c
- |/ Successors: [fdf9bde5129a], [019fadeab383]
- | semi-colon: [fdf9bde5129a]; [019fadeab383]
- | Fate: reworded as fdf9bde5129a
- | Fate: reworded as 019fadeab383
+ |/ Successors: 2:fdf9bde5129a; 4:019fadeab383
+ | semi-colon: 2:fdf9bde5129a; 4:019fadeab383
+ | Fate: reworded as 2:fdf9bde5129a
+ | Fate: reworded as 4:019fadeab383
|
o ea207398892e
@@ -683,7 +683,7 @@
| o fdf9bde5129a
|/
| @ 471f378eab4c
- |/ Obsfate: reworded as fdf9bde5129a; reworded as 019fadeab383
+ |/ Obsfate: reworded as 2:fdf9bde5129a; reworded as 4:019fadeab383
|
o ea207398892e
@@ -710,23 +710,23 @@
Precursors template should a precursor as we force its display with --hidden
$ hg tlog --hidden
o 019fadeab383
- | Precursors: 65b757b745b9
- | semi-colon: 65b757b745b9
+ | Precursors: 3:65b757b745b9
+ | semi-colon: 3:65b757b745b9
| x 65b757b745b9
- |/ Precursors: 471f378eab4c
- | semi-colon: 471f378eab4c
- | Successors: [019fadeab383]
- | semi-colon: [019fadeab383]
- | Fate: reworded as 019fadeab383
+ |/ Precursors: 1:471f378eab4c
+ | semi-colon: 1:471f378eab4c
+ | Successors: 4:019fadeab383
+ | semi-colon: 4:019fadeab383
+ | Fate: reworded as 4:019fadeab383
|
| @ fdf9bde5129a
- |/ Precursors: 471f378eab4c
- | semi-colon: 471f378eab4c
+ |/ Precursors: 1:471f378eab4c
+ | semi-colon: 1:471f378eab4c
| x 471f378eab4c
- |/ Successors: [fdf9bde5129a], [65b757b745b9]
- | semi-colon: [fdf9bde5129a]; [65b757b745b9]
- | Fate: reworded as fdf9bde5129a
- | Fate: reworded as 65b757b745b9
+ |/ Successors: 2:fdf9bde5129a; 3:65b757b745b9
+ | semi-colon: 2:fdf9bde5129a; 3:65b757b745b9
+ | Fate: reworded as 2:fdf9bde5129a
+ | Fate: reworded as 3:65b757b745b9
|
o ea207398892e
@@ -734,26 +734,26 @@
o 019fadeab383
|
| x 65b757b745b9
- |/ Obsfate: reworded as 019fadeab383
+ |/ Obsfate: reworded as 4:019fadeab383
|
| @ fdf9bde5129a
|/
| x 471f378eab4c
- |/ Obsfate: reworded as fdf9bde5129a; reworded as 65b757b745b9
+ |/ Obsfate: reworded as 2:fdf9bde5129a; reworded as 3:65b757b745b9
|
o ea207398892e
$ hg fatelogjson --hidden
- o 019fadeab383 ""
+ o 019fadeab383 []
|
| x 65b757b745b9 [{"markers": [["65b757b745b935093c87a2bccd877521cccffcbd", ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"], 0, [["ef1", "1"], ["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"], "users": ["test"], "verb": "reworded"}]
|/
- | @ fdf9bde5129a ""
+ | @ fdf9bde5129a []
|/
| x 471f378eab4c [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], 0, [["ef1", "1"], ["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], "users": ["test"], "verb": "reworded"}, {"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["65b757b745b935093c87a2bccd877521cccffcbd"], 0, [["ef1", "1"], ["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["65b757b745b935093c87a2bccd877521cccffcbd"], "users": ["test"], "verb": "reworded"}]
|/
- o ea207398892e ""
+ o ea207398892e []
Test templates with amended + folded commit
@@ -779,7 +779,7 @@
| x changeset: 2:0dec01379d3b
|/ user: test
| date: Thu Jan 01 00:00:00 1970 +0000
- | obsolete: reworded as b7ea6d14e664
+ | obsolete: reworded as 3:b7ea6d14e664
| summary: B0
|
o changeset: 1:471f378eab4c
@@ -807,19 +807,19 @@
| | parent: 1:471f378eab4c
| | user: test
| | date: Thu Jan 01 00:00:00 1970 +0000
- | | obsolete: rewritten as eb5a0daa2192
+ | | obsolete: rewritten as 4:eb5a0daa2192
| | summary: B1
| |
| | x changeset: 2:0dec01379d3b
| |/ user: test
| | date: Thu Jan 01 00:00:00 1970 +0000
- | | obsolete: reworded as b7ea6d14e664
+ | | obsolete: reworded as 3:b7ea6d14e664
| | summary: B0
| |
| x changeset: 1:471f378eab4c
|/ user: test
| date: Thu Jan 01 00:00:00 1970 +0000
- | obsolete: rewritten as eb5a0daa2192
+ | obsolete: rewritten as 4:eb5a0daa2192
| summary: A0
|
o changeset: 0:ea207398892e
@@ -836,12 +836,12 @@
(use 'hg evolve' to update to its successor: eb5a0daa2192)
$ hg tlog
o eb5a0daa2192
- | Precursors: 471f378eab4c
- | semi-colon: 471f378eab4c
+ | Precursors: 1:471f378eab4c
+ | semi-colon: 1:471f378eab4c
| @ 471f378eab4c
- |/ Successors: [eb5a0daa2192]
- | semi-colon: [eb5a0daa2192]
- | Fate: rewritten as eb5a0daa2192
+ |/ Successors: 4:eb5a0daa2192
+ | semi-colon: 4:eb5a0daa2192
+ | Fate: rewritten as 4:eb5a0daa2192
|
o ea207398892e
@@ -849,7 +849,7 @@
o eb5a0daa2192
|
| @ 471f378eab4c
- |/ Obsfate: rewritten as eb5a0daa2192
+ |/ Obsfate: rewritten as 4:eb5a0daa2192
|
o ea207398892e
@@ -859,17 +859,17 @@
(use 'hg evolve' to update to its successor: eb5a0daa2192)
$ hg tlog
o eb5a0daa2192
- | Precursors: 0dec01379d3b 471f378eab4c
- | semi-colon: 0dec01379d3b; 471f378eab4c
+ | Precursors: 2:0dec01379d3b 1:471f378eab4c
+ | semi-colon: 2:0dec01379d3b; 1:471f378eab4c
| @ 0dec01379d3b
- | | Successors: [eb5a0daa2192]
- | | semi-colon: [eb5a0daa2192]
- | | Fate: rewritten as eb5a0daa2192
+ | | Successors: 4:eb5a0daa2192
+ | | semi-colon: 4:eb5a0daa2192
+ | | Fate: rewritten as 4:eb5a0daa2192
| |
| x 471f378eab4c
- |/ Successors: [eb5a0daa2192]
- | semi-colon: [eb5a0daa2192]
- | Fate: rewritten as eb5a0daa2192
+ |/ Successors: 4:eb5a0daa2192
+ | semi-colon: 4:eb5a0daa2192
+ | Fate: rewritten as 4:eb5a0daa2192
|
o ea207398892e
@@ -877,10 +877,10 @@
o eb5a0daa2192
|
| @ 0dec01379d3b
- | | Obsfate: rewritten as eb5a0daa2192
+ | | Obsfate: rewritten as 4:eb5a0daa2192
| |
| x 471f378eab4c
- |/ Obsfate: rewritten as eb5a0daa2192
+ |/ Obsfate: rewritten as 4:eb5a0daa2192
|
o ea207398892e
@@ -891,17 +891,17 @@
(use 'hg evolve' to update to its successor: eb5a0daa2192)
$ hg tlog
o eb5a0daa2192
- | Precursors: 471f378eab4c b7ea6d14e664
- | semi-colon: 471f378eab4c; b7ea6d14e664
+ | Precursors: 1:471f378eab4c 3:b7ea6d14e664
+ | semi-colon: 1:471f378eab4c; 3:b7ea6d14e664
| @ b7ea6d14e664
- | | Successors: [eb5a0daa2192]
- | | semi-colon: [eb5a0daa2192]
- | | Fate: rewritten as eb5a0daa2192
+ | | Successors: 4:eb5a0daa2192
+ | | semi-colon: 4:eb5a0daa2192
+ | | Fate: rewritten as 4:eb5a0daa2192
| |
| x 471f378eab4c
- |/ Successors: [eb5a0daa2192]
- | semi-colon: [eb5a0daa2192]
- | Fate: rewritten as eb5a0daa2192
+ |/ Successors: 4:eb5a0daa2192
+ | semi-colon: 4:eb5a0daa2192
+ | Fate: rewritten as 4:eb5a0daa2192
|
o ea207398892e
@@ -909,10 +909,10 @@
o eb5a0daa2192
|
| @ b7ea6d14e664
- | | Obsfate: rewritten as eb5a0daa2192
+ | | Obsfate: rewritten as 4:eb5a0daa2192
| |
| x 471f378eab4c
- |/ Obsfate: rewritten as eb5a0daa2192
+ |/ Obsfate: rewritten as 4:eb5a0daa2192
|
o ea207398892e
@@ -926,24 +926,24 @@
$ hg tlog --hidden
@ eb5a0daa2192
- | Precursors: 471f378eab4c b7ea6d14e664
- | semi-colon: 471f378eab4c; b7ea6d14e664
+ | Precursors: 1:471f378eab4c 3:b7ea6d14e664
+ | semi-colon: 1:471f378eab4c; 3:b7ea6d14e664
| x b7ea6d14e664
- | | Precursors: 0dec01379d3b
- | | semi-colon: 0dec01379d3b
- | | Successors: [eb5a0daa2192]
- | | semi-colon: [eb5a0daa2192]
- | | Fate: rewritten as eb5a0daa2192
+ | | Precursors: 2:0dec01379d3b
+ | | semi-colon: 2:0dec01379d3b
+ | | Successors: 4:eb5a0daa2192
+ | | semi-colon: 4:eb5a0daa2192
+ | | Fate: rewritten as 4:eb5a0daa2192
| |
| | x 0dec01379d3b
- | |/ Successors: [b7ea6d14e664]
- | | semi-colon: [b7ea6d14e664]
- | | Fate: reworded as b7ea6d14e664
+ | |/ Successors: 3:b7ea6d14e664
+ | | semi-colon: 3:b7ea6d14e664
+ | | Fate: reworded as 3:b7ea6d14e664
| |
| x 471f378eab4c
- |/ Successors: [eb5a0daa2192]
- | semi-colon: [eb5a0daa2192]
- | Fate: rewritten as eb5a0daa2192
+ |/ Successors: 4:eb5a0daa2192
+ | semi-colon: 4:eb5a0daa2192
+ | Fate: rewritten as 4:eb5a0daa2192
|
o ea207398892e
@@ -951,18 +951,18 @@
@ eb5a0daa2192
|
| x b7ea6d14e664
- | | Obsfate: rewritten as eb5a0daa2192
+ | | Obsfate: rewritten as 4:eb5a0daa2192
| |
| | x 0dec01379d3b
- | |/ Obsfate: reworded as b7ea6d14e664
+ | |/ Obsfate: reworded as 3:b7ea6d14e664
| |
| x 471f378eab4c
- |/ Obsfate: rewritten as eb5a0daa2192
+ |/ Obsfate: rewritten as 4:eb5a0daa2192
|
o ea207398892e
$ hg fatelogjson --hidden
- @ eb5a0daa2192 ""
+ @ eb5a0daa2192 []
|
| x b7ea6d14e664 [{"markers": [["b7ea6d14e664bdc8922221f7992631b50da3fb07", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["ef1", "13"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], "users": ["test"], "verb": "rewritten"}]
| |
@@ -970,7 +970,7 @@
| |/
| x 471f378eab4c [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["ef1", "9"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], "users": ["test"], "verb": "rewritten"}]
|/
- o ea207398892e ""
+ o ea207398892e []
Test template with pushed and pulled obs markers
@@ -1014,13 +1014,13 @@
|/ parent: 0:ea207398892e
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
- | obsolete: reworded as 7a230b46bf61
+ | obsolete: reworded as 3:7a230b46bf61
| summary: A1
|
| x changeset: 1:471f378eab4c
|/ user: test
| date: Thu Jan 01 00:00:00 1970 +0000
- | obsolete: reworded as fdf9bde5129a
+ | obsolete: reworded as 2:fdf9bde5129a
| summary: A0
|
o changeset: 0:ea207398892e
@@ -1038,6 +1038,7 @@
added 1 changesets with 0 changes to 1 files (+1 heads)
2 new obsolescence markers
obsoleted 1 changesets
+ new changesets 7a230b46bf61
(run 'hg heads' to see heads, 'hg merge' to merge)
working directory parent is obsolete! (471f378eab4c)
(use 'hg evolve' to update to its successor: 7a230b46bf61)
@@ -1052,7 +1053,7 @@
| @ changeset: 1:471f378eab4c
|/ user: test
| date: Thu Jan 01 00:00:00 1970 +0000
- | obsolete: reworded as 7a230b46bf61
+ | obsolete: reworded as 2:7a230b46bf61
| summary: A0
|
o changeset: 0:ea207398892e
@@ -1065,12 +1066,12 @@
$ hg tlog
o 7a230b46bf61
- | Precursors: 471f378eab4c
- | semi-colon: 471f378eab4c
+ | Precursors: 1:471f378eab4c
+ | semi-colon: 1:471f378eab4c
| @ 471f378eab4c
- |/ Successors: [7a230b46bf61]
- | semi-colon: [7a230b46bf61]
- | Fate: reworded as 7a230b46bf61
+ |/ Successors: 2:7a230b46bf61
+ | semi-colon: 2:7a230b46bf61
+ | Fate: reworded as 2:7a230b46bf61
|
o ea207398892e
@@ -1078,7 +1079,7 @@
o 7a230b46bf61
|
| @ 471f378eab4c
- |/ Obsfate: reworded as 7a230b46bf61 by test (at 1970-01-01 00:00 +0000)
+ |/ Obsfate: reworded as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000)
|
o ea207398892e
@@ -1096,12 +1097,12 @@
$ hg tlog --hidden
@ 7a230b46bf61
- | Precursors: 471f378eab4c
- | semi-colon: 471f378eab4c
+ | Precursors: 1:471f378eab4c
+ | semi-colon: 1:471f378eab4c
| x 471f378eab4c
- |/ Successors: [7a230b46bf61]
- | semi-colon: [7a230b46bf61]
- | Fate: reworded as 7a230b46bf61
+ |/ Successors: 2:7a230b46bf61
+ | semi-colon: 2:7a230b46bf61
+ | Fate: reworded as 2:7a230b46bf61
|
o ea207398892e
@@ -1109,17 +1110,17 @@
@ 7a230b46bf61
|
| x 471f378eab4c
- |/ Obsfate: reworded as 7a230b46bf61 by test (at 1970-01-01 00:00 +0000)
+ |/ Obsfate: reworded as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000)
|
o ea207398892e
$ hg fatelogjson --hidden
- @ 7a230b46bf61 ""
+ @ 7a230b46bf61 []
|
| x 471f378eab4c [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], 0, [["ef1", "1"], ["operation", "amend"], ["user", "test"]], [0.0, 0], null], ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e", ["7a230b46bf61e50b30308c6cfd7bd1269ef54702"], 0, [["ef1", "1"], ["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["7a230b46bf61e50b30308c6cfd7bd1269ef54702"], "users": ["test"], "verb": "reworded"}]
|/
- o ea207398892e ""
+ o ea207398892e []
Test templates with pruned commits