obsfate: fix user filtering in obsfate-printer
Only hide current user only if it's the only one that create obs-markers.
--- a/hgext3rd/evolve/templatekw.py Tue Oct 10 16:22:21 2017 +0200
+++ b/hgext3rd/evolve/templatekw.py Tue Oct 10 15:28:03 2017 +0200
@@ -195,9 +195,12 @@
if (verbose or normal) and 'users' in obsfateline:
users = obsfateline['users']
- if normal:
+ if not verbose:
+ # If current user is the only user, do not show anything if not in
+ # verbose mode
username = _getusername(ui)
- users = [user for user in users if user != username]
+ if len(users) == 1 and users[0] == username:
+ users = None
if users:
line.append(" by %s" % ",".join(users))
--- a/tests/test-evolve-templates.t Tue Oct 10 16:22:21 2017 +0200
+++ b/tests/test-evolve-templates.t Tue Oct 10 15:28:03 2017 +0200
@@ -107,7 +107,7 @@
| @ changeset: 1:471f378eab4c
|/ user: test
| date: Thu Jan 01 00:00:00 1970 +0000
- | obsolete: rewritten by test2 as d004c8f274b9
+ | obsolete: rewritten by test,test2 as d004c8f274b9
| summary: A0
|
o changeset: 0:ea207398892e