[Updated] D10854: copyfiles: add a way to relax the file system checking for hardlink

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Mon Jun 21 15:15:14 UTC 2021


Closed by commit rHG09ff5d532a25: copyfiles: add a way to relax the file system checking for hardlink (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/D10854?vs=28624&id=28654

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

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

AFFECTED FILES
  mercurial/util.py

CHANGE DETAILS

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -1917,6 +1917,7 @@
     checkambig=False,
     nb_bytes=None,
     no_hardlink_cb=None,
+    check_fs_hardlink=True,
 ):
     """copy a file, preserving mode and optionally other stat info like
     atime/mtime
@@ -1935,7 +1936,7 @@
         if checkambig:
             oldstat = checkambig and filestat.frompath(dest)
         unlink(dest)
-    if hardlink:
+    if hardlink and check_fs_hardlink:
         # Hardlinks are problematic on CIFS (issue4546), do not allow hardlinks
         # unless we are confident that dest is on a whitelisted filesystem.
         try:



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


More information about the Mercurial-patches mailing list