Mercurial > hg-stable
changeset 50307:70ca1f09ceca stable
transaction: add clarifying comment about why ignoring some error is fine
It is less scary when explained.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 15 Mar 2023 12:08:05 +0100 |
parents | 90276164333a |
children | cab3defe6d3b |
files | mercurial/transaction.py |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/transaction.py Wed Mar 15 11:18:24 2023 +0100 +++ b/mercurial/transaction.py Wed Mar 15 12:08:05 2023 +0100 @@ -150,6 +150,16 @@ try: vfs.unlink(target) except FileNotFoundError: + # This is fine because + # + # either we are trying to delete the main file, and it is + # already deleted. + # + # or we are trying to delete a temporary file and it is + # already deleted. + # + # in both case, our target result (delete the file) is + # already achieved. pass except (IOError, OSError, error.Abort): if not c: