--- 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')