# HG changeset patch # User Boris Feld # Date 1507642083 -7200 # Node ID 204a6947a9203cc965798c315cc1c81efce9846e # Parent 6603d565519274c80ce34c918387a65904d110fb obsfate: fix user filtering in obsfate-printer Only hide current user only if it's the only one that create obs-markers. diff -r 6603d5655192 -r 204a6947a920 hgext3rd/evolve/templatekw.py --- 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)) diff -r 6603d5655192 -r 204a6947a920 tests/test-evolve-templates.t --- 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