changeset 6921:2cb708e25a5d

merge with crew-stable
author Thomas Arendsen Hein <thomas@intevation.de>
date Wed, 20 Aug 2008 19:00:39 +0200
parents 7d1713353aaf (current diff) 7e5e13bee8f4 (diff)
children 1ec2d227a521
files
diffstat 2 files changed, 19 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-hardlinks-safety	Wed Aug 20 15:05:43 2008 +0200
+++ b/tests/test-hardlinks-safety	Wed Aug 20 19:00:39 2008 +0200
@@ -1,5 +1,21 @@
 #!/bin/sh
 
+# some implementations of cp can't create hardlinks
+cat > cp.py <<EOF
+from mercurial import util
+import sys
+util.copyfiles(sys.argv[1], sys.argv[2], hardlink=True)
+EOF
+
+# test hardlinking outside hg
+mkdir x
+echo foo > x/a
+
+python cp.py x y
+echo bar >> y/a
+echo % no diff if hardlink
+diff x/a y/a
+
 # test mq hardlinking
 echo "[extensions]" >> $HGRCPATH
 echo "mq=" >> $HGRCPATH
@@ -21,7 +37,7 @@
 hg qpush
 
 cd ..
-cp -al a b
+python cp.py a b
 cd b
 
 hg qimport -n bar - << EOF
@@ -51,7 +67,7 @@
 hg tag foo
 
 cd ..
-cp -al b c
+python cp.py b c
 cd c
 
 hg tag -l -r 0 lbar
--- a/tests/test-hardlinks-safety.out	Wed Aug 20 15:05:43 2008 +0200
+++ b/tests/test-hardlinks-safety.out	Wed Aug 20 19:00:39 2008 +0200
@@ -1,3 +1,4 @@
+% no diff if hardlink
 % init
 adding foo to series file
 applying foo