hgext/largefiles/lfutil.py
branchstable
changeset 16153 05197f9fd1f3
parent 16103 3e1efb458e8b
child 16155 1b2b42e866be
--- a/hgext/largefiles/lfutil.py	Thu Feb 23 00:07:54 2012 +0900
+++ b/hgext/largefiles/lfutil.py	Thu Feb 23 13:22:55 2012 +0100
@@ -237,11 +237,11 @@
     if inusercache(repo.ui, hash):
         link(usercachepath(repo.ui, hash), storepath(repo, hash))
     else:
-        dst = util.atomictempfile(storepath(repo, hash))
+        dst = util.atomictempfile(storepath(repo, hash),
+                                  createmode=repo.store.createmode)
         for chunk in util.filechunkiter(open(file, 'rb')):
             dst.write(chunk)
         dst.close()
-        util.copymode(file, storepath(repo, hash))
         linktousercache(repo, hash)
 
 def linktousercache(repo, hash):