diff hgext/largefiles/overrides.py @ 37088:08890706366e

copyfile: preserve stat info (mtime, etc.) when doing copies/renames Differential Revision: https://phab.mercurial-scm.org/D2729
author Kyle Lippincott <spectral@google.com>
date Thu, 08 Mar 2018 11:44:03 -0800
parents 45bfcd16f27e
children 335e19c6b7fa
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Thu Mar 22 22:58:31 2018 -0400
+++ b/hgext/largefiles/overrides.py	Thu Mar 08 11:44:03 2018 -0800
@@ -667,7 +667,7 @@
         try:
             origcopyfile = util.copyfile
             copiedfiles = []
-            def overridecopyfile(src, dest):
+            def overridecopyfile(src, dest, *args, **kwargs):
                 if (lfutil.shortname in src and
                     dest.startswith(repo.wjoin(lfutil.shortname))):
                     destlfile = dest.replace(lfutil.shortname, '')
@@ -675,7 +675,7 @@
                         raise IOError('',
                             _('destination largefile already exists'))
                 copiedfiles.append((src, dest))
-                origcopyfile(src, dest)
+                origcopyfile(src, dest, *args, **kwargs)
 
             util.copyfile = overridecopyfile
             result += orig(ui, repo, listpats, opts, rename)