Mercurial > public > mercurial-scm > hg
diff tests/test-largefiles.t @ 15778:f15c646bffc7
largefiles: display remote errors from putlfile (issue3123) (issue3149)
author | Kevin Gessner <kevin@fogcreek.com> |
---|---|
date | Thu, 05 Jan 2012 07:26:22 -0800 |
parents | 65df60a3f96b |
children | 3fe39d6d2bd8 |
line wrap: on
line diff
--- a/tests/test-largefiles.t Thu Jan 05 20:35:10 2012 -0600 +++ b/tests/test-largefiles.t Thu Jan 05 07:26:22 2012 -0800 @@ -1,5 +1,7 @@ $ "$TESTDIR/hghave" symlink unix-permissions serve || exit 80 + $ USERCACHE=`pwd`/cache; export USERCACHE + $ mkdir -p ${USERCACHE} $ cat >> $HGRCPATH <<EOF > [extensions] > largefiles= @@ -11,6 +13,7 @@ > [largefiles] > minsize=2 > patterns=glob:**.dat + > usercache=${USERCACHE} > EOF Create the repo with a couple of revisions of both large and normal @@ -824,6 +827,21 @@ [255] $ cd .. +putlfile errors are shown (issue3123) +Corrupt the cached largefile in r7 + $ echo corruption > $USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8 + $ hg init empty + $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \ + > --config 'web.allow_push=*' --config web.push_ssl=False + $ cat hg.pid >> $DAEMON_PIDS + $ hg push -R r7 http://localhost:$HGPORT1 + pushing to http://localhost:$HGPORT1/ + searching for changes + remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash + abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ + [255] + $ rm -rf empty + Clone a local repository owned by another user We have to simulate that here by setting $HOME and removing write permissions $ ORIGHOME="$HOME"