diff hgext3rd/topic/__init__.py @ 4268:d5a2cc19903f

topics: improve the message around topic changing The new message says 'cleared' when topic name is cleared, if we change to a new topic name, it mentions the new topic name too.
author Pulkit Goyal <pulkit@yandex-team.ru>
date Mon, 26 Nov 2018 16:43:39 +0300
parents 35dac5aadcfc
children ff799015d62e
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py	Wed Nov 21 11:13:21 2018 +0000
+++ b/hgext3rd/topic/__init__.py	Mon Nov 26 16:43:39 2018 +0300
@@ -680,7 +680,11 @@
             txn = repo.transaction('rewrite-topics')
             rewrote = _changetopics(ui, repo, touchedrevs, topic)
             txn.close()
-            ui.status('changed topic on %d changes\n' % rewrote)
+            if topic is None:
+                ui.status('cleared topic on %d changesets\n' % rewrote)
+            else:
+                ui.status('changed topic on %d changesets to "%s"\n' % (rewrote,
+                                                                        topic))
         finally:
             lockmod.release(txn, lock, wl)
             repo.invalidate()