mercurial/commands.py
changeset 35711 35a0f6f31eef
parent 35704 41ef02ba329b
child 35745 3bd8ab4c80a5
--- a/mercurial/commands.py	Sun Jan 14 00:02:40 2018 -0800
+++ b/mercurial/commands.py	Tue Jan 16 14:08:54 2018 +0100
@@ -43,6 +43,7 @@
     lock as lockmod,
     merge as mergemod,
     obsolete,
+    obsutil,
     patch,
     phases,
     pycompat,
@@ -5538,7 +5539,12 @@
         ctx = scmutil.revsingle(repo, rev, rev)
         rev = ctx.rev()
         if ctx.hidden():
-            ui.warn(_("updating to a hidden changeset %s\n") % ctx.hex()[:12])
+            ctxstr = ctx.hex()[:12]
+            ui.warn(_("updating to a hidden changeset %s\n") % ctxstr)
+
+            if ctx.obsolete():
+                obsfatemsg = obsutil._getfilteredreason(repo, ctxstr, ctx)
+                ui.warn("(%s)\n" % obsfatemsg)
 
         repo.ui.setconfig('ui', 'forcemerge', tool, 'update')