Show More
@@ -1,82 +1,106 b'' | |||||
1 | #!/bin/sh |
|
|||
2 |
|
1 | |||
3 | # some implementations of cp can't create hardlinks |
|
2 | # some implementations of cp can't create hardlinks | |
4 | cat > cp.py <<EOF |
|
3 | $ cat > cp.py <<EOF | |
5 | from mercurial import util |
|
4 | > from mercurial import util | |
6 | import sys |
|
5 | > import sys | |
7 | util.copyfiles(sys.argv[1], sys.argv[2], hardlink=True) |
|
6 | > util.copyfiles(sys.argv[1], sys.argv[2], hardlink=True) | |
8 | EOF |
|
7 | > EOF | |
|
8 | ||||
|
9 | Test hardlinking outside hg: | |||
9 |
|
10 | |||
10 | # test hardlinking outside hg |
|
11 | $ mkdir x | |
11 | mkdir x |
|
12 | $ echo foo > x/a | |
12 | echo foo > x/a |
|
13 | ||
|
14 | $ python cp.py x y | |||
|
15 | $ echo bar >> y/a | |||
13 |
|
16 | |||
14 | python cp.py x y |
|
17 | No diff if hardlink: | |
15 | echo bar >> y/a |
|
|||
16 | echo % no diff if hardlink |
|
|||
17 | diff x/a y/a |
|
|||
18 |
|
18 | |||
19 | # test mq hardlinking |
|
19 | $ diff x/a y/a | |
20 | echo "[extensions]" >> $HGRCPATH |
|
20 | ||
21 | echo "mq=" >> $HGRCPATH |
|
21 | Test mq hardlinking: | |
22 |
|
22 | |||
23 | echo % init |
|
23 | $ echo "[extensions]" >> $HGRCPATH | |
24 | hg init a |
|
24 | $ echo "mq=" >> $HGRCPATH | |
25 | cd a |
|
25 | ||
|
26 | $ hg init a | |||
|
27 | $ cd a | |||
26 |
|
28 | |||
27 | hg qimport -n foo - << EOF |
|
29 | $ hg qimport -n foo - << EOF | |
28 | # HG changeset patch |
|
30 | > # HG changeset patch | |
29 | # Date 1 0 |
|
31 | > # Date 1 0 | |
30 | diff -r 2588a8b53d66 a |
|
32 | > diff -r 2588a8b53d66 a | |
31 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
33 | > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
32 | +++ b/a Wed Jul 23 15:54:29 2008 +0200 |
|
34 | > +++ b/a Wed Jul 23 15:54:29 2008 +0200 | |
33 | @@ -0,0 +1,1 @@ |
|
35 | > @@ -0,0 +1,1 @@ | |
34 | +a |
|
36 | > +a | |
35 | EOF |
|
37 | > EOF | |
|
38 | adding foo to series file | |||
36 |
|
39 | |||
37 | hg qpush |
|
40 | $ hg qpush | |
|
41 | applying foo | |||
|
42 | now at: foo | |||
38 |
|
43 | |||
39 | cd .. |
|
44 | $ cd .. | |
40 | python cp.py a b |
|
45 | $ python cp.py a b | |
41 | cd b |
|
46 | $ cd b | |
42 |
|
47 | |||
43 | hg qimport -n bar - << EOF |
|
48 | $ hg qimport -n bar - << EOF | |
44 | # HG changeset patch |
|
49 | > # HG changeset patch | |
45 | # Date 2 0 |
|
50 | > # Date 2 0 | |
46 | diff -r 2588a8b53d66 a |
|
51 | > diff -r 2588a8b53d66 a | |
47 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
52 | > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
48 | +++ b/b Wed Jul 23 15:54:29 2008 +0200 |
|
53 | > +++ b/b Wed Jul 23 15:54:29 2008 +0200 | |
49 | @@ -0,0 +1,1 @@ |
|
54 | > @@ -0,0 +1,1 @@ | |
50 | +b |
|
55 | > +b | |
51 | EOF |
|
56 | > EOF | |
|
57 | adding bar to series file | |||
52 |
|
58 | |||
53 | hg qpush |
|
59 | $ hg qpush | |
|
60 | applying bar | |||
|
61 | now at: bar | |||
|
62 | ||||
|
63 | $ cat .hg/patches/status | |||
|
64 | 430ed4828a74fa4047bc816a25500f7472ab4bfe:foo | |||
|
65 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c:bar | |||
54 |
|
66 | |||
55 |
cat .hg/patches/s |
|
67 | $ cat .hg/patches/series | |
56 | echo % |
|
68 | foo | |
57 | cat .hg/patches/series |
|
69 | bar | |
58 | echo %%% |
|
70 | ||
59 | cat ../a/.hg/patches/status |
|
71 | $ cat ../a/.hg/patches/status | |
60 | echo % |
|
72 | 430ed4828a74fa4047bc816a25500f7472ab4bfe:foo | |
61 | cat ../a/.hg/patches/series |
|
73 | ||
|
74 | $ cat ../a/.hg/patches/series | |||
|
75 | foo | |||
62 |
|
76 | |||
63 |
|
|
77 | Test tags hardlinking: | |
64 | hg qdel -r qbase:qtip |
|
78 | ||
|
79 | $ hg qdel -r qbase:qtip | |||
|
80 | patch foo finalized without changeset message | |||
|
81 | patch bar finalized without changeset message | |||
65 |
|
82 | |||
66 | hg tag -l lfoo |
|
83 | $ hg tag -l lfoo | |
67 | hg tag foo |
|
84 | $ hg tag foo | |
68 |
|
85 | |||
69 | cd .. |
|
86 | $ cd .. | |
70 | python cp.py b c |
|
87 | $ python cp.py b c | |
71 | cd c |
|
88 | $ cd c | |
72 |
|
89 | |||
73 | hg tag -l -r 0 lbar |
|
90 | $ hg tag -l -r 0 lbar | |
74 | hg tag -r 0 bar |
|
91 | $ hg tag -r 0 bar | |
75 | echo %%% |
|
92 | ||
76 | cat .hgtags |
|
93 | $ cat .hgtags | |
77 | echo % |
|
94 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo | |
78 | cat .hg/localtags |
|
95 | 430ed4828a74fa4047bc816a25500f7472ab4bfe bar | |
79 | echo %%% |
|
96 | ||
80 | cat ../b/.hgtags |
|
97 | $ cat .hg/localtags | |
81 | echo % |
|
98 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo | |
82 | cat ../b/.hg/localtags |
|
99 | 430ed4828a74fa4047bc816a25500f7472ab4bfe lbar | |
|
100 | ||||
|
101 | $ cat ../b/.hgtags | |||
|
102 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo | |||
|
103 | ||||
|
104 | $ cat ../b/.hg/localtags | |||
|
105 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo | |||
|
106 |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now