[PATCH 1 of 4] tests: Solaris cp doesn't support the -T option
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Thu Mar 3 03:52:54 EST 2016
At Wed, 02 Mar 2016 15:22:20 -0800,
danek.duvall at oracle.com wrote:
>
> # HG changeset patch
> # User Danek Duvall <danek.duvall at oracle.com>
> # Date 1456959037 28800
> # Wed Mar 02 14:50:37 2016 -0800
> # Node ID 47d43135bf430d7172c8fb8fe35fb17b6f8f029c
> # Parent c7f89ad87baef87f00c507545dfd4cc824bc3131
> tests: Solaris cp doesn't support the -T option
>
> The treemanifest tests use the -T option to cp in order to ensure that the
> two directories named on the commandline are treated as peers, rather than
> the usual behavior when the final argument is a directory. GNU cp has this
> option, but other implementations may not. Thankfully, there's no pressing
> reason to use it. We can simply copy the contents of the first directory
> into the target directory, since we know that the target directory already
> exists.
I confirmed that #1, #2 and #4 fix test portability problem on
Solaris.
To avoid re-raising "cp -T" problem in the future, it would be
desirable to add new detection rule for usage of "cp -T" to
contrib/check-code.py.
> diff --git a/tests/test-treemanifest.t b/tests/test-treemanifest.t
> --- a/tests/test-treemanifest.t
> +++ b/tests/test-treemanifest.t
> @@ -541,7 +541,7 @@ Verify reports missing dirlog
> 8 integrity errors encountered!
> (first damaged changeset appears to be 0)
> [1]
> - $ cp -rT .hg/store-newcopy .hg/store
> + $ cp -r .hg/store-newcopy/* .hg/store
>
> Verify reports missing dirlog entry
> $ mv -f .hg/store-copy/meta/b/00manifest.* .hg/store/meta/b/
> @@ -566,7 +566,7 @@ Verify reports missing dirlog entry
> 8 integrity errors encountered!
> (first damaged changeset appears to be 1)
> [1]
> - $ cp -rT .hg/store-newcopy .hg/store
> + $ cp -r .hg/store-newcopy/* .hg/store
>
> Test cloning a treemanifest repo over http.
> $ hg serve -p $HGPORT -d --pid-file=hg.pid --errorlog=errors.log
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
----------------------------------------------------------------------
[FUJIWARA Katsunori] foozy at lares.dti.ne.jp
More information about the Mercurial-devel
mailing list