Show More
@@ -1,5 +1,21 | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | # some implementations of cp can't create hardlinks | |
|
4 | cat > cp.py <<EOF | |
|
5 | from mercurial import util | |
|
6 | import sys | |
|
7 | util.copyfiles(sys.argv[1], sys.argv[2], hardlink=True) | |
|
8 | EOF | |
|
9 | ||
|
10 | # test hardlinking outside hg | |
|
11 | mkdir x | |
|
12 | echo foo > x/a | |
|
13 | ||
|
14 | python cp.py x y | |
|
15 | echo bar >> y/a | |
|
16 | echo % no diff if hardlink | |
|
17 | diff x/a y/a | |
|
18 | ||
|
3 | 19 | # test mq hardlinking |
|
4 | 20 | echo "[extensions]" >> $HGRCPATH |
|
5 | 21 | echo "mq=" >> $HGRCPATH |
@@ -21,7 +37,7 EOF | |||
|
21 | 37 | hg qpush |
|
22 | 38 | |
|
23 | 39 | cd .. |
|
24 | cp -al a b | |
|
40 | python cp.py a b | |
|
25 | 41 | cd b |
|
26 | 42 | |
|
27 | 43 | hg qimport -n bar - << EOF |
@@ -51,7 +67,7 hg tag -l lfoo | |||
|
51 | 67 | hg tag foo |
|
52 | 68 | |
|
53 | 69 | cd .. |
|
54 | cp -al b c | |
|
70 | python cp.py b c | |
|
55 | 71 | cd c |
|
56 | 72 | |
|
57 | 73 | hg tag -l -r 0 lbar |
General Comments 0
You need to be logged in to leave comments.
Login now