Mercurial > hg
comparison i18n/hggettext @ 46270:161313f9c467
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
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 07 Jan 2021 12:22:39 -0800 |
parents | c102b704edb5 |
children | d4ba4d51f85f |
comparison
equal
deleted
inserted
replaced
46269:44556639f14a | 46270:161313f9c467 |
---|