tests: replace "cp -r" with "cp -R"
authorJun Wu <quark@fb.com>
Wed, 30 Nov 2016 19:25:18 +0000
changeset 35027 c059286a0f9c4079515bbc5a9e2320ed63912c9c
parent 35026 6a672c3b7860d66fecfab3dffc73c7dfe45f7ff7
child 35028 cbeb54ec0481a4bf9723ba4b80a5861a813c8531
push id413
push usergszorc@mozilla.com
push dateSat, 03 Dec 2016 01:28:23 +0000
tests: replace "cp -r" with "cp -R" The POSIX documentation about "cp" [1] says: .... RATIONALE .... Earlier versions of this standard included support for the -r option to copy file hierarchies. The -r option is historical practice on BSD and BSD-derived systems. This option is no longer specified by POSIX.1-2008 but may be present in some implementations. The -R option was added as a close synonym to the -r option, selected for consistency with all other options in this volume of POSIX.1-2008 that do recursive directory descent. The difference between -R and the removed -r option is in the treatment by cp of file types other than regular and directory. It was implementation-defined how the - option treated special files to allow both historical implementations and those that chose to support -r with the same abilities as -R defined by this volume of POSIX.1-2008. The original -r flag, for historic reasons, did not handle special files any differently from regular files, but always read the file and copied its contents. This had obvious problems in the presence of special file types; for example, character devices, FIFOs, and sockets. .... .... Issue 6 The -r option is marked obsolescent. .... Issue 7 .... The obsolescent -r option is removed. .... (No "Issue 8" yet) Therefore it's clear that "cp -R" is strictly better than "cp -r". The issue was discovered when running tests on OS X after 0d87b1caed92. [1]: pubs.opengroup.org/onlinepubs/9699919799/utilities/cp.html
tests/test-bookmarks.t
tests/test-histedit-obsolete.t
tests/test-obsolete-checkheads.t
tests/test-revert.t
tests/test-subrepo.t
tests/test-treemanifest.t
tests/test-verify.t
--- a/tests/test-bookmarks.t
+++ b/tests/test-bookmarks.t
@@ -567,18 +567,18 @@ update to active bookmark if it's not th
      Y                         2:db815d6d32e6
    * Z                         3:125c9a1d6df6
      x  y                      2:db815d6d32e6
 
 pull --update works the same as pull && update
 
   $ hg bookmark -r3 Y
   moving bookmark 'Y' forward from db815d6d32e6
-  $ cp -r  ../cloned-bookmarks-update ../cloned-bookmarks-manual-update
-  $ cp -r  ../cloned-bookmarks-update ../cloned-bookmarks-manual-update-with-divergence
+  $ cp -R ../cloned-bookmarks-update ../cloned-bookmarks-manual-update
+  $ cp -R ../cloned-bookmarks-update ../cloned-bookmarks-manual-update-with-divergence
 
 (manual version)
 
   $ hg -R ../cloned-bookmarks-manual-update update Y
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   (activating bookmark Y)
   $ hg -R ../cloned-bookmarks-manual-update pull .
   pulling from .
--- a/tests/test-histedit-obsolete.t
+++ b/tests/test-histedit-obsolete.t
@@ -334,17 +334,17 @@ Prepare further testing
 simple phase conservation
 -------------------------------------------
 
 Resulting changeset should conserve the phase of the original one whatever the
 phases.new-commit option is.
 
 New-commit as draft (default)
 
-  $ cp -r base simple-draft
+  $ cp -R base simple-draft
   $ cd simple-draft
   $ hg histedit -r 'b449568bf7fc' --commands - << EOF
   > edit b449568bf7fc 11 f
   > pick 6b70183d2492 12 g
   > pick 7395e1ff83bd 13 h
   > pick b605fb7503f2 14 i
   > pick 3a6c53ee7f3d 15 j
   > pick ee118ab9fa44 16 k
@@ -373,17 +373,17 @@ New-commit as draft (default)
   |
   o  0:cb9a9f314b8b (public) a
   
   $ cd ..
 
 
 New-commit as secret (config)
 
-  $ cp -r base simple-secret
+  $ cp -R base simple-secret
   $ cd simple-secret
   $ cat >> .hg/hgrc << EOF
   > [phases]
   > new-commit=secret
   > EOF
   $ hg histedit -r 'b449568bf7fc' --commands - << EOF
   > edit b449568bf7fc 11 f
   > pick 6b70183d2492 12 g
