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