##// END OF EJS Templates
tests: convert some hghave unix-permissions to #if
Mads Kiilerich -
r16986:79902f7e default
parent child Browse files
Show More
@@ -1,5 +1,3 b''
1 $ "$TESTDIR/hghave" unix-permissions || exit 80
2
3 1 $ cat >> $HGRCPATH <<EOF
4 2 > [extensions]
5 3 > convert=
@@ -293,24 +291,27 b''
293 291 pulling from ../a
294 292 searching for changes
295 293 no changes found
296 $ touch bogusfile
297 294
298 should fail
295 conversion to existing file should fail
299 296
297 $ touch bogusfile
300 298 $ hg convert a bogusfile
301 299 initializing destination bogusfile repository
302 300 abort: cannot create new bundle repository
303 301 [255]
302
303 #if unix-permissions
304
305 conversion to dir without permissions should fail
306
304 307 $ mkdir bogusdir
305 308 $ chmod 000 bogusdir
306 309
307 should fail
308
309 310 $ hg convert a bogusdir
310 311 abort: Permission denied: bogusdir
311 312 [255]
312 313
313 should succeed
314 user permissions should succeed
314 315
315 316 $ chmod 700 bogusdir
316 317 $ hg convert a bogusdir
@@ -324,6 +325,8 b' should succeed'
324 325 1 d
325 326 0 e
326 327
328 #endif
329
327 330 test pre and post conversion actions
328 331
329 332 $ echo 'include b' > filemap
@@ -1,5 +1,3 b''
1 $ "$TESTDIR/hghave" unix-permissions || exit 80
2
3 1 Test EOL extension
4 2
5 3 $ cat >> $HGRCPATH <<EOF
@@ -386,10 +384,13 b' Mixed tests'
386 384 % hg status
387 385 $ rm -r mixed
388 386
387 $ echo '[extensions]' >> $HGRCPATH
388 $ echo 'eol =' >> $HGRCPATH
389
390 #if unix-permissions
391
389 392 Test issue2569 -- eol extension takes write lock on reading:
390 393
391 $ echo '[extensions]' >> $HGRCPATH
392 $ echo 'eol =' >> $HGRCPATH
393 394 $ hg init repo
394 395 $ cd repo
395 396 $ touch .hgeol
@@ -403,6 +404,8 b' Test issue2569 -- eol extension takes wr'
403 404 $ chmod -R u+w .hg
404 405 $ cd ..
405 406
407 #endif
408
406 409 Test cleverencode: and cleverdecode: aliases for win32text extension
407 410
408 411 $ echo '[encode]' >> $HGRCPATH
@@ -1,5 +1,3 b''
1 $ "$TESTDIR/hghave" unix-permissions || exit 80
2
3 1 Create user cache directory
4 2
5 3 $ USERCACHE=`pwd`/cache; export USERCACHE
@@ -72,10 +70,12 b' Update working directory to tip, again.'
72 70 0 largefiles updated, 0 removed
73 71 $ hg status
74 72 ! large
73 $ cd ..
74
75 #if unix-permissions
75 76
76 77 Portable way to print file permissions:
77 78
78 $ cd ..
79 79 $ cat > ls-l.py <<EOF
80 80 > #!/usr/bin/env python
81 81 > import sys, os
@@ -121,3 +121,5 b' Test permission of files created by push'
121 121 640
122 122
123 123 $ cd ..
124
125 #endif
@@ -1,4 +1,4 b''
1 $ "$TESTDIR/hghave" unix-permissions serve || exit 80
1 $ "$TESTDIR/hghave" serve || exit 80
2 2 $ USERCACHE=`pwd`/cache; export USERCACHE
3 3 $ mkdir -p ${USERCACHE}
4 4 $ cat >> $HGRCPATH <<EOF
@@ -1018,6 +1018,8 b' Push a largefiles repository to a served'
1018 1018 used all HGPORTs, kill all daemons
1019 1019 $ "$TESTDIR/killdaemons.py"
1020 1020
1021 #if unix-permissions
1022
1021 1023 Clone a local repository owned by another user
1022 1024 We have to simulate that here by setting $HOME and removing write permissions
1023 1025 $ ORIGHOME="$HOME"
@@ -1051,6 +1053,8 b' We have to simulate that here by setting'
1051 1053 $ chmod -R u+w alice/pubrepo
1052 1054 $ HOME="$ORIGHOME"
1053 1055
1056 #endif
1057
1054 1058 #if symlink
1055 1059
1056 1060 Symlink to a large largefile should behave the same as a symlink to a normal file
General Comments 0
You need to be logged in to leave comments. Login now