# HG changeset patch # User Mads Kiilerich # Date 1340063021 -7200 # Node ID 79902f7e27df0eeae96d4d47d5c8a12fae2a0bb7 # Parent 40c9aa7023032d6e384139eecabd245105fcbd2a tests: convert some hghave unix-permissions to #if diff -r 40c9aa702303 -r 79902f7e27df tests/test-convert.t --- a/tests/test-convert.t Tue Jun 19 00:20:38 2012 +0200 +++ b/tests/test-convert.t Tue Jun 19 01:43:41 2012 +0200 @@ -1,5 +1,3 @@ - $ "$TESTDIR/hghave" unix-permissions || exit 80 - $ cat >> $HGRCPATH < [extensions] > convert= @@ -293,24 +291,27 @@ pulling from ../a searching for changes no changes found - $ touch bogusfile -should fail +conversion to existing file should fail + $ touch bogusfile $ hg convert a bogusfile initializing destination bogusfile repository abort: cannot create new bundle repository [255] + +#if unix-permissions + +conversion to dir without permissions should fail + $ mkdir bogusdir $ chmod 000 bogusdir -should fail - $ hg convert a bogusdir abort: Permission denied: bogusdir [255] -should succeed +user permissions should succeed $ chmod 700 bogusdir $ hg convert a bogusdir @@ -324,6 +325,8 @@ 1 d 0 e +#endif + test pre and post conversion actions $ echo 'include b' > filemap diff -r 40c9aa702303 -r 79902f7e27df tests/test-eol.t --- a/tests/test-eol.t Tue Jun 19 00:20:38 2012 +0200 +++ b/tests/test-eol.t Tue Jun 19 01:43:41 2012 +0200 @@ -1,5 +1,3 @@ - $ "$TESTDIR/hghave" unix-permissions || exit 80 - Test EOL extension $ cat >> $HGRCPATH <> $HGRCPATH + $ echo 'eol =' >> $HGRCPATH + +#if unix-permissions + Test issue2569 -- eol extension takes write lock on reading: - $ echo '[extensions]' >> $HGRCPATH - $ echo 'eol =' >> $HGRCPATH $ hg init repo $ cd repo $ touch .hgeol @@ -403,6 +404,8 @@ $ chmod -R u+w .hg $ cd .. +#endif + Test cleverencode: and cleverdecode: aliases for win32text extension $ echo '[encode]' >> $HGRCPATH diff -r 40c9aa702303 -r 79902f7e27df tests/test-largefiles-cache.t --- a/tests/test-largefiles-cache.t Tue Jun 19 00:20:38 2012 +0200 +++ b/tests/test-largefiles-cache.t Tue Jun 19 01:43:41 2012 +0200 @@ -1,5 +1,3 @@ - $ "$TESTDIR/hghave" unix-permissions || exit 80 - Create user cache directory $ USERCACHE=`pwd`/cache; export USERCACHE @@ -72,10 +70,12 @@ 0 largefiles updated, 0 removed $ hg status ! large + $ cd .. + +#if unix-permissions Portable way to print file permissions: - $ cd .. $ cat > ls-l.py < #!/usr/bin/env python > import sys, os @@ -121,3 +121,5 @@ 640 $ cd .. + +#endif diff -r 40c9aa702303 -r 79902f7e27df tests/test-largefiles.t --- a/tests/test-largefiles.t Tue Jun 19 00:20:38 2012 +0200 +++ b/tests/test-largefiles.t Tue Jun 19 01:43:41 2012 +0200 @@ -1,4 +1,4 @@ - $ "$TESTDIR/hghave" unix-permissions serve || exit 80 + $ "$TESTDIR/hghave" serve || exit 80 $ USERCACHE=`pwd`/cache; export USERCACHE $ mkdir -p ${USERCACHE} $ cat >> $HGRCPATH <