[PATCH] Make test-hardlinks-safety portable
Christian Ebert
blacktrash at gmx.net
Fri Aug 15 09:21:51 UTC 2008
Play it again with terser commit message.
>From man cp on MacOS X:
|Note that cp copies hard linked files as separate files. If you
|need to preserve hard links, consider using tar(1), cpio(1), or
|pax(1) instead.
c
# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1218791761 -7200
# Node ID 52a83161a11af98695c276b7975bd5f31965a2f5
# Parent 438e02b4be73ffd80d4a6cc45b7c9273d6b26604
Make test-hardlinks-safety portable
On some systems (MacOS X) cp does not preserve hardlinks.
Use tar instead.
diff --git a/tests/test-hardlinks-safety b/tests/test-hardlinks-safety
--- a/tests/test-hardlinks-safety
+++ b/tests/test-hardlinks-safety
@@ -21,7 +21,9 @@
hg qpush
cd ..
-cp -al a b
+mkdir x
+tar -cf - a | tar xf - -C x
+mv x/a b
cd b
hg qimport -n bar - << EOF
@@ -51,7 +53,8 @@
hg tag foo
cd ..
-cp -al b c
+tar -cf - b | tar xf - -C x
+mv x/b c
cd c
hg tag -l -r 0 lbar
More information about the Mercurial-devel
mailing list