[PATCH 1 of 4] tests: Solaris cp doesn't support the -T option

danek.duvall at oracle.com danek.duvall at oracle.com
Wed Mar 2 23:22:20 UTC 2016


# 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.

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


More information about the Mercurial-devel mailing list