[PATCH] test-hardlinks: add testcase for repo copied with 'cp -al'

Christian Ebert blacktrash at gmx.net
Mon Nov 15 20:17:29 CST 2010


* Adrian Buehlmann on Monday, November 15, 2010 at 23:34:52 +0100
> # HG changeset patch
> # User Adrian Buehlmann <adrian at cadifra.com>
> # Date 1289860194 -3600
> # Node ID 8b4d67efd67b928218ac4fa73ab43d22ff9e8a6c
> # Parent  3a42651b0a62a44012d10e3f4e19230eec3964e5
> test-hardlinks: add testcase for repo copied with 'cp -al'
> 
> This patch adds a case to test-hardlinks.t which demonstrates that
> hardlinks in the working directory are broken up (using 'hg update').
> 
> Motivation for this patch:
> 
> 'hg help clone' shows copying repositories *and* the working directory
> using 'cp -al', creating hardlinks in the *working directory* too (not
> just in the store).

MacOS X' cp (FreeBSD as well?) does not know about the -a or -l options:

ERROR: /Users/chris/hgworkspace/hg-crew-mq/tests/test-hardlinks.t output changed
--- /Users/chris/hgworkspace/hg-crew-mq/tests/test-hardlinks.t
+++ /Users/chris/hgworkspace/hg-crew-mq/tests/test-hardlinks.t.err
@@ -163,57 +163,22 @@
 Create hardlinked copy r4 of r3 using 'cp -al':

   $ cp -al r3 r4
+  cp: illegal option -- a
+  usage: cp [-R [-H | -L | -P]] [-fi | -n] [-pvX] source_file target_file
+         cp [-R [-H | -L | -P]] [-fi | -n] [-pvX] source_file ... target_directory
+  [64]
[...]


I haven't found an equivalent to 'cp -al'.

c
-- 
theatre - books - texts - movies
Black Trash Productions at home: http://www.blacktrash.org
Black Trash Productions on Facebook:
http://www.facebook.com/blacktrashproductions


More information about the Mercurial-devel mailing list