# HG changeset patch # User Christian Ebert # Date 1219247892 -7200 # Node ID 7e5e13bee8f457e913d7e4a61bd155a06f359eca # Parent c8555b127408d8e75b735fe45bb80d5886633f35 Make test-hardlinks-safety portable On some systems cp cannot create/preserve hardlinks. Use util.copyfiles instead, after making sure it actually does create hardlinks. diff -r c8555b127408 -r 7e5e13bee8f4 tests/test-hardlinks-safety --- a/tests/test-hardlinks-safety Wed Aug 20 15:04:45 2008 +0200 +++ b/tests/test-hardlinks-safety Wed Aug 20 17:58:12 2008 +0200 @@ -1,5 +1,21 @@ #!/bin/sh +# some implementations of cp can't create hardlinks +cat > cp.py < 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 diff -r c8555b127408 -r 7e5e13bee8f4 tests/test-hardlinks-safety.out --- a/tests/test-hardlinks-safety.out Wed Aug 20 15:04:45 2008 +0200 +++ b/tests/test-hardlinks-safety.out Wed Aug 20 17:58:12 2008 +0200 @@ -1,3 +1,4 @@ +% no diff if hardlink % init adding foo to series file applying foo