martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches.
REVISION SUMMARY The only place we call `shelvedfile.opener()` is when we're about to apply a bundle. The file should always exist. If it doesn't, the `.hg/` directory is corrupt and we don't provide any guarantees about supporting corrupt repos (besides, telling the user that the shelve doesn't exist when `hg shelve --list` lists it is not very helpful). REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9698 AFFECTED FILES mercurial/shelve.py CHANGE DETAILS diff --git a/mercurial/shelve.py b/mercurial/shelve.py --- a/mercurial/shelve.py +++ b/mercurial/shelve.py @@ -117,12 +117,7 @@ return self.vfs.stat(self.fname) def opener(self, mode=b'rb'): - try: - return self.vfs(self.fname, mode) - except IOError as err: - if err.errno != errno.ENOENT: - raise - raise error.Abort(_(b"shelved change '%s' not found") % self.name) + return self.vfs(self.fname, mode) def applybundle(self, tr): fp = self.opener() To: martinvonz, #hg-reviewers Cc: mercurial-patches, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel