# HG changeset patch # User Arseniy Alekseyev # Date 1661853152 -3600 # Node ID b10e4c19f8c5f6633fc41efb36f3d1bad76c0cef # Parent 5579a5e18a9b37a8a68e3e45a828eade772e638c tests: improve portability by no longer using the flag [tar --force-local] A different way of making sure the path is not interpreted as a URL is to never give this path to [tar], instead making tar read from stdin. diff -r 5579a5e18a9b -r b10e4c19f8c5 tests/test-issue6528.t --- a/tests/test-issue6528.t Thu Aug 25 16:53:56 2022 +0100 +++ b/tests/test-issue6528.t Tue Aug 30 10:52:32 2022 +0100 @@ -177,14 +177,7 @@ $ cd .. $ mkdir repo-to-fix $ cd repo-to-fix -#if windows -tar interprets `:` in paths (like `C:`) as being remote, force local on Windows -only since some versions of tar don't have this flag. - - $ tar --force-local -xf $TESTDIR/bundles/issue6528.tar -#else - $ tar xf $TESTDIR/bundles/issue6528.tar -#endif + $ tar -x < $TESTDIR/bundles/issue6528.tar Check that the issue is present (It is currently not present with rhg but will be when optimizations are added @@ -285,14 +278,7 @@ $ cd .. $ mkdir repo-to-fix-report $ cd repo-to-fix -#if windows -tar interprets `:` in paths (like `C:`) as being remote, force local on Windows -only since some versions of tar don't have this flag. - - $ tar --force-local -xf $TESTDIR/bundles/issue6528.tar -#else - $ tar xf $TESTDIR/bundles/issue6528.tar -#endif + $ tar -x < "$TESTDIR"/bundles/issue6528.tar $ hg debug-repair-issue6528 --to-report $TESTTMP/report.txt found affected revision 1 for filelog 'data/D.txt.i' @@ -379,14 +365,7 @@ $ mkdir repo-to-fix-not-inline $ cd repo-to-fix-not-inline -#if windows -tar interprets `:` in paths (like `C:`) as being remote, force local on Windows -only since some versions of tar don't have this flag. - - $ tar --force-local -xf $TESTDIR/bundles/issue6528.tar -#else - $ tar xf $TESTDIR/bundles/issue6528.tar -#endif + $ tar -x < "$TESTDIR"/bundles/issue6528.tar $ echo b >> b.txt $ hg commit -qm "inline -> separate" $ find .hg -name *b.txt.d diff -r 5579a5e18a9b -r b10e4c19f8c5 tests/test-revlog.t --- a/tests/test-revlog.t Thu Aug 25 16:53:56 2022 +0100 +++ b/tests/test-revlog.t Tue Aug 30 10:52:32 2022 +0100 @@ -73,7 +73,7 @@ - hg commit -Am_ - remove some cache files - $ tar --force-local -xf "$TESTDIR"/bundles/test-revlog-diff-relative-to-nullrev.tar + $ tar -x < "$TESTDIR"/bundles/test-revlog-diff-relative-to-nullrev.tar $ cd nullrev-diff $ hg debugdeltachain a rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks