Commit 9ff18cdf authored by Pierre-Yves David's avatar Pierre-Yves David 🐙
Browse files

topics: add special label and color for topic you touched

This will make it easier to spot your own topic.

One the long run, this should probably be related to namespace.

I am not fully convinced by the visual result either, but that is already more
useful than nothing.
parent 38ebdb5ca4b0
Pipeline #58032 passed with stage
in 17 minutes and 48 seconds
......@@ -211,6 +211,7 @@
b'topic.list.headcount.multiple': b'yellow',
b'topic.list.behindcount': b'cyan',
b'topic.list.behinderror': b'red',
b'topic.list.user.current': b'green',
b'stack.index': b'yellow',
b'stack.index.base': b'none dim',
b'stack.desc.base': b'none dim',
......@@ -1227,6 +1228,7 @@
def _listtopics(ui, repo, opts):
fm = ui.formatter(b'topics', pycompat.byteskwargs(opts))
current_user = stack.parseusername(ui.username(acceptempty=True))
activetopic = repo.currenttopic
namemask = b'%s'
if repo.topics:
......@@ -1266,7 +1268,10 @@
timestr = templatefilters.age(date)
fm.write(b'lasttouched', b'%s', timestr, label=b'topic.list.time')
if user:
fm.write(b'usertouched', b' by %s', user, label=b'topic.list.user')
user_label = b'topic.list.user'
if user == current_user:
user_label += b' topic.list.user.current'
fm.write(b'usertouched', b' by %s', user, label=user_label)
if date:
fm.plain(b', ')
data = stack.stack(repo, topic=topic)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment