# HG changeset patch # User Mads Kiilerich # Date 2012-06-10 16:50:42 # Node ID 6a997aacba5d18ae2837943627d1a06f954e52c2 # Parent 91dc9587862ed60a526e6230c43660619a0f0d6c tests: convert some 'hghave symlink' to #if This will enable some tests for windows. diff --git a/tests/test-audit-path.t b/tests/test-audit-path.t --- a/tests/test-audit-path.t +++ b/tests/test-audit-path.t @@ -1,28 +1,24 @@ - $ "$TESTDIR/hghave" symlink || exit 80 - $ hg init -should fail +audit of .hg $ hg add .hg/00changelog.i abort: path contains illegal component: .hg/00changelog.i (glob) [255] +#if symlink + +Symlinks + $ mkdir a $ echo a > a/a $ hg ci -Ama adding a/a $ ln -s a b $ echo b > a/b - -should fail - $ hg add b/b abort: path 'b/b' traverses symbolic link 'b' (glob) [255] - -should succeed - $ hg add b should still fail - maybe @@ -31,6 +27,9 @@ should still fail - maybe abort: path 'b/b' traverses symbolic link 'b' (glob) [255] +#endif + + unbundle tampered bundle $ hg init target @@ -47,7 +46,7 @@ attack .hg/test $ hg manifest -r0 .hg/test $ hg update -Cr0 - abort: path contains illegal component: .hg/test + abort: path contains illegal component: .hg/test (glob) [255] attack foo/.hg/test @@ -55,7 +54,7 @@ attack foo/.hg/test $ hg manifest -r1 foo/.hg/test $ hg update -Cr1 - abort: path 'foo/.hg/test' is inside nested repo 'foo' + abort: path 'foo/.hg/test' is inside nested repo 'foo' (glob) [255] attack back/test where back symlinks to .. @@ -63,16 +62,23 @@ attack back/test where back symlinks to $ hg manifest -r2 back back/test +#if symlink $ hg update -Cr2 abort: path 'back/test' traverses symbolic link 'back' [255] +#else +('back' will be a file and cause some other system specific error) + $ hg update -Cr2 + abort: * (glob) + [255] +#endif attack ../test $ hg manifest -r3 ../test $ hg update -Cr3 - abort: path contains illegal component: ../test + abort: path contains illegal component: ../test (glob) [255] attack /tmp/test diff --git a/tests/test-keyword.t b/tests/test-keyword.t --- a/tests/test-keyword.t +++ b/tests/test-keyword.t @@ -1,4 +1,4 @@ - $ "$TESTDIR/hghave" symlink unix-permissions serve || exit 80 + $ "$TESTDIR/hghave" unix-permissions serve || exit 80 $ cat <> $HGRCPATH > [extensions] @@ -658,6 +658,8 @@ Status after rollback: $ hg update --clean 0 files updated, 0 files merged, 0 files removed, 0 files unresolved +#if symlink + cp symlink file; hg cp -A symlink file (part2) - copied symlink points to kw ignored file: do not overwrite @@ -679,6 +681,8 @@ cp symlink file; hg cp -A symlink file ( 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ rm i symignored +#endif + Custom keywordmaps as argument to kwdemo $ hg --quiet kwdemo "Xinfo = {author}: {desc}" diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t --- a/tests/test-largefiles.t +++ b/tests/test-largefiles.t @@ -1,4 +1,4 @@ - $ "$TESTDIR/hghave" symlink unix-permissions serve || exit 80 + $ "$TESTDIR/hghave" unix-permissions serve || exit 80 $ USERCACHE=`pwd`/cache; export USERCACHE $ mkdir -p ${USERCACHE} $ cat >> $HGRCPATH <> $HGRCPATH < [extensions] > largefiles = @@ -33,6 +31,7 @@ adding sub/normal2 $ hg commit -m"add large, normal1" large normal1 $ hg commit -m"add sub/*" sub + Test tag parsing $ cat >> .hgtags < IncorrectlyFormattedTag! @@ -41,10 +40,8 @@ Test tag parsing > EOF $ hg add .hgtags $ hg commit -m"add large2" large2 .hgtags - $ hg rename large2 large3 + Test link+rename largefile codepath - $ ln -sf large large3 - $ hg commit -m"make large2 a symlink" large2 large3 $ [ -d .hg/largefiles ] && echo fail || echo pass pass $ cd .. @@ -53,13 +50,24 @@ Test link+rename largefile codepath skipping incorrectly formatted tag IncorrectlyFormattedTag! skipping incorrectly formatted id invalidhash no mapping for id 0123456789abcdef +#if symlink + $ hg --cwd bigfile-repo rename large2 large3 + $ ln -sf large bigfile-repo/large3 + $ hg --cwd bigfile-repo commit -m"make large2 a symlink" large2 large3 + $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo-symlink + initializing destination largefiles-repo-symlink + skipping incorrectly formatted tag IncorrectlyFormattedTag! + skipping incorrectly formatted id invalidhash + no mapping for id 0123456789abcdef abort: renamed/copied largefile large3 becomes symlink [255] +#endif $ cd bigfile-repo $ hg strip --no-backup 2 0 files updated, 0 files merged, 2 files removed, 0 files unresolved $ cd .. - $ rm -rf largefiles-repo + $ rm -rf largefiles-repo largefiles-repo-symlink + $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo initializing destination largefiles-repo