Show More
@@ -1,6 +1,19 b'' | |||||
1 | Test for the full copytracing algorithm |
|
1 | Test for the full copytracing algorithm | |
2 | ======================================= |
|
2 | ======================================= | |
3 |
|
3 | |||
|
4 | ||||
|
5 | Initial Setup | |||
|
6 | ============= | |||
|
7 | ||||
|
8 | use git diff to see rename | |||
|
9 | ||||
|
10 | $ cat << EOF >> $HGRCPATH | |||
|
11 | > [diff] | |||
|
12 | > git=yes | |||
|
13 | > EOF | |||
|
14 | ||||
|
15 | Setup an history where one side copy and rename a file (and update it) while the other side update it. | |||
|
16 | ||||
4 | $ hg init t |
|
17 | $ hg init t | |
5 | $ cd t |
|
18 | $ cd t | |
6 |
|
19 | |||
@@ -22,6 +35,59 b' Test for the full copytracing algorithm' | |||||
22 |
|
35 | |||
23 | $ hg ci -qAm "other" |
|
36 | $ hg ci -qAm "other" | |
24 |
|
37 | |||
|
38 | $ hg log -G --patch | |||
|
39 | @ changeset: 2:add3f11052fa | |||
|
40 | | tag: tip | |||
|
41 | | parent: 0:b8bf91eeebbc | |||
|
42 | | user: test | |||
|
43 | | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
44 | | summary: other | |||
|
45 | | | |||
|
46 | | diff --git a/a b/a | |||
|
47 | | --- a/a | |||
|
48 | | +++ b/a | |||
|
49 | | @@ -1,1 +1,2 @@ | |||
|
50 | | +0 | |||
|
51 | | 1 | |||
|
52 | | | |||
|
53 | | o changeset: 1:17c05bb7fcb6 | |||
|
54 | |/ user: test | |||
|
55 | | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
56 | | summary: second | |||
|
57 | | | |||
|
58 | | diff --git a/a b/b | |||
|
59 | | rename from a | |||
|
60 | | rename to b | |||
|
61 | | --- a/a | |||
|
62 | | +++ b/b | |||
|
63 | | @@ -1,1 +1,2 @@ | |||
|
64 | | 1 | |||
|
65 | | +2 | |||
|
66 | | diff --git a/a b/c | |||
|
67 | | copy from a | |||
|
68 | | copy to c | |||
|
69 | | --- a/a | |||
|
70 | | +++ b/c | |||
|
71 | | @@ -1,1 +1,2 @@ | |||
|
72 | | 1 | |||
|
73 | | +2 | |||
|
74 | | | |||
|
75 | o changeset: 0:b8bf91eeebbc | |||
|
76 | user: test | |||
|
77 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
78 | summary: first | |||
|
79 | ||||
|
80 | diff --git a/a b/a | |||
|
81 | new file mode 100644 | |||
|
82 | --- /dev/null | |||
|
83 | +++ b/a | |||
|
84 | @@ -0,0 +1,1 @@ | |||
|
85 | +1 | |||
|
86 | ||||
|
87 | ||||
|
88 | Test Simple Merge | |||
|
89 | ================= | |||
|
90 | ||||
25 |
$ |
|
91 | $ hg merge --debug | |
26 | unmatched files in other: |
|
92 | unmatched files in other: | |
27 | b |
|
93 | b | |
@@ -64,8 +130,10 b' file c' | |||||
64 | 2 |
|
130 | 2 | |
65 |
|
131 | |||
66 | Test disabling copy tracing |
|
132 | Test disabling copy tracing | |
|
133 | =========================== | |||
67 |
|
134 | |||
68 |
|
|
135 | first verify copy metadata was kept | |
|
136 | ----------------------------------- | |||
69 |
|
137 | |||
70 | $ hg up -qC 2 |
|
138 | $ hg up -qC 2 | |
71 | $ hg rebase --keep -d 1 -b 2 --config extensions.rebase= |
|
139 | $ hg rebase --keep -d 1 -b 2 --config extensions.rebase= | |
@@ -78,7 +146,8 b' Test disabling copy tracing' | |||||
78 | 1 |
|
146 | 1 | |
79 | 2 |
|
147 | 2 | |
80 |
|
148 | |||
81 |
|
|
149 | next verify copy metadata is lost when disabled | |
|
150 | ------------------------------------------------ | |||
82 |
|
151 | |||
83 | $ hg strip -r . --config extensions.strip= |
|
152 | $ hg strip -r . --config extensions.strip= | |
84 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
153 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
@@ -99,6 +168,7 b' Test disabling copy tracing' | |||||
99 | $ cd .. |
|
168 | $ cd .. | |
100 |
|
169 | |||
101 | Verify disabling copy tracing still keeps copies from rebase source |
|
170 | Verify disabling copy tracing still keeps copies from rebase source | |
|
171 | ------------------------------------------------------------------- | |||
102 |
|
172 | |||
103 | $ hg init copydisable |
|
173 | $ hg init copydisable | |
104 | $ cd copydisable |
|
174 | $ cd copydisable | |
@@ -131,7 +201,14 b' Verify disabling copy tracing still keep' | |||||
131 |
|
201 | |||
132 | $ cd ../ |
|
202 | $ cd ../ | |
133 |
|
203 | |||
134 | Verify we duplicate existing copies, instead of detecting them |
|
204 | ||
|
205 | test storage preservation | |||
|
206 | ------------------------- | |||
|
207 | ||||
|
208 | Verify rebase do not discard recorded copies data when copy tracing usage is | |||
|
209 | disabled. | |||
|
210 | ||||
|
211 | Setup | |||
135 |
|
212 | |||
136 | $ hg init copydisable3 |
|
213 | $ hg init copydisable3 | |
137 | $ cd copydisable3 |
|
214 | $ cd copydisable3 | |
@@ -154,6 +231,12 b' Verify we duplicate existing copies, ins' | |||||
154 | |/ |
|
231 | |/ | |
155 | o 0 add a |
|
232 | o 0 add a | |
156 |
|
233 | |||
|
234 | ||||
|
235 | Actual Test | |||
|
236 | ||||
|
237 | A file is copied on one side and has been moved twice on the other side. the | |||
|
238 | file is copied from `0:a`, so the file history of the `3:b` should trace directly to `0:a`. | |||
|
239 | ||||
157 | $ hg rebase -d 2 -s 3 --config extensions.rebase= --config experimental.copytrace=off |
|
240 | $ hg rebase -d 2 -s 3 --config extensions.rebase= --config experimental.copytrace=off | |
158 | rebasing 3:47e1a9e6273b "copy a->b (2)" (tip) |
|
241 | rebasing 3:47e1a9e6273b "copy a->b (2)" (tip) | |
159 | saved backup bundle to $TESTTMP/copydisable3/.hg/strip-backup/47e1a9e6273b-2d099c59-rebase.hg |
|
242 | saved backup bundle to $TESTTMP/copydisable3/.hg/strip-backup/47e1a9e6273b-2d099c59-rebase.hg |
General Comments 0
You need to be logged in to leave comments.
Login now