[PATCH] Make test-hardlinks-safety work on MacOS X

Christian Ebert blacktrash at gmx.net
Wed Aug 13 23:14:57 UTC 2008


# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1218669229 -7200
# Node ID 0259350f90c738ccf8d0ed6b72902e0a8bd8451e
# Parent  6e253aa04ff7cf974fc3719dc8ae8136fcf693f5
Make test-hardlinks-safety work on MacOS X

MacOS cp neither has -a option, nor the capability to 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