obslog: make {succnodes} be full hex nodes
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 07 Nov 2019 13:40:53 -0800
changeset 4951 7bfd3fed5d1f
parent 4950 60d2065b720b
child 4952 b135591bec1a
obslog: make {succnodes} be full hex nodes It should be up to the user to shorten the nodeid as much or as little as they like.
hgext3rd/evolve/obshistory.py
tests/test-evolve-cycles.t
tests/test-evolve-obshistory-amend-then-fold.t
tests/test-evolve-obshistory-amend.t
tests/test-evolve-obshistory-content-divergent.t
tests/test-evolve-obshistory-fold.t
tests/test-evolve-obshistory-lots-of-splits.t
tests/test-evolve-obshistory-phase-divergent.t
tests/test-evolve-obshistory-split.t
--- a/hgext3rd/evolve/obshistory.py	Fri Nov 08 07:19:18 2019 -0800
+++ b/hgext3rd/evolve/obshistory.py	Thu Nov 07 13:40:53 2019 -0800
@@ -150,7 +150,7 @@
     b"missingnode": TEMPLATE_MISSING_NODE
 }
 TEMPLATE_VERB = b"""{label("evolve.verb", verb)}"""
-TEMPLATE_SUCCNODES = b"""{label("evolve.node", join(succnodes % "{succnode}", ", "))}"""
+TEMPLATE_SUCCNODES = b"""{label("evolve.node", join(succnodes % "{succnode|short}", ", "))}"""
 TEMPLATE_REWRITE = b"""{if(succnodes, "%(verb)s{if(effects, "({join(effects, ", ")})")} as %(succnodes)s", "pruned")}""" % {
     b"verb": TEMPLATE_VERB,
     b"succnodes": TEMPLATE_SUCCNODES
@@ -577,8 +577,8 @@
             fm.write(b'effects', b'(%s)', fmteffect)
 
     if len(succnodes) > 0:
-        shortsnodes = (nodemod.short(succnode) for succnode in sorted(succnodes))
-        nodes = fm.formatlist(shortsnodes, b'succnode')
+        hexnodes = (nodemod.hex(succnode) for succnode in sorted(succnodes))
+        nodes = fm.formatlist(hexnodes, b'succnode')
         fm.write(b'succnodes', b'%s', nodes)
 
     operation = metadata.get(b'operation')
--- a/tests/test-evolve-cycles.t	Fri Nov 08 07:19:18 2019 -0800
+++ b/tests/test-evolve-cycles.t	Thu Nov 07 13:40:53 2019 -0800
@@ -307,7 +307,7 @@
                   ],
                   "operation": "prune",
                   "succnodes": [
-                      "0da815c333f6"
+                      "0da815c333f6364b46c86b0a897c00eb617397b6"
                   ],
                   "user": "test",
                   "verb": "rewritten"
@@ -330,7 +330,7 @@
                   ],
                   "operation": "prune",
                   "succnodes": [
-                      "868d2e0eb19c"
+                      "868d2e0eb19c2b55a2894d37e1c435c221384d48"
                   ],
                   "user": "test",
                   "verb": "rewritten"
@@ -353,7 +353,7 @@
                   ],
                   "operation": "prune",
                   "succnodes": [
-                      "d9f908fde1a1"
+                      "d9f908fde1a10ad198a462a3ec8b440bb397fc9c"
                   ],
                   "user": "test",
                   "verb": "rewritten"
@@ -376,8 +376,8 @@
                   ],
                   "operation": "prune",
                   "succnodes": [
-                      "2a34000d3544",
-                      "868d2e0eb19c"
+                      "2a34000d35446022104f7a091c06fe21ff2b5912",
+                      "868d2e0eb19c2b55a2894d37e1c435c221384d48"
                   ],
                   "user": "test",
                   "verb": "rewritten"
@@ -400,7 +400,7 @@
                   ],
                   "operation": "prune",
                   "succnodes": [
-                      "a8df460dbbfe"
+                      "a8df460dbbfe9ef0c1e5ab4fff02e9514672e379"
                   ],
                   "user": "test",
                   "verb": "rewritten"
@@ -423,7 +423,7 @@
                   ],
                   "operation": "prune",
                   "succnodes": [
-                      "c473644ee0e9"
+                      "c473644ee0e988d7f537e31423831bbc409f12f7"
                   ],
                   "user": "test",
                   "verb": "rewritten"
--- a/tests/test-evolve-obshistory-amend-then-fold.t	Fri Nov 08 07:19:18 2019 -0800
+++ b/tests/test-evolve-obshistory-amend-then-fold.t	Thu Nov 07 13:40:53 2019 -0800
@@ -169,7 +169,7 @@
                   ],
                   "operation": "fold",
                   "succnodes": [
-                      "eb5a0daa2192"
+                      "eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
                   ],
                   "user": "test",
                   "verb": "rewritten"
@@ -190,7 +190,7 @@
                   ],
                   "operation": "amend",
                   "succnodes": [
-                      "b7ea6d14e664"
+                      "b7ea6d14e664bdc8922221f7992631b50da3fb07"
                   ],
                   "user": "test",
                   "verb": "rewritten"
@@ -212,7 +212,7 @@
                   ],
                   "operation": "fold",
                   "succnodes": [
-                      "eb5a0daa2192"
+                      "eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
                   ],
                   "user": "test",
                   "verb": "rewritten"
