Show More
@@ -1,227 +1,233 | |||
|
1 | # enable bundle2 in advance | |
|
2 | ||
|
3 | $ cat << EOF >> $HGRCPATH | |
|
4 | > [format] | |
|
5 | > usegeneraldelta=yes | |
|
6 | > EOF | |
|
1 | 7 | |
|
2 | 8 | $ mkdir part1 |
|
3 | 9 | $ cd part1 |
|
4 | 10 | |
|
5 | 11 | $ hg init |
|
6 | 12 | $ echo a > a |
|
7 | 13 | $ hg add a |
|
8 | 14 | $ hg commit -m "1" |
|
9 | 15 | $ hg status |
|
10 | 16 | $ hg copy a b |
|
11 | 17 | $ hg --config ui.portablefilenames=abort copy a con.xml |
|
12 | 18 | abort: filename contains 'con', which is reserved on Windows: 'con.xml' |
|
13 | 19 | [255] |
|
14 | 20 | $ hg status |
|
15 | 21 | A b |
|
16 | 22 | $ hg sum |
|
17 | 23 | parent: 0:c19d34741b0a tip |
|
18 | 24 | 1 |
|
19 | 25 | branch: default |
|
20 | 26 | commit: 1 copied |
|
21 | 27 | update: (current) |
|
22 | 28 | phases: 1 draft |
|
23 | 29 | $ hg --debug commit -m "2" |
|
24 | 30 | committing files: |
|
25 | 31 | b |
|
26 | 32 | b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 |
|
27 | 33 | committing manifest |
|
28 | 34 | committing changelog |
|
29 | 35 | committed changeset 1:93580a2c28a50a56f63526fb305067e6fbf739c4 |
|
30 | 36 | |
|
31 | 37 | we should see two history entries |
|
32 | 38 | |
|
33 | 39 | $ hg history -v |
|
34 | 40 | changeset: 1:93580a2c28a5 |
|
35 | 41 | tag: tip |
|
36 | 42 | user: test |
|
37 | 43 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
38 | 44 | files: b |
|
39 | 45 | description: |
|
40 | 46 | 2 |
|
41 | 47 | |
|
42 | 48 | |
|
43 | 49 | changeset: 0:c19d34741b0a |
|
44 | 50 | user: test |
|
45 | 51 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
46 | 52 | files: a |
|
47 | 53 | description: |
|
48 | 54 | 1 |
|
49 | 55 | |
|
50 | 56 | |
|
51 | 57 | |
|
52 | 58 | we should see one log entry for a |
|
53 | 59 | |
|
54 | 60 | $ hg log a |
|
55 | 61 | changeset: 0:c19d34741b0a |
|
56 | 62 | user: test |
|
57 | 63 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
58 | 64 | summary: 1 |
|
59 | 65 | |
|
60 | 66 | |
|
61 | 67 | this should show a revision linked to changeset 0 |
|
62 | 68 | |
|
63 | 69 | $ hg debugindex a |
|
64 | 70 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
65 | 71 | 0 0 3 ..... 0 b789fdd96dc2 000000000000 000000000000 (re) |
|
66 | 72 | |
|
67 | 73 | we should see one log entry for b |
|
68 | 74 | |
|
69 | 75 | $ hg log b |
|
70 | 76 | changeset: 1:93580a2c28a5 |
|
71 | 77 | tag: tip |
|
72 | 78 | user: test |
|
73 | 79 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
74 | 80 | summary: 2 |
|
75 | 81 | |
|
76 | 82 | |
|
77 | 83 | this should show a revision linked to changeset 1 |
|
78 | 84 | |
|
79 | 85 | $ hg debugindex b |
|
80 | 86 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
81 | 87 | 0 0 65 ..... 1 37d9b5d994ea 000000000000 000000000000 (re) |
|
82 | 88 | |
|
83 | 89 | this should show the rename information in the metadata |
|
84 | 90 | |
|
85 | 91 | $ hg debugdata b 0 | head -3 | tail -2 |
|
86 | 92 | copy: a |
|
87 | 93 | copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 |
|
88 | 94 | |
|
89 | 95 | $ md5sum.py .hg/store/data/b.i |
|
90 | 4999f120a3b88713bbefddd195cf5133 .hg/store/data/b.i | |
|
96 | 44913824c8f5890ae218f9829535922e .hg/store/data/b.i | |
|
91 | 97 | $ hg cat b > bsum |
|
92 | 98 | $ md5sum.py bsum |
|
93 | 99 | 60b725f10c9c85c70d97880dfe8191b3 bsum |
|
94 | 100 | $ hg cat a > asum |
|
95 | 101 | $ md5sum.py asum |
|
96 | 102 | 60b725f10c9c85c70d97880dfe8191b3 asum |
|
97 | 103 | $ hg verify |
|
98 | 104 | checking changesets |
|
99 | 105 | checking manifests |
|
100 | 106 | crosschecking files in changesets and manifests |
|
101 | 107 | checking files |
|
102 | 108 | 2 files, 2 changesets, 2 total revisions |
|
103 | 109 | |
|
104 | 110 | $ cd .. |
|
105 | 111 | |
|
106 | 112 | |
|
107 | 113 | $ mkdir part2 |
|
108 | 114 | $ cd part2 |
|
109 | 115 | |
|
110 | 116 | $ hg init |
|
111 | 117 | $ echo foo > foo |
|
112 | 118 | should fail - foo is not managed |
|
113 | 119 | $ hg mv foo bar |
|
114 | 120 | foo: not copying - file is not managed |
|
115 | 121 | abort: no files to copy |
|
116 | 122 | [255] |
|
117 | 123 | $ hg st -A |
|
118 | 124 | ? foo |
|
119 | 125 | $ hg add foo |
|
120 | 126 | dry-run; print a warning that this is not a real copy; foo is added |
|
121 | 127 | $ hg mv --dry-run foo bar |
|
122 | 128 | foo has not been committed yet, so no copy data will be stored for bar. |
|
123 | 129 | $ hg st -A |
|
124 | 130 | A foo |
|
125 | 131 | should print a warning that this is not a real copy; bar is added |
|
126 | 132 | $ hg mv foo bar |
|
127 | 133 | foo has not been committed yet, so no copy data will be stored for bar. |
|
128 | 134 | $ hg st -A |
|
129 | 135 | A bar |
|
130 | 136 | should print a warning that this is not a real copy; foo is added |
|
131 | 137 | $ hg cp bar foo |
|
132 | 138 | bar has not been committed yet, so no copy data will be stored for foo. |
|
133 | 139 | $ hg rm -f bar |
|
134 | 140 | $ rm bar |
|
135 | 141 | $ hg st -A |
|
136 | 142 | A foo |
|
137 | 143 | $ hg commit -m1 |
|
138 | 144 | |
|
139 | 145 | moving a missing file |
|
140 | 146 | $ rm foo |
|
141 | 147 | $ hg mv foo foo3 |
|
142 | 148 | foo: deleted in working directory |
|
143 | 149 | foo3 does not exist! |
|
144 | 150 | $ hg up -qC . |
|
145 | 151 | |
|
146 | 152 | copy --after to a nonexistent target filename |
|
147 | 153 | $ hg cp -A foo dummy |
|
148 | 154 | foo: not recording copy - dummy does not exist |
|
149 | 155 | |
|
150 | 156 | dry-run; should show that foo is clean |
|
151 | 157 | $ hg copy --dry-run foo bar |
|
152 | 158 | $ hg st -A |
|
153 | 159 | C foo |
|
154 | 160 | should show copy |
|
155 | 161 | $ hg copy foo bar |
|
156 | 162 | $ hg st -C |
|
157 | 163 | A bar |
|
158 | 164 | foo |
|
159 | 165 | |
|
160 | 166 | shouldn't show copy |
|
161 | 167 | $ hg commit -m2 |
|
162 | 168 | $ hg st -C |
|
163 | 169 | |
|
164 | 170 | should match |
|
165 | 171 | $ hg debugindex foo |
|
166 | 172 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
167 | 173 | 0 0 5 ..... 0 2ed2a3912a0b 000000000000 000000000000 (re) |
|
168 | 174 | $ hg debugrename bar |
|
169 | 175 | bar renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd |
|
170 | 176 | |
|
171 | 177 | $ echo bleah > foo |
|
172 | 178 | $ echo quux > bar |
|
173 | 179 | $ hg commit -m3 |
|
174 | 180 | |
|
175 | 181 | should not be renamed |
|
176 | 182 | $ hg debugrename bar |
|
177 | 183 | bar not renamed |
|
178 | 184 | |
|
179 | 185 | $ hg copy -f foo bar |
|
180 | 186 | should show copy |
|
181 | 187 | $ hg st -C |
|
182 | 188 | M bar |
|
183 | 189 | foo |
|
184 | 190 | |
|
185 | 191 | XXX: filtering lfilesrepo.status() in 3.3-rc causes the copy source to not be |
|
186 | 192 | displayed. |
|
187 | 193 | $ hg st -C --config extensions.largefiles= |
|
188 | 194 | M bar |
|
189 | 195 | foo |
|
190 | 196 | |
|
191 | 197 | $ hg commit -m3 |
|
192 | 198 | |
|
193 | 199 | should show no parents for tip |
|
194 | 200 | $ hg debugindex bar |
|
195 | 201 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
196 | 202 | 0 0 69 ..... 1 7711d36246cc 000000000000 000000000000 (re) |
|
197 | 203 | 1 69 6 ..... 2 bdf70a2b8d03 7711d36246cc 000000000000 (re) |
|
198 | 204 | 2 75 71 ..... 3 b2558327ea8d 000000000000 000000000000 (re) |
|
199 | 205 | should match |
|
200 | 206 | $ hg debugindex foo |
|
201 | 207 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
202 | 208 | 0 0 5 ..... 0 2ed2a3912a0b 000000000000 000000000000 (re) |
|
203 | 209 | 1 5 7 ..... 2 dd12c926cf16 2ed2a3912a0b 000000000000 (re) |
|
204 | 210 | $ hg debugrename bar |
|
205 | 211 | bar renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17 |
|
206 | 212 | |
|
207 | 213 | should show no copies |
|
208 | 214 | $ hg st -C |
|
209 | 215 | |
|
210 | 216 | copy --after on an added file |
|
211 | 217 | $ cp bar baz |
|
212 | 218 | $ hg add baz |
|
213 | 219 | $ hg cp -A bar baz |
|
214 | 220 | $ hg st -C |
|
215 | 221 | A baz |
|
216 | 222 | bar |
|
217 | 223 | |
|
218 | 224 | foo was clean: |
|
219 | 225 | $ hg st -AC foo |
|
220 | 226 | C foo |
|
221 | 227 | but it's considered modified after a copy --after --force |
|
222 | 228 | $ hg copy -Af bar foo |
|
223 | 229 | $ hg st -AC foo |
|
224 | 230 | M foo |
|
225 | 231 | bar |
|
226 | 232 | |
|
227 | 233 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now