@@ -420,17 +420,17 @@ New-commit as secret (config)
 
 
 Changeset reordering
 -------------------------------------------
 
 If a secret changeset is put before a draft one, all descendant should be secret.
 It seems more important to present the secret phase.
 
-  $ cp -r base reorder
+  $ cp -R base reorder
   $ cd reorder
   $ hg histedit -r 'b449568bf7fc' --commands - << EOF
   > pick b449568bf7fc 11 f
   > pick 3a6c53ee7f3d 15 j
   > pick 6b70183d2492 12 g
   > pick b605fb7503f2 14 i
   > pick 7395e1ff83bd 13 h
   > pick ee118ab9fa44 16 k
@@ -457,17 +457,17 @@ It seems more important to present the s
 Changeset folding
 -------------------------------------------
 
 Folding a secret changeset with a draft one turn the result secret (again,
 better safe than sorry). Folding between same phase changeset still works
 
 Note that there is a few reordering in this series for more extensive test
 
-  $ cp -r base folding
+  $ cp -R base folding
   $ cd folding
   $ cat >> .hg/hgrc << EOF
   > [phases]
   > new-commit=secret
   > EOF
   $ hg histedit -r 'b449568bf7fc' --commands - << EOF
   > pick 7395e1ff83bd 13 h
   > fold b449568bf7fc 11 f
--- a/tests/test-obsolete-checkheads.t
+++ b/tests/test-obsolete-checkheads.t
@@ -18,17 +18,17 @@ Check that obsolete properly strip heads
   > }
 
 
   $ hg init remote
   $ cd remote
   $ mkcommit base
   $ hg phase --public .
   $ cd ..
-  $ cp -r remote base
+  $ cp -R remote base
   $ hg clone remote local
   updating to branch default
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cd local
 
 New head replaces old head
 ==========================
 
@@ -49,17 +49,17 @@ setup
   $ hg debugobsolete --flags 1 `getid old` `getid new`
   $ hg log -G --hidden
   @  71e3228bffe1 (draft) add new
   |
   | x  c70b08862e08 (draft) add old
   |/
   o  b4952fcf48cf (public) add base
   
-  $ cp -r ../remote ../backup1
+  $ cp -R ../remote ../backup1
 
 old exists remotely as draft. It is obsoleted by new that we now push.
 Push should not warn about creating new head
 
   $ hg push
   pushing to $TESTTMP/remote (glob)
   searching for changes
   adding changesets
@@ -68,17 +68,17 @@ Push should not warn about creating new 
   added 1 changesets with 1 changes to 1 files (+1 heads)
 
 old head is now public (public local version)
 =============================================
 
 setup
 
   $ rm -fr ../remote
-  $ cp -r ../backup1 ../remote
+  $ cp -R ../backup1 ../remote
   $ hg -R ../remote phase --public c70b08862e08
   $ hg pull -v
   pulling from $TESTTMP/remote (glob)
   searching for changes
   no changes found
   $ hg log -G --hidden
   @  71e3228bffe1 (draft) add new
   |
@@ -99,17 +99,17 @@ Abort: old will still be an head because
 old head is now public (public remote version)
 ==============================================
 
 TODO: Not implemented yet.
 
 # setup
 #
 #   $ rm -fr ../remote
-#   $ cp -r ../backup1 ../remote
+#   $ cp -R ../backup1 ../remote
 #   $ hg -R ../remote phase --public c70b08862e08
 #   $ hg phase --draft --force c70b08862e08
 #   $ hg log -G --hidden
 #   @  71e3228bffe1 (draft) add new
 #   |
 #   | x  c70b08862e08 (draft) add old
 #   |/
 #   o  b4952fcf48cf (public) add base
@@ -126,17 +126,17 @@ TODO: Not implemented yet.
 #   [255]
 
 old head is obsolete but replacement is not pushed
 ==================================================
 
 setup
 
   $ rm -fr ../remote
