Mercurial > evolve
changeset 2604:3bcc9d3bac33
template: use hex node in the obsmarkers used in the obsfate template
This was pointed by Yuya and yuya is right.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 16 Jun 2017 17:42:28 +0200 |
parents | 23f1c3b9052f |
children | 7d9608219362 |
files | hgext3rd/evolve/obshistory.py tests/test-evolve-templates.t |
diffstat | 2 files changed, 25 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/obshistory.py Fri Jun 16 17:34:02 2017 +0200 +++ b/hgext3rd/evolve/obshistory.py Fri Jun 16 17:42:28 2017 +0200 @@ -673,9 +673,21 @@ """ For a successor set, get all related markers, compute the set of user, the min date and the max date """ - markers = _successorsetallmarkers(successorset, pathscache) + hex = nodemod.hex + rawmarkers = _successorsetallmarkers(successorset, pathscache) + + successorset = [hex(n) for n in successorset] - successorset = [nodemod.hex(n) for n in successorset] + # hex the binary nodes in the markers + markers = [] + for m in rawmarkers: + hexprec = hex(m[0]) + hexsucs = tuple(hex(n) for n in m[1]) + hexparents = None + if m[5] is not None: + hexparents = tuple(hex(n) for n in m[5]) + newmarker = (hexprec, hexsucs) + m[2:5] + (hexparents,) + m[6:] + markers.append(newmarker) # Format basic data data = {
--- a/tests/test-evolve-templates.t Fri Jun 16 17:34:02 2017 +0200 +++ b/tests/test-evolve-templates.t Fri Jun 16 17:42:28 2017 +0200 @@ -236,11 +236,11 @@ $ hg fatelogjson --hidden @ d004c8f274b9 "" | - | x a468dc9b3633 [{"markers": [["\udca4h\u071b63\udc8b\u0014\udcfd\udcb7\udc82_U\udcce=\udcf4\udce7\u0015\u0017\udcad", ["\udcd0\u0004\udcc8\udcf2t\udcb9\udcecH\nG\udca9\u003c\u0010\udcda\udcc5\udcee\udce6:\udcdbx"], 0, [["ef1", "1"], ["user", "test2"]], [987654321.0, 0], null]], "max_date": [987654321.0, 0], "min_date": [987654321.0, 0], "successors": ["d004c8f274b9ec480a47a93c10dac5eee63adb78"], "users": ["test2"], "verb": "rewritten"}] + | x a468dc9b3633 [{"markers": [["a468dc9b36338b14fdb7825f55ce3df4e71517ad", ["d004c8f274b9ec480a47a93c10dac5eee63adb78"], 0, [["ef1", "1"], ["user", "test2"]], [987654321.0, 0], null]], "max_date": [987654321.0, 0], "min_date": [987654321.0, 0], "successors": ["d004c8f274b9ec480a47a93c10dac5eee63adb78"], "users": ["test2"], "verb": "rewritten"}] |/ | x f137d23bb3e1 [{"markers": [], "successors": [], "verb": "pruned"}] | | - | x 471f378eab4c [{"markers": [["G\u001f7\udc8e\udcabL^%\udcf6\udcc7\u007fx['\udcc96\udcef\udcb2(t", ["\udca4h\u071b63\udc8b\u0014\udcfd\udcb7\udc82_U\udcce=\udcf4\udce7\u0015\u0017\udcad"], 0, [["ef1", "9"], ["user", "test1"]], [1234567890.0, 0], null]], "max_date": [1234567890.0, 0], "min_date": [1234567890.0, 0], "successors": ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"], "users": ["test1"], "verb": "rewritten"}] + | x 471f378eab4c [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"], 0, [["ef1", "9"], ["user", "test1"]], [1234567890.0, 0], null]], "max_date": [1234567890.0, 0], "min_date": [1234567890.0, 0], "successors": ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"], "users": ["test1"], "verb": "rewritten"}] |/ o ea207398892e "" @@ -405,7 +405,7 @@ | o 337fec4d2edc "" | - | x 471597cad322 [{"markers": [["G\u0015\udc97\udcca\udcd3\"\udcd1\udcf6Y\udcbb\u0016\udc97Q\udcbe\udc913\udcda\udcd9.\udcf3", ["3\u007f\udcecM.\udcdc\udcf0\udce7\udca4g\udce3_\udc81\udc824\udcbcb\u0000h\udcb5", "\udcf2W\udcfd\udce2\udc9cz\udc84|\udc9b`\u007fn\udc95\udc86V\udcd0\udcdf\u000f\udcb1\\"], 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": "rewritten"}] + | 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": "rewritten"}] |/ o ea207398892e "" @@ -570,9 +570,9 @@ $ hg fatelogjson --hidden @ eb5a0daa2192 "" | - | x 0dec01379d3b [{"markers": [["\r\udcec\u00017\udc9d;\udce61\udc8cG\u000e\udcad1\udcb1\udcfez\udce7\udccbS\udcd5", ["\udcebZ\r\udcaa!\udc92;\udcbf\udc8c\udcae\udcb2\udcc4 \udc85\udcb9\udce4c\udc86\u001f\udcd0"], 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 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": [["G\u001f7\udc8e\udcabL^%\udcf6\udcc7\u007fx['\udcc96\udcef\udcb2(t", ["\udcebZ\r\udcaa!\udc92;\udcbf\udc8c\udcae\udcb2\udcc4 \udc85\udcb9\udce4c\udc86\u001f\udcd0"], 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"}] + | 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 "" @@ -736,11 +736,11 @@ $ hg fatelogjson --hidden o 019fadeab383 "" | - | x 65b757b745b9 [{"markers": [["e\udcb7W\udcb7E\udcb95\t\u003c\udc87\udca2\udcbc\u0347u!\udccc\udccf\udcfc\udcbd", ["\u0001\udc9f\udcad\uacc3\udcf6i\udc9f\udca8:\u05fd\udcb4\udcd8.\udcd2\udcc0\udce5\udcab"], 0, [["ef1", "1"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"], "users": ["test"], "verb": "rewritten"}] + | x 65b757b745b9 [{"markers": [["65b757b745b935093c87a2bccd877521cccffcbd", ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"], 0, [["ef1", "1"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"], "users": ["test"], "verb": "rewritten"}] |/ | @ fdf9bde5129a "" |/ - | x 471f378eab4c [{"markers": [["G\u001f7\udc8e\udcabL^%\udcf6\udcc7\u007fx['\udcc96\udcef\udcb2(t", ["\udcfd\udcf9\udcbd\udce5\u0012\udc9a(\udcd4T\udc8f\udcad\udcd3\udcf6+&\\\udcdd;z."], 0, [["ef1", "1"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], "users": ["test"], "verb": "rewritten"}, {"markers": [["G\u001f7\udc8e\udcabL^%\udcf6\udcc7\u007fx['\udcc96\udcef\udcb2(t", ["e\udcb7W\udcb7E\udcb95\t\u003c\udc87\udca2\udcbc\u0347u!\udccc\udccf\udcfc\udcbd"], 0, [["ef1", "1"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["65b757b745b935093c87a2bccd877521cccffcbd"], "users": ["test"], "verb": "rewritten"}] + | x 471f378eab4c [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], 0, [["ef1", "1"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], "users": ["test"], "verb": "rewritten"}, {"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["65b757b745b935093c87a2bccd877521cccffcbd"], 0, [["ef1", "1"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["65b757b745b935093c87a2bccd877521cccffcbd"], "users": ["test"], "verb": "rewritten"}] |/ o ea207398892e "" @@ -949,11 +949,11 @@ $ hg fatelogjson --hidden @ eb5a0daa2192 "" | - | x b7ea6d14e664 [{"markers": [["\udcb7\udceam\u0014\udce6d\udcbd\u0212\"!\udcf7\udc99&1\udcb5\r\udca3\udcfb\u0007", ["\udcebZ\r\udcaa!\udc92;\udcbf\udc8c\udcae\udcb2\udcc4 \udc85\udcb9\udce4c\udc86\u001f\udcd0"], 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 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"}] | | - | | x 0dec01379d3b [{"markers": [["\r\udcec\u00017\udc9d;\udce61\udc8cG\u000e\udcad1\udcb1\udcfez\udce7\udccbS\udcd5", ["\udcb7\udceam\u0014\udce6d\udcbd\u0212\"!\udcf7\udc99&1\udcb5\r\udca3\udcfb\u0007"], 0, [["ef1", "1"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["b7ea6d14e664bdc8922221f7992631b50da3fb07"], "users": ["test"], "verb": "rewritten"}] + | | x 0dec01379d3b [{"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["b7ea6d14e664bdc8922221f7992631b50da3fb07"], 0, [["ef1", "1"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["b7ea6d14e664bdc8922221f7992631b50da3fb07"], "users": ["test"], "verb": "rewritten"}] | |/ - | x 471f378eab4c [{"markers": [["G\u001f7\udc8e\udcabL^%\udcf6\udcc7\u007fx['\udcc96\udcef\udcb2(t", ["\udcebZ\r\udcaa!\udc92;\udcbf\udc8c\udcae\udcb2\udcc4 \udc85\udcb9\udce4c\udc86\u001f\udcd0"], 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"}] + | 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 "" @@ -1098,7 +1098,7 @@ $ hg fatelogjson --hidden @ 7a230b46bf61 "" | - | x 471f378eab4c [{"markers": [["G\u001f7\udc8e\udcabL^%\udcf6\udcc7\u007fx['\udcc96\udcef\udcb2(t", ["\udcfd\udcf9\udcbd\udce5\u0012\udc9a(\udcd4T\udc8f\udcad\udcd3\udcf6+&\\\udcdd;z."], 0, [["ef1", "1"], ["user", "test"]], [0.0, 0], null], ["\udcfd\udcf9\udcbd\udce5\u0012\udc9a(\udcd4T\udc8f\udcad\udcd3\udcf6+&\\\udcdd;z.", ["z#\u000bF\udcbfa\udce5\u000b00\udc8cl\udcfd{\udcd1&\udc9e\udcf5G\u0002"], 0, [["ef1", "1"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["7a230b46bf61e50b30308c6cfd7bd1269ef54702"], "users": ["test"], "verb": "rewritten"}] + | x 471f378eab4c [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], 0, [["ef1", "1"], ["user", "test"]], [0.0, 0], null], ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e", ["7a230b46bf61e50b30308c6cfd7bd1269ef54702"], 0, [["ef1", "1"], ["user", "test"]], [0.0, 0], null]], "max_date": [0.0, 0], "min_date": [0.0, 0], "successors": ["7a230b46bf61e50b30308c6cfd7bd1269ef54702"], "users": ["test"], "verb": "rewritten"}] |/ o ea207398892e ""