Mercurial > hg
diff mercurial/commands.py @ 35711:35a0f6f31eef
update: display the obsfate of hidden revision we update to
Display the same message we added recently to the filtered error message when
updating to a hidden obsolete changeset.
Differential Revision: https://phab.mercurial-scm.org/D1869
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Tue, 16 Jan 2018 14:08:54 +0100 |
parents | 41ef02ba329b |
children | 3bd8ab4c80a5 |
line wrap: on
line diff
--- 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')