# HG changeset patch # User Anton Shestakov # Date 1621250554 -28800 # Node ID 16f3fb30428585717c2351932b36ac9a03f63eec # Parent 4c7e430c3e386bc6126fea07b6bd3606113f54a5 topic: add a 'topic.active' label to messages with active topic diff -r 4c7e430c3e38 -r 16f3fb304285 hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Mon May 17 19:19:32 2021 +0800 +++ b/hgext3rd/topic/__init__.py Mon May 17 19:22:34 2021 +0800 @@ -670,7 +670,8 @@ csetcount = stack.stack(repo, topic=ct).changesetcount empty = csetcount == 0 if empty and not ctwasempty: - ui.status(b"active topic '%s' is now empty\n" % ct) + ui.status(b"active topic '%s' is now empty\n" + % ui.label(ct, b'topic.active')) trnames = getattr(tr, 'names', getattr(tr, '_names', ())) if (b'phase' in trnames or any(n.startswith(b'push-response') @@ -680,10 +681,10 @@ if ctwasempty and not empty: if csetcount == 1: msg = _(b"active topic '%s' grew its first changeset\n%s") - ui.status(msg % (ct, hint)) + ui.status(msg % (ui.label(ct, b'topic.active'), hint)) else: msg = _(b"active topic '%s' grew its %d first changesets\n%s") - ui.status(msg % (ct, csetcount, hint)) + ui.status(msg % (ui.label(ct, b'topic.active'), csetcount, hint)) tr.addpostclose(b'signalcurrenttopicempty', currenttopicempty) return tr @@ -870,7 +871,8 @@ if topic: if not ct: - ui.status(_(b'marked working directory as topic: %s\n') % topic) + ui.status(_(b'marked working directory as topic: %s\n') + % ui.label(topic, b'topic.active')) return _changecurrenttopic(repo, topic) ui.pager(b'topics')