equal
deleted
inserted
replaced
1 #!/bin/sh |
1 #!/bin/sh |
|
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 |
2 |
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 |
6 |
22 |
19 EOF |
35 EOF |
20 |
36 |
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 |
28 # HG changeset patch |
44 # HG changeset patch |
29 # Date 2 0 |
45 # Date 2 0 |
49 |
65 |
50 hg tag -l lfoo |
66 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 |
58 hg tag -r 0 bar |
74 hg tag -r 0 bar |
59 echo %%% |
75 echo %%% |