shelve: don't swallow errors that happen when reverting the working copy
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 18 Jun 2021 14:17:43 -0700
changeset 47436 6ecd0980d7f9
parent 47435 e9fbf8fd5f33
child 47437 7a430116f639
shelve: don't swallow errors that happen when reverting the working copy Same reasoning as the parent commit. The code in question here comes from fb8065de47b0 (unshelve: silence internal revert, 2014-08-15), which says that it was to prepare for some upcoming revert changes. I suppose those changes have happened by now but we fixed something about it, because I don't see any unwanted changes in tests (no changes at all in tests, in fact). Differential Revision: https://phab.mercurial-scm.org/D10883
mercurial/shelve.py
--- a/mercurial/shelve.py	Fri Jun 18 13:55:45 2021 -0700
+++ b/mercurial/shelve.py	Fri Jun 18 14:17:43 2021 -0700
@@ -781,9 +781,7 @@
     dirstate."""
     with ui.configoverride({(b'ui', b'quiet'): True}):
         hg.update(repo, wctx.node())
-        ui.pushbuffer(True)
         cmdutil.revert(ui, repo, shelvectx)
-        ui.popbuffer()
 
 
 def restorebranch(ui, repo, branchtorestore):