Mercurial > public > mercurial-scm > hg-stable
diff mercurial/obsutil.py @ 34850:62a4ccf9784a
obsfate: filter out current user if not in verbose
Obsolescence is sometimes used only locally so the obs-marker users is always
the same. Showing the user in this case does not bring much values.
In the case where multiple users rewrite the commit, display the full list of
users. Also show all users in verbose mode.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Mon, 09 Oct 2017 15:34:12 +0200 |
parents | e27f1f04c2cf |
children | 6f53a53245a2 |
line wrap: on
line diff
--- a/mercurial/obsutil.py Fri Oct 06 16:23:47 2017 +0200 +++ b/mercurial/obsutil.py Mon Oct 09 15:34:12 2017 +0200 @@ -788,6 +788,10 @@ """ Build a obsfate string for a single successorset using all obsfate related function defined in obsutil """ + quiet = ui.quiet + verbose = ui.verbose + normal = not verbose and not quiet + line = [] # Verb @@ -805,8 +809,14 @@ # Users users = markersusers(markers) + # Filter out current user in not verbose mode to reduce amount of + # information + if not verbose: + currentuser = ui.username(acceptempty=True) + if len(users) == 1 and currentuser in users: + users = None - if users: + if (verbose or normal) and users: line.append(" by %s" % ", ".join(users)) # Date