Mercurial > hg
diff hgext/largefiles/lfutil.py @ 16153:05197f9fd1f3 stable
largefiles: use repo.store.createmode for new files in .hg/largefiles
Before, the mode was copied from the file in the working copy. This is
inconsistent with how Mercurial normally creates files inside the .hg
folder. This can lead to a situation where you can read the files
under .hg/store but not under .hg/largefiles and so a clone will fail
if it needs to access a largefile.
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Thu, 23 Feb 2012 13:22:55 +0100 |
parents | 3e1efb458e8b |
children | 1b2b42e866be |
line wrap: on
line diff
--- 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):