--- a/tests/test-evolve-obshistory-amend.t	Fri Nov 08 07:19:18 2019 -0800
+++ b/tests/test-evolve-obshistory-amend.t	Thu Nov 07 13:40:53 2019 -0800
@@ -161,7 +161,7 @@
                   ],
                   "operation": "amend",
                   "succnodes": [
-                      "4ae3a4151de9"
+                      "4ae3a4151de9aa872113f0b196e28323308981e8"
                   ],
                   "user": "test",
                   "verb": "rewritten"
@@ -206,7 +206,7 @@
                   ],
                   "operation": "amend",
                   "succnodes": [
-                      "4ae3a4151de9"
+                      "4ae3a4151de9aa872113f0b196e28323308981e8"
                   ],
                   "user": "test",
                   "verb": "rewritten"
--- a/tests/test-evolve-obshistory-content-divergent.t	Fri Nov 08 07:19:18 2019 -0800
+++ b/tests/test-evolve-obshistory-content-divergent.t	Thu Nov 07 13:40:53 2019 -0800
@@ -134,7 +134,7 @@
                   ],
                   "operation": "amend",
                   "succnodes": [
-                      "65b757b745b9"
+                      "65b757b745b935093c87a2bccd877521cccffcbd"
                   ],
                   "user": "test",
                   "verb": "rewritten"
@@ -149,7 +149,7 @@
                   ],
                   "operation": "amend",
                   "succnodes": [
-                      "fdf9bde5129a"
+                      "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"
                   ],
                   "user": "test",
                   "verb": "rewritten"
@@ -298,7 +298,7 @@
                   ],
                   "operation": "amend",
                   "succnodes": [
-                      "65b757b745b9"
+                      "65b757b745b935093c87a2bccd877521cccffcbd"
                   ],
                   "user": "test",
                   "verb": "rewritten"
@@ -313,7 +313,7 @@
                   ],
                   "operation": "amend",
                   "succnodes": [
-                      "fdf9bde5129a"
+                      "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"
                   ],
                   "user": "test",
                   "verb": "rewritten"
--- a/tests/test-evolve-obshistory-fold.t	Fri Nov 08 07:19:18 2019 -0800
+++ b/tests/test-evolve-obshistory-fold.t	Thu Nov 07 13:40:53 2019 -0800
@@ -188,7 +188,7 @@
                   ],
                   "operation": "fold",
                   "succnodes": [
-                      "eb5a0daa2192"
+                      "eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
                   ],
                   "user": "test",
                   "verb": "rewritten"
@@ -211,7 +211,7 @@
                   ],
                   "operation": "fold",
                   "succnodes": [
-                      "eb5a0daa2192"
+                      "eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
                   ],
                   "user": "test",
                   "verb": "rewritten"
--- a/tests/test-evolve-obshistory-lots-of-splits.t	Fri Nov 08 07:19:18 2019 -0800
+++ b/tests/test-evolve-obshistory-lots-of-splits.t	Thu Nov 07 13:40:53 2019 -0800
@@ -207,10 +207,10 @@
                   ],
                   "operation": "split",
                   "succnodes": [
-                      "1ae8bc733a14",
-                      "337fec4d2edc",
-                      "c7f044602e9b",
-                      "f257fde29c7a"
+                      "1ae8bc733a14e374f11767d2ad128d4c891dc43f",
+                      "337fec4d2edcf0e7a467e35f818234bc620068b5",
+                      "c7f044602e9bd5dec6528b33114df3d0221e6359",
+                      "f257fde29c7a847c9b607f6e958656d0df0fb15c"
                   ],
                   "user": "test",
                   "verb": "rewritten"
@@ -247,10 +247,10 @@
                   ],
                   "operation": "split",
                   "succnodes": [
-                      "1ae8bc733a14",
-                      "337fec4d2edc",
-                      "c7f044602e9b",
-                      "f257fde29c7a"
+                      "1ae8bc733a14e374f11767d2ad128d4c891dc43f",
+                      "337fec4d2edcf0e7a467e35f818234bc620068b5",
+                      "c7f044602e9bd5dec6528b33114df3d0221e6359",
+                      "f257fde29c7a847c9b607f6e958656d0df0fb15c"
                   ],
                   "user": "test",
                   "verb": "rewritten"
--- a/tests/test-evolve-obshistory-phase-divergent.t	Fri Nov 08 07:19:18 2019 -0800
+++ b/tests/test-evolve-obshistory-phase-divergent.t	Thu Nov 07 13:40:53 2019 -0800
@@ -107,7 +107,7 @@
                   ],
                   "operation": "amend",
                   "succnodes": [
-                      "fdf9bde5129a"
+                      "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"
                   ],
                   "user": "test",
                   "verb": "rewritten"
@@ -210,7 +210,7 @@
                   ],
                   "operation": "amend",
                   "succnodes": [
-                      "fdf9bde5129a"
+                      "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"
                   ],
                   "user": "test",
                   "verb": "rewritten"
--- a/tests/test-evolve-obshistory-split.t	Fri Nov 08 07:19:18 2019 -0800
+++ b/tests/test-evolve-obshistory-split.t	Thu Nov 07 13:40:53 2019 -0800
@@ -126,8 +126,8 @@
                   "note": "testing split",
                   "operation": "split",
                   "succnodes": [
-                      "337fec4d2edc",
-                      "f257fde29c7a"
+                      "337fec4d2edcf0e7a467e35f818234bc620068b5",
+                      "f257fde29c7a847c9b607f6e958656d0df0fb15c"
                   ],
                   "user": "test",
                   "verb": "rewritten"