mercurial/util.py
changeset 7767 b2410ed2cbe9
parent 7732 3793802ea41b
child 7780 9892c4d94fb7
--- a/mercurial/util.py	Sun Feb 08 15:58:39 2009 +0100
+++ b/mercurial/util.py	Mon Feb 09 07:55:42 2009 -0600
@@ -760,7 +760,7 @@
         pass
 
 def copyfile(src, dest):
-    "copy a file, preserving mode"
+    "copy a file, preserving mode and atime/mtime"
     if os.path.islink(src):
         try:
             os.unlink(dest)
@@ -770,7 +770,7 @@
     else:
         try:
             shutil.copyfile(src, dest)
-            shutil.copymode(src, dest)
+            shutil.copystat(src, dest)
         except shutil.Error, inst:
             raise Abort(str(inst))