Mercurial > public > mercurial-scm > hg
diff tests/test-largefiles-cache.t @ 16155:1b2b42e866be stable
largefiles: respect store.createmode and avoid extra file copy
Before, a tempfile was used to create a temp file was created with 600
permissions and the uploaded data was written into it. This file was
then *copied* to .hg/largefiles/<hash>.
We now simply use atomictempfile to write the data to a temp file with
the right permissions and then rename that into place.
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Thu, 23 Feb 2012 13:37:10 +0100 |
parents | 9b072a5f8f92 |
children | f2719b387380 |
line wrap: on
line diff
--- a/tests/test-largefiles-cache.t Thu Feb 23 13:37:10 2012 +0100 +++ b/tests/test-largefiles-cache.t Thu Feb 23 13:37:10 2012 +0100 @@ -103,3 +103,19 @@ $ hg pull ../src --update -q $ ../ls-l.py .hg/largefiles/e151b474069de4ca6898f67ce2f2a7263adf8fea 640 + +Test permission of files created by push: + + $ hg serve -R ../src -d -p $HGPORT --pid-file hg.pid \ + > --config "web.allow_push=*" --config web.push_ssl=no + $ cat hg.pid >> $DAEMON_PIDS + + $ echo change >> large + $ hg commit -m change + + $ rm -r "$USERCACHE" + + $ hg push -q http://localhost:$HGPORT/ + + $ ../ls-l.py ../src/.hg/largefiles/b734e14a0971e370408ab9bce8d56d8485e368a9 + 640