src/topic/__init__.py
changeset 1849 9218f91619f6
parent 1848 9a81657deec2
child 1850 0da6bf86b718
--- a/src/topic/__init__.py	Wed Jun 10 16:32:20 2015 -0500
+++ b/src/topic/__init__.py	Wed Jun 10 16:44:49 2015 -0500
@@ -131,6 +131,7 @@
 def updatewrap(orig, ui, repo, *args, **kwargs):
     ret = orig(ui, repo, *args, **kwargs)
     pctx = repo['.']
+    ot = repo.currenttopic
     if pctx.phase() == phases.public and repo.vfs.exists('topic'):
         repo.vfs.unlink('topic')
     else:
@@ -139,6 +140,8 @@
         if t and pctx.phase() > phases.public:
             with repo.vfs.open('topic', 'w') as f:
                 f.write(t)
+            if t != ot:
+                ui.status(_("switching to topic %s\n") % t)
     return ret
 
 extensions.wrapcommand(commands.table, 'update', updatewrap)