[Updated] D10845: transaction: narrow the error filtering when failing to rename undo file

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Thu Jun 17 13:31:42 UTC 2021


Closed by commit rHGd2e0226b511a: transaction: narrow the error filtering when failing to rename undo file (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D10845?vs=28522&id=28594

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D10845/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D10845

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -3445,8 +3445,9 @@
             vfs.tryunlink(dest)
             try:
                 vfs.rename(src, dest)
-            except OSError:  # journal file does not yet exist
-                pass
+            except OSError as exc:  # journal file does not yet exist
+                if exc.errno != errno.ENOENT:
+                    raise
 
     return a
 



To: marmoute, #hg-reviewers, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210617/30406f29/attachment-0002.html>


More information about the Mercurial-patches mailing list