Thu, 07 Jan 2021 12:22:39 -0800 shelve: rewrite check for unknown shelf to delete
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Jan 2021 12:22:39 -0800] rev 46270
shelve: rewrite check for unknown shelf to delete The code would try to delete the shelf's .patch file and if that raised an exception, it would convert it to an `error.Abort`. This patch rewrites it so the check is done upfront. I find it easier to read that way. It's now clear enough that I removed the comment explaining it as well. As Joerg pointed out during review, another differences is that the old code would move a `.hg` file without its `.patch` friend to backup before it realized that the `.patch` file was missing. The new code will error out earlier and not move the `.hg` file, which seems like an improvement. That should only matter on corrupt `.hg/shelved/` directories, however. Differential Revision: https://phab.mercurial-scm.org/D9697
Thu, 07 Jan 2021 12:37:14 -0800 shelve: remove a bundlerepo method
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Jan 2021 12:37:14 -0800] rev 46269
shelve: remove a bundlerepo method It was added in 43816070284e (shelve: add a bundlerepo method, 2014-10-10), but I haven't been able to find a place it was used. Differential Revision: https://phab.mercurial-scm.org/D9696
Fri, 08 Jan 2021 16:38:41 -0800 tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Jan 2021 16:38:41 -0800] rev 46268
tests: add tests for corrupt .hg/shelved/ directory I don't care much how we behave in these cases, except that we should provide a way for the user to get out of the broken state. Differential Revision: https://phab.mercurial-scm.org/D9718
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -3 +3 +10 +30 +100 +300 +1000 +3000 tip