Fri, 18 Jun 2021 15:48:51 -0700 ui: add a context manager for silencing the ui (pushbuffer+popbuffer)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Jun 2021 15:48:51 -0700] rev 47437
ui: add a context manager for silencing the ui (pushbuffer+popbuffer) We often silence the ui by calling `ui.pushbuffer()` followed (a later in the code) by `ui.popbuffer()`. These places can be identified by the fact that they ignore the output returned from `ui.popbuffer()`. Let's create a context manager for these cases, to avoid repetition, and to avoid accidentally leaving the ui silent on exceptions. I deliberately called the new function `silent()` instead of `buffered()`, because it's just an implementation detail that it uses `pushbuffer()` and `popbuffer()`. We could later optimize it to not buffer the output. Differential Revision: https://phab.mercurial-scm.org/D10884
Fri, 18 Jun 2021 14:17:43 -0700 shelve: don't swallow errors that happen when reverting the working copy
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Jun 2021 14:17:43 -0700] rev 47436
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
Fri, 18 Jun 2021 13:55:45 -0700 histedit: don't swallow errors that happen when updating the working copy
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Jun 2021 13:55:45 -0700] rev 47435
histedit: don't swallow errors that happen when updating the working copy Commit 34165875fa5d (histedit: limit updated and merging output to important updates, 2016-02-03) added a call to `ui.pushbuffer(labeled=True, errors=True)`. I don't know if there was a reason for the `errors=True` (nor the `labeled=True` bit, which I removed in the previous commit). It seems bad to just discard the errors, so let's not do that. By not doing that, we can also remove a workaround for the lack of errors from `test-removeemptydirs.t`. Differential Revision: https://phab.mercurial-scm.org/D10882
Fri, 18 Jun 2021 13:44:05 -0700 histedit: don't record labels for output that we will discard
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Jun 2021 13:44:05 -0700] rev 47434
histedit: don't record labels for output that we will discard Differential Revision: https://phab.mercurial-scm.org/D10881
Thu, 10 Jun 2021 15:56:55 -0700 dog-raft: work with str-keyed opts throughout
Martin von Zweigbergk <martinvonz@google.com> [Thu, 10 Jun 2021 15:56:55 -0700] rev 47433
dog-raft: work with str-keyed opts throughout Differential Revision: https://phab.mercurial-scm.org/D10864
Thu, 10 Jun 2021 15:45:22 -0700 cmdutil: make resolvecommitoptions() work on str-keyed opts
Martin von Zweigbergk <martinvonz@google.com> [Thu, 10 Jun 2021 15:45:22 -0700] rev 47432
cmdutil: make resolvecommitoptions() work on str-keyed opts As with `checknotesize()`, I also changed to snake_case while at it, to help extensions a little. Differential Revision: https://phab.mercurial-scm.org/D10863
Thu, 10 Jun 2021 14:55:10 -0700 cmdutil: make amend() take str-keyed opts
Martin von Zweigbergk <martinvonz@google.com> [Thu, 10 Jun 2021 14:55:10 -0700] rev 47431
cmdutil: make amend() take str-keyed opts I couldn't think of a reasonable change to the signature here, so unfortunately it keeps the existing one. Differential Revision: https://phab.mercurial-scm.org/D10862
Thu, 10 Jun 2021 14:47:14 -0700 commit: keep opts dict str-keyed a bit longer
Martin von Zweigbergk <martinvonz@google.com> [Thu, 10 Jun 2021 14:47:14 -0700] rev 47430
commit: keep opts dict str-keyed a bit longer Differential Revision: https://phab.mercurial-scm.org/D10861
Thu, 10 Jun 2021 14:36:26 -0700 dog-raft: keep opts dict str-keyed a bit longer
Martin von Zweigbergk <martinvonz@google.com> [Thu, 10 Jun 2021 14:36:26 -0700] rev 47429
dog-raft: keep opts dict str-keyed a bit longer Differential Revision: https://phab.mercurial-scm.org/D10860
Thu, 10 Jun 2021 14:25:16 -0700 cmdutil: make checknotesize() work on str-keyed opts
Martin von Zweigbergk <martinvonz@google.com> [Thu, 10 Jun 2021 14:25:16 -0700] rev 47428
cmdutil: make checknotesize() work on str-keyed opts Since this patch changes the behavior of the function, I consider it a bonus if the signature also changes so that extensions can detect which version they're dealing with (for the record, I don't have any such extensions). Therefore, I also dropped an unused `ui` argument and renamed the function to use snake_case. Differential Revision: https://phab.mercurial-scm.org/D10859
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip