Show More
@@ -1,5 +1,21 b'' | |||||
1 | #!/bin/sh |
|
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 | # test mq hardlinking |
|
19 | # test mq hardlinking | |
4 | echo "[extensions]" >> $HGRCPATH |
|
20 | echo "[extensions]" >> $HGRCPATH | |
5 | echo "mq=" >> $HGRCPATH |
|
21 | echo "mq=" >> $HGRCPATH | |
@@ -21,7 +37,7 b' EOF' | |||||
21 | hg qpush |
|
37 | hg qpush | |
22 |
|
38 | |||
23 | cd .. |
|
39 | cd .. | |
24 | cp -al a b |
|
40 | python cp.py a b | |
25 | cd b |
|
41 | cd b | |
26 |
|
42 | |||
27 | hg qimport -n bar - << EOF |
|
43 | hg qimport -n bar - << EOF | |
@@ -51,7 +67,7 b' hg tag -l lfoo' | |||||
51 | hg tag foo |
|
67 | hg tag foo | |
52 |
|
68 | |||
53 | cd .. |
|
69 | cd .. | |
54 | cp -al b c |
|
70 | python cp.py b c | |
55 | cd c |
|
71 | cd c | |
56 |
|
72 | |||
57 | hg tag -l -r 0 lbar |
|
73 | hg tag -l -r 0 lbar |
General Comments 0
You need to be logged in to leave comments.
Login now