tests: Solaris cp doesn't support the -T option
authorDanek Duvall <danek.duvall@oracle.com>
Wed, 02 Mar 2016 14:50:37 -0800
changeset 30544 515018f64c41c804bf9844f755141e377687599e
parent 30543 9dc340f51e06e84a33cf0e481068491c254c4a9b
child 30545 a5a13eeffc598c2790caa3dd32494fded4d1ac01
push id197
push usergszorc@mozilla.com
push dateFri, 11 Mar 2016 23:55:12 +0000
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.
tests/test-treemanifest.t
--- a/tests/test-treemanifest.t
+++ b/tests/test-treemanifest.t
@@ -536,17 +536,17 @@ Verify reports missing dirlog
    b/bar/orange/fly/housefly.txt@0: in changeset but not in manifest
    b/foo/apple/bees/flower.py@0: in changeset but not in manifest
   checking files
   8 files, 3 changesets, 10 total revisions
   6 warnings encountered!
   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/
   $ hg verify
   checking changesets
   checking manifests
   checking directory manifests
    b/@1: parent-directory manifest refers to unknown revision f38e85d334c5
@@ -561,17 +561,17 @@ Verify reports missing dirlog entry
    (expected None)
   crosschecking files in changesets and manifests
   checking files
   8 files, 3 changesets, 10 total revisions
   2 warnings encountered!
   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
   $ cat hg.pid >> $DAEMON_PIDS
   $ cd ..
 We can clone even with the knob turned off and we'll get a treemanifest repo.
   $ hg clone --config experimental.treemanifest=False \
   >   --config experimental.changegroup3=True \