# HG changeset patch # User Pierre-Yves David # Date 1497624691 -7200 # Node ID 054d92586e439bc3948eee9e592a4e1dcd43a026 # Parent 02129bed002c0277a109aefb7b2c0c4a89cddb75 obsfate: use 'split' as verb when appropriate diff -r 02129bed002c -r 054d92586e43 hgext3rd/evolve/obshistory.py --- 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 = [ diff -r 02129bed002c -r 054d92586e43 tests/test-evolve-templates.t --- 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 ""