# HG changeset patch # User Pierre-Yves David # Date 1678878485 -3600 # Node ID 70ca1f09ceca9a6cef561636b4656365d3c0f8b9 # Parent 90276164333a690b234dd6599a9975e00a36bdd3 transaction: add clarifying comment about why ignoring some error is fine It is less scary when explained. diff -r 90276164333a -r 70ca1f09ceca mercurial/transaction.py --- 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: