changeset 2607:054d92586e43

obsfate: use 'split' as verb when appropriate
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 16 Jun 2017 16:51:31 +0200
parents 02129bed002c
children 4dd548327f89
files hgext3rd/evolve/obshistory.py tests/test-evolve-templates.t
diffstat 2 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/obshistory.py	Fri Jun 16 16:50:11 2017 +0200
+++ b/hgext3rd/evolve/obshistory.py	Fri Jun 16 16:51:31 2017 +0200
@@ -631,8 +631,10 @@
     """
     if not successorset:
         verb = 'pruned'
+    elif len(successorset) == 1:
+        verb = 'rewritten'
     else:
-        verb = 'rewritten'
+        verb = 'split'
     return {'verb': verb}
 
 FORMATSSETSFUNCTIONS = [
--- a/tests/test-evolve-templates.t	Fri Jun 16 16:50:11 2017 +0200
+++ b/tests/test-evolve-templates.t	Fri Jun 16 16:51:31 2017 +0200
@@ -346,7 +346,7 @@
   | @  471597cad322
   |/     Successors: [337fec4d2edc, f257fde29c7a]
   |      semi-colon: [337fec4d2edc, f257fde29c7a]
-  |      Fate: rewritten by test as 337fec4d2edc, f257fde29c7a
+  |      Fate: split by test as 337fec4d2edc, f257fde29c7a
   |
   o  ea207398892e
   
@@ -356,7 +356,7 @@
   o  337fec4d2edc
   |
   | @  471597cad322
-  |/     Obsfate: rewritten by test as 337fec4d2edc, f257fde29c7a
+  |/     Obsfate: split by test as 337fec4d2edc, f257fde29c7a
   |
   o  ea207398892e
   
@@ -385,7 +385,7 @@
   | x  471597cad322
   |/     Successors: [337fec4d2edc, f257fde29c7a]
   |      semi-colon: [337fec4d2edc, f257fde29c7a]
-  |      Fate: rewritten by test as 337fec4d2edc, f257fde29c7a
+  |      Fate: split by test as 337fec4d2edc, f257fde29c7a
   |
   o  ea207398892e
   
@@ -395,7 +395,7 @@
   o  337fec4d2edc
   |
   | x  471597cad322
-  |/     Obsfate: rewritten by test as 337fec4d2edc, f257fde29c7a
+  |/     Obsfate: split by test as 337fec4d2edc, f257fde29c7a
   |
   o  ea207398892e
   
@@ -405,7 +405,7 @@
   |
   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": "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": "split"}]
   |/
   o  ea207398892e ""