-  $ cp -r ../backup1 ../remote
+  $ cp -R ../backup1 ../remote
   $ hg phase --draft --force '(0::) - 0'
   $ hg up -q '.^'
   $ mkcommit other
   created new head
   $ hg log -G --hidden
   @  d7d41ccbd4de (draft) add other
   |
   | o  71e3228bffe1 (draft) add new
@@ -201,17 +201,17 @@ setup. (The obsolete marker is known loc
   
   $ hg log -G --hidden -R ../remote
   o  71e3228bffe1 (draft) add new
   |
   | o  c70b08862e08 (draft) add old
   |/
   @  b4952fcf48cf (public) add base
   
-  $ cp -r ../remote ../backup2
+  $ cp -R ../remote ../backup2
 
 Push should not warn about adding new heads. We create one, but we'll delete
 one anyway.
 
   $ hg push
   pushing to $TESTTMP/remote (glob)
   searching for changes
   adding changesets
@@ -221,17 +221,17 @@ one anyway.
 
 
 Remote head is unknown but obsoleted by a local changeset
 =========================================================
 
 setup
 
   $ rm -fr ../remote
-  $ cp -r ../backup1 ../remote
+  $ cp -R ../backup1 ../remote
   $ cd ..
   $ rm -rf local
   $ hg clone remote local -r 0
   adding changesets
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
   updating to branch default
--- a/tests/test-revert.t
+++ b/tests/test-revert.t
@@ -779,17 +779,17 @@ Setup working directory
 
   $ cd ..
 
 Test revert --all to parent content
 -----------------------------------
 
 (setup from reference repo)
 
-  $ cp -r revert-ref revert-parent-all
+  $ cp -R revert-ref revert-parent-all
   $ cd revert-parent-all
 
 check revert output
 
   $ hg revert --all
   undeleting content1_content1_content1-untracked
   reverting content1_content1_content3-tracked
   undeleting content1_content1_content3-untracked
@@ -836,17 +836,17 @@ additional `.orig` backup file when appl
   +content3 missing_missing_content3-tracked
   +content3 missing_missing_content3-untracked
 
 Test revert --all to "base" content
 -----------------------------------
 
 (setup from reference repo)
 
-  $ cp -r revert-ref revert-base-all
+  $ cp -R revert-ref revert-base-all
   $ cd revert-base-all
 
 check revert output
 
   $ hg revert --all --rev 'desc(base)'
   undeleting content1_content1_content1-untracked
   reverting content1_content1_content3-tracked
   undeleting content1_content1_content3-untracked
@@ -891,17 +891,17 @@ additional `.orig` backup file when appl
   +content3 missing_missing_content3-tracked
   +content3 missing_missing_content3-untracked
 
 Test revert to parent content with explicit file name
 -----------------------------------------------------
 
 (setup from reference repo)
 
-  $ cp -r revert-ref revert-parent-explicit
+  $ cp -R revert-ref revert-parent-explicit
   $ cd revert-parent-explicit
 
 revert all files individually and check the output
 (output is expected to be different than in the --all case)
 
   $ for file in `python $TESTDIR/generate-working-copy-states.py filelist 2`; do
   >   echo '### revert for:' $file;
   >   hg revert $file;
@@ -984,17 +984,17 @@ check resulting directory against the --
   $ diff -U 0 -- content-parent-all.txt content-parent-explicit.txt | grep _
   [1]
 
 Test revert to "base" content with explicit file name
 -----------------------------------------------------
 
 (setup from reference repo)
 
-  $ cp -r revert-ref revert-base-explicit
+  $ cp -R revert-ref revert-base-explicit
   $ cd revert-base-explicit
 
 revert all files individually and check the output
 (output is expected to be different than in the --all case)
 
   $ for file in `python $TESTDIR/generate-working-copy-states.py filelist 2`; do
   >   echo '### revert for:' $file;
   >   hg revert $file --rev 'desc(base)';
--- a/tests/test-subrepo.t
+++ b/tests/test-subrepo.t
@@ -1513,18 +1513,18 @@ Forgetting an explicit path in a subrepo
   $ hg st -S
   ? s/f19
   $ rm s/f19
   $ cd ..
 
 Courtesy phases synchronisation to publishing server does not block the push
 (issue3781)
 
-  $ cp -r main issue3781
-  $ cp -r main issue3781-dest
+  $ cp -R main issue3781
+  $ cp -R main issue3781-dest
   $ cd issue3781-dest/s
   $ hg phase tip # show we have draft changeset
   5: draft
   $ chmod a-w .hg/store/phaseroots # prevent phase push
   $ cd ../../issue3781
   $ cat >> .hg/hgrc << EOF
   > [paths]
   > default=../issue3781-dest/
--- a/tests/test-treemanifest.t
+++ b/tests/test-treemanifest.t
@@ -453,66 +453,66 @@ Test files from the root.
   d.py
 
 Excludes with a glob should not exclude everything from the glob's root
 
   $ hg files -r . -X 'b/fo?' b
   b/bar/fruits.txt (glob)
   b/bar/orange/fly/gnat.py (glob)
   b/bar/orange/fly/housefly.txt (glob)
-  $ cp -r .hg/store .hg/store-copy
+  $ cp -R .hg/store .hg/store-copy
 
 Test files for a subdirectory.
 
   $ rm -r .hg/store/meta/~2e_a
   $ hg files -r . b
   b/bar/fruits.txt (glob)
   b/bar/orange/fly/gnat.py (glob)
   b/bar/orange/fly/housefly.txt (glob)
   b/foo/apple/bees/flower.py (glob)
-  $ cp -r .hg/store-copy/. .hg/store
+  $ cp -R .hg/store-copy/. .hg/store
 
 Test files with just includes and excludes.
 
   $ rm -r .hg/store/meta/~2e_a
   $ rm -r .hg/store/meta/b/bar/orange/fly
   $ rm -r .hg/store/meta/b/foo/apple/bees
   $ hg files -r . -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees
   b/bar/fruits.txt (glob)
-  $ cp -r .hg/store-copy/. .hg/store
+  $ cp -R .hg/store-copy/. .hg/store
 
 Test files for a subdirectory, excluding a directory within it.
 
   $ rm -r .hg/store/meta/~2e_a
   $ rm -r .hg/store/meta/b/foo
   $ hg files -r . -X path:b/foo b
   b/bar/fruits.txt (glob)
   b/bar/orange/fly/gnat.py (glob)
   b/bar/orange/fly/housefly.txt (glob)
-  $ cp -r .hg/store-copy/. .hg/store
+  $ cp -R .hg/store-copy/. .hg/store
 
 Test files for a sub directory, including only a directory within it, and
 including an unrelated directory.
 
   $ rm -r .hg/store/meta/~2e_a
   $ rm -r .hg/store/meta/b/foo
   $ hg files -r . -I path:b/bar/orange -I path:a b
   b/bar/orange/fly/gnat.py (glob)
   b/bar/orange/fly/housefly.txt (glob)
-  $ cp -r .hg/store-copy/. .hg/store
+  $ cp -R .hg/store-copy/. .hg/store
 
 Test files for a pattern, including a directory, and excluding a directory
 within that.
 
   $ rm -r .hg/store/meta/~2e_a
   $ rm -r .hg/store/meta/b/foo
   $ rm -r .hg/store/meta/b/bar/orange
   $ hg files -r . glob:**.txt -I path:b/bar -X path:b/bar/orange
   b/bar/fruits.txt (glob)
-  $ cp -r .hg/store-copy/. .hg/store
+  $ cp -R .hg/store-copy/. .hg/store
 
 Add some more changes to the deep repo
   $ echo narf >> b/bar/fruits.txt
   $ hg ci -m narf
   $ echo troz >> b/bar/orange/fly/gnat.py
   $ hg ci -m troz
 
 Verify works
@@ -548,17 +548,17 @@ Rebuilt fncache includes dirlogs
   adding meta/b/foo/apple/00manifest.i
   adding meta/b/foo/apple/bees/00manifest.i
   16 items added, 0 removed from fncache
 
 Finish first server
   $ killdaemons.py
 
 Back up the recently added revlogs
-  $ cp -r .hg/store .hg/store-newcopy
+  $ cp -R .hg/store .hg/store-newcopy
 
 Verify reports missing dirlog
   $ rm .hg/store/meta/b/00manifest.*
   $ hg verify
   checking changesets
   checking manifests
   checking directory manifests
    0: empty or missing b/
@@ -577,17 +577,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 -r .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
@@ -602,17 +602,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 -r .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 \
--- a/tests/test-verify.t
+++ b/tests/test-verify.t
@@ -64,66 +64,66 @@ introduce some bugs in repo
   $ cd ..
 
 Set up a repo for testing missing revlog entries
 
   $ hg init missing-entries
   $ cd missing-entries
   $ echo 0 > file
   $ hg ci -Aqm0
-  $ cp -r .hg/store .hg/store-partial
+  $ cp -R .hg/store .hg/store-partial
   $ echo 1 > file
   $ hg ci -Aqm1
-  $ cp -r .hg/store .hg/store-full
+  $ cp -R .hg/store .hg/store-full
 
 Entire changelog missing
 
   $ rm .hg/store/00changelog.*
   $ hg verify -q
    0: empty or missing changelog
    manifest@0: d0b6632564d4 not in changesets
    manifest@1: 941fc4534185 not in changesets
   3 integrity errors encountered!
   (first damaged changeset appears to be 0)
   [1]
-  $ cp -r .hg/store-full/. .hg/store
+  $ cp -R .hg/store-full/. .hg/store
 
 Entire manifest log missing
 
   $ rm .hg/store/00manifest.*
   $ hg verify -q
    0: empty or missing manifest
   1 integrity errors encountered!
   (first damaged changeset appears to be 0)
   [1]
-  $ cp -r .hg/store-full/. .hg/store
+  $ cp -R .hg/store-full/. .hg/store
 
 Entire filelog missing
 
   $ rm .hg/store/data/file.*
   $ hg verify -q
    warning: revlog 'data/file.i' not in fncache!
    0: empty or missing file
    file@0: manifest refers to unknown revision 362fef284ce2
    file@1: manifest refers to unknown revision c10f2164107d
   1 warnings encountered!
   hint: run "hg debugrebuildfncache" to recover from corrupt fncache
   3 integrity errors encountered!
   (first damaged changeset appears to be 0)
   [1]
-  $ cp -r .hg/store-full/. .hg/store
+  $ cp -R .hg/store-full/. .hg/store
 
 Entire changelog and manifest log missing
 
   $ rm .hg/store/00changelog.*
   $ rm .hg/store/00manifest.*
   $ hg verify -q
   warning: orphan revlog 'data/file.i'
   1 warnings encountered!
-  $ cp -r .hg/store-full/. .hg/store
+  $ cp -R .hg/store-full/. .hg/store
 
 Entire changelog and filelog missing
 
   $ rm .hg/store/00changelog.*
   $ rm .hg/store/data/file.*
   $ hg verify -q
    0: empty or missing changelog
    manifest@0: d0b6632564d4 not in changesets
@@ -132,141 +132,141 @@ Entire changelog and filelog missing
    ?: empty or missing file
    file@0: manifest refers to unknown revision 362fef284ce2
    file@1: manifest refers to unknown revision c10f2164107d
   1 warnings encountered!
   hint: run "hg debugrebuildfncache" to recover from corrupt fncache
   6 integrity errors encountered!
   (first damaged changeset appears to be 0)
   [1]
-  $ cp -r .hg/store-full/. .hg/store
+  $ cp -R .hg/store-full/. .hg/store
 
 Entire manifest log and filelog missing
 
   $ rm .hg/store/00manifest.*
   $ rm .hg/store/data/file.*
   $ hg verify -q
    0: empty or missing manifest
    warning: revlog 'data/file.i' not in fncache!
    0: empty or missing file
   1 warnings encountered!
   hint: run "hg debugrebuildfncache" to recover from corrupt fncache
   2 integrity errors encountered!
   (first damaged changeset appears to be 0)
   [1]
-  $ cp -r .hg/store-full/. .hg/store
+  $ cp -R .hg/store-full/. .hg/store
 
 Changelog missing entry
 
   $ cp -f .hg/store-partial/00changelog.* .hg/store
   $ hg verify -q
    manifest@?: rev 1 points to nonexistent changeset 1
    manifest@?: 941fc4534185 not in changesets
    file@?: rev 1 points to nonexistent changeset 1
    (expected 0)
   1 warnings encountered!
   3 integrity errors encountered!
   [1]
-  $ cp -r .hg/store-full/. .hg/store
+  $ cp -R .hg/store-full/. .hg/store
 
 Manifest log missing entry
 
   $ cp -f .hg/store-partial/00manifest.* .hg/store
   $ hg verify -q
    manifest@1: changeset refers to unknown revision 941fc4534185
    file@1: c10f2164107d not in manifests
   2 integrity errors encountered!
   (first damaged changeset appears to be 1)
   [1]
-  $ cp -r .hg/store-full/. .hg/store
+  $ cp -R .hg/store-full/. .hg/store
 
 Filelog missing entry
 
   $ cp -f .hg/store-partial/data/file.* .hg/store/data
   $ hg verify -q
    file@1: manifest refers to unknown revision c10f2164107d
   1 integrity errors encountered!
   (first damaged changeset appears to be 1)
   [1]
-  $ cp -r .hg/store-full/. .hg/store
+  $ cp -R .hg/store-full/. .hg/store
 
 Changelog and manifest log missing entry
 
   $ cp -f .hg/store-partial/00changelog.* .hg/store
   $ cp -f .hg/store-partial/00manifest.* .hg/store
   $ hg verify -q
    file@?: rev 1 points to nonexistent changeset 1
    (expected 0)
    file@?: c10f2164107d not in manifests
   1 warnings encountered!
   2 integrity errors encountered!
   [1]
-  $ cp -r .hg/store-full/. .hg/store
+  $ cp -R .hg/store-full/. .hg/store
 
 Changelog and filelog missing entry
 
   $ cp -f .hg/store-partial/00changelog.* .hg/store
   $ cp -f .hg/store-partial/data/file.* .hg/store/data
   $ hg verify -q
    manifest@?: rev 1 points to nonexistent changeset 1
    manifest@?: 941fc4534185 not in changesets
    file@?: manifest refers to unknown revision c10f2164107d
   3 integrity errors encountered!
   [1]
-  $ cp -r .hg/store-full/. .hg/store
+  $ cp -R .hg/store-full/. .hg/store
 
 Manifest and filelog missing entry
 
   $ cp -f .hg/store-partial/00manifest.* .hg/store
   $ cp -f .hg/store-partial/data/file.* .hg/store/data
   $ hg verify -q
    manifest@1: changeset refers to unknown revision 941fc4534185
   1 integrity errors encountered!
   (first damaged changeset appears to be 1)
   [1]
-  $ cp -r .hg/store-full/. .hg/store
+  $ cp -R .hg/store-full/. .hg/store
 
 Corrupt changelog base node to cause failure to read revision
 
   $ printf abcd | dd conv=notrunc of=.hg/store/00changelog.i bs=1 seek=16 \
   >   2> /dev/null
   $ hg verify -q
    0: unpacking changeset 08b1860757c2: * (glob)
    manifest@?: rev 0 points to unexpected changeset 0
    manifest@?: d0b6632564d4 not in changesets
    file@?: rev 0 points to unexpected changeset 0
    (expected 1)
   1 warnings encountered!
   4 integrity errors encountered!
   (first damaged changeset appears to be 0)
   [1]
-  $ cp -r .hg/store-full/. .hg/store
+  $ cp -R .hg/store-full/. .hg/store
 
 Corrupt manifest log base node to cause failure to read revision
 
   $ printf abcd | dd conv=notrunc of=.hg/store/00manifest.i bs=1 seek=16 \
   >   2> /dev/null
   $ hg verify -q
    manifest@0: reading delta d0b6632564d4: * (glob)
    file@0: 362fef284ce2 not in manifests
   2 integrity errors encountered!
   (first damaged changeset appears to be 0)
   [1]
-  $ cp -r .hg/store-full/. .hg/store
+  $ cp -R .hg/store-full/. .hg/store
 
 Corrupt filelog base node to cause failure to read revision
 
   $ printf abcd | dd conv=notrunc of=.hg/store/data/file.i bs=1 seek=16 \
   >   2> /dev/null
   $ hg verify -q
    file@0: unpacking 362fef284ce2: * (glob)
   1 integrity errors encountered!
   (first damaged changeset appears to be 0)
   [1]
-  $ cp -r .hg/store-full/. .hg/store
+  $ cp -R .hg/store-full/. .hg/store
 
   $ cd ..
 
 test changelog without a manifest
 
   $ hg init b
   $ cd b
   $ hg branch foo