log: update obsfate output order
Always display successors after the verb. So instead of "rewritten by boris as
X", display "rewritten as X by boris".
07b9fcf8b6d3 did update template-based obsfate but forget to update
obsfatelineprinter.
--- a/hgext3rd/evolve/templatekw.py Fri Oct 06 10:28:09 2017 +0200
+++ b/hgext3rd/evolve/templatekw.py Thu Sep 28 21:35:29 2017 +0100
@@ -191,6 +191,13 @@
# Verb
line.append(obsfateline['verb'])
+ # Successors
+ successors = obsfateline["successors"]
+
+ if successors:
+ fmtsuccessors = map(lambda s: s[:12], successors)
+ line.append(" as %s" % ", ".join(fmtsuccessors))
+
# Users
if (verbose or normal) and 'users' in obsfateline:
users = obsfateline['users']
@@ -202,13 +209,6 @@
if users:
line.append(" by %s" % ",".join(users))
- # Successors
- successors = obsfateline["successors"]
-
- if successors:
- fmtsuccessors = map(lambda s: s[:12], successors)
- line.append(" as %s" % ", ".join(fmtsuccessors))
-
# Date
if verbose:
min_date = obsfateline['min_date']
--- a/tests/test-evolve-templates.t Fri Oct 06 10:28:09 2017 +0200
+++ b/tests/test-evolve-templates.t Thu Sep 28 21:35:29 2017 +0100
@@ -47,13 +47,13 @@
|/ parent: 0:ea207398892e
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
- | obsolete: reworded by test2 as d004c8f274b9
+ | obsolete: reworded as d004c8f274b9 by test2
| summary: A1
|
| x changeset: 1:471f378eab4c
|/ user: test
| date: Thu Jan 01 00:00:00 1970 +0000
- | obsolete: rewritten by test1 as a468dc9b3633
+ | obsolete: rewritten as a468dc9b3633 by test1
| summary: A0
|
o changeset: 0:ea207398892e