Show More
@@ -1,1829 +1,1832 b'' | |||||
1 | $ hg init a |
|
1 | $ hg init a | |
2 | $ mkdir a/d1 |
|
2 | $ mkdir a/d1 | |
3 | $ mkdir a/d1/d2 |
|
3 | $ mkdir a/d1/d2 | |
4 | $ echo line 1 > a/a |
|
4 | $ echo line 1 > a/a | |
5 | $ echo line 1 > a/d1/d2/a |
|
5 | $ echo line 1 > a/d1/d2/a | |
6 | $ hg --cwd a ci -Ama |
|
6 | $ hg --cwd a ci -Ama | |
7 | adding a |
|
7 | adding a | |
8 | adding d1/d2/a |
|
8 | adding d1/d2/a | |
9 |
|
9 | |||
10 | $ echo line 2 >> a/a |
|
10 | $ echo line 2 >> a/a | |
11 | $ hg --cwd a ci -u someone -d '1 0' -m'second change' |
|
11 | $ hg --cwd a ci -u someone -d '1 0' -m'second change' | |
12 |
|
12 | |||
13 | import with no args: |
|
13 | import with no args: | |
14 |
|
14 | |||
15 | $ hg --cwd a import |
|
15 | $ hg --cwd a import | |
16 | abort: need at least one patch to import |
|
16 | abort: need at least one patch to import | |
17 | [255] |
|
17 | [255] | |
18 |
|
18 | |||
19 | generate patches for the test |
|
19 | generate patches for the test | |
20 |
|
20 | |||
21 | $ hg --cwd a export tip > exported-tip.patch |
|
21 | $ hg --cwd a export tip > exported-tip.patch | |
22 | $ hg --cwd a diff -r0:1 > diffed-tip.patch |
|
22 | $ hg --cwd a diff -r0:1 > diffed-tip.patch | |
23 |
|
23 | |||
24 |
|
24 | |||
25 | import exported patch |
|
25 | import exported patch | |
26 | (this also tests that editor is not invoked, if the patch contains the |
|
26 | (this also tests that editor is not invoked, if the patch contains the | |
27 | commit message and '--edit' is not specified) |
|
27 | commit message and '--edit' is not specified) | |
28 |
|
28 | |||
29 | $ hg clone -r0 a b |
|
29 | $ hg clone -r0 a b | |
30 | adding changesets |
|
30 | adding changesets | |
31 | adding manifests |
|
31 | adding manifests | |
32 | adding file changes |
|
32 | adding file changes | |
33 | added 1 changesets with 2 changes to 2 files |
|
33 | added 1 changesets with 2 changes to 2 files | |
34 | new changesets 80971e65b431 |
|
34 | new changesets 80971e65b431 | |
35 | updating to branch default |
|
35 | updating to branch default | |
36 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
36 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
37 | $ HGEDITOR=cat hg --cwd b import ../exported-tip.patch |
|
37 | $ HGEDITOR=cat hg --cwd b import ../exported-tip.patch | |
38 | applying ../exported-tip.patch |
|
38 | applying ../exported-tip.patch | |
39 |
|
39 | |||
40 | message and committer and date should be same |
|
40 | message and committer and date should be same | |
41 |
|
41 | |||
42 | $ hg --cwd b tip |
|
42 | $ hg --cwd b tip | |
43 | changeset: 1:1d4bd90af0e4 |
|
43 | changeset: 1:1d4bd90af0e4 | |
44 | tag: tip |
|
44 | tag: tip | |
45 | user: someone |
|
45 | user: someone | |
46 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
46 | date: Thu Jan 01 00:00:01 1970 +0000 | |
47 | summary: second change |
|
47 | summary: second change | |
48 |
|
48 | |||
49 | $ rm -r b |
|
49 | $ rm -r b | |
50 |
|
50 | |||
51 |
|
51 | |||
52 | import exported patch with external patcher |
|
52 | import exported patch with external patcher | |
53 | (this also tests that editor is invoked, if the '--edit' is specified, |
|
53 | (this also tests that editor is invoked, if the '--edit' is specified, | |
54 | regardless of the commit message in the patch) |
|
54 | regardless of the commit message in the patch) | |
55 |
|
55 | |||
56 | $ cat > dummypatch.py <<EOF |
|
56 | $ cat > dummypatch.py <<EOF | |
57 | > from __future__ import print_function |
|
57 | > from __future__ import print_function | |
58 | > print('patching file a') |
|
58 | > print('patching file a') | |
59 | > file('a', 'wb').write('line2\n') |
|
59 | > file('a', 'wb').write('line2\n') | |
60 | > EOF |
|
60 | > EOF | |
61 | $ hg clone -r0 a b |
|
61 | $ hg clone -r0 a b | |
62 | adding changesets |
|
62 | adding changesets | |
63 | adding manifests |
|
63 | adding manifests | |
64 | adding file changes |
|
64 | adding file changes | |
65 | added 1 changesets with 2 changes to 2 files |
|
65 | added 1 changesets with 2 changes to 2 files | |
66 | new changesets 80971e65b431 |
|
66 | new changesets 80971e65b431 | |
67 | updating to branch default |
|
67 | updating to branch default | |
68 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
68 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
69 | $ HGEDITOR=cat hg --config ui.patch="$PYTHON ../dummypatch.py" --cwd b import --edit ../exported-tip.patch |
|
69 | $ HGEDITOR=cat hg --config ui.patch="$PYTHON ../dummypatch.py" --cwd b import --edit ../exported-tip.patch | |
70 | applying ../exported-tip.patch |
|
70 | applying ../exported-tip.patch | |
71 | second change |
|
71 | second change | |
72 |
|
72 | |||
73 |
|
73 | |||
74 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
74 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
75 | HG: Leave message empty to abort commit. |
|
75 | HG: Leave message empty to abort commit. | |
76 | HG: -- |
|
76 | HG: -- | |
77 | HG: user: someone |
|
77 | HG: user: someone | |
78 | HG: branch 'default' |
|
78 | HG: branch 'default' | |
79 | HG: changed a |
|
79 | HG: changed a | |
80 | $ cat b/a |
|
80 | $ cat b/a | |
81 | line2 |
|
81 | line2 | |
82 | $ rm -r b |
|
82 | $ rm -r b | |
83 |
|
83 | |||
84 |
|
84 | |||
85 | import of plain diff should fail without message |
|
85 | import of plain diff should fail without message | |
86 | (this also tests that editor is invoked, if the patch doesn't contain |
|
86 | (this also tests that editor is invoked, if the patch doesn't contain | |
87 | the commit message, regardless of '--edit') |
|
87 | the commit message, regardless of '--edit') | |
88 |
|
88 | |||
89 | $ hg clone -r0 a b |
|
89 | $ hg clone -r0 a b | |
90 | adding changesets |
|
90 | adding changesets | |
91 | adding manifests |
|
91 | adding manifests | |
92 | adding file changes |
|
92 | adding file changes | |
93 | added 1 changesets with 2 changes to 2 files |
|
93 | added 1 changesets with 2 changes to 2 files | |
94 | new changesets 80971e65b431 |
|
94 | new changesets 80971e65b431 | |
95 | updating to branch default |
|
95 | updating to branch default | |
96 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
96 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
97 | $ cat > $TESTTMP/editor.sh <<EOF |
|
97 | $ cat > $TESTTMP/editor.sh <<EOF | |
98 | > env | grep HGEDITFORM |
|
98 | > env | grep HGEDITFORM | |
99 | > cat \$1 |
|
99 | > cat \$1 | |
100 | > EOF |
|
100 | > EOF | |
101 | $ HGEDITOR="sh $TESTTMP/editor.sh" hg --cwd b import ../diffed-tip.patch |
|
101 | $ HGEDITOR="sh $TESTTMP/editor.sh" hg --cwd b import ../diffed-tip.patch | |
102 | applying ../diffed-tip.patch |
|
102 | applying ../diffed-tip.patch | |
103 | HGEDITFORM=import.normal.normal |
|
103 | HGEDITFORM=import.normal.normal | |
104 |
|
104 | |||
105 |
|
105 | |||
106 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
106 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
107 | HG: Leave message empty to abort commit. |
|
107 | HG: Leave message empty to abort commit. | |
108 | HG: -- |
|
108 | HG: -- | |
109 | HG: user: test |
|
109 | HG: user: test | |
110 | HG: branch 'default' |
|
110 | HG: branch 'default' | |
111 | HG: changed a |
|
111 | HG: changed a | |
112 | abort: empty commit message |
|
112 | abort: empty commit message | |
113 | [255] |
|
113 | [255] | |
114 |
|
114 | |||
115 | Test avoiding editor invocation at applying the patch with --exact, |
|
115 | Test avoiding editor invocation at applying the patch with --exact, | |
116 | even if commit message is empty |
|
116 | even if commit message is empty | |
117 |
|
117 | |||
118 | $ echo a >> b/a |
|
118 | $ echo a >> b/a | |
119 | $ hg --cwd b commit -m ' ' |
|
119 | $ hg --cwd b commit -m ' ' | |
120 | $ hg --cwd b tip -T "{node}\n" |
|
120 | $ hg --cwd b tip -T "{node}\n" | |
121 | d8804f3f5396d800812f579c8452796a5993bdb2 |
|
121 | d8804f3f5396d800812f579c8452796a5993bdb2 | |
122 | $ hg --cwd b export -o ../empty-log.diff . |
|
122 | $ hg --cwd b export -o ../empty-log.diff . | |
123 | $ hg --cwd b update -q -C ".^1" |
|
123 | $ hg --cwd b update -q -C ".^1" | |
124 | $ hg --cwd b --config extensions.strip= strip -q tip |
|
124 | $ hg --cwd b --config extensions.strip= strip -q tip | |
125 | $ HGEDITOR=cat hg --cwd b import --exact ../empty-log.diff |
|
125 | $ HGEDITOR=cat hg --cwd b import --exact ../empty-log.diff | |
126 | applying ../empty-log.diff |
|
126 | applying ../empty-log.diff | |
127 | $ hg --cwd b tip -T "{node}\n" |
|
127 | $ hg --cwd b tip -T "{node}\n" | |
128 | d8804f3f5396d800812f579c8452796a5993bdb2 |
|
128 | d8804f3f5396d800812f579c8452796a5993bdb2 | |
129 |
|
129 | |||
130 | $ rm -r b |
|
130 | $ rm -r b | |
131 |
|
131 | |||
132 |
|
132 | |||
133 | import of plain diff should be ok with message |
|
133 | import of plain diff should be ok with message | |
134 |
|
134 | |||
135 | $ hg clone -r0 a b |
|
135 | $ hg clone -r0 a b | |
136 | adding changesets |
|
136 | adding changesets | |
137 | adding manifests |
|
137 | adding manifests | |
138 | adding file changes |
|
138 | adding file changes | |
139 | added 1 changesets with 2 changes to 2 files |
|
139 | added 1 changesets with 2 changes to 2 files | |
140 | new changesets 80971e65b431 |
|
140 | new changesets 80971e65b431 | |
141 | updating to branch default |
|
141 | updating to branch default | |
142 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
142 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
143 | $ hg --cwd b import -mpatch ../diffed-tip.patch |
|
143 | $ hg --cwd b import -mpatch ../diffed-tip.patch | |
144 | applying ../diffed-tip.patch |
|
144 | applying ../diffed-tip.patch | |
145 | $ rm -r b |
|
145 | $ rm -r b | |
146 |
|
146 | |||
147 |
|
147 | |||
148 | import of plain diff with specific date and user |
|
148 | import of plain diff with specific date and user | |
149 | (this also tests that editor is not invoked, if |
|
149 | (this also tests that editor is not invoked, if | |
150 | '--message'/'--logfile' is specified and '--edit' is not) |
|
150 | '--message'/'--logfile' is specified and '--edit' is not) | |
151 |
|
151 | |||
152 | $ hg clone -r0 a b |
|
152 | $ hg clone -r0 a b | |
153 | adding changesets |
|
153 | adding changesets | |
154 | adding manifests |
|
154 | adding manifests | |
155 | adding file changes |
|
155 | adding file changes | |
156 | added 1 changesets with 2 changes to 2 files |
|
156 | added 1 changesets with 2 changes to 2 files | |
157 | new changesets 80971e65b431 |
|
157 | new changesets 80971e65b431 | |
158 | updating to branch default |
|
158 | updating to branch default | |
159 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
159 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
160 | $ hg --cwd b import -mpatch -d '1 0' -u 'user@nowhere.net' ../diffed-tip.patch |
|
160 | $ hg --cwd b import -mpatch -d '1 0' -u 'user@nowhere.net' ../diffed-tip.patch | |
161 | applying ../diffed-tip.patch |
|
161 | applying ../diffed-tip.patch | |
162 | $ hg -R b tip -pv |
|
162 | $ hg -R b tip -pv | |
163 | changeset: 1:ca68f19f3a40 |
|
163 | changeset: 1:ca68f19f3a40 | |
164 | tag: tip |
|
164 | tag: tip | |
165 | user: user@nowhere.net |
|
165 | user: user@nowhere.net | |
166 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
166 | date: Thu Jan 01 00:00:01 1970 +0000 | |
167 | files: a |
|
167 | files: a | |
168 | description: |
|
168 | description: | |
169 | patch |
|
169 | patch | |
170 |
|
170 | |||
171 |
|
171 | |||
172 | diff -r 80971e65b431 -r ca68f19f3a40 a |
|
172 | diff -r 80971e65b431 -r ca68f19f3a40 a | |
173 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
173 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
174 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
174 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
175 | @@ -1,1 +1,2 @@ |
|
175 | @@ -1,1 +1,2 @@ | |
176 | line 1 |
|
176 | line 1 | |
177 | +line 2 |
|
177 | +line 2 | |
178 |
|
178 | |||
179 | $ rm -r b |
|
179 | $ rm -r b | |
180 |
|
180 | |||
181 |
|
181 | |||
182 | import of plain diff should be ok with --no-commit |
|
182 | import of plain diff should be ok with --no-commit | |
183 | (this also tests that editor is not invoked, if '--no-commit' is |
|
183 | (this also tests that editor is not invoked, if '--no-commit' is | |
184 | specified, regardless of '--edit') |
|
184 | specified, regardless of '--edit') | |
185 |
|
185 | |||
186 | $ hg clone -r0 a b |
|
186 | $ hg clone -r0 a b | |
187 | adding changesets |
|
187 | adding changesets | |
188 | adding manifests |
|
188 | adding manifests | |
189 | adding file changes |
|
189 | adding file changes | |
190 | added 1 changesets with 2 changes to 2 files |
|
190 | added 1 changesets with 2 changes to 2 files | |
191 | new changesets 80971e65b431 |
|
191 | new changesets 80971e65b431 | |
192 | updating to branch default |
|
192 | updating to branch default | |
193 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
193 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
194 | $ HGEDITOR=cat hg --cwd b import --no-commit --edit ../diffed-tip.patch |
|
194 | $ HGEDITOR=cat hg --cwd b import --no-commit --edit ../diffed-tip.patch | |
195 | applying ../diffed-tip.patch |
|
195 | applying ../diffed-tip.patch | |
196 | $ hg --cwd b diff --nodates |
|
196 | $ hg --cwd b diff --nodates | |
197 | diff -r 80971e65b431 a |
|
197 | diff -r 80971e65b431 a | |
198 | --- a/a |
|
198 | --- a/a | |
199 | +++ b/a |
|
199 | +++ b/a | |
200 | @@ -1,1 +1,2 @@ |
|
200 | @@ -1,1 +1,2 @@ | |
201 | line 1 |
|
201 | line 1 | |
202 | +line 2 |
|
202 | +line 2 | |
203 | $ rm -r b |
|
203 | $ rm -r b | |
204 |
|
204 | |||
205 |
|
205 | |||
206 | import of malformed plain diff should fail |
|
206 | import of malformed plain diff should fail | |
207 |
|
207 | |||
208 | $ hg clone -r0 a b |
|
208 | $ hg clone -r0 a b | |
209 | adding changesets |
|
209 | adding changesets | |
210 | adding manifests |
|
210 | adding manifests | |
211 | adding file changes |
|
211 | adding file changes | |
212 | added 1 changesets with 2 changes to 2 files |
|
212 | added 1 changesets with 2 changes to 2 files | |
213 | new changesets 80971e65b431 |
|
213 | new changesets 80971e65b431 | |
214 | updating to branch default |
|
214 | updating to branch default | |
215 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
215 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
216 | $ sed 's/1,1/foo/' < diffed-tip.patch > broken.patch |
|
216 | $ sed 's/1,1/foo/' < diffed-tip.patch > broken.patch | |
217 | $ hg --cwd b import -mpatch ../broken.patch |
|
217 | $ hg --cwd b import -mpatch ../broken.patch | |
218 | applying ../broken.patch |
|
218 | applying ../broken.patch | |
219 | abort: bad hunk #1 |
|
219 | abort: bad hunk #1 | |
220 | [255] |
|
220 | [255] | |
221 | $ rm -r b |
|
221 | $ rm -r b | |
222 |
|
222 | |||
223 |
|
223 | |||
224 | hg -R repo import |
|
224 | hg -R repo import | |
225 | put the clone in a subdir - having a directory named "a" |
|
225 | put the clone in a subdir - having a directory named "a" | |
226 | used to hide a bug. |
|
226 | used to hide a bug. | |
227 |
|
227 | |||
228 | $ mkdir dir |
|
228 | $ mkdir dir | |
229 | $ hg clone -r0 a dir/b |
|
229 | $ hg clone -r0 a dir/b | |
230 | adding changesets |
|
230 | adding changesets | |
231 | adding manifests |
|
231 | adding manifests | |
232 | adding file changes |
|
232 | adding file changes | |
233 | added 1 changesets with 2 changes to 2 files |
|
233 | added 1 changesets with 2 changes to 2 files | |
234 | new changesets 80971e65b431 |
|
234 | new changesets 80971e65b431 | |
235 | updating to branch default |
|
235 | updating to branch default | |
236 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
236 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
237 | $ cd dir |
|
237 | $ cd dir | |
238 | $ hg -R b import ../exported-tip.patch |
|
238 | $ hg -R b import ../exported-tip.patch | |
239 | applying ../exported-tip.patch |
|
239 | applying ../exported-tip.patch | |
240 | $ cd .. |
|
240 | $ cd .. | |
241 | $ rm -r dir |
|
241 | $ rm -r dir | |
242 |
|
242 | |||
243 |
|
243 | |||
244 | import from stdin |
|
244 | import from stdin | |
245 |
|
245 | |||
246 | $ hg clone -r0 a b |
|
246 | $ hg clone -r0 a b | |
247 | adding changesets |
|
247 | adding changesets | |
248 | adding manifests |
|
248 | adding manifests | |
249 | adding file changes |
|
249 | adding file changes | |
250 | added 1 changesets with 2 changes to 2 files |
|
250 | added 1 changesets with 2 changes to 2 files | |
251 | new changesets 80971e65b431 |
|
251 | new changesets 80971e65b431 | |
252 | updating to branch default |
|
252 | updating to branch default | |
253 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
253 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
254 | $ hg --cwd b import - < exported-tip.patch |
|
254 | $ hg --cwd b import - < exported-tip.patch | |
255 | applying patch from stdin |
|
255 | applying patch from stdin | |
256 | $ rm -r b |
|
256 | $ rm -r b | |
257 |
|
257 | |||
258 |
|
258 | |||
259 | import two patches in one stream |
|
259 | import two patches in one stream | |
260 |
|
260 | |||
261 | $ hg init b |
|
261 | $ hg init b | |
262 | $ hg --cwd a export 0:tip | hg --cwd b import - |
|
262 | $ hg --cwd a export 0:tip | hg --cwd b import - | |
263 | applying patch from stdin |
|
263 | applying patch from stdin | |
264 | $ hg --cwd a id |
|
264 | $ hg --cwd a id | |
265 | 1d4bd90af0e4 tip |
|
265 | 1d4bd90af0e4 tip | |
266 | $ hg --cwd b id |
|
266 | $ hg --cwd b id | |
267 | 1d4bd90af0e4 tip |
|
267 | 1d4bd90af0e4 tip | |
268 | $ rm -r b |
|
268 | $ rm -r b | |
269 |
|
269 | |||
270 |
|
270 | |||
271 | override commit message |
|
271 | override commit message | |
272 |
|
272 | |||
273 | $ hg clone -r0 a b |
|
273 | $ hg clone -r0 a b | |
274 | adding changesets |
|
274 | adding changesets | |
275 | adding manifests |
|
275 | adding manifests | |
276 | adding file changes |
|
276 | adding file changes | |
277 | added 1 changesets with 2 changes to 2 files |
|
277 | added 1 changesets with 2 changes to 2 files | |
278 | new changesets 80971e65b431 |
|
278 | new changesets 80971e65b431 | |
279 | updating to branch default |
|
279 | updating to branch default | |
280 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
280 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
281 | $ hg --cwd b import -m 'override' - < exported-tip.patch |
|
281 | $ hg --cwd b import -m 'override' - < exported-tip.patch | |
282 | applying patch from stdin |
|
282 | applying patch from stdin | |
283 | $ hg --cwd b tip | grep override |
|
283 | $ hg --cwd b tip | grep override | |
284 | summary: override |
|
284 | summary: override | |
285 | $ rm -r b |
|
285 | $ rm -r b | |
286 |
|
286 | |||
287 | $ cat > mkmsg.py <<EOF |
|
287 | $ cat > mkmsg.py <<EOF | |
288 | > import email.Message, sys |
|
288 | > import email.Message, sys | |
289 | > msg = email.Message.Message() |
|
289 | > msg = email.Message.Message() | |
290 | > patch = open(sys.argv[1], 'rb').read() |
|
290 | > patch = open(sys.argv[1], 'rb').read() | |
291 | > msg.set_payload('email commit message\n' + patch) |
|
291 | > msg.set_payload('email commit message\n' + patch) | |
292 | > msg['Subject'] = 'email patch' |
|
292 | > msg['Subject'] = 'email patch' | |
293 | > msg['From'] = 'email patcher' |
|
293 | > msg['From'] = 'email patcher' | |
294 | > file(sys.argv[2], 'wb').write(msg.as_string()) |
|
294 | > file(sys.argv[2], 'wb').write(msg.as_string()) | |
295 | > EOF |
|
295 | > EOF | |
296 |
|
296 | |||
297 |
|
297 | |||
298 | plain diff in email, subject, message body |
|
298 | plain diff in email, subject, message body | |
299 |
|
299 | |||
300 | $ hg clone -r0 a b |
|
300 | $ hg clone -r0 a b | |
301 | adding changesets |
|
301 | adding changesets | |
302 | adding manifests |
|
302 | adding manifests | |
303 | adding file changes |
|
303 | adding file changes | |
304 | added 1 changesets with 2 changes to 2 files |
|
304 | added 1 changesets with 2 changes to 2 files | |
305 | new changesets 80971e65b431 |
|
305 | new changesets 80971e65b431 | |
306 | updating to branch default |
|
306 | updating to branch default | |
307 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
307 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
308 | $ $PYTHON mkmsg.py diffed-tip.patch msg.patch |
|
308 | $ $PYTHON mkmsg.py diffed-tip.patch msg.patch | |
309 | $ hg --cwd b import ../msg.patch |
|
309 | $ hg --cwd b import ../msg.patch | |
310 | applying ../msg.patch |
|
310 | applying ../msg.patch | |
311 | $ hg --cwd b tip | grep email |
|
311 | $ hg --cwd b tip | grep email | |
312 | user: email patcher |
|
312 | user: email patcher | |
313 | summary: email patch |
|
313 | summary: email patch | |
314 | $ rm -r b |
|
314 | $ rm -r b | |
315 |
|
315 | |||
316 |
|
316 | |||
317 | plain diff in email, no subject, message body |
|
317 | plain diff in email, no subject, message body | |
318 |
|
318 | |||
319 | $ hg clone -r0 a b |
|
319 | $ hg clone -r0 a b | |
320 | adding changesets |
|
320 | adding changesets | |
321 | adding manifests |
|
321 | adding manifests | |
322 | adding file changes |
|
322 | adding file changes | |
323 | added 1 changesets with 2 changes to 2 files |
|
323 | added 1 changesets with 2 changes to 2 files | |
324 | new changesets 80971e65b431 |
|
324 | new changesets 80971e65b431 | |
325 | updating to branch default |
|
325 | updating to branch default | |
326 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
326 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
327 | $ grep -v '^Subject:' msg.patch | hg --cwd b import - |
|
327 | $ grep -v '^Subject:' msg.patch | hg --cwd b import - | |
328 | applying patch from stdin |
|
328 | applying patch from stdin | |
329 | $ rm -r b |
|
329 | $ rm -r b | |
330 |
|
330 | |||
331 |
|
331 | |||
332 | plain diff in email, subject, no message body |
|
332 | plain diff in email, subject, no message body | |
333 |
|
333 | |||
334 | $ hg clone -r0 a b |
|
334 | $ hg clone -r0 a b | |
335 | adding changesets |
|
335 | adding changesets | |
336 | adding manifests |
|
336 | adding manifests | |
337 | adding file changes |
|
337 | adding file changes | |
338 | added 1 changesets with 2 changes to 2 files |
|
338 | added 1 changesets with 2 changes to 2 files | |
339 | new changesets 80971e65b431 |
|
339 | new changesets 80971e65b431 | |
340 | updating to branch default |
|
340 | updating to branch default | |
341 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
341 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
342 | $ grep -v '^email ' msg.patch | hg --cwd b import - |
|
342 | $ grep -v '^email ' msg.patch | hg --cwd b import - | |
343 | applying patch from stdin |
|
343 | applying patch from stdin | |
344 | $ rm -r b |
|
344 | $ rm -r b | |
345 |
|
345 | |||
346 |
|
346 | |||
347 | plain diff in email, no subject, no message body, should fail |
|
347 | plain diff in email, no subject, no message body, should fail | |
348 |
|
348 | |||
349 | $ hg clone -r0 a b |
|
349 | $ hg clone -r0 a b | |
350 | adding changesets |
|
350 | adding changesets | |
351 | adding manifests |
|
351 | adding manifests | |
352 | adding file changes |
|
352 | adding file changes | |
353 | added 1 changesets with 2 changes to 2 files |
|
353 | added 1 changesets with 2 changes to 2 files | |
354 | new changesets 80971e65b431 |
|
354 | new changesets 80971e65b431 | |
355 | updating to branch default |
|
355 | updating to branch default | |
356 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
356 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
357 | $ egrep -v '^(Subject|email)' msg.patch | hg --cwd b import - |
|
357 | $ egrep -v '^(Subject|email)' msg.patch | hg --cwd b import - | |
358 | applying patch from stdin |
|
358 | applying patch from stdin | |
359 | abort: empty commit message |
|
359 | abort: empty commit message | |
360 | [255] |
|
360 | [255] | |
361 | $ rm -r b |
|
361 | $ rm -r b | |
362 |
|
362 | |||
363 |
|
363 | |||
364 | hg export in email, should use patch header |
|
364 | hg export in email, should use patch header | |
365 |
|
365 | |||
366 | $ hg clone -r0 a b |
|
366 | $ hg clone -r0 a b | |
367 | adding changesets |
|
367 | adding changesets | |
368 | adding manifests |
|
368 | adding manifests | |
369 | adding file changes |
|
369 | adding file changes | |
370 | added 1 changesets with 2 changes to 2 files |
|
370 | added 1 changesets with 2 changes to 2 files | |
371 | new changesets 80971e65b431 |
|
371 | new changesets 80971e65b431 | |
372 | updating to branch default |
|
372 | updating to branch default | |
373 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
373 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
374 | $ $PYTHON mkmsg.py exported-tip.patch msg.patch |
|
374 | $ $PYTHON mkmsg.py exported-tip.patch msg.patch | |
375 | $ cat msg.patch | hg --cwd b import - |
|
375 | $ cat msg.patch | hg --cwd b import - | |
376 | applying patch from stdin |
|
376 | applying patch from stdin | |
377 | $ hg --cwd b tip | grep second |
|
377 | $ hg --cwd b tip | grep second | |
378 | summary: second change |
|
378 | summary: second change | |
379 | $ rm -r b |
|
379 | $ rm -r b | |
380 |
|
380 | |||
381 |
|
381 | |||
382 | subject: duplicate detection, removal of [PATCH] |
|
382 | subject: duplicate detection, removal of [PATCH] | |
383 | The '---' tests the gitsendmail handling without proper mail headers |
|
383 | The '---' tests the gitsendmail handling without proper mail headers | |
384 |
|
384 | |||
385 | $ cat > mkmsg2.py <<EOF |
|
385 | $ cat > mkmsg2.py <<EOF | |
386 | > import email.Message, sys |
|
386 | > import email.Message, sys | |
387 | > msg = email.Message.Message() |
|
387 | > msg = email.Message.Message() | |
388 | > patch = open(sys.argv[1], 'rb').read() |
|
388 | > patch = open(sys.argv[1], 'rb').read() | |
389 | > msg.set_payload('email patch\n\nnext line\n---\n' + patch) |
|
389 | > msg.set_payload('email patch\n\nnext line\n---\n' + patch) | |
390 | > msg['Subject'] = '[PATCH] email patch' |
|
390 | > msg['Subject'] = '[PATCH] email patch' | |
391 | > msg['From'] = 'email patcher' |
|
391 | > msg['From'] = 'email patcher' | |
392 | > file(sys.argv[2], 'wb').write(msg.as_string()) |
|
392 | > file(sys.argv[2], 'wb').write(msg.as_string()) | |
393 | > EOF |
|
393 | > EOF | |
394 |
|
394 | |||
395 |
|
395 | |||
396 | plain diff in email, [PATCH] subject, message body with subject |
|
396 | plain diff in email, [PATCH] subject, message body with subject | |
397 |
|
397 | |||
398 | $ hg clone -r0 a b |
|
398 | $ hg clone -r0 a b | |
399 | adding changesets |
|
399 | adding changesets | |
400 | adding manifests |
|
400 | adding manifests | |
401 | adding file changes |
|
401 | adding file changes | |
402 | added 1 changesets with 2 changes to 2 files |
|
402 | added 1 changesets with 2 changes to 2 files | |
403 | new changesets 80971e65b431 |
|
403 | new changesets 80971e65b431 | |
404 | updating to branch default |
|
404 | updating to branch default | |
405 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
405 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
406 | $ $PYTHON mkmsg2.py diffed-tip.patch msg.patch |
|
406 | $ $PYTHON mkmsg2.py diffed-tip.patch msg.patch | |
407 | $ cat msg.patch | hg --cwd b import - |
|
407 | $ cat msg.patch | hg --cwd b import - | |
408 | applying patch from stdin |
|
408 | applying patch from stdin | |
409 | $ hg --cwd b tip --template '{desc}\n' |
|
409 | $ hg --cwd b tip --template '{desc}\n' | |
410 | email patch |
|
410 | email patch | |
411 |
|
411 | |||
412 | next line |
|
412 | next line | |
413 | $ rm -r b |
|
413 | $ rm -r b | |
414 |
|
414 | |||
415 |
|
415 | |||
416 | Issue963: Parent of working dir incorrect after import of multiple |
|
416 | Issue963: Parent of working dir incorrect after import of multiple | |
417 | patches and rollback |
|
417 | patches and rollback | |
418 |
|
418 | |||
419 | We weren't backing up the correct dirstate file when importing many |
|
419 | We weren't backing up the correct dirstate file when importing many | |
420 | patches: import patch1 patch2; rollback |
|
420 | patches: import patch1 patch2; rollback | |
421 |
|
421 | |||
422 | $ echo line 3 >> a/a |
|
422 | $ echo line 3 >> a/a | |
423 | $ hg --cwd a ci -m'third change' |
|
423 | $ hg --cwd a ci -m'third change' | |
424 | $ hg --cwd a export -o '../patch%R' 1 2 |
|
424 | $ hg --cwd a export -o '../patch%R' 1 2 | |
425 | $ hg clone -qr0 a b |
|
425 | $ hg clone -qr0 a b | |
426 | $ hg --cwd b parents --template 'parent: {rev}\n' |
|
426 | $ hg --cwd b parents --template 'parent: {rev}\n' | |
427 | parent: 0 |
|
427 | parent: 0 | |
428 | $ hg --cwd b import -v ../patch1 ../patch2 |
|
428 | $ hg --cwd b import -v ../patch1 ../patch2 | |
429 | applying ../patch1 |
|
429 | applying ../patch1 | |
430 | patching file a |
|
430 | patching file a | |
431 | committing files: |
|
431 | committing files: | |
432 | a |
|
432 | a | |
433 | committing manifest |
|
433 | committing manifest | |
434 | committing changelog |
|
434 | committing changelog | |
435 | created 1d4bd90af0e4 |
|
435 | created 1d4bd90af0e4 | |
436 | applying ../patch2 |
|
436 | applying ../patch2 | |
437 | patching file a |
|
437 | patching file a | |
438 | committing files: |
|
438 | committing files: | |
439 | a |
|
439 | a | |
440 | committing manifest |
|
440 | committing manifest | |
441 | committing changelog |
|
441 | committing changelog | |
442 | created 6d019af21222 |
|
442 | created 6d019af21222 | |
443 | $ hg --cwd b rollback |
|
443 | $ hg --cwd b rollback | |
444 | repository tip rolled back to revision 0 (undo import) |
|
444 | repository tip rolled back to revision 0 (undo import) | |
445 | working directory now based on revision 0 |
|
445 | working directory now based on revision 0 | |
446 | $ hg --cwd b parents --template 'parent: {rev}\n' |
|
446 | $ hg --cwd b parents --template 'parent: {rev}\n' | |
447 | parent: 0 |
|
447 | parent: 0 | |
448 |
|
448 | |||
449 | Test that "hg rollback" doesn't restore dirstate to one at the |
|
449 | Test that "hg rollback" doesn't restore dirstate to one at the | |
450 | beginning of the rolled back transaction in not-"parent-gone" case. |
|
450 | beginning of the rolled back transaction in not-"parent-gone" case. | |
451 |
|
451 | |||
452 | invoking pretxncommit hook will cause marking '.hg/dirstate' as a file |
|
452 | invoking pretxncommit hook will cause marking '.hg/dirstate' as a file | |
453 | to be restored when rolling back, after DirstateTransactionPlan (see wiki |
|
453 | to be restored when rolling back, after DirstateTransactionPlan (see wiki | |
454 | page for detail). |
|
454 | page for detail). | |
455 |
|
455 | |||
456 | $ hg --cwd b branch -q foobar |
|
456 | $ hg --cwd b branch -q foobar | |
457 | $ hg --cwd b commit -m foobar |
|
457 | $ hg --cwd b commit -m foobar | |
458 | $ hg --cwd b update 0 -q |
|
458 | $ hg --cwd b update 0 -q | |
459 | $ hg --cwd b import ../patch1 ../patch2 --config hooks.pretxncommit=true |
|
459 | $ hg --cwd b import ../patch1 ../patch2 --config hooks.pretxncommit=true | |
460 | applying ../patch1 |
|
460 | applying ../patch1 | |
461 | applying ../patch2 |
|
461 | applying ../patch2 | |
462 | $ hg --cwd b update -q 1 |
|
462 | $ hg --cwd b update -q 1 | |
463 | $ hg --cwd b rollback -q |
|
463 | $ hg --cwd b rollback -q | |
464 | $ hg --cwd b parents --template 'parent: {rev}\n' |
|
464 | $ hg --cwd b parents --template 'parent: {rev}\n' | |
465 | parent: 1 |
|
465 | parent: 1 | |
466 |
|
466 | |||
467 | $ hg --cwd b update -q -C 0 |
|
467 | $ hg --cwd b update -q -C 0 | |
468 | $ hg --cwd b --config extensions.strip= strip -q 1 |
|
468 | $ hg --cwd b --config extensions.strip= strip -q 1 | |
469 |
|
469 | |||
470 | Test visibility of in-memory dirstate changes inside transaction to |
|
470 | Test visibility of in-memory dirstate changes inside transaction to | |
471 | external process |
|
471 | external process | |
472 |
|
472 | |||
473 | $ echo foo > a/foo |
|
473 | $ echo foo > a/foo | |
474 | $ hg --cwd a commit -A -m 'adding foo' foo |
|
474 | $ hg --cwd a commit -A -m 'adding foo' foo | |
475 | $ hg --cwd a export -o '../patch%R' 3 |
|
475 | $ hg --cwd a export -o '../patch%R' 3 | |
476 |
|
476 | |||
477 | $ cat > $TESTTMP/checkvisibility.sh <<EOF |
|
477 | $ cat > $TESTTMP/checkvisibility.sh <<EOF | |
478 | > echo "====" |
|
478 | > echo "====" | |
479 | > hg parents --template "VISIBLE {rev}:{node|short}\n" |
|
479 | > hg parents --template "VISIBLE {rev}:{node|short}\n" | |
480 | > hg status -amr |
|
480 | > hg status -amr | |
481 | > # test that pending changes are hidden |
|
481 | > # test that pending changes are hidden | |
482 | > unset HG_PENDING |
|
482 | > unset HG_PENDING | |
483 | > hg parents --template "ACTUAL {rev}:{node|short}\n" |
|
483 | > hg parents --template "ACTUAL {rev}:{node|short}\n" | |
484 | > hg status -amr |
|
484 | > hg status -amr | |
485 | > echo "====" |
|
485 | > echo "====" | |
486 | > EOF |
|
486 | > EOF | |
487 |
|
487 | |||
488 | == test visibility to external editor |
|
488 | == test visibility to external editor | |
489 |
|
489 | |||
490 | $ (cd b && sh "$TESTTMP/checkvisibility.sh") |
|
490 | $ (cd b && sh "$TESTTMP/checkvisibility.sh") | |
491 | ==== |
|
491 | ==== | |
492 | VISIBLE 0:80971e65b431 |
|
492 | VISIBLE 0:80971e65b431 | |
493 | ACTUAL 0:80971e65b431 |
|
493 | ACTUAL 0:80971e65b431 | |
494 | ==== |
|
494 | ==== | |
495 |
|
495 | |||
496 | $ HGEDITOR="sh $TESTTMP/checkvisibility.sh" hg --cwd b import -v --edit ../patch1 ../patch2 ../patch3 |
|
496 | $ HGEDITOR="sh $TESTTMP/checkvisibility.sh" hg --cwd b import -v --edit ../patch1 ../patch2 ../patch3 | |
497 | applying ../patch1 |
|
497 | applying ../patch1 | |
498 | patching file a |
|
498 | patching file a | |
499 | ==== |
|
499 | ==== | |
500 | VISIBLE 0:80971e65b431 |
|
500 | VISIBLE 0:80971e65b431 | |
501 | M a |
|
501 | M a | |
502 | ACTUAL 0:80971e65b431 |
|
502 | ACTUAL 0:80971e65b431 | |
503 | M a |
|
503 | M a | |
504 | ==== |
|
504 | ==== | |
505 | committing files: |
|
505 | committing files: | |
506 | a |
|
506 | a | |
507 | committing manifest |
|
507 | committing manifest | |
508 | committing changelog |
|
508 | committing changelog | |
509 | created 1d4bd90af0e4 |
|
509 | created 1d4bd90af0e4 | |
510 | applying ../patch2 |
|
510 | applying ../patch2 | |
511 | patching file a |
|
511 | patching file a | |
512 | ==== |
|
512 | ==== | |
513 | VISIBLE 1:1d4bd90af0e4 |
|
513 | VISIBLE 1:1d4bd90af0e4 | |
514 | M a |
|
514 | M a | |
515 | ACTUAL 0:80971e65b431 |
|
515 | ACTUAL 0:80971e65b431 | |
516 | M a |
|
516 | M a | |
517 | ==== |
|
517 | ==== | |
518 | committing files: |
|
518 | committing files: | |
519 | a |
|
519 | a | |
520 | committing manifest |
|
520 | committing manifest | |
521 | committing changelog |
|
521 | committing changelog | |
522 | created 6d019af21222 |
|
522 | created 6d019af21222 | |
523 | applying ../patch3 |
|
523 | applying ../patch3 | |
524 | patching file foo |
|
524 | patching file foo | |
525 | adding foo |
|
525 | adding foo | |
526 | ==== |
|
526 | ==== | |
527 | VISIBLE 2:6d019af21222 |
|
527 | VISIBLE 2:6d019af21222 | |
528 | A foo |
|
528 | A foo | |
529 | ACTUAL 0:80971e65b431 |
|
529 | ACTUAL 0:80971e65b431 | |
530 | M a |
|
530 | M a | |
531 | ==== |
|
531 | ==== | |
532 | committing files: |
|
532 | committing files: | |
533 | foo |
|
533 | foo | |
534 | committing manifest |
|
534 | committing manifest | |
535 | committing changelog |
|
535 | committing changelog | |
536 | created 55e3f75b2378 |
|
536 | created 55e3f75b2378 | |
537 |
|
537 | |||
538 | $ hg --cwd b rollback -q |
|
538 | $ hg --cwd b rollback -q | |
539 |
|
539 | |||
540 | (content of file "a" is already changed and it should be recognized as |
|
540 | (content of file "a" is already changed and it should be recognized as | |
541 | "M", even though dirstate is restored to one before "hg import") |
|
541 | "M", even though dirstate is restored to one before "hg import") | |
542 |
|
542 | |||
543 | $ (cd b && sh "$TESTTMP/checkvisibility.sh") |
|
543 | $ (cd b && sh "$TESTTMP/checkvisibility.sh") | |
544 | ==== |
|
544 | ==== | |
545 | VISIBLE 0:80971e65b431 |
|
545 | VISIBLE 0:80971e65b431 | |
546 | M a |
|
546 | M a | |
547 | ACTUAL 0:80971e65b431 |
|
547 | ACTUAL 0:80971e65b431 | |
548 | M a |
|
548 | M a | |
549 | ==== |
|
549 | ==== | |
550 | $ hg --cwd b revert --no-backup a |
|
550 | $ hg --cwd b revert --no-backup a | |
551 | $ rm -f b/foo |
|
551 | $ rm -f b/foo | |
552 |
|
552 | |||
553 | == test visibility to precommit external hook |
|
553 | == test visibility to precommit external hook | |
554 |
|
554 | |||
555 | $ cat >> b/.hg/hgrc <<EOF |
|
555 | $ cat >> b/.hg/hgrc <<EOF | |
556 | > [hooks] |
|
556 | > [hooks] | |
557 | > precommit.visibility = sh $TESTTMP/checkvisibility.sh |
|
557 | > precommit.visibility = sh $TESTTMP/checkvisibility.sh | |
558 | > EOF |
|
558 | > EOF | |
559 |
|
559 | |||
560 | $ (cd b && sh "$TESTTMP/checkvisibility.sh") |
|
560 | $ (cd b && sh "$TESTTMP/checkvisibility.sh") | |
561 | ==== |
|
561 | ==== | |
562 | VISIBLE 0:80971e65b431 |
|
562 | VISIBLE 0:80971e65b431 | |
563 | ACTUAL 0:80971e65b431 |
|
563 | ACTUAL 0:80971e65b431 | |
564 | ==== |
|
564 | ==== | |
565 |
|
565 | |||
566 | $ hg --cwd b import ../patch1 ../patch2 ../patch3 |
|
566 | $ hg --cwd b import ../patch1 ../patch2 ../patch3 | |
567 | applying ../patch1 |
|
567 | applying ../patch1 | |
568 | ==== |
|
568 | ==== | |
569 | VISIBLE 0:80971e65b431 |
|
569 | VISIBLE 0:80971e65b431 | |
570 | M a |
|
570 | M a | |
571 | ACTUAL 0:80971e65b431 |
|
571 | ACTUAL 0:80971e65b431 | |
572 | M a |
|
572 | M a | |
573 | ==== |
|
573 | ==== | |
574 | applying ../patch2 |
|
574 | applying ../patch2 | |
575 | ==== |
|
575 | ==== | |
576 | VISIBLE 1:1d4bd90af0e4 |
|
576 | VISIBLE 1:1d4bd90af0e4 | |
577 | M a |
|
577 | M a | |
578 | ACTUAL 0:80971e65b431 |
|
578 | ACTUAL 0:80971e65b431 | |
579 | M a |
|
579 | M a | |
580 | ==== |
|
580 | ==== | |
581 | applying ../patch3 |
|
581 | applying ../patch3 | |
582 | ==== |
|
582 | ==== | |
583 | VISIBLE 2:6d019af21222 |
|
583 | VISIBLE 2:6d019af21222 | |
584 | A foo |
|
584 | A foo | |
585 | ACTUAL 0:80971e65b431 |
|
585 | ACTUAL 0:80971e65b431 | |
586 | M a |
|
586 | M a | |
587 | ==== |
|
587 | ==== | |
588 |
|
588 | |||
589 | $ hg --cwd b rollback -q |
|
589 | $ hg --cwd b rollback -q | |
590 | $ (cd b && sh "$TESTTMP/checkvisibility.sh") |
|
590 | $ (cd b && sh "$TESTTMP/checkvisibility.sh") | |
591 | ==== |
|
591 | ==== | |
592 | VISIBLE 0:80971e65b431 |
|
592 | VISIBLE 0:80971e65b431 | |
593 | M a |
|
593 | M a | |
594 | ACTUAL 0:80971e65b431 |
|
594 | ACTUAL 0:80971e65b431 | |
595 | M a |
|
595 | M a | |
596 | ==== |
|
596 | ==== | |
597 | $ hg --cwd b revert --no-backup a |
|
597 | $ hg --cwd b revert --no-backup a | |
598 | $ rm -f b/foo |
|
598 | $ rm -f b/foo | |
599 |
|
599 | |||
600 | $ cat >> b/.hg/hgrc <<EOF |
|
600 | $ cat >> b/.hg/hgrc <<EOF | |
601 | > [hooks] |
|
601 | > [hooks] | |
602 | > precommit.visibility = |
|
602 | > precommit.visibility = | |
603 | > EOF |
|
603 | > EOF | |
604 |
|
604 | |||
605 | == test visibility to pretxncommit external hook |
|
605 | == test visibility to pretxncommit external hook | |
606 |
|
606 | |||
607 | $ cat >> b/.hg/hgrc <<EOF |
|
607 | $ cat >> b/.hg/hgrc <<EOF | |
608 | > [hooks] |
|
608 | > [hooks] | |
609 | > pretxncommit.visibility = sh $TESTTMP/checkvisibility.sh |
|
609 | > pretxncommit.visibility = sh $TESTTMP/checkvisibility.sh | |
610 | > EOF |
|
610 | > EOF | |
611 |
|
611 | |||
612 | $ (cd b && sh "$TESTTMP/checkvisibility.sh") |
|
612 | $ (cd b && sh "$TESTTMP/checkvisibility.sh") | |
613 | ==== |
|
613 | ==== | |
614 | VISIBLE 0:80971e65b431 |
|
614 | VISIBLE 0:80971e65b431 | |
615 | ACTUAL 0:80971e65b431 |
|
615 | ACTUAL 0:80971e65b431 | |
616 | ==== |
|
616 | ==== | |
617 |
|
617 | |||
618 | $ hg --cwd b import ../patch1 ../patch2 ../patch3 |
|
618 | $ hg --cwd b import ../patch1 ../patch2 ../patch3 | |
619 | applying ../patch1 |
|
619 | applying ../patch1 | |
620 | ==== |
|
620 | ==== | |
621 | VISIBLE 0:80971e65b431 |
|
621 | VISIBLE 0:80971e65b431 | |
622 | M a |
|
622 | M a | |
623 | ACTUAL 0:80971e65b431 |
|
623 | ACTUAL 0:80971e65b431 | |
624 | M a |
|
624 | M a | |
625 | ==== |
|
625 | ==== | |
626 | applying ../patch2 |
|
626 | applying ../patch2 | |
627 | ==== |
|
627 | ==== | |
628 | VISIBLE 1:1d4bd90af0e4 |
|
628 | VISIBLE 1:1d4bd90af0e4 | |
629 | M a |
|
629 | M a | |
630 | ACTUAL 0:80971e65b431 |
|
630 | ACTUAL 0:80971e65b431 | |
631 | M a |
|
631 | M a | |
632 | ==== |
|
632 | ==== | |
633 | applying ../patch3 |
|
633 | applying ../patch3 | |
634 | ==== |
|
634 | ==== | |
635 | VISIBLE 2:6d019af21222 |
|
635 | VISIBLE 2:6d019af21222 | |
636 | A foo |
|
636 | A foo | |
637 | ACTUAL 0:80971e65b431 |
|
637 | ACTUAL 0:80971e65b431 | |
638 | M a |
|
638 | M a | |
639 | ==== |
|
639 | ==== | |
640 |
|
640 | |||
641 | $ hg --cwd b rollback -q |
|
641 | $ hg --cwd b rollback -q | |
642 | $ (cd b && sh "$TESTTMP/checkvisibility.sh") |
|
642 | $ (cd b && sh "$TESTTMP/checkvisibility.sh") | |
643 | ==== |
|
643 | ==== | |
644 | VISIBLE 0:80971e65b431 |
|
644 | VISIBLE 0:80971e65b431 | |
645 | M a |
|
645 | M a | |
646 | ACTUAL 0:80971e65b431 |
|
646 | ACTUAL 0:80971e65b431 | |
647 | M a |
|
647 | M a | |
648 | ==== |
|
648 | ==== | |
649 | $ hg --cwd b revert --no-backup a |
|
649 | $ hg --cwd b revert --no-backup a | |
650 | $ rm -f b/foo |
|
650 | $ rm -f b/foo | |
651 |
|
651 | |||
652 | $ cat >> b/.hg/hgrc <<EOF |
|
652 | $ cat >> b/.hg/hgrc <<EOF | |
653 | > [hooks] |
|
653 | > [hooks] | |
654 | > pretxncommit.visibility = |
|
654 | > pretxncommit.visibility = | |
655 | > EOF |
|
655 | > EOF | |
656 |
|
656 | |||
657 | $ rm -r b |
|
657 | $ rm -r b | |
658 |
|
658 | |||
659 |
|
659 | |||
660 | importing a patch in a subdirectory failed at the commit stage |
|
660 | importing a patch in a subdirectory failed at the commit stage | |
661 |
|
661 | |||
662 | $ echo line 2 >> a/d1/d2/a |
|
662 | $ echo line 2 >> a/d1/d2/a | |
663 | $ hg --cwd a ci -u someoneelse -d '1 0' -m'subdir change' |
|
663 | $ hg --cwd a ci -u someoneelse -d '1 0' -m'subdir change' | |
664 |
|
664 | |||
665 | hg import in a subdirectory |
|
665 | hg import in a subdirectory | |
666 |
|
666 | |||
667 | $ hg clone -r0 a b |
|
667 | $ hg clone -r0 a b | |
668 | adding changesets |
|
668 | adding changesets | |
669 | adding manifests |
|
669 | adding manifests | |
670 | adding file changes |
|
670 | adding file changes | |
671 | added 1 changesets with 2 changes to 2 files |
|
671 | added 1 changesets with 2 changes to 2 files | |
672 | new changesets 80971e65b431 |
|
672 | new changesets 80971e65b431 | |
673 | updating to branch default |
|
673 | updating to branch default | |
674 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
674 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
675 | $ hg --cwd a export tip > tmp |
|
675 | $ hg --cwd a export tip > tmp | |
676 | $ sed -e 's/d1\/d2\///' < tmp > subdir-tip.patch |
|
676 | $ sed -e 's/d1\/d2\///' < tmp > subdir-tip.patch | |
677 | $ dir=`pwd` |
|
677 | $ dir=`pwd` | |
678 | $ cd b/d1/d2 2>&1 > /dev/null |
|
678 | $ cd b/d1/d2 2>&1 > /dev/null | |
679 | $ hg import ../../../subdir-tip.patch |
|
679 | $ hg import ../../../subdir-tip.patch | |
680 | applying ../../../subdir-tip.patch |
|
680 | applying ../../../subdir-tip.patch | |
681 | $ cd "$dir" |
|
681 | $ cd "$dir" | |
682 |
|
682 | |||
683 | message should be 'subdir change' |
|
683 | message should be 'subdir change' | |
684 | committer should be 'someoneelse' |
|
684 | committer should be 'someoneelse' | |
685 |
|
685 | |||
686 | $ hg --cwd b tip |
|
686 | $ hg --cwd b tip | |
687 | changeset: 1:3577f5aea227 |
|
687 | changeset: 1:3577f5aea227 | |
688 | tag: tip |
|
688 | tag: tip | |
689 | user: someoneelse |
|
689 | user: someoneelse | |
690 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
690 | date: Thu Jan 01 00:00:01 1970 +0000 | |
691 | summary: subdir change |
|
691 | summary: subdir change | |
692 |
|
692 | |||
693 |
|
693 | |||
694 | should be empty |
|
694 | should be empty | |
695 |
|
695 | |||
696 | $ hg --cwd b status |
|
696 | $ hg --cwd b status | |
697 |
|
697 | |||
698 |
|
698 | |||
699 | Test fuzziness (ambiguous patch location, fuzz=2) |
|
699 | Test fuzziness (ambiguous patch location, fuzz=2) | |
700 |
|
700 | |||
701 | $ hg init fuzzy |
|
701 | $ hg init fuzzy | |
702 | $ cd fuzzy |
|
702 | $ cd fuzzy | |
703 | $ echo line1 > a |
|
703 | $ echo line1 > a | |
704 | $ echo line0 >> a |
|
704 | $ echo line0 >> a | |
705 | $ echo line3 >> a |
|
705 | $ echo line3 >> a | |
706 | $ hg ci -Am adda |
|
706 | $ hg ci -Am adda | |
707 | adding a |
|
707 | adding a | |
708 | $ echo line1 > a |
|
708 | $ echo line1 > a | |
709 | $ echo line2 >> a |
|
709 | $ echo line2 >> a | |
710 | $ echo line0 >> a |
|
710 | $ echo line0 >> a | |
711 | $ echo line3 >> a |
|
711 | $ echo line3 >> a | |
712 | $ hg ci -m change a |
|
712 | $ hg ci -m change a | |
713 | $ hg export tip > fuzzy-tip.patch |
|
713 | $ hg export tip > fuzzy-tip.patch | |
714 | $ hg up -C 0 |
|
714 | $ hg up -C 0 | |
715 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
715 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
716 | $ echo line1 > a |
|
716 | $ echo line1 > a | |
717 | $ echo line0 >> a |
|
717 | $ echo line0 >> a | |
718 | $ echo line1 >> a |
|
718 | $ echo line1 >> a | |
719 | $ echo line0 >> a |
|
719 | $ echo line0 >> a | |
720 | $ hg ci -m brancha |
|
720 | $ hg ci -m brancha | |
721 | created new head |
|
721 | created new head | |
722 | $ hg import --config patch.fuzz=0 -v fuzzy-tip.patch |
|
722 | $ hg import --config patch.fuzz=0 -v fuzzy-tip.patch | |
723 | applying fuzzy-tip.patch |
|
723 | applying fuzzy-tip.patch | |
724 | patching file a |
|
724 | patching file a | |
725 | Hunk #1 FAILED at 0 |
|
725 | Hunk #1 FAILED at 0 | |
726 | 1 out of 1 hunks FAILED -- saving rejects to file a.rej |
|
726 | 1 out of 1 hunks FAILED -- saving rejects to file a.rej | |
727 | abort: patch failed to apply |
|
727 | abort: patch failed to apply | |
728 | [255] |
|
728 | [255] | |
729 | $ hg import --no-commit -v fuzzy-tip.patch |
|
729 | $ hg import --no-commit -v fuzzy-tip.patch | |
730 | applying fuzzy-tip.patch |
|
730 | applying fuzzy-tip.patch | |
731 | patching file a |
|
731 | patching file a | |
732 | Hunk #1 succeeded at 2 with fuzz 1 (offset 0 lines). |
|
732 | Hunk #1 succeeded at 2 with fuzz 1 (offset 0 lines). | |
733 | applied to working directory |
|
733 | applied to working directory | |
734 | $ hg revert -a |
|
734 | $ hg revert -a | |
735 | reverting a |
|
735 | reverting a | |
736 |
|
736 | |||
737 |
|
737 | |||
738 | import with --no-commit should have written .hg/last-message.txt |
|
738 | import with --no-commit should have written .hg/last-message.txt | |
739 |
|
739 | |||
740 | $ cat .hg/last-message.txt |
|
740 | $ cat .hg/last-message.txt | |
741 | change (no-eol) |
|
741 | change (no-eol) | |
742 |
|
742 | |||
743 |
|
743 | |||
744 | test fuzziness with eol=auto |
|
744 | test fuzziness with eol=auto | |
745 |
|
745 | |||
746 | $ hg --config patch.eol=auto import --no-commit -v fuzzy-tip.patch |
|
746 | $ hg --config patch.eol=auto import --no-commit -v fuzzy-tip.patch | |
747 | applying fuzzy-tip.patch |
|
747 | applying fuzzy-tip.patch | |
748 | patching file a |
|
748 | patching file a | |
749 | Hunk #1 succeeded at 2 with fuzz 1 (offset 0 lines). |
|
749 | Hunk #1 succeeded at 2 with fuzz 1 (offset 0 lines). | |
750 | applied to working directory |
|
750 | applied to working directory | |
751 | $ cd .. |
|
751 | $ cd .. | |
752 |
|
752 | |||
753 |
|
753 | |||
754 | Test hunk touching empty files (issue906) |
|
754 | Test hunk touching empty files (issue906) | |
755 |
|
755 | |||
756 | $ hg init empty |
|
756 | $ hg init empty | |
757 | $ cd empty |
|
757 | $ cd empty | |
758 | $ touch a |
|
758 | $ touch a | |
759 | $ touch b1 |
|
759 | $ touch b1 | |
760 | $ touch c1 |
|
760 | $ touch c1 | |
761 | $ echo d > d |
|
761 | $ echo d > d | |
762 | $ hg ci -Am init |
|
762 | $ hg ci -Am init | |
763 | adding a |
|
763 | adding a | |
764 | adding b1 |
|
764 | adding b1 | |
765 | adding c1 |
|
765 | adding c1 | |
766 | adding d |
|
766 | adding d | |
767 | $ echo a > a |
|
767 | $ echo a > a | |
768 | $ echo b > b1 |
|
768 | $ echo b > b1 | |
769 | $ hg mv b1 b2 |
|
769 | $ hg mv b1 b2 | |
770 | $ echo c > c1 |
|
770 | $ echo c > c1 | |
771 | $ hg copy c1 c2 |
|
771 | $ hg copy c1 c2 | |
772 | $ rm d |
|
772 | $ rm d | |
773 | $ touch d |
|
773 | $ touch d | |
774 | $ hg diff --git |
|
774 | $ hg diff --git | |
775 | diff --git a/a b/a |
|
775 | diff --git a/a b/a | |
776 | --- a/a |
|
776 | --- a/a | |
777 | +++ b/a |
|
777 | +++ b/a | |
778 | @@ -0,0 +1,1 @@ |
|
778 | @@ -0,0 +1,1 @@ | |
779 | +a |
|
779 | +a | |
780 | diff --git a/b1 b/b2 |
|
780 | diff --git a/b1 b/b2 | |
781 | rename from b1 |
|
781 | rename from b1 | |
782 | rename to b2 |
|
782 | rename to b2 | |
783 | --- a/b1 |
|
783 | --- a/b1 | |
784 | +++ b/b2 |
|
784 | +++ b/b2 | |
785 | @@ -0,0 +1,1 @@ |
|
785 | @@ -0,0 +1,1 @@ | |
786 | +b |
|
786 | +b | |
787 | diff --git a/c1 b/c1 |
|
787 | diff --git a/c1 b/c1 | |
788 | --- a/c1 |
|
788 | --- a/c1 | |
789 | +++ b/c1 |
|
789 | +++ b/c1 | |
790 | @@ -0,0 +1,1 @@ |
|
790 | @@ -0,0 +1,1 @@ | |
791 | +c |
|
791 | +c | |
792 | diff --git a/c1 b/c2 |
|
792 | diff --git a/c1 b/c2 | |
793 | copy from c1 |
|
793 | copy from c1 | |
794 | copy to c2 |
|
794 | copy to c2 | |
795 | --- a/c1 |
|
795 | --- a/c1 | |
796 | +++ b/c2 |
|
796 | +++ b/c2 | |
797 | @@ -0,0 +1,1 @@ |
|
797 | @@ -0,0 +1,1 @@ | |
798 | +c |
|
798 | +c | |
799 | diff --git a/d b/d |
|
799 | diff --git a/d b/d | |
800 | --- a/d |
|
800 | --- a/d | |
801 | +++ b/d |
|
801 | +++ b/d | |
802 | @@ -1,1 +0,0 @@ |
|
802 | @@ -1,1 +0,0 @@ | |
803 | -d |
|
803 | -d | |
804 | $ hg ci -m empty |
|
804 | $ hg ci -m empty | |
805 | $ hg export --git tip > empty.diff |
|
805 | $ hg export --git tip > empty.diff | |
806 | $ hg up -C 0 |
|
806 | $ hg up -C 0 | |
807 | 4 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
807 | 4 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
808 | $ hg import empty.diff |
|
808 | $ hg import empty.diff | |
809 | applying empty.diff |
|
809 | applying empty.diff | |
810 | $ for name in a b1 b2 c1 c2 d; do |
|
810 | $ for name in a b1 b2 c1 c2 d; do | |
811 | > echo % $name file |
|
811 | > echo % $name file | |
812 | > test -f $name && cat $name |
|
812 | > test -f $name && cat $name | |
813 | > done |
|
813 | > done | |
814 | % a file |
|
814 | % a file | |
815 | a |
|
815 | a | |
816 | % b1 file |
|
816 | % b1 file | |
817 | % b2 file |
|
817 | % b2 file | |
818 | b |
|
818 | b | |
819 | % c1 file |
|
819 | % c1 file | |
820 | c |
|
820 | c | |
821 | % c2 file |
|
821 | % c2 file | |
822 | c |
|
822 | c | |
823 | % d file |
|
823 | % d file | |
824 | $ cd .. |
|
824 | $ cd .. | |
825 |
|
825 | |||
826 |
|
826 | |||
827 | Test importing a patch ending with a binary file removal |
|
827 | Test importing a patch ending with a binary file removal | |
828 |
|
828 | |||
829 | $ hg init binaryremoval |
|
829 | $ hg init binaryremoval | |
830 | $ cd binaryremoval |
|
830 | $ cd binaryremoval | |
831 | $ echo a > a |
|
831 | $ echo a > a | |
832 | $ $PYTHON -c "file('b', 'wb').write('a\x00b')" |
|
832 | $ $PYTHON -c "file('b', 'wb').write('a\x00b')" | |
833 | $ hg ci -Am addall |
|
833 | $ hg ci -Am addall | |
834 | adding a |
|
834 | adding a | |
835 | adding b |
|
835 | adding b | |
836 | $ hg rm a |
|
836 | $ hg rm a | |
837 | $ hg rm b |
|
837 | $ hg rm b | |
838 | $ hg st |
|
838 | $ hg st | |
839 | R a |
|
839 | R a | |
840 | R b |
|
840 | R b | |
841 | $ hg ci -m remove |
|
841 | $ hg ci -m remove | |
842 | $ hg export --git . > remove.diff |
|
842 | $ hg export --git . > remove.diff | |
843 | $ cat remove.diff | grep git |
|
843 | $ cat remove.diff | grep git | |
844 | diff --git a/a b/a |
|
844 | diff --git a/a b/a | |
845 | diff --git a/b b/b |
|
845 | diff --git a/b b/b | |
846 | $ hg up -C 0 |
|
846 | $ hg up -C 0 | |
847 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
847 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
848 | $ hg import remove.diff |
|
848 | $ hg import remove.diff | |
849 | applying remove.diff |
|
849 | applying remove.diff | |
850 | $ hg manifest |
|
850 | $ hg manifest | |
851 | $ cd .. |
|
851 | $ cd .. | |
852 |
|
852 | |||
853 |
|
853 | |||
854 | Issue927: test update+rename with common name |
|
854 | Issue927: test update+rename with common name | |
855 |
|
855 | |||
856 | $ hg init t |
|
856 | $ hg init t | |
857 | $ cd t |
|
857 | $ cd t | |
858 | $ touch a |
|
858 | $ touch a | |
859 | $ hg ci -Am t |
|
859 | $ hg ci -Am t | |
860 | adding a |
|
860 | adding a | |
861 | $ echo a > a |
|
861 | $ echo a > a | |
862 |
|
862 | |||
863 | Here, bfile.startswith(afile) |
|
863 | Here, bfile.startswith(afile) | |
864 |
|
864 | |||
865 | $ hg copy a a2 |
|
865 | $ hg copy a a2 | |
866 | $ hg ci -m copya |
|
866 | $ hg ci -m copya | |
867 | $ hg export --git tip > copy.diff |
|
867 | $ hg export --git tip > copy.diff | |
868 | $ hg up -C 0 |
|
868 | $ hg up -C 0 | |
869 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
869 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
870 | $ hg import copy.diff |
|
870 | $ hg import copy.diff | |
871 | applying copy.diff |
|
871 | applying copy.diff | |
872 |
|
872 | |||
873 | a should contain an 'a' |
|
873 | a should contain an 'a' | |
874 |
|
874 | |||
875 | $ cat a |
|
875 | $ cat a | |
876 | a |
|
876 | a | |
877 |
|
877 | |||
878 | and a2 should have duplicated it |
|
878 | and a2 should have duplicated it | |
879 |
|
879 | |||
880 | $ cat a2 |
|
880 | $ cat a2 | |
881 | a |
|
881 | a | |
882 | $ cd .. |
|
882 | $ cd .. | |
883 |
|
883 | |||
884 |
|
884 | |||
885 | test -p0 |
|
885 | test -p0 | |
886 |
|
886 | |||
887 | $ hg init p0 |
|
887 | $ hg init p0 | |
888 | $ cd p0 |
|
888 | $ cd p0 | |
889 | $ echo a > a |
|
889 | $ echo a > a | |
890 | $ hg ci -Am t |
|
890 | $ hg ci -Am t | |
891 | adding a |
|
891 | adding a | |
892 | $ hg import -p foo |
|
892 | $ hg import -p foo | |
893 | abort: invalid value 'foo' for option -p, expected int |
|
893 | abort: invalid value 'foo' for option -p, expected int | |
894 | [255] |
|
894 | [255] | |
895 | $ hg import -p0 - << EOF |
|
895 | $ hg import -p0 - << EOF | |
896 | > foobar |
|
896 | > foobar | |
897 | > --- a Sat Apr 12 22:43:58 2008 -0400 |
|
897 | > --- a Sat Apr 12 22:43:58 2008 -0400 | |
898 | > +++ a Sat Apr 12 22:44:05 2008 -0400 |
|
898 | > +++ a Sat Apr 12 22:44:05 2008 -0400 | |
899 | > @@ -1,1 +1,1 @@ |
|
899 | > @@ -1,1 +1,1 @@ | |
900 | > -a |
|
900 | > -a | |
901 | > +bb |
|
901 | > +bb | |
902 | > EOF |
|
902 | > EOF | |
903 | applying patch from stdin |
|
903 | applying patch from stdin | |
904 | $ hg status |
|
904 | $ hg status | |
905 | $ cat a |
|
905 | $ cat a | |
906 | bb |
|
906 | bb | |
907 |
|
907 | |||
908 | test --prefix |
|
908 | test --prefix | |
909 |
|
909 | |||
910 | $ mkdir -p dir/dir2 |
|
910 | $ mkdir -p dir/dir2 | |
911 | $ echo b > dir/dir2/b |
|
911 | $ echo b > dir/dir2/b | |
912 | $ hg ci -Am b |
|
912 | $ hg ci -Am b | |
913 | adding dir/dir2/b |
|
913 | adding dir/dir2/b | |
914 | $ hg import -p2 --prefix dir - << EOF |
|
914 | $ hg import -p2 --prefix dir - << EOF | |
915 | > foobar |
|
915 | > foobar | |
916 | > --- drop1/drop2/dir2/b |
|
916 | > --- drop1/drop2/dir2/b | |
917 | > +++ drop1/drop2/dir2/b |
|
917 | > +++ drop1/drop2/dir2/b | |
918 | > @@ -1,1 +1,1 @@ |
|
918 | > @@ -1,1 +1,1 @@ | |
919 | > -b |
|
919 | > -b | |
920 | > +cc |
|
920 | > +cc | |
921 | > EOF |
|
921 | > EOF | |
922 | applying patch from stdin |
|
922 | applying patch from stdin | |
923 | $ hg status |
|
923 | $ hg status | |
924 | $ cat dir/dir2/b |
|
924 | $ cat dir/dir2/b | |
925 | cc |
|
925 | cc | |
926 | $ cd .. |
|
926 | $ cd .. | |
927 |
|
927 | |||
928 |
|
928 | |||
929 | test paths outside repo root |
|
929 | test paths outside repo root | |
930 |
|
930 | |||
931 | $ mkdir outside |
|
931 | $ mkdir outside | |
932 | $ touch outside/foo |
|
932 | $ touch outside/foo | |
933 | $ hg init inside |
|
933 | $ hg init inside | |
934 | $ cd inside |
|
934 | $ cd inside | |
935 | $ hg import - <<EOF |
|
935 | $ hg import - <<EOF | |
936 | > diff --git a/a b/b |
|
936 | > diff --git a/a b/b | |
937 | > rename from ../outside/foo |
|
937 | > rename from ../outside/foo | |
938 | > rename to bar |
|
938 | > rename to bar | |
939 | > EOF |
|
939 | > EOF | |
940 | applying patch from stdin |
|
940 | applying patch from stdin | |
941 | abort: path contains illegal component: ../outside/foo (glob) |
|
941 | abort: path contains illegal component: ../outside/foo (glob) | |
942 | [255] |
|
942 | [255] | |
943 | $ cd .. |
|
943 | $ cd .. | |
944 |
|
944 | |||
945 |
|
945 | |||
946 | test import with similarity and git and strip (issue295 et al.) |
|
946 | test import with similarity and git and strip (issue295 et al.) | |
947 |
|
947 | |||
948 | $ hg init sim |
|
948 | $ hg init sim | |
949 | $ cd sim |
|
949 | $ cd sim | |
950 | $ echo 'this is a test' > a |
|
950 | $ echo 'this is a test' > a | |
951 | $ hg ci -Ama |
|
951 | $ hg ci -Ama | |
952 | adding a |
|
952 | adding a | |
953 | $ cat > ../rename.diff <<EOF |
|
953 | $ cat > ../rename.diff <<EOF | |
954 | > diff --git a/foo/a b/foo/a |
|
954 | > diff --git a/foo/a b/foo/a | |
955 | > deleted file mode 100644 |
|
955 | > deleted file mode 100644 | |
956 | > --- a/foo/a |
|
956 | > --- a/foo/a | |
957 | > +++ /dev/null |
|
957 | > +++ /dev/null | |
958 | > @@ -1,1 +0,0 @@ |
|
958 | > @@ -1,1 +0,0 @@ | |
959 | > -this is a test |
|
959 | > -this is a test | |
960 | > diff --git a/foo/b b/foo/b |
|
960 | > diff --git a/foo/b b/foo/b | |
961 | > new file mode 100644 |
|
961 | > new file mode 100644 | |
962 | > --- /dev/null |
|
962 | > --- /dev/null | |
963 | > +++ b/foo/b |
|
963 | > +++ b/foo/b | |
964 | > @@ -0,0 +1,2 @@ |
|
964 | > @@ -0,0 +1,2 @@ | |
965 | > +this is a test |
|
965 | > +this is a test | |
966 | > +foo |
|
966 | > +foo | |
967 | > EOF |
|
967 | > EOF | |
968 | $ hg import --no-commit -v -s 1 ../rename.diff -p2 |
|
968 | $ hg import --no-commit -v -s 1 ../rename.diff -p2 | |
969 | applying ../rename.diff |
|
969 | applying ../rename.diff | |
970 | patching file a |
|
970 | patching file a | |
971 | patching file b |
|
971 | patching file b | |
972 | adding b |
|
972 | adding b | |
973 | recording removal of a as rename to b (88% similar) |
|
973 | recording removal of a as rename to b (88% similar) | |
974 | applied to working directory |
|
974 | applied to working directory | |
|
975 | $ echo 'mod b' > b | |||
975 | $ hg st -C |
|
976 | $ hg st -C | |
976 | A b |
|
977 | A b | |
977 | a |
|
978 | a | |
978 | R a |
|
979 | R a | |
979 | $ hg revert -a |
|
980 | $ hg revert -a | |
980 | undeleting a |
|
981 | undeleting a | |
981 | forgetting b |
|
982 | forgetting b | |
|
983 | $ cat b | |||
|
984 | mod b | |||
982 | $ rm b |
|
985 | $ rm b | |
983 | $ hg import --no-commit -v -s 100 ../rename.diff -p2 |
|
986 | $ hg import --no-commit -v -s 100 ../rename.diff -p2 | |
984 | applying ../rename.diff |
|
987 | applying ../rename.diff | |
985 | patching file a |
|
988 | patching file a | |
986 | patching file b |
|
989 | patching file b | |
987 | adding b |
|
990 | adding b | |
988 | applied to working directory |
|
991 | applied to working directory | |
989 | $ hg st -C |
|
992 | $ hg st -C | |
990 | A b |
|
993 | A b | |
991 | R a |
|
994 | R a | |
992 | $ cd .. |
|
995 | $ cd .. | |
993 |
|
996 | |||
994 |
|
997 | |||
995 | Issue1495: add empty file from the end of patch |
|
998 | Issue1495: add empty file from the end of patch | |
996 |
|
999 | |||
997 | $ hg init addemptyend |
|
1000 | $ hg init addemptyend | |
998 | $ cd addemptyend |
|
1001 | $ cd addemptyend | |
999 | $ touch a |
|
1002 | $ touch a | |
1000 | $ hg addremove |
|
1003 | $ hg addremove | |
1001 | adding a |
|
1004 | adding a | |
1002 | $ hg ci -m "commit" |
|
1005 | $ hg ci -m "commit" | |
1003 | $ cat > a.patch <<EOF |
|
1006 | $ cat > a.patch <<EOF | |
1004 | > add a, b |
|
1007 | > add a, b | |
1005 | > diff --git a/a b/a |
|
1008 | > diff --git a/a b/a | |
1006 | > --- a/a |
|
1009 | > --- a/a | |
1007 | > +++ b/a |
|
1010 | > +++ b/a | |
1008 | > @@ -0,0 +1,1 @@ |
|
1011 | > @@ -0,0 +1,1 @@ | |
1009 | > +a |
|
1012 | > +a | |
1010 | > diff --git a/b b/b |
|
1013 | > diff --git a/b b/b | |
1011 | > new file mode 100644 |
|
1014 | > new file mode 100644 | |
1012 | > EOF |
|
1015 | > EOF | |
1013 | $ hg import --no-commit a.patch |
|
1016 | $ hg import --no-commit a.patch | |
1014 | applying a.patch |
|
1017 | applying a.patch | |
1015 |
|
1018 | |||
1016 | apply a good patch followed by an empty patch (mainly to ensure |
|
1019 | apply a good patch followed by an empty patch (mainly to ensure | |
1017 | that dirstate is *not* updated when import crashes) |
|
1020 | that dirstate is *not* updated when import crashes) | |
1018 | $ hg update -q -C . |
|
1021 | $ hg update -q -C . | |
1019 | $ rm b |
|
1022 | $ rm b | |
1020 | $ touch empty.patch |
|
1023 | $ touch empty.patch | |
1021 | $ hg import a.patch empty.patch |
|
1024 | $ hg import a.patch empty.patch | |
1022 | applying a.patch |
|
1025 | applying a.patch | |
1023 | applying empty.patch |
|
1026 | applying empty.patch | |
1024 | transaction abort! |
|
1027 | transaction abort! | |
1025 | rollback completed |
|
1028 | rollback completed | |
1026 | abort: empty.patch: no diffs found |
|
1029 | abort: empty.patch: no diffs found | |
1027 | [255] |
|
1030 | [255] | |
1028 | $ hg tip --template '{rev} {desc|firstline}\n' |
|
1031 | $ hg tip --template '{rev} {desc|firstline}\n' | |
1029 | 0 commit |
|
1032 | 0 commit | |
1030 | $ hg -q status |
|
1033 | $ hg -q status | |
1031 | M a |
|
1034 | M a | |
1032 | $ cd .. |
|
1035 | $ cd .. | |
1033 |
|
1036 | |||
1034 | create file when source is not /dev/null |
|
1037 | create file when source is not /dev/null | |
1035 |
|
1038 | |||
1036 | $ cat > create.patch <<EOF |
|
1039 | $ cat > create.patch <<EOF | |
1037 | > diff -Naur proj-orig/foo proj-new/foo |
|
1040 | > diff -Naur proj-orig/foo proj-new/foo | |
1038 | > --- proj-orig/foo 1969-12-31 16:00:00.000000000 -0800 |
|
1041 | > --- proj-orig/foo 1969-12-31 16:00:00.000000000 -0800 | |
1039 | > +++ proj-new/foo 2009-07-17 16:50:45.801368000 -0700 |
|
1042 | > +++ proj-new/foo 2009-07-17 16:50:45.801368000 -0700 | |
1040 | > @@ -0,0 +1,1 @@ |
|
1043 | > @@ -0,0 +1,1 @@ | |
1041 | > +a |
|
1044 | > +a | |
1042 | > EOF |
|
1045 | > EOF | |
1043 |
|
1046 | |||
1044 | some people have patches like the following too |
|
1047 | some people have patches like the following too | |
1045 |
|
1048 | |||
1046 | $ cat > create2.patch <<EOF |
|
1049 | $ cat > create2.patch <<EOF | |
1047 | > diff -Naur proj-orig/foo proj-new/foo |
|
1050 | > diff -Naur proj-orig/foo proj-new/foo | |
1048 | > --- proj-orig/foo.orig 1969-12-31 16:00:00.000000000 -0800 |
|
1051 | > --- proj-orig/foo.orig 1969-12-31 16:00:00.000000000 -0800 | |
1049 | > +++ proj-new/foo 2009-07-17 16:50:45.801368000 -0700 |
|
1052 | > +++ proj-new/foo 2009-07-17 16:50:45.801368000 -0700 | |
1050 | > @@ -0,0 +1,1 @@ |
|
1053 | > @@ -0,0 +1,1 @@ | |
1051 | > +a |
|
1054 | > +a | |
1052 | > EOF |
|
1055 | > EOF | |
1053 | $ hg init oddcreate |
|
1056 | $ hg init oddcreate | |
1054 | $ cd oddcreate |
|
1057 | $ cd oddcreate | |
1055 | $ hg import --no-commit ../create.patch |
|
1058 | $ hg import --no-commit ../create.patch | |
1056 | applying ../create.patch |
|
1059 | applying ../create.patch | |
1057 | $ cat foo |
|
1060 | $ cat foo | |
1058 | a |
|
1061 | a | |
1059 | $ rm foo |
|
1062 | $ rm foo | |
1060 | $ hg revert foo |
|
1063 | $ hg revert foo | |
1061 | $ hg import --no-commit ../create2.patch |
|
1064 | $ hg import --no-commit ../create2.patch | |
1062 | applying ../create2.patch |
|
1065 | applying ../create2.patch | |
1063 | $ cat foo |
|
1066 | $ cat foo | |
1064 | a |
|
1067 | a | |
1065 |
|
1068 | |||
1066 | $ cd .. |
|
1069 | $ cd .. | |
1067 |
|
1070 | |||
1068 | Issue1859: first line mistaken for email headers |
|
1071 | Issue1859: first line mistaken for email headers | |
1069 |
|
1072 | |||
1070 | $ hg init emailconfusion |
|
1073 | $ hg init emailconfusion | |
1071 | $ cd emailconfusion |
|
1074 | $ cd emailconfusion | |
1072 | $ cat > a.patch <<EOF |
|
1075 | $ cat > a.patch <<EOF | |
1073 | > module: summary |
|
1076 | > module: summary | |
1074 | > |
|
1077 | > | |
1075 | > description |
|
1078 | > description | |
1076 | > |
|
1079 | > | |
1077 | > |
|
1080 | > | |
1078 | > diff -r 000000000000 -r 9b4c1e343b55 test.txt |
|
1081 | > diff -r 000000000000 -r 9b4c1e343b55 test.txt | |
1079 | > --- /dev/null |
|
1082 | > --- /dev/null | |
1080 | > +++ b/a |
|
1083 | > +++ b/a | |
1081 | > @@ -0,0 +1,1 @@ |
|
1084 | > @@ -0,0 +1,1 @@ | |
1082 | > +a |
|
1085 | > +a | |
1083 | > EOF |
|
1086 | > EOF | |
1084 | $ hg import -d '0 0' a.patch |
|
1087 | $ hg import -d '0 0' a.patch | |
1085 | applying a.patch |
|
1088 | applying a.patch | |
1086 | $ hg parents -v |
|
1089 | $ hg parents -v | |
1087 | changeset: 0:5a681217c0ad |
|
1090 | changeset: 0:5a681217c0ad | |
1088 | tag: tip |
|
1091 | tag: tip | |
1089 | user: test |
|
1092 | user: test | |
1090 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1093 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1091 | files: a |
|
1094 | files: a | |
1092 | description: |
|
1095 | description: | |
1093 | module: summary |
|
1096 | module: summary | |
1094 |
|
1097 | |||
1095 | description |
|
1098 | description | |
1096 |
|
1099 | |||
1097 |
|
1100 | |||
1098 | $ cd .. |
|
1101 | $ cd .. | |
1099 |
|
1102 | |||
1100 |
|
1103 | |||
1101 | in commit message |
|
1104 | in commit message | |
1102 |
|
1105 | |||
1103 | $ hg init commitconfusion |
|
1106 | $ hg init commitconfusion | |
1104 | $ cd commitconfusion |
|
1107 | $ cd commitconfusion | |
1105 | $ cat > a.patch <<EOF |
|
1108 | $ cat > a.patch <<EOF | |
1106 | > module: summary |
|
1109 | > module: summary | |
1107 | > |
|
1110 | > | |
1108 | > --- description |
|
1111 | > --- description | |
1109 | > |
|
1112 | > | |
1110 | > diff --git a/a b/a |
|
1113 | > diff --git a/a b/a | |
1111 | > new file mode 100644 |
|
1114 | > new file mode 100644 | |
1112 | > --- /dev/null |
|
1115 | > --- /dev/null | |
1113 | > +++ b/a |
|
1116 | > +++ b/a | |
1114 | > @@ -0,0 +1,1 @@ |
|
1117 | > @@ -0,0 +1,1 @@ | |
1115 | > +a |
|
1118 | > +a | |
1116 | > EOF |
|
1119 | > EOF | |
1117 | > hg import -d '0 0' a.patch |
|
1120 | > hg import -d '0 0' a.patch | |
1118 | > hg parents -v |
|
1121 | > hg parents -v | |
1119 | > cd .. |
|
1122 | > cd .. | |
1120 | > |
|
1123 | > | |
1121 | > echo '% tricky header splitting' |
|
1124 | > echo '% tricky header splitting' | |
1122 | > cat > trickyheaders.patch <<EOF |
|
1125 | > cat > trickyheaders.patch <<EOF | |
1123 | > From: User A <user@a> |
|
1126 | > From: User A <user@a> | |
1124 | > Subject: [PATCH] from: tricky! |
|
1127 | > Subject: [PATCH] from: tricky! | |
1125 | > |
|
1128 | > | |
1126 | > # HG changeset patch |
|
1129 | > # HG changeset patch | |
1127 | > # User User B |
|
1130 | > # User User B | |
1128 | > # Date 1266264441 18000 |
|
1131 | > # Date 1266264441 18000 | |
1129 | > # Branch stable |
|
1132 | > # Branch stable | |
1130 | > # Node ID f2be6a1170ac83bf31cb4ae0bad00d7678115bc0 |
|
1133 | > # Node ID f2be6a1170ac83bf31cb4ae0bad00d7678115bc0 | |
1131 | > # Parent 0000000000000000000000000000000000000000 |
|
1134 | > # Parent 0000000000000000000000000000000000000000 | |
1132 | > from: tricky! |
|
1135 | > from: tricky! | |
1133 | > |
|
1136 | > | |
1134 | > That is not a header. |
|
1137 | > That is not a header. | |
1135 | > |
|
1138 | > | |
1136 | > diff -r 000000000000 -r f2be6a1170ac foo |
|
1139 | > diff -r 000000000000 -r f2be6a1170ac foo | |
1137 | > --- /dev/null |
|
1140 | > --- /dev/null | |
1138 | > +++ b/foo |
|
1141 | > +++ b/foo | |
1139 | > @@ -0,0 +1,1 @@ |
|
1142 | > @@ -0,0 +1,1 @@ | |
1140 | > +foo |
|
1143 | > +foo | |
1141 | > EOF |
|
1144 | > EOF | |
1142 | applying a.patch |
|
1145 | applying a.patch | |
1143 | changeset: 0:f34d9187897d |
|
1146 | changeset: 0:f34d9187897d | |
1144 | tag: tip |
|
1147 | tag: tip | |
1145 | user: test |
|
1148 | user: test | |
1146 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1149 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1147 | files: a |
|
1150 | files: a | |
1148 | description: |
|
1151 | description: | |
1149 | module: summary |
|
1152 | module: summary | |
1150 |
|
1153 | |||
1151 |
|
1154 | |||
1152 | % tricky header splitting |
|
1155 | % tricky header splitting | |
1153 |
|
1156 | |||
1154 | $ hg init trickyheaders |
|
1157 | $ hg init trickyheaders | |
1155 | $ cd trickyheaders |
|
1158 | $ cd trickyheaders | |
1156 | $ hg import -d '0 0' ../trickyheaders.patch |
|
1159 | $ hg import -d '0 0' ../trickyheaders.patch | |
1157 | applying ../trickyheaders.patch |
|
1160 | applying ../trickyheaders.patch | |
1158 | $ hg export --git tip |
|
1161 | $ hg export --git tip | |
1159 | # HG changeset patch |
|
1162 | # HG changeset patch | |
1160 | # User User B |
|
1163 | # User User B | |
1161 | # Date 0 0 |
|
1164 | # Date 0 0 | |
1162 | # Thu Jan 01 00:00:00 1970 +0000 |
|
1165 | # Thu Jan 01 00:00:00 1970 +0000 | |
1163 | # Node ID eb56ab91903632294ac504838508cb370c0901d2 |
|
1166 | # Node ID eb56ab91903632294ac504838508cb370c0901d2 | |
1164 | # Parent 0000000000000000000000000000000000000000 |
|
1167 | # Parent 0000000000000000000000000000000000000000 | |
1165 | from: tricky! |
|
1168 | from: tricky! | |
1166 |
|
1169 | |||
1167 | That is not a header. |
|
1170 | That is not a header. | |
1168 |
|
1171 | |||
1169 | diff --git a/foo b/foo |
|
1172 | diff --git a/foo b/foo | |
1170 | new file mode 100644 |
|
1173 | new file mode 100644 | |
1171 | --- /dev/null |
|
1174 | --- /dev/null | |
1172 | +++ b/foo |
|
1175 | +++ b/foo | |
1173 | @@ -0,0 +1,1 @@ |
|
1176 | @@ -0,0 +1,1 @@ | |
1174 | +foo |
|
1177 | +foo | |
1175 | $ cd .. |
|
1178 | $ cd .. | |
1176 |
|
1179 | |||
1177 |
|
1180 | |||
1178 | Issue2102: hg export and hg import speak different languages |
|
1181 | Issue2102: hg export and hg import speak different languages | |
1179 |
|
1182 | |||
1180 | $ hg init issue2102 |
|
1183 | $ hg init issue2102 | |
1181 | $ cd issue2102 |
|
1184 | $ cd issue2102 | |
1182 | $ mkdir -p src/cmd/gc |
|
1185 | $ mkdir -p src/cmd/gc | |
1183 | $ touch src/cmd/gc/mksys.bash |
|
1186 | $ touch src/cmd/gc/mksys.bash | |
1184 | $ hg ci -Am init |
|
1187 | $ hg ci -Am init | |
1185 | adding src/cmd/gc/mksys.bash |
|
1188 | adding src/cmd/gc/mksys.bash | |
1186 | $ hg import - <<EOF |
|
1189 | $ hg import - <<EOF | |
1187 | > # HG changeset patch |
|
1190 | > # HG changeset patch | |
1188 | > # User Rob Pike |
|
1191 | > # User Rob Pike | |
1189 | > # Date 1216685449 25200 |
|
1192 | > # Date 1216685449 25200 | |
1190 | > # Node ID 03aa2b206f499ad6eb50e6e207b9e710d6409c98 |
|
1193 | > # Node ID 03aa2b206f499ad6eb50e6e207b9e710d6409c98 | |
1191 | > # Parent 93d10138ad8df586827ca90b4ddb5033e21a3a84 |
|
1194 | > # Parent 93d10138ad8df586827ca90b4ddb5033e21a3a84 | |
1192 | > help management of empty pkg and lib directories in perforce |
|
1195 | > help management of empty pkg and lib directories in perforce | |
1193 | > |
|
1196 | > | |
1194 | > R=gri |
|
1197 | > R=gri | |
1195 | > DELTA=4 (4 added, 0 deleted, 0 changed) |
|
1198 | > DELTA=4 (4 added, 0 deleted, 0 changed) | |
1196 | > OCL=13328 |
|
1199 | > OCL=13328 | |
1197 | > CL=13328 |
|
1200 | > CL=13328 | |
1198 | > |
|
1201 | > | |
1199 | > diff --git a/lib/place-holder b/lib/place-holder |
|
1202 | > diff --git a/lib/place-holder b/lib/place-holder | |
1200 | > new file mode 100644 |
|
1203 | > new file mode 100644 | |
1201 | > --- /dev/null |
|
1204 | > --- /dev/null | |
1202 | > +++ b/lib/place-holder |
|
1205 | > +++ b/lib/place-holder | |
1203 | > @@ -0,0 +1,2 @@ |
|
1206 | > @@ -0,0 +1,2 @@ | |
1204 | > +perforce does not maintain empty directories. |
|
1207 | > +perforce does not maintain empty directories. | |
1205 | > +this file helps. |
|
1208 | > +this file helps. | |
1206 | > diff --git a/pkg/place-holder b/pkg/place-holder |
|
1209 | > diff --git a/pkg/place-holder b/pkg/place-holder | |
1207 | > new file mode 100644 |
|
1210 | > new file mode 100644 | |
1208 | > --- /dev/null |
|
1211 | > --- /dev/null | |
1209 | > +++ b/pkg/place-holder |
|
1212 | > +++ b/pkg/place-holder | |
1210 | > @@ -0,0 +1,2 @@ |
|
1213 | > @@ -0,0 +1,2 @@ | |
1211 | > +perforce does not maintain empty directories. |
|
1214 | > +perforce does not maintain empty directories. | |
1212 | > +this file helps. |
|
1215 | > +this file helps. | |
1213 | > diff --git a/src/cmd/gc/mksys.bash b/src/cmd/gc/mksys.bash |
|
1216 | > diff --git a/src/cmd/gc/mksys.bash b/src/cmd/gc/mksys.bash | |
1214 | > old mode 100644 |
|
1217 | > old mode 100644 | |
1215 | > new mode 100755 |
|
1218 | > new mode 100755 | |
1216 | > EOF |
|
1219 | > EOF | |
1217 | applying patch from stdin |
|
1220 | applying patch from stdin | |
1218 |
|
1221 | |||
1219 | #if execbit |
|
1222 | #if execbit | |
1220 |
|
1223 | |||
1221 | $ hg sum |
|
1224 | $ hg sum | |
1222 | parent: 1:d59915696727 tip |
|
1225 | parent: 1:d59915696727 tip | |
1223 | help management of empty pkg and lib directories in perforce |
|
1226 | help management of empty pkg and lib directories in perforce | |
1224 | branch: default |
|
1227 | branch: default | |
1225 | commit: (clean) |
|
1228 | commit: (clean) | |
1226 | update: (current) |
|
1229 | update: (current) | |
1227 | phases: 2 draft |
|
1230 | phases: 2 draft | |
1228 |
|
1231 | |||
1229 | $ hg diff --git -c tip |
|
1232 | $ hg diff --git -c tip | |
1230 | diff --git a/lib/place-holder b/lib/place-holder |
|
1233 | diff --git a/lib/place-holder b/lib/place-holder | |
1231 | new file mode 100644 |
|
1234 | new file mode 100644 | |
1232 | --- /dev/null |
|
1235 | --- /dev/null | |
1233 | +++ b/lib/place-holder |
|
1236 | +++ b/lib/place-holder | |
1234 | @@ -0,0 +1,2 @@ |
|
1237 | @@ -0,0 +1,2 @@ | |
1235 | +perforce does not maintain empty directories. |
|
1238 | +perforce does not maintain empty directories. | |
1236 | +this file helps. |
|
1239 | +this file helps. | |
1237 | diff --git a/pkg/place-holder b/pkg/place-holder |
|
1240 | diff --git a/pkg/place-holder b/pkg/place-holder | |
1238 | new file mode 100644 |
|
1241 | new file mode 100644 | |
1239 | --- /dev/null |
|
1242 | --- /dev/null | |
1240 | +++ b/pkg/place-holder |
|
1243 | +++ b/pkg/place-holder | |
1241 | @@ -0,0 +1,2 @@ |
|
1244 | @@ -0,0 +1,2 @@ | |
1242 | +perforce does not maintain empty directories. |
|
1245 | +perforce does not maintain empty directories. | |
1243 | +this file helps. |
|
1246 | +this file helps. | |
1244 | diff --git a/src/cmd/gc/mksys.bash b/src/cmd/gc/mksys.bash |
|
1247 | diff --git a/src/cmd/gc/mksys.bash b/src/cmd/gc/mksys.bash | |
1245 | old mode 100644 |
|
1248 | old mode 100644 | |
1246 | new mode 100755 |
|
1249 | new mode 100755 | |
1247 |
|
1250 | |||
1248 | #else |
|
1251 | #else | |
1249 |
|
1252 | |||
1250 | $ hg sum |
|
1253 | $ hg sum | |
1251 | parent: 1:28f089cc9ccc tip |
|
1254 | parent: 1:28f089cc9ccc tip | |
1252 | help management of empty pkg and lib directories in perforce |
|
1255 | help management of empty pkg and lib directories in perforce | |
1253 | branch: default |
|
1256 | branch: default | |
1254 | commit: (clean) |
|
1257 | commit: (clean) | |
1255 | update: (current) |
|
1258 | update: (current) | |
1256 | phases: 2 draft |
|
1259 | phases: 2 draft | |
1257 |
|
1260 | |||
1258 | $ hg diff --git -c tip |
|
1261 | $ hg diff --git -c tip | |
1259 | diff --git a/lib/place-holder b/lib/place-holder |
|
1262 | diff --git a/lib/place-holder b/lib/place-holder | |
1260 | new file mode 100644 |
|
1263 | new file mode 100644 | |
1261 | --- /dev/null |
|
1264 | --- /dev/null | |
1262 | +++ b/lib/place-holder |
|
1265 | +++ b/lib/place-holder | |
1263 | @@ -0,0 +1,2 @@ |
|
1266 | @@ -0,0 +1,2 @@ | |
1264 | +perforce does not maintain empty directories. |
|
1267 | +perforce does not maintain empty directories. | |
1265 | +this file helps. |
|
1268 | +this file helps. | |
1266 | diff --git a/pkg/place-holder b/pkg/place-holder |
|
1269 | diff --git a/pkg/place-holder b/pkg/place-holder | |
1267 | new file mode 100644 |
|
1270 | new file mode 100644 | |
1268 | --- /dev/null |
|
1271 | --- /dev/null | |
1269 | +++ b/pkg/place-holder |
|
1272 | +++ b/pkg/place-holder | |
1270 | @@ -0,0 +1,2 @@ |
|
1273 | @@ -0,0 +1,2 @@ | |
1271 | +perforce does not maintain empty directories. |
|
1274 | +perforce does not maintain empty directories. | |
1272 | +this file helps. |
|
1275 | +this file helps. | |
1273 |
|
1276 | |||
1274 | /* The mode change for mksys.bash is missing here, because on platforms */ |
|
1277 | /* The mode change for mksys.bash is missing here, because on platforms */ | |
1275 | /* that don't support execbits, mode changes in patches are ignored when */ |
|
1278 | /* that don't support execbits, mode changes in patches are ignored when */ | |
1276 | /* they are imported. This is obviously also the reason for why the hash */ |
|
1279 | /* they are imported. This is obviously also the reason for why the hash */ | |
1277 | /* in the created changeset is different to the one you see above the */ |
|
1280 | /* in the created changeset is different to the one you see above the */ | |
1278 | /* #else clause */ |
|
1281 | /* #else clause */ | |
1279 |
|
1282 | |||
1280 | #endif |
|
1283 | #endif | |
1281 | $ cd .. |
|
1284 | $ cd .. | |
1282 |
|
1285 | |||
1283 |
|
1286 | |||
1284 | diff lines looking like headers |
|
1287 | diff lines looking like headers | |
1285 |
|
1288 | |||
1286 | $ hg init difflineslikeheaders |
|
1289 | $ hg init difflineslikeheaders | |
1287 | $ cd difflineslikeheaders |
|
1290 | $ cd difflineslikeheaders | |
1288 | $ echo a >a |
|
1291 | $ echo a >a | |
1289 | $ echo b >b |
|
1292 | $ echo b >b | |
1290 | $ echo c >c |
|
1293 | $ echo c >c | |
1291 | $ hg ci -Am1 |
|
1294 | $ hg ci -Am1 | |
1292 | adding a |
|
1295 | adding a | |
1293 | adding b |
|
1296 | adding b | |
1294 | adding c |
|
1297 | adding c | |
1295 |
|
1298 | |||
1296 | $ echo "key: value" >>a |
|
1299 | $ echo "key: value" >>a | |
1297 | $ echo "key: value" >>b |
|
1300 | $ echo "key: value" >>b | |
1298 | $ echo "foo" >>c |
|
1301 | $ echo "foo" >>c | |
1299 | $ hg ci -m2 |
|
1302 | $ hg ci -m2 | |
1300 |
|
1303 | |||
1301 | $ hg up -C 0 |
|
1304 | $ hg up -C 0 | |
1302 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1305 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1303 | $ hg diff --git -c1 >want |
|
1306 | $ hg diff --git -c1 >want | |
1304 | $ hg diff -c1 | hg import --no-commit - |
|
1307 | $ hg diff -c1 | hg import --no-commit - | |
1305 | applying patch from stdin |
|
1308 | applying patch from stdin | |
1306 | $ hg diff --git >have |
|
1309 | $ hg diff --git >have | |
1307 | $ diff want have |
|
1310 | $ diff want have | |
1308 | $ cd .. |
|
1311 | $ cd .. | |
1309 |
|
1312 | |||
1310 | import a unified diff with no lines of context (diff -U0) |
|
1313 | import a unified diff with no lines of context (diff -U0) | |
1311 |
|
1314 | |||
1312 | $ hg init diffzero |
|
1315 | $ hg init diffzero | |
1313 | $ cd diffzero |
|
1316 | $ cd diffzero | |
1314 | $ cat > f << EOF |
|
1317 | $ cat > f << EOF | |
1315 | > c2 |
|
1318 | > c2 | |
1316 | > c4 |
|
1319 | > c4 | |
1317 | > c5 |
|
1320 | > c5 | |
1318 | > EOF |
|
1321 | > EOF | |
1319 | $ hg commit -Am0 |
|
1322 | $ hg commit -Am0 | |
1320 | adding f |
|
1323 | adding f | |
1321 |
|
1324 | |||
1322 | $ hg import --no-commit - << EOF |
|
1325 | $ hg import --no-commit - << EOF | |
1323 | > # HG changeset patch |
|
1326 | > # HG changeset patch | |
1324 | > # User test |
|
1327 | > # User test | |
1325 | > # Date 0 0 |
|
1328 | > # Date 0 0 | |
1326 | > # Node ID f4974ab632f3dee767567b0576c0ec9a4508575c |
|
1329 | > # Node ID f4974ab632f3dee767567b0576c0ec9a4508575c | |
1327 | > # Parent 8679a12a975b819fae5f7ad3853a2886d143d794 |
|
1330 | > # Parent 8679a12a975b819fae5f7ad3853a2886d143d794 | |
1328 | > 1 |
|
1331 | > 1 | |
1329 | > diff -r 8679a12a975b -r f4974ab632f3 f |
|
1332 | > diff -r 8679a12a975b -r f4974ab632f3 f | |
1330 | > --- a/f Thu Jan 01 00:00:00 1970 +0000 |
|
1333 | > --- a/f Thu Jan 01 00:00:00 1970 +0000 | |
1331 | > +++ b/f Thu Jan 01 00:00:00 1970 +0000 |
|
1334 | > +++ b/f Thu Jan 01 00:00:00 1970 +0000 | |
1332 | > @@ -0,0 +1,1 @@ |
|
1335 | > @@ -0,0 +1,1 @@ | |
1333 | > +c1 |
|
1336 | > +c1 | |
1334 | > @@ -1,0 +3,1 @@ |
|
1337 | > @@ -1,0 +3,1 @@ | |
1335 | > +c3 |
|
1338 | > +c3 | |
1336 | > @@ -3,1 +4,0 @@ |
|
1339 | > @@ -3,1 +4,0 @@ | |
1337 | > -c5 |
|
1340 | > -c5 | |
1338 | > EOF |
|
1341 | > EOF | |
1339 | applying patch from stdin |
|
1342 | applying patch from stdin | |
1340 |
|
1343 | |||
1341 | $ cat f |
|
1344 | $ cat f | |
1342 | c1 |
|
1345 | c1 | |
1343 | c2 |
|
1346 | c2 | |
1344 | c3 |
|
1347 | c3 | |
1345 | c4 |
|
1348 | c4 | |
1346 |
|
1349 | |||
1347 | $ cd .. |
|
1350 | $ cd .. | |
1348 |
|
1351 | |||
1349 | no segfault while importing a unified diff which start line is zero but chunk |
|
1352 | no segfault while importing a unified diff which start line is zero but chunk | |
1350 | size is non-zero |
|
1353 | size is non-zero | |
1351 |
|
1354 | |||
1352 | $ hg init startlinezero |
|
1355 | $ hg init startlinezero | |
1353 | $ cd startlinezero |
|
1356 | $ cd startlinezero | |
1354 | $ echo foo > foo |
|
1357 | $ echo foo > foo | |
1355 | $ hg commit -Amfoo |
|
1358 | $ hg commit -Amfoo | |
1356 | adding foo |
|
1359 | adding foo | |
1357 |
|
1360 | |||
1358 | $ hg import --no-commit - << EOF |
|
1361 | $ hg import --no-commit - << EOF | |
1359 | > diff a/foo b/foo |
|
1362 | > diff a/foo b/foo | |
1360 | > --- a/foo |
|
1363 | > --- a/foo | |
1361 | > +++ b/foo |
|
1364 | > +++ b/foo | |
1362 | > @@ -0,1 +0,1 @@ |
|
1365 | > @@ -0,1 +0,1 @@ | |
1363 | > foo |
|
1366 | > foo | |
1364 | > EOF |
|
1367 | > EOF | |
1365 | applying patch from stdin |
|
1368 | applying patch from stdin | |
1366 |
|
1369 | |||
1367 | $ cd .. |
|
1370 | $ cd .. | |
1368 |
|
1371 | |||
1369 | Test corner case involving fuzz and skew |
|
1372 | Test corner case involving fuzz and skew | |
1370 |
|
1373 | |||
1371 | $ hg init morecornercases |
|
1374 | $ hg init morecornercases | |
1372 | $ cd morecornercases |
|
1375 | $ cd morecornercases | |
1373 |
|
1376 | |||
1374 | $ cat > 01-no-context-beginning-of-file.diff <<EOF |
|
1377 | $ cat > 01-no-context-beginning-of-file.diff <<EOF | |
1375 | > diff --git a/a b/a |
|
1378 | > diff --git a/a b/a | |
1376 | > --- a/a |
|
1379 | > --- a/a | |
1377 | > +++ b/a |
|
1380 | > +++ b/a | |
1378 | > @@ -1,0 +1,1 @@ |
|
1381 | > @@ -1,0 +1,1 @@ | |
1379 | > +line |
|
1382 | > +line | |
1380 | > EOF |
|
1383 | > EOF | |
1381 |
|
1384 | |||
1382 | $ cat > 02-no-context-middle-of-file.diff <<EOF |
|
1385 | $ cat > 02-no-context-middle-of-file.diff <<EOF | |
1383 | > diff --git a/a b/a |
|
1386 | > diff --git a/a b/a | |
1384 | > --- a/a |
|
1387 | > --- a/a | |
1385 | > +++ b/a |
|
1388 | > +++ b/a | |
1386 | > @@ -1,1 +1,1 @@ |
|
1389 | > @@ -1,1 +1,1 @@ | |
1387 | > -2 |
|
1390 | > -2 | |
1388 | > +add some skew |
|
1391 | > +add some skew | |
1389 | > @@ -2,0 +2,1 @@ |
|
1392 | > @@ -2,0 +2,1 @@ | |
1390 | > +line |
|
1393 | > +line | |
1391 | > EOF |
|
1394 | > EOF | |
1392 |
|
1395 | |||
1393 | $ cat > 03-no-context-end-of-file.diff <<EOF |
|
1396 | $ cat > 03-no-context-end-of-file.diff <<EOF | |
1394 | > diff --git a/a b/a |
|
1397 | > diff --git a/a b/a | |
1395 | > --- a/a |
|
1398 | > --- a/a | |
1396 | > +++ b/a |
|
1399 | > +++ b/a | |
1397 | > @@ -10,0 +10,1 @@ |
|
1400 | > @@ -10,0 +10,1 @@ | |
1398 | > +line |
|
1401 | > +line | |
1399 | > EOF |
|
1402 | > EOF | |
1400 |
|
1403 | |||
1401 | $ cat > 04-middle-of-file-completely-fuzzed.diff <<EOF |
|
1404 | $ cat > 04-middle-of-file-completely-fuzzed.diff <<EOF | |
1402 | > diff --git a/a b/a |
|
1405 | > diff --git a/a b/a | |
1403 | > --- a/a |
|
1406 | > --- a/a | |
1404 | > +++ b/a |
|
1407 | > +++ b/a | |
1405 | > @@ -1,1 +1,1 @@ |
|
1408 | > @@ -1,1 +1,1 @@ | |
1406 | > -2 |
|
1409 | > -2 | |
1407 | > +add some skew |
|
1410 | > +add some skew | |
1408 | > @@ -2,2 +2,3 @@ |
|
1411 | > @@ -2,2 +2,3 @@ | |
1409 | > not matching, should fuzz |
|
1412 | > not matching, should fuzz | |
1410 | > ... a bit |
|
1413 | > ... a bit | |
1411 | > +line |
|
1414 | > +line | |
1412 | > EOF |
|
1415 | > EOF | |
1413 |
|
1416 | |||
1414 | $ cat > a <<EOF |
|
1417 | $ cat > a <<EOF | |
1415 | > 1 |
|
1418 | > 1 | |
1416 | > 2 |
|
1419 | > 2 | |
1417 | > 3 |
|
1420 | > 3 | |
1418 | > 4 |
|
1421 | > 4 | |
1419 | > EOF |
|
1422 | > EOF | |
1420 | $ hg ci -Am adda a |
|
1423 | $ hg ci -Am adda a | |
1421 | $ for p in *.diff; do |
|
1424 | $ for p in *.diff; do | |
1422 | > hg import -v --no-commit $p |
|
1425 | > hg import -v --no-commit $p | |
1423 | > cat a |
|
1426 | > cat a | |
1424 | > hg revert -aqC a |
|
1427 | > hg revert -aqC a | |
1425 | > # patch -p1 < $p |
|
1428 | > # patch -p1 < $p | |
1426 | > # cat a |
|
1429 | > # cat a | |
1427 | > # hg revert -aC a |
|
1430 | > # hg revert -aC a | |
1428 | > done |
|
1431 | > done | |
1429 | applying 01-no-context-beginning-of-file.diff |
|
1432 | applying 01-no-context-beginning-of-file.diff | |
1430 | patching file a |
|
1433 | patching file a | |
1431 | applied to working directory |
|
1434 | applied to working directory | |
1432 | 1 |
|
1435 | 1 | |
1433 | line |
|
1436 | line | |
1434 | 2 |
|
1437 | 2 | |
1435 | 3 |
|
1438 | 3 | |
1436 | 4 |
|
1439 | 4 | |
1437 | applying 02-no-context-middle-of-file.diff |
|
1440 | applying 02-no-context-middle-of-file.diff | |
1438 | patching file a |
|
1441 | patching file a | |
1439 | Hunk #1 succeeded at 2 (offset 1 lines). |
|
1442 | Hunk #1 succeeded at 2 (offset 1 lines). | |
1440 | Hunk #2 succeeded at 4 (offset 1 lines). |
|
1443 | Hunk #2 succeeded at 4 (offset 1 lines). | |
1441 | applied to working directory |
|
1444 | applied to working directory | |
1442 | 1 |
|
1445 | 1 | |
1443 | add some skew |
|
1446 | add some skew | |
1444 | 3 |
|
1447 | 3 | |
1445 | line |
|
1448 | line | |
1446 | 4 |
|
1449 | 4 | |
1447 | applying 03-no-context-end-of-file.diff |
|
1450 | applying 03-no-context-end-of-file.diff | |
1448 | patching file a |
|
1451 | patching file a | |
1449 | Hunk #1 succeeded at 5 (offset -6 lines). |
|
1452 | Hunk #1 succeeded at 5 (offset -6 lines). | |
1450 | applied to working directory |
|
1453 | applied to working directory | |
1451 | 1 |
|
1454 | 1 | |
1452 | 2 |
|
1455 | 2 | |
1453 | 3 |
|
1456 | 3 | |
1454 | 4 |
|
1457 | 4 | |
1455 | line |
|
1458 | line | |
1456 | applying 04-middle-of-file-completely-fuzzed.diff |
|
1459 | applying 04-middle-of-file-completely-fuzzed.diff | |
1457 | patching file a |
|
1460 | patching file a | |
1458 | Hunk #1 succeeded at 2 (offset 1 lines). |
|
1461 | Hunk #1 succeeded at 2 (offset 1 lines). | |
1459 | Hunk #2 succeeded at 5 with fuzz 2 (offset 1 lines). |
|
1462 | Hunk #2 succeeded at 5 with fuzz 2 (offset 1 lines). | |
1460 | applied to working directory |
|
1463 | applied to working directory | |
1461 | 1 |
|
1464 | 1 | |
1462 | add some skew |
|
1465 | add some skew | |
1463 | 3 |
|
1466 | 3 | |
1464 | 4 |
|
1467 | 4 | |
1465 | line |
|
1468 | line | |
1466 | $ cd .. |
|
1469 | $ cd .. | |
1467 |
|
1470 | |||
1468 | Test partial application |
|
1471 | Test partial application | |
1469 | ------------------------ |
|
1472 | ------------------------ | |
1470 |
|
1473 | |||
1471 | prepare a stack of patches depending on each other |
|
1474 | prepare a stack of patches depending on each other | |
1472 |
|
1475 | |||
1473 | $ hg init partial |
|
1476 | $ hg init partial | |
1474 | $ cd partial |
|
1477 | $ cd partial | |
1475 | $ cat << EOF > a |
|
1478 | $ cat << EOF > a | |
1476 | > one |
|
1479 | > one | |
1477 | > two |
|
1480 | > two | |
1478 | > three |
|
1481 | > three | |
1479 | > four |
|
1482 | > four | |
1480 | > five |
|
1483 | > five | |
1481 | > six |
|
1484 | > six | |
1482 | > seven |
|
1485 | > seven | |
1483 | > EOF |
|
1486 | > EOF | |
1484 | $ hg add a |
|
1487 | $ hg add a | |
1485 | $ echo 'b' > b |
|
1488 | $ echo 'b' > b | |
1486 | $ hg add b |
|
1489 | $ hg add b | |
1487 | $ hg commit -m 'initial' -u Babar |
|
1490 | $ hg commit -m 'initial' -u Babar | |
1488 | $ cat << EOF > a |
|
1491 | $ cat << EOF > a | |
1489 | > one |
|
1492 | > one | |
1490 | > two |
|
1493 | > two | |
1491 | > 3 |
|
1494 | > 3 | |
1492 | > four |
|
1495 | > four | |
1493 | > five |
|
1496 | > five | |
1494 | > six |
|
1497 | > six | |
1495 | > seven |
|
1498 | > seven | |
1496 | > EOF |
|
1499 | > EOF | |
1497 | $ hg commit -m 'three' -u Celeste |
|
1500 | $ hg commit -m 'three' -u Celeste | |
1498 | $ cat << EOF > a |
|
1501 | $ cat << EOF > a | |
1499 | > one |
|
1502 | > one | |
1500 | > two |
|
1503 | > two | |
1501 | > 3 |
|
1504 | > 3 | |
1502 | > 4 |
|
1505 | > 4 | |
1503 | > five |
|
1506 | > five | |
1504 | > six |
|
1507 | > six | |
1505 | > seven |
|
1508 | > seven | |
1506 | > EOF |
|
1509 | > EOF | |
1507 | $ hg commit -m 'four' -u Rataxes |
|
1510 | $ hg commit -m 'four' -u Rataxes | |
1508 | $ cat << EOF > a |
|
1511 | $ cat << EOF > a | |
1509 | > one |
|
1512 | > one | |
1510 | > two |
|
1513 | > two | |
1511 | > 3 |
|
1514 | > 3 | |
1512 | > 4 |
|
1515 | > 4 | |
1513 | > 5 |
|
1516 | > 5 | |
1514 | > six |
|
1517 | > six | |
1515 | > seven |
|
1518 | > seven | |
1516 | > EOF |
|
1519 | > EOF | |
1517 | $ echo bb >> b |
|
1520 | $ echo bb >> b | |
1518 | $ hg commit -m 'five' -u Arthur |
|
1521 | $ hg commit -m 'five' -u Arthur | |
1519 | $ echo 'Babar' > jungle |
|
1522 | $ echo 'Babar' > jungle | |
1520 | $ hg add jungle |
|
1523 | $ hg add jungle | |
1521 | $ hg ci -m 'jungle' -u Zephir |
|
1524 | $ hg ci -m 'jungle' -u Zephir | |
1522 | $ echo 'Celeste' >> jungle |
|
1525 | $ echo 'Celeste' >> jungle | |
1523 | $ hg ci -m 'extended jungle' -u Cornelius |
|
1526 | $ hg ci -m 'extended jungle' -u Cornelius | |
1524 | $ hg log -G --template '{desc|firstline} [{author}] {diffstat}\n' |
|
1527 | $ hg log -G --template '{desc|firstline} [{author}] {diffstat}\n' | |
1525 | @ extended jungle [Cornelius] 1: +1/-0 |
|
1528 | @ extended jungle [Cornelius] 1: +1/-0 | |
1526 | | |
|
1529 | | | |
1527 | o jungle [Zephir] 1: +1/-0 |
|
1530 | o jungle [Zephir] 1: +1/-0 | |
1528 | | |
|
1531 | | | |
1529 | o five [Arthur] 2: +2/-1 |
|
1532 | o five [Arthur] 2: +2/-1 | |
1530 | | |
|
1533 | | | |
1531 | o four [Rataxes] 1: +1/-1 |
|
1534 | o four [Rataxes] 1: +1/-1 | |
1532 | | |
|
1535 | | | |
1533 | o three [Celeste] 1: +1/-1 |
|
1536 | o three [Celeste] 1: +1/-1 | |
1534 | | |
|
1537 | | | |
1535 | o initial [Babar] 2: +8/-0 |
|
1538 | o initial [Babar] 2: +8/-0 | |
1536 |
|
1539 | |||
1537 | Adding those config options should not change the output of diffstat. Bugfix #4755. |
|
1540 | Adding those config options should not change the output of diffstat. Bugfix #4755. | |
1538 |
|
1541 | |||
1539 | $ hg log -r . --template '{diffstat}\n' |
|
1542 | $ hg log -r . --template '{diffstat}\n' | |
1540 | 1: +1/-0 |
|
1543 | 1: +1/-0 | |
1541 | $ hg log -r . --template '{diffstat}\n' --config diff.git=1 \ |
|
1544 | $ hg log -r . --template '{diffstat}\n' --config diff.git=1 \ | |
1542 | > --config diff.noprefix=1 |
|
1545 | > --config diff.noprefix=1 | |
1543 | 1: +1/-0 |
|
1546 | 1: +1/-0 | |
1544 |
|
1547 | |||
1545 | Importing with some success and some errors: |
|
1548 | Importing with some success and some errors: | |
1546 |
|
1549 | |||
1547 | $ hg update --rev 'desc(initial)' |
|
1550 | $ hg update --rev 'desc(initial)' | |
1548 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1551 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1549 | $ hg export --rev 'desc(five)' | hg import --partial - |
|
1552 | $ hg export --rev 'desc(five)' | hg import --partial - | |
1550 | applying patch from stdin |
|
1553 | applying patch from stdin | |
1551 | patching file a |
|
1554 | patching file a | |
1552 | Hunk #1 FAILED at 1 |
|
1555 | Hunk #1 FAILED at 1 | |
1553 | 1 out of 1 hunks FAILED -- saving rejects to file a.rej |
|
1556 | 1 out of 1 hunks FAILED -- saving rejects to file a.rej | |
1554 | patch applied partially |
|
1557 | patch applied partially | |
1555 | (fix the .rej files and run `hg commit --amend`) |
|
1558 | (fix the .rej files and run `hg commit --amend`) | |
1556 | [1] |
|
1559 | [1] | |
1557 |
|
1560 | |||
1558 | $ hg log -G --template '{desc|firstline} [{author}] {diffstat}\n' |
|
1561 | $ hg log -G --template '{desc|firstline} [{author}] {diffstat}\n' | |
1559 | @ five [Arthur] 1: +1/-0 |
|
1562 | @ five [Arthur] 1: +1/-0 | |
1560 | | |
|
1563 | | | |
1561 | | o extended jungle [Cornelius] 1: +1/-0 |
|
1564 | | o extended jungle [Cornelius] 1: +1/-0 | |
1562 | | | |
|
1565 | | | | |
1563 | | o jungle [Zephir] 1: +1/-0 |
|
1566 | | o jungle [Zephir] 1: +1/-0 | |
1564 | | | |
|
1567 | | | | |
1565 | | o five [Arthur] 2: +2/-1 |
|
1568 | | o five [Arthur] 2: +2/-1 | |
1566 | | | |
|
1569 | | | | |
1567 | | o four [Rataxes] 1: +1/-1 |
|
1570 | | o four [Rataxes] 1: +1/-1 | |
1568 | | | |
|
1571 | | | | |
1569 | | o three [Celeste] 1: +1/-1 |
|
1572 | | o three [Celeste] 1: +1/-1 | |
1570 | |/ |
|
1573 | |/ | |
1571 | o initial [Babar] 2: +8/-0 |
|
1574 | o initial [Babar] 2: +8/-0 | |
1572 |
|
1575 | |||
1573 | $ hg export |
|
1576 | $ hg export | |
1574 | # HG changeset patch |
|
1577 | # HG changeset patch | |
1575 | # User Arthur |
|
1578 | # User Arthur | |
1576 | # Date 0 0 |
|
1579 | # Date 0 0 | |
1577 | # Thu Jan 01 00:00:00 1970 +0000 |
|
1580 | # Thu Jan 01 00:00:00 1970 +0000 | |
1578 | # Node ID 26e6446bb2526e2be1037935f5fca2b2706f1509 |
|
1581 | # Node ID 26e6446bb2526e2be1037935f5fca2b2706f1509 | |
1579 | # Parent 8e4f0351909eae6b9cf68c2c076cb54c42b54b2e |
|
1582 | # Parent 8e4f0351909eae6b9cf68c2c076cb54c42b54b2e | |
1580 | five |
|
1583 | five | |
1581 |
|
1584 | |||
1582 | diff -r 8e4f0351909e -r 26e6446bb252 b |
|
1585 | diff -r 8e4f0351909e -r 26e6446bb252 b | |
1583 | --- a/b Thu Jan 01 00:00:00 1970 +0000 |
|
1586 | --- a/b Thu Jan 01 00:00:00 1970 +0000 | |
1584 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
1587 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
1585 | @@ -1,1 +1,2 @@ |
|
1588 | @@ -1,1 +1,2 @@ | |
1586 | b |
|
1589 | b | |
1587 | +bb |
|
1590 | +bb | |
1588 | $ hg status -c . |
|
1591 | $ hg status -c . | |
1589 | C a |
|
1592 | C a | |
1590 | C b |
|
1593 | C b | |
1591 | $ ls |
|
1594 | $ ls | |
1592 | a |
|
1595 | a | |
1593 | a.rej |
|
1596 | a.rej | |
1594 | b |
|
1597 | b | |
1595 |
|
1598 | |||
1596 | Importing with zero success: |
|
1599 | Importing with zero success: | |
1597 |
|
1600 | |||
1598 | $ hg update --rev 'desc(initial)' |
|
1601 | $ hg update --rev 'desc(initial)' | |
1599 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1602 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1600 | $ hg export --rev 'desc(four)' | hg import --partial - |
|
1603 | $ hg export --rev 'desc(four)' | hg import --partial - | |
1601 | applying patch from stdin |
|
1604 | applying patch from stdin | |
1602 | patching file a |
|
1605 | patching file a | |
1603 | Hunk #1 FAILED at 0 |
|
1606 | Hunk #1 FAILED at 0 | |
1604 | 1 out of 1 hunks FAILED -- saving rejects to file a.rej |
|
1607 | 1 out of 1 hunks FAILED -- saving rejects to file a.rej | |
1605 | patch applied partially |
|
1608 | patch applied partially | |
1606 | (fix the .rej files and run `hg commit --amend`) |
|
1609 | (fix the .rej files and run `hg commit --amend`) | |
1607 | [1] |
|
1610 | [1] | |
1608 |
|
1611 | |||
1609 | $ hg log -G --template '{desc|firstline} [{author}] {diffstat}\n' |
|
1612 | $ hg log -G --template '{desc|firstline} [{author}] {diffstat}\n' | |
1610 | @ four [Rataxes] 0: +0/-0 |
|
1613 | @ four [Rataxes] 0: +0/-0 | |
1611 | | |
|
1614 | | | |
1612 | | o five [Arthur] 1: +1/-0 |
|
1615 | | o five [Arthur] 1: +1/-0 | |
1613 | |/ |
|
1616 | |/ | |
1614 | | o extended jungle [Cornelius] 1: +1/-0 |
|
1617 | | o extended jungle [Cornelius] 1: +1/-0 | |
1615 | | | |
|
1618 | | | | |
1616 | | o jungle [Zephir] 1: +1/-0 |
|
1619 | | o jungle [Zephir] 1: +1/-0 | |
1617 | | | |
|
1620 | | | | |
1618 | | o five [Arthur] 2: +2/-1 |
|
1621 | | o five [Arthur] 2: +2/-1 | |
1619 | | | |
|
1622 | | | | |
1620 | | o four [Rataxes] 1: +1/-1 |
|
1623 | | o four [Rataxes] 1: +1/-1 | |
1621 | | | |
|
1624 | | | | |
1622 | | o three [Celeste] 1: +1/-1 |
|
1625 | | o three [Celeste] 1: +1/-1 | |
1623 | |/ |
|
1626 | |/ | |
1624 | o initial [Babar] 2: +8/-0 |
|
1627 | o initial [Babar] 2: +8/-0 | |
1625 |
|
1628 | |||
1626 | $ hg export |
|
1629 | $ hg export | |
1627 | # HG changeset patch |
|
1630 | # HG changeset patch | |
1628 | # User Rataxes |
|
1631 | # User Rataxes | |
1629 | # Date 0 0 |
|
1632 | # Date 0 0 | |
1630 | # Thu Jan 01 00:00:00 1970 +0000 |
|
1633 | # Thu Jan 01 00:00:00 1970 +0000 | |
1631 | # Node ID cb9b1847a74d9ad52e93becaf14b98dbcc274e1e |
|
1634 | # Node ID cb9b1847a74d9ad52e93becaf14b98dbcc274e1e | |
1632 | # Parent 8e4f0351909eae6b9cf68c2c076cb54c42b54b2e |
|
1635 | # Parent 8e4f0351909eae6b9cf68c2c076cb54c42b54b2e | |
1633 | four |
|
1636 | four | |
1634 |
|
1637 | |||
1635 | $ hg status -c . |
|
1638 | $ hg status -c . | |
1636 | C a |
|
1639 | C a | |
1637 | C b |
|
1640 | C b | |
1638 | $ ls |
|
1641 | $ ls | |
1639 | a |
|
1642 | a | |
1640 | a.rej |
|
1643 | a.rej | |
1641 | b |
|
1644 | b | |
1642 |
|
1645 | |||
1643 | Importing with unknown file: |
|
1646 | Importing with unknown file: | |
1644 |
|
1647 | |||
1645 | $ hg update --rev 'desc(initial)' |
|
1648 | $ hg update --rev 'desc(initial)' | |
1646 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1649 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1647 | $ hg export --rev 'desc("extended jungle")' | hg import --partial - |
|
1650 | $ hg export --rev 'desc("extended jungle")' | hg import --partial - | |
1648 | applying patch from stdin |
|
1651 | applying patch from stdin | |
1649 | unable to find 'jungle' for patching |
|
1652 | unable to find 'jungle' for patching | |
1650 | (use '--prefix' to apply patch relative to the current directory) |
|
1653 | (use '--prefix' to apply patch relative to the current directory) | |
1651 | 1 out of 1 hunks FAILED -- saving rejects to file jungle.rej |
|
1654 | 1 out of 1 hunks FAILED -- saving rejects to file jungle.rej | |
1652 | patch applied partially |
|
1655 | patch applied partially | |
1653 | (fix the .rej files and run `hg commit --amend`) |
|
1656 | (fix the .rej files and run `hg commit --amend`) | |
1654 | [1] |
|
1657 | [1] | |
1655 |
|
1658 | |||
1656 | $ hg log -G --template '{desc|firstline} [{author}] {diffstat}\n' |
|
1659 | $ hg log -G --template '{desc|firstline} [{author}] {diffstat}\n' | |
1657 | @ extended jungle [Cornelius] 0: +0/-0 |
|
1660 | @ extended jungle [Cornelius] 0: +0/-0 | |
1658 | | |
|
1661 | | | |
1659 | | o four [Rataxes] 0: +0/-0 |
|
1662 | | o four [Rataxes] 0: +0/-0 | |
1660 | |/ |
|
1663 | |/ | |
1661 | | o five [Arthur] 1: +1/-0 |
|
1664 | | o five [Arthur] 1: +1/-0 | |
1662 | |/ |
|
1665 | |/ | |
1663 | | o extended jungle [Cornelius] 1: +1/-0 |
|
1666 | | o extended jungle [Cornelius] 1: +1/-0 | |
1664 | | | |
|
1667 | | | | |
1665 | | o jungle [Zephir] 1: +1/-0 |
|
1668 | | o jungle [Zephir] 1: +1/-0 | |
1666 | | | |
|
1669 | | | | |
1667 | | o five [Arthur] 2: +2/-1 |
|
1670 | | o five [Arthur] 2: +2/-1 | |
1668 | | | |
|
1671 | | | | |
1669 | | o four [Rataxes] 1: +1/-1 |
|
1672 | | o four [Rataxes] 1: +1/-1 | |
1670 | | | |
|
1673 | | | | |
1671 | | o three [Celeste] 1: +1/-1 |
|
1674 | | o three [Celeste] 1: +1/-1 | |
1672 | |/ |
|
1675 | |/ | |
1673 | o initial [Babar] 2: +8/-0 |
|
1676 | o initial [Babar] 2: +8/-0 | |
1674 |
|
1677 | |||
1675 | $ hg export |
|
1678 | $ hg export | |
1676 | # HG changeset patch |
|
1679 | # HG changeset patch | |
1677 | # User Cornelius |
|
1680 | # User Cornelius | |
1678 | # Date 0 0 |
|
1681 | # Date 0 0 | |
1679 | # Thu Jan 01 00:00:00 1970 +0000 |
|
1682 | # Thu Jan 01 00:00:00 1970 +0000 | |
1680 | # Node ID 1fb1f86bef43c5a75918178f8d23c29fb0a7398d |
|
1683 | # Node ID 1fb1f86bef43c5a75918178f8d23c29fb0a7398d | |
1681 | # Parent 8e4f0351909eae6b9cf68c2c076cb54c42b54b2e |
|
1684 | # Parent 8e4f0351909eae6b9cf68c2c076cb54c42b54b2e | |
1682 | extended jungle |
|
1685 | extended jungle | |
1683 |
|
1686 | |||
1684 | $ hg status -c . |
|
1687 | $ hg status -c . | |
1685 | C a |
|
1688 | C a | |
1686 | C b |
|
1689 | C b | |
1687 | $ ls |
|
1690 | $ ls | |
1688 | a |
|
1691 | a | |
1689 | a.rej |
|
1692 | a.rej | |
1690 | b |
|
1693 | b | |
1691 | jungle.rej |
|
1694 | jungle.rej | |
1692 |
|
1695 | |||
1693 | Importing multiple failing patches: |
|
1696 | Importing multiple failing patches: | |
1694 |
|
1697 | |||
1695 | $ hg update --rev 'desc(initial)' |
|
1698 | $ hg update --rev 'desc(initial)' | |
1696 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1699 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1697 | $ echo 'B' > b # just to make another commit |
|
1700 | $ echo 'B' > b # just to make another commit | |
1698 | $ hg commit -m "a new base" |
|
1701 | $ hg commit -m "a new base" | |
1699 | created new head |
|
1702 | created new head | |
1700 | $ hg export --rev 'desc("four") + desc("extended jungle")' | hg import --partial - |
|
1703 | $ hg export --rev 'desc("four") + desc("extended jungle")' | hg import --partial - | |
1701 | applying patch from stdin |
|
1704 | applying patch from stdin | |
1702 | patching file a |
|
1705 | patching file a | |
1703 | Hunk #1 FAILED at 0 |
|
1706 | Hunk #1 FAILED at 0 | |
1704 | 1 out of 1 hunks FAILED -- saving rejects to file a.rej |
|
1707 | 1 out of 1 hunks FAILED -- saving rejects to file a.rej | |
1705 | patch applied partially |
|
1708 | patch applied partially | |
1706 | (fix the .rej files and run `hg commit --amend`) |
|
1709 | (fix the .rej files and run `hg commit --amend`) | |
1707 | [1] |
|
1710 | [1] | |
1708 | $ hg log -G --template '{desc|firstline} [{author}] {diffstat}\n' |
|
1711 | $ hg log -G --template '{desc|firstline} [{author}] {diffstat}\n' | |
1709 | @ four [Rataxes] 0: +0/-0 |
|
1712 | @ four [Rataxes] 0: +0/-0 | |
1710 | | |
|
1713 | | | |
1711 | o a new base [test] 1: +1/-1 |
|
1714 | o a new base [test] 1: +1/-1 | |
1712 | | |
|
1715 | | | |
1713 | | o extended jungle [Cornelius] 0: +0/-0 |
|
1716 | | o extended jungle [Cornelius] 0: +0/-0 | |
1714 | |/ |
|
1717 | |/ | |
1715 | | o four [Rataxes] 0: +0/-0 |
|
1718 | | o four [Rataxes] 0: +0/-0 | |
1716 | |/ |
|
1719 | |/ | |
1717 | | o five [Arthur] 1: +1/-0 |
|
1720 | | o five [Arthur] 1: +1/-0 | |
1718 | |/ |
|
1721 | |/ | |
1719 | | o extended jungle [Cornelius] 1: +1/-0 |
|
1722 | | o extended jungle [Cornelius] 1: +1/-0 | |
1720 | | | |
|
1723 | | | | |
1721 | | o jungle [Zephir] 1: +1/-0 |
|
1724 | | o jungle [Zephir] 1: +1/-0 | |
1722 | | | |
|
1725 | | | | |
1723 | | o five [Arthur] 2: +2/-1 |
|
1726 | | o five [Arthur] 2: +2/-1 | |
1724 | | | |
|
1727 | | | | |
1725 | | o four [Rataxes] 1: +1/-1 |
|
1728 | | o four [Rataxes] 1: +1/-1 | |
1726 | | | |
|
1729 | | | | |
1727 | | o three [Celeste] 1: +1/-1 |
|
1730 | | o three [Celeste] 1: +1/-1 | |
1728 | |/ |
|
1731 | |/ | |
1729 | o initial [Babar] 2: +8/-0 |
|
1732 | o initial [Babar] 2: +8/-0 | |
1730 |
|
1733 | |||
1731 | $ hg export |
|
1734 | $ hg export | |
1732 | # HG changeset patch |
|
1735 | # HG changeset patch | |
1733 | # User Rataxes |
|
1736 | # User Rataxes | |
1734 | # Date 0 0 |
|
1737 | # Date 0 0 | |
1735 | # Thu Jan 01 00:00:00 1970 +0000 |
|
1738 | # Thu Jan 01 00:00:00 1970 +0000 | |
1736 | # Node ID a9d7b6d0ffbb4eb12b7d5939250fcd42e8930a1d |
|
1739 | # Node ID a9d7b6d0ffbb4eb12b7d5939250fcd42e8930a1d | |
1737 | # Parent f59f8d2e95a8ca5b1b4ca64320140da85f3b44fd |
|
1740 | # Parent f59f8d2e95a8ca5b1b4ca64320140da85f3b44fd | |
1738 | four |
|
1741 | four | |
1739 |
|
1742 | |||
1740 | $ hg status -c . |
|
1743 | $ hg status -c . | |
1741 | C a |
|
1744 | C a | |
1742 | C b |
|
1745 | C b | |
1743 |
|
1746 | |||
1744 | Importing some extra header |
|
1747 | Importing some extra header | |
1745 | =========================== |
|
1748 | =========================== | |
1746 |
|
1749 | |||
1747 | $ cat > $TESTTMP/parseextra.py <<EOF |
|
1750 | $ cat > $TESTTMP/parseextra.py <<EOF | |
1748 | > import mercurial.patch |
|
1751 | > import mercurial.patch | |
1749 | > import mercurial.cmdutil |
|
1752 | > import mercurial.cmdutil | |
1750 | > |
|
1753 | > | |
1751 | > def processfoo(repo, data, extra, opts): |
|
1754 | > def processfoo(repo, data, extra, opts): | |
1752 | > if 'foo' in data: |
|
1755 | > if 'foo' in data: | |
1753 | > extra['foo'] = data['foo'] |
|
1756 | > extra['foo'] = data['foo'] | |
1754 | > def postimport(ctx): |
|
1757 | > def postimport(ctx): | |
1755 | > if 'foo' in ctx.extra(): |
|
1758 | > if 'foo' in ctx.extra(): | |
1756 | > ctx.repo().ui.write('imported-foo: %s\n' % ctx.extra()['foo']) |
|
1759 | > ctx.repo().ui.write('imported-foo: %s\n' % ctx.extra()['foo']) | |
1757 | > |
|
1760 | > | |
1758 | > mercurial.patch.patchheadermap.append(('Foo', 'foo')) |
|
1761 | > mercurial.patch.patchheadermap.append(('Foo', 'foo')) | |
1759 | > mercurial.cmdutil.extrapreimport.append('foo') |
|
1762 | > mercurial.cmdutil.extrapreimport.append('foo') | |
1760 | > mercurial.cmdutil.extrapreimportmap['foo'] = processfoo |
|
1763 | > mercurial.cmdutil.extrapreimportmap['foo'] = processfoo | |
1761 | > mercurial.cmdutil.extrapostimport.append('foo') |
|
1764 | > mercurial.cmdutil.extrapostimport.append('foo') | |
1762 | > mercurial.cmdutil.extrapostimportmap['foo'] = postimport |
|
1765 | > mercurial.cmdutil.extrapostimportmap['foo'] = postimport | |
1763 | > EOF |
|
1766 | > EOF | |
1764 | $ cat >> $HGRCPATH <<EOF |
|
1767 | $ cat >> $HGRCPATH <<EOF | |
1765 | > [extensions] |
|
1768 | > [extensions] | |
1766 | > parseextra=$TESTTMP/parseextra.py |
|
1769 | > parseextra=$TESTTMP/parseextra.py | |
1767 | > EOF |
|
1770 | > EOF | |
1768 | $ hg up -C tip |
|
1771 | $ hg up -C tip | |
1769 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1772 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1770 | $ cat > $TESTTMP/foo.patch <<EOF |
|
1773 | $ cat > $TESTTMP/foo.patch <<EOF | |
1771 | > # HG changeset patch |
|
1774 | > # HG changeset patch | |
1772 | > # User Rataxes |
|
1775 | > # User Rataxes | |
1773 | > # Date 0 0 |
|
1776 | > # Date 0 0 | |
1774 | > # Thu Jan 01 00:00:00 1970 +0000 |
|
1777 | > # Thu Jan 01 00:00:00 1970 +0000 | |
1775 | > # Foo bar |
|
1778 | > # Foo bar | |
1776 | > height |
|
1779 | > height | |
1777 | > |
|
1780 | > | |
1778 | > --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1781 | > --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1779 | > +++ b/a Wed Oct 07 09:17:44 2015 +0000 |
|
1782 | > +++ b/a Wed Oct 07 09:17:44 2015 +0000 | |
1780 | > @@ -5,3 +5,4 @@ |
|
1783 | > @@ -5,3 +5,4 @@ | |
1781 | > five |
|
1784 | > five | |
1782 | > six |
|
1785 | > six | |
1783 | > seven |
|
1786 | > seven | |
1784 | > +heigt |
|
1787 | > +heigt | |
1785 | > EOF |
|
1788 | > EOF | |
1786 | $ hg import $TESTTMP/foo.patch |
|
1789 | $ hg import $TESTTMP/foo.patch | |
1787 | applying $TESTTMP/foo.patch |
|
1790 | applying $TESTTMP/foo.patch | |
1788 | imported-foo: bar |
|
1791 | imported-foo: bar | |
1789 | $ hg log --debug -r . | grep extra |
|
1792 | $ hg log --debug -r . | grep extra | |
1790 | extra: branch=default |
|
1793 | extra: branch=default | |
1791 | extra: foo=bar |
|
1794 | extra: foo=bar | |
1792 |
|
1795 | |||
1793 | Warn the user that paths are relative to the root of |
|
1796 | Warn the user that paths are relative to the root of | |
1794 | repository when file not found for patching |
|
1797 | repository when file not found for patching | |
1795 |
|
1798 | |||
1796 | $ mkdir filedir |
|
1799 | $ mkdir filedir | |
1797 | $ echo "file1" >> filedir/file1 |
|
1800 | $ echo "file1" >> filedir/file1 | |
1798 | $ hg add filedir/file1 |
|
1801 | $ hg add filedir/file1 | |
1799 | $ hg commit -m "file1" |
|
1802 | $ hg commit -m "file1" | |
1800 | $ cd filedir |
|
1803 | $ cd filedir | |
1801 | $ hg import -p 2 - <<EOF |
|
1804 | $ hg import -p 2 - <<EOF | |
1802 | > # HG changeset patch |
|
1805 | > # HG changeset patch | |
1803 | > # User test |
|
1806 | > # User test | |
1804 | > # Date 0 0 |
|
1807 | > # Date 0 0 | |
1805 | > file2 |
|
1808 | > file2 | |
1806 | > |
|
1809 | > | |
1807 | > diff --git a/filedir/file1 b/filedir/file1 |
|
1810 | > diff --git a/filedir/file1 b/filedir/file1 | |
1808 | > --- a/filedir/file1 |
|
1811 | > --- a/filedir/file1 | |
1809 | > +++ b/filedir/file1 |
|
1812 | > +++ b/filedir/file1 | |
1810 | > @@ -1,1 +1,2 @@ |
|
1813 | > @@ -1,1 +1,2 @@ | |
1811 | > file1 |
|
1814 | > file1 | |
1812 | > +file2 |
|
1815 | > +file2 | |
1813 | > EOF |
|
1816 | > EOF | |
1814 | applying patch from stdin |
|
1817 | applying patch from stdin | |
1815 | unable to find 'file1' for patching |
|
1818 | unable to find 'file1' for patching | |
1816 | (use '--prefix' to apply patch relative to the current directory) |
|
1819 | (use '--prefix' to apply patch relative to the current directory) | |
1817 | 1 out of 1 hunks FAILED -- saving rejects to file file1.rej |
|
1820 | 1 out of 1 hunks FAILED -- saving rejects to file file1.rej | |
1818 | abort: patch failed to apply |
|
1821 | abort: patch failed to apply | |
1819 | [255] |
|
1822 | [255] | |
1820 |
|
1823 | |||
1821 | test import crash (issue5375) |
|
1824 | test import crash (issue5375) | |
1822 | $ cd .. |
|
1825 | $ cd .. | |
1823 | $ hg init repo |
|
1826 | $ hg init repo | |
1824 | $ cd repo |
|
1827 | $ cd repo | |
1825 | $ printf "diff --git a/a b/b\nrename from a\nrename to b" | hg import - |
|
1828 | $ printf "diff --git a/a b/b\nrename from a\nrename to b" | hg import - | |
1826 | applying patch from stdin |
|
1829 | applying patch from stdin | |
1827 | a not tracked! |
|
1830 | a not tracked! | |
1828 | abort: source file 'a' does not exist |
|
1831 | abort: source file 'a' does not exist | |
1829 | [255] |
|
1832 | [255] |
@@ -1,1121 +1,1283 b'' | |||||
1 | This file contains testcases that tend to be related to special cases or less |
|
1 | This file contains testcases that tend to be related to special cases or less | |
2 | common commands affecting largefile. |
|
2 | common commands affecting largefile. | |
3 |
|
3 | |||
4 | Each sections should be independent of each others. |
|
4 | Each sections should be independent of each others. | |
5 |
|
5 | |||
6 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE |
|
6 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE | |
7 | $ mkdir "${USERCACHE}" |
|
7 | $ mkdir "${USERCACHE}" | |
8 | $ cat >> $HGRCPATH <<EOF |
|
8 | $ cat >> $HGRCPATH <<EOF | |
9 | > [extensions] |
|
9 | > [extensions] | |
10 | > largefiles= |
|
10 | > largefiles= | |
11 | > purge= |
|
11 | > purge= | |
12 | > rebase= |
|
12 | > rebase= | |
13 | > transplant= |
|
13 | > transplant= | |
14 | > [phases] |
|
14 | > [phases] | |
15 | > publish=False |
|
15 | > publish=False | |
16 | > [largefiles] |
|
16 | > [largefiles] | |
17 | > minsize=2 |
|
17 | > minsize=2 | |
18 | > patterns=glob:**.dat |
|
18 | > patterns=glob:**.dat | |
19 | > usercache=${USERCACHE} |
|
19 | > usercache=${USERCACHE} | |
20 | > [hooks] |
|
20 | > [hooks] | |
21 | > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" |
|
21 | > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" | |
22 | > EOF |
|
22 | > EOF | |
23 |
|
23 | |||
24 |
|
24 | |||
25 |
|
25 | |||
26 | Test copies and moves from a directory other than root (issue3516) |
|
26 | Test copies and moves from a directory other than root (issue3516) | |
27 | ========================================================================= |
|
27 | ========================================================================= | |
28 |
|
28 | |||
29 | $ hg init lf_cpmv |
|
29 | $ hg init lf_cpmv | |
30 | $ cd lf_cpmv |
|
30 | $ cd lf_cpmv | |
31 | $ mkdir dira |
|
31 | $ mkdir dira | |
32 | $ mkdir dira/dirb |
|
32 | $ mkdir dira/dirb | |
33 | $ touch dira/dirb/largefile |
|
33 | $ touch dira/dirb/largefile | |
34 | $ hg add --large dira/dirb/largefile |
|
34 | $ hg add --large dira/dirb/largefile | |
35 | $ hg commit -m "added" |
|
35 | $ hg commit -m "added" | |
36 | Invoking status precommit hook |
|
36 | Invoking status precommit hook | |
37 | A dira/dirb/largefile |
|
37 | A dira/dirb/largefile | |
38 | $ cd dira |
|
38 | $ cd dira | |
39 | $ hg cp dirb/largefile foo/largefile |
|
39 | $ hg cp dirb/largefile foo/largefile | |
40 |
|
40 | |||
41 | TODO: Ideally, this should mention the largefile, not the standin |
|
41 | TODO: Ideally, this should mention the largefile, not the standin | |
42 | $ hg log -T '{rev}\n' --stat 'set:clean()' |
|
42 | $ hg log -T '{rev}\n' --stat 'set:clean()' | |
43 | 0 |
|
43 | 0 | |
44 | .hglf/dira/dirb/largefile | 1 + |
|
44 | .hglf/dira/dirb/largefile | 1 + | |
45 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
45 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
46 |
|
46 | |||
47 | $ hg ci -m "deep copy" |
|
47 | $ hg ci -m "deep copy" | |
48 | Invoking status precommit hook |
|
48 | Invoking status precommit hook | |
49 | A dira/foo/largefile |
|
49 | A dira/foo/largefile | |
50 | $ find . | sort |
|
50 | $ find . | sort | |
51 | . |
|
51 | . | |
52 | ./dirb |
|
52 | ./dirb | |
53 | ./dirb/largefile |
|
53 | ./dirb/largefile | |
54 | ./foo |
|
54 | ./foo | |
55 | ./foo/largefile |
|
55 | ./foo/largefile | |
56 | $ hg mv foo/largefile baz/largefile |
|
56 | $ hg mv foo/largefile baz/largefile | |
57 | $ hg ci -m "moved" |
|
57 | $ hg ci -m "moved" | |
58 | Invoking status precommit hook |
|
58 | Invoking status precommit hook | |
59 | A dira/baz/largefile |
|
59 | A dira/baz/largefile | |
60 | R dira/foo/largefile |
|
60 | R dira/foo/largefile | |
61 | $ find . | sort |
|
61 | $ find . | sort | |
62 | . |
|
62 | . | |
63 | ./baz |
|
63 | ./baz | |
64 | ./baz/largefile |
|
64 | ./baz/largefile | |
65 | ./dirb |
|
65 | ./dirb | |
66 | ./dirb/largefile |
|
66 | ./dirb/largefile | |
67 | $ cd .. |
|
67 | $ cd .. | |
68 | $ hg mv dira dirc |
|
68 | $ hg mv dira dirc | |
69 | moving .hglf/dira/baz/largefile to .hglf/dirc/baz/largefile (glob) |
|
69 | moving .hglf/dira/baz/largefile to .hglf/dirc/baz/largefile (glob) | |
70 | moving .hglf/dira/dirb/largefile to .hglf/dirc/dirb/largefile (glob) |
|
70 | moving .hglf/dira/dirb/largefile to .hglf/dirc/dirb/largefile (glob) | |
71 | $ find * | sort |
|
71 | $ find * | sort | |
72 | dirc |
|
72 | dirc | |
73 | dirc/baz |
|
73 | dirc/baz | |
74 | dirc/baz/largefile |
|
74 | dirc/baz/largefile | |
75 | dirc/dirb |
|
75 | dirc/dirb | |
76 | dirc/dirb/largefile |
|
76 | dirc/dirb/largefile | |
77 |
|
77 | |||
78 | $ hg clone -q . ../fetch |
|
78 | $ hg clone -q . ../fetch | |
79 | $ hg --config extensions.fetch= fetch ../fetch |
|
79 | $ hg --config extensions.fetch= fetch ../fetch | |
80 | abort: uncommitted changes |
|
80 | abort: uncommitted changes | |
81 | [255] |
|
81 | [255] | |
82 | $ hg up -qC |
|
82 | $ hg up -qC | |
83 | $ cd .. |
|
83 | $ cd .. | |
84 |
|
84 | |||
85 | Clone a local repository owned by another user |
|
85 | Clone a local repository owned by another user | |
86 | =================================================== |
|
86 | =================================================== | |
87 |
|
87 | |||
88 | #if unix-permissions |
|
88 | #if unix-permissions | |
89 |
|
89 | |||
90 | We have to simulate that here by setting $HOME and removing write permissions |
|
90 | We have to simulate that here by setting $HOME and removing write permissions | |
91 | $ ORIGHOME="$HOME" |
|
91 | $ ORIGHOME="$HOME" | |
92 | $ mkdir alice |
|
92 | $ mkdir alice | |
93 | $ HOME="`pwd`/alice" |
|
93 | $ HOME="`pwd`/alice" | |
94 | $ cd alice |
|
94 | $ cd alice | |
95 | $ hg init pubrepo |
|
95 | $ hg init pubrepo | |
96 | $ cd pubrepo |
|
96 | $ cd pubrepo | |
97 | $ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null |
|
97 | $ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null | |
98 | $ hg add --large a-large-file |
|
98 | $ hg add --large a-large-file | |
99 | $ hg commit -m "Add a large file" |
|
99 | $ hg commit -m "Add a large file" | |
100 | Invoking status precommit hook |
|
100 | Invoking status precommit hook | |
101 | A a-large-file |
|
101 | A a-large-file | |
102 | $ cd .. |
|
102 | $ cd .. | |
103 | $ chmod -R a-w pubrepo |
|
103 | $ chmod -R a-w pubrepo | |
104 | $ cd .. |
|
104 | $ cd .. | |
105 | $ mkdir bob |
|
105 | $ mkdir bob | |
106 | $ HOME="`pwd`/bob" |
|
106 | $ HOME="`pwd`/bob" | |
107 | $ cd bob |
|
107 | $ cd bob | |
108 | $ hg clone --pull ../alice/pubrepo pubrepo |
|
108 | $ hg clone --pull ../alice/pubrepo pubrepo | |
109 | requesting all changes |
|
109 | requesting all changes | |
110 | adding changesets |
|
110 | adding changesets | |
111 | adding manifests |
|
111 | adding manifests | |
112 | adding file changes |
|
112 | adding file changes | |
113 | added 1 changesets with 1 changes to 1 files |
|
113 | added 1 changesets with 1 changes to 1 files | |
114 | new changesets 09a186cfa6da |
|
114 | new changesets 09a186cfa6da | |
115 | updating to branch default |
|
115 | updating to branch default | |
116 | getting changed largefiles |
|
116 | getting changed largefiles | |
117 | 1 largefiles updated, 0 removed |
|
117 | 1 largefiles updated, 0 removed | |
118 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
118 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
119 | $ cd .. |
|
119 | $ cd .. | |
120 | $ chmod -R u+w alice/pubrepo |
|
120 | $ chmod -R u+w alice/pubrepo | |
121 | $ HOME="$ORIGHOME" |
|
121 | $ HOME="$ORIGHOME" | |
122 |
|
122 | |||
123 | #endif |
|
123 | #endif | |
124 |
|
124 | |||
125 |
|
125 | |||
126 | Symlink to a large largefile should behave the same as a symlink to a normal file |
|
126 | Symlink to a large largefile should behave the same as a symlink to a normal file | |
127 | ===================================================================================== |
|
127 | ===================================================================================== | |
128 |
|
128 | |||
129 | #if symlink |
|
129 | #if symlink | |
130 |
|
130 | |||
131 | $ hg init largesymlink |
|
131 | $ hg init largesymlink | |
132 | $ cd largesymlink |
|
132 | $ cd largesymlink | |
133 | $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null |
|
133 | $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null | |
134 | $ hg add --large largefile |
|
134 | $ hg add --large largefile | |
135 | $ hg commit -m "commit a large file" |
|
135 | $ hg commit -m "commit a large file" | |
136 | Invoking status precommit hook |
|
136 | Invoking status precommit hook | |
137 | A largefile |
|
137 | A largefile | |
138 | $ ln -s largefile largelink |
|
138 | $ ln -s largefile largelink | |
139 | $ hg add largelink |
|
139 | $ hg add largelink | |
140 | $ hg commit -m "commit a large symlink" |
|
140 | $ hg commit -m "commit a large symlink" | |
141 | Invoking status precommit hook |
|
141 | Invoking status precommit hook | |
142 | A largelink |
|
142 | A largelink | |
143 | $ rm -f largelink |
|
143 | $ rm -f largelink | |
144 | $ hg up >/dev/null |
|
144 | $ hg up >/dev/null | |
145 | $ test -f largelink |
|
145 | $ test -f largelink | |
146 | [1] |
|
146 | [1] | |
147 | $ test -L largelink |
|
147 | $ test -L largelink | |
148 | [1] |
|
148 | [1] | |
149 | $ rm -f largelink # make next part of the test independent of the previous |
|
149 | $ rm -f largelink # make next part of the test independent of the previous | |
150 | $ hg up -C >/dev/null |
|
150 | $ hg up -C >/dev/null | |
151 | $ test -f largelink |
|
151 | $ test -f largelink | |
152 | $ test -L largelink |
|
152 | $ test -L largelink | |
153 | $ cd .. |
|
153 | $ cd .. | |
154 |
|
154 | |||
155 | #endif |
|
155 | #endif | |
156 |
|
156 | |||
157 |
|
157 | |||
158 | test for pattern matching on 'hg status': |
|
158 | test for pattern matching on 'hg status': | |
159 | ============================================== |
|
159 | ============================================== | |
160 |
|
160 | |||
161 |
|
161 | |||
162 | to boost performance, largefiles checks whether specified patterns are |
|
162 | to boost performance, largefiles checks whether specified patterns are | |
163 | related to largefiles in working directory (NOT to STANDIN) or not. |
|
163 | related to largefiles in working directory (NOT to STANDIN) or not. | |
164 |
|
164 | |||
165 | $ hg init statusmatch |
|
165 | $ hg init statusmatch | |
166 | $ cd statusmatch |
|
166 | $ cd statusmatch | |
167 |
|
167 | |||
168 | $ mkdir -p a/b/c/d |
|
168 | $ mkdir -p a/b/c/d | |
169 | $ echo normal > a/b/c/d/e.normal.txt |
|
169 | $ echo normal > a/b/c/d/e.normal.txt | |
170 | $ hg add a/b/c/d/e.normal.txt |
|
170 | $ hg add a/b/c/d/e.normal.txt | |
171 | $ echo large > a/b/c/d/e.large.txt |
|
171 | $ echo large > a/b/c/d/e.large.txt | |
172 | $ hg add --large a/b/c/d/e.large.txt |
|
172 | $ hg add --large a/b/c/d/e.large.txt | |
173 | $ mkdir -p a/b/c/x |
|
173 | $ mkdir -p a/b/c/x | |
174 | $ echo normal > a/b/c/x/y.normal.txt |
|
174 | $ echo normal > a/b/c/x/y.normal.txt | |
175 | $ hg add a/b/c/x/y.normal.txt |
|
175 | $ hg add a/b/c/x/y.normal.txt | |
176 | $ hg commit -m 'add files' |
|
176 | $ hg commit -m 'add files' | |
177 | Invoking status precommit hook |
|
177 | Invoking status precommit hook | |
178 | A a/b/c/d/e.large.txt |
|
178 | A a/b/c/d/e.large.txt | |
179 | A a/b/c/d/e.normal.txt |
|
179 | A a/b/c/d/e.normal.txt | |
180 | A a/b/c/x/y.normal.txt |
|
180 | A a/b/c/x/y.normal.txt | |
181 |
|
181 | |||
182 | (1) no pattern: no performance boost |
|
182 | (1) no pattern: no performance boost | |
183 | $ hg status -A |
|
183 | $ hg status -A | |
184 | C a/b/c/d/e.large.txt |
|
184 | C a/b/c/d/e.large.txt | |
185 | C a/b/c/d/e.normal.txt |
|
185 | C a/b/c/d/e.normal.txt | |
186 | C a/b/c/x/y.normal.txt |
|
186 | C a/b/c/x/y.normal.txt | |
187 |
|
187 | |||
188 | (2) pattern not related to largefiles: performance boost |
|
188 | (2) pattern not related to largefiles: performance boost | |
189 | $ hg status -A a/b/c/x |
|
189 | $ hg status -A a/b/c/x | |
190 | C a/b/c/x/y.normal.txt |
|
190 | C a/b/c/x/y.normal.txt | |
191 |
|
191 | |||
192 | (3) pattern related to largefiles: no performance boost |
|
192 | (3) pattern related to largefiles: no performance boost | |
193 | $ hg status -A a/b/c/d |
|
193 | $ hg status -A a/b/c/d | |
194 | C a/b/c/d/e.large.txt |
|
194 | C a/b/c/d/e.large.txt | |
195 | C a/b/c/d/e.normal.txt |
|
195 | C a/b/c/d/e.normal.txt | |
196 |
|
196 | |||
197 | (4) pattern related to STANDIN (not to largefiles): performance boost |
|
197 | (4) pattern related to STANDIN (not to largefiles): performance boost | |
198 | $ hg status -A .hglf/a |
|
198 | $ hg status -A .hglf/a | |
199 | C .hglf/a/b/c/d/e.large.txt |
|
199 | C .hglf/a/b/c/d/e.large.txt | |
200 |
|
200 | |||
201 | (5) mixed case: no performance boost |
|
201 | (5) mixed case: no performance boost | |
202 | $ hg status -A a/b/c/x a/b/c/d |
|
202 | $ hg status -A a/b/c/x a/b/c/d | |
203 | C a/b/c/d/e.large.txt |
|
203 | C a/b/c/d/e.large.txt | |
204 | C a/b/c/d/e.normal.txt |
|
204 | C a/b/c/d/e.normal.txt | |
205 | C a/b/c/x/y.normal.txt |
|
205 | C a/b/c/x/y.normal.txt | |
206 |
|
206 | |||
207 | verify that largefiles doesn't break filesets |
|
207 | verify that largefiles doesn't break filesets | |
208 |
|
208 | |||
209 | $ hg log --rev . --exclude "set:binary()" |
|
209 | $ hg log --rev . --exclude "set:binary()" | |
210 | changeset: 0:41bd42f10efa |
|
210 | changeset: 0:41bd42f10efa | |
211 | tag: tip |
|
211 | tag: tip | |
212 | user: test |
|
212 | user: test | |
213 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
213 | date: Thu Jan 01 00:00:00 1970 +0000 | |
214 | summary: add files |
|
214 | summary: add files | |
215 |
|
215 | |||
216 | sharing a largefile repo automatically enables largefiles on the share |
|
216 | sharing a largefile repo automatically enables largefiles on the share | |
217 |
|
217 | |||
218 | $ hg share --config extensions.share= . ../shared_lfrepo |
|
218 | $ hg share --config extensions.share= . ../shared_lfrepo | |
219 | updating working directory |
|
219 | updating working directory | |
220 | getting changed largefiles |
|
220 | getting changed largefiles | |
221 | 1 largefiles updated, 0 removed |
|
221 | 1 largefiles updated, 0 removed | |
222 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
222 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
223 | $ cat ../shared_lfrepo/.hg/hgrc |
|
223 | $ cat ../shared_lfrepo/.hg/hgrc | |
224 |
|
224 | |||
225 | [extensions] |
|
225 | [extensions] | |
226 | largefiles= |
|
226 | largefiles= | |
227 |
|
227 | |||
228 | verify that large files in subrepos handled properly |
|
228 | verify that large files in subrepos handled properly | |
229 | $ hg init subrepo |
|
229 | $ hg init subrepo | |
230 | $ echo "subrepo = subrepo" > .hgsub |
|
230 | $ echo "subrepo = subrepo" > .hgsub | |
231 | $ hg add .hgsub |
|
231 | $ hg add .hgsub | |
232 | $ hg ci -m "add subrepo" |
|
232 | $ hg ci -m "add subrepo" | |
233 | Invoking status precommit hook |
|
233 | Invoking status precommit hook | |
234 | A .hgsub |
|
234 | A .hgsub | |
235 | ? .hgsubstate |
|
235 | ? .hgsubstate | |
236 | $ echo "rev 1" > subrepo/large.txt |
|
236 | $ echo "rev 1" > subrepo/large.txt | |
237 | $ hg add --large subrepo/large.txt |
|
237 | $ hg add --large subrepo/large.txt | |
238 | $ hg sum |
|
238 | $ hg sum | |
239 | parent: 1:8ee150ea2e9c tip |
|
239 | parent: 1:8ee150ea2e9c tip | |
240 | add subrepo |
|
240 | add subrepo | |
241 | branch: default |
|
241 | branch: default | |
242 | commit: 1 subrepos |
|
242 | commit: 1 subrepos | |
243 | update: (current) |
|
243 | update: (current) | |
244 | phases: 2 draft |
|
244 | phases: 2 draft | |
245 | $ hg st |
|
245 | $ hg st | |
246 | $ hg st -S |
|
246 | $ hg st -S | |
247 | A subrepo/large.txt |
|
247 | A subrepo/large.txt | |
248 | $ hg ci -S -m "commit top repo" |
|
248 | $ hg ci -S -m "commit top repo" | |
249 | committing subrepository subrepo |
|
249 | committing subrepository subrepo | |
250 | Invoking status precommit hook |
|
250 | Invoking status precommit hook | |
251 | A large.txt |
|
251 | A large.txt | |
252 | Invoking status precommit hook |
|
252 | Invoking status precommit hook | |
253 | M .hgsubstate |
|
253 | M .hgsubstate | |
254 | # No differences |
|
254 | # No differences | |
255 | $ hg st -S |
|
255 | $ hg st -S | |
256 | $ hg sum |
|
256 | $ hg sum | |
257 | parent: 2:ce4cd0c527a6 tip |
|
257 | parent: 2:ce4cd0c527a6 tip | |
258 | commit top repo |
|
258 | commit top repo | |
259 | branch: default |
|
259 | branch: default | |
260 | commit: (clean) |
|
260 | commit: (clean) | |
261 | update: (current) |
|
261 | update: (current) | |
262 | phases: 3 draft |
|
262 | phases: 3 draft | |
263 | $ echo "rev 2" > subrepo/large.txt |
|
263 | $ echo "rev 2" > subrepo/large.txt | |
264 | $ hg st -S |
|
264 | $ hg st -S | |
265 | M subrepo/large.txt |
|
265 | M subrepo/large.txt | |
266 | $ hg sum |
|
266 | $ hg sum | |
267 | parent: 2:ce4cd0c527a6 tip |
|
267 | parent: 2:ce4cd0c527a6 tip | |
268 | commit top repo |
|
268 | commit top repo | |
269 | branch: default |
|
269 | branch: default | |
270 | commit: 1 subrepos |
|
270 | commit: 1 subrepos | |
271 | update: (current) |
|
271 | update: (current) | |
272 | phases: 3 draft |
|
272 | phases: 3 draft | |
273 | $ hg ci -m "this commit should fail without -S" |
|
273 | $ hg ci -m "this commit should fail without -S" | |
274 | abort: uncommitted changes in subrepository "subrepo" |
|
274 | abort: uncommitted changes in subrepository "subrepo" | |
275 | (use --subrepos for recursive commit) |
|
275 | (use --subrepos for recursive commit) | |
276 | [255] |
|
276 | [255] | |
277 |
|
277 | |||
278 | Add a normal file to the subrepo, then test archiving |
|
278 | Add a normal file to the subrepo, then test archiving | |
279 |
|
279 | |||
280 | $ echo 'normal file' > subrepo/normal.txt |
|
280 | $ echo 'normal file' > subrepo/normal.txt | |
281 | $ touch large.dat |
|
281 | $ touch large.dat | |
282 | $ mv subrepo/large.txt subrepo/renamed-large.txt |
|
282 | $ mv subrepo/large.txt subrepo/renamed-large.txt | |
283 | $ hg addremove -S --dry-run |
|
283 | $ hg addremove -S --dry-run | |
284 | adding large.dat as a largefile |
|
284 | adding large.dat as a largefile | |
285 | removing subrepo/large.txt |
|
285 | removing subrepo/large.txt | |
286 | adding subrepo/normal.txt |
|
286 | adding subrepo/normal.txt | |
287 | adding subrepo/renamed-large.txt |
|
287 | adding subrepo/renamed-large.txt | |
288 | $ hg status -S |
|
288 | $ hg status -S | |
289 | ! subrepo/large.txt |
|
289 | ! subrepo/large.txt | |
290 | ? large.dat |
|
290 | ? large.dat | |
291 | ? subrepo/normal.txt |
|
291 | ? subrepo/normal.txt | |
292 | ? subrepo/renamed-large.txt |
|
292 | ? subrepo/renamed-large.txt | |
293 |
|
293 | |||
294 | $ hg addremove --dry-run subrepo |
|
294 | $ hg addremove --dry-run subrepo | |
295 | removing subrepo/large.txt (glob) |
|
295 | removing subrepo/large.txt (glob) | |
296 | adding subrepo/normal.txt (glob) |
|
296 | adding subrepo/normal.txt (glob) | |
297 | adding subrepo/renamed-large.txt (glob) |
|
297 | adding subrepo/renamed-large.txt (glob) | |
298 | $ hg status -S |
|
298 | $ hg status -S | |
299 | ! subrepo/large.txt |
|
299 | ! subrepo/large.txt | |
300 | ? large.dat |
|
300 | ? large.dat | |
301 | ? subrepo/normal.txt |
|
301 | ? subrepo/normal.txt | |
302 | ? subrepo/renamed-large.txt |
|
302 | ? subrepo/renamed-large.txt | |
303 | $ cd .. |
|
303 | $ cd .. | |
304 |
|
304 | |||
305 | $ hg -R statusmatch addremove --dry-run statusmatch/subrepo |
|
305 | $ hg -R statusmatch addremove --dry-run statusmatch/subrepo | |
306 | removing statusmatch/subrepo/large.txt (glob) |
|
306 | removing statusmatch/subrepo/large.txt (glob) | |
307 | adding statusmatch/subrepo/normal.txt (glob) |
|
307 | adding statusmatch/subrepo/normal.txt (glob) | |
308 | adding statusmatch/subrepo/renamed-large.txt (glob) |
|
308 | adding statusmatch/subrepo/renamed-large.txt (glob) | |
309 | $ hg -R statusmatch status -S |
|
309 | $ hg -R statusmatch status -S | |
310 | ! subrepo/large.txt |
|
310 | ! subrepo/large.txt | |
311 | ? large.dat |
|
311 | ? large.dat | |
312 | ? subrepo/normal.txt |
|
312 | ? subrepo/normal.txt | |
313 | ? subrepo/renamed-large.txt |
|
313 | ? subrepo/renamed-large.txt | |
314 |
|
314 | |||
315 | $ hg -R statusmatch addremove --dry-run -S |
|
315 | $ hg -R statusmatch addremove --dry-run -S | |
316 | adding large.dat as a largefile |
|
316 | adding large.dat as a largefile | |
317 | removing subrepo/large.txt |
|
317 | removing subrepo/large.txt | |
318 | adding subrepo/normal.txt |
|
318 | adding subrepo/normal.txt | |
319 | adding subrepo/renamed-large.txt |
|
319 | adding subrepo/renamed-large.txt | |
320 | $ cd statusmatch |
|
320 | $ cd statusmatch | |
321 |
|
321 | |||
322 | $ mv subrepo/renamed-large.txt subrepo/large.txt |
|
322 | $ mv subrepo/renamed-large.txt subrepo/large.txt | |
323 | $ hg addremove subrepo |
|
323 | $ hg addremove subrepo | |
324 | adding subrepo/normal.txt (glob) |
|
324 | adding subrepo/normal.txt (glob) | |
325 | $ hg forget subrepo/normal.txt |
|
325 | $ hg forget subrepo/normal.txt | |
326 |
|
326 | |||
327 | $ hg addremove -S |
|
327 | $ hg addremove -S | |
328 | adding large.dat as a largefile |
|
328 | adding large.dat as a largefile | |
329 | adding subrepo/normal.txt |
|
329 | adding subrepo/normal.txt | |
330 | $ rm large.dat |
|
330 | $ rm large.dat | |
331 |
|
331 | |||
332 | $ hg addremove subrepo |
|
332 | $ hg addremove subrepo | |
333 | $ hg addremove -S |
|
333 | $ hg addremove -S | |
334 | removing large.dat |
|
334 | removing large.dat | |
335 |
|
335 | |||
336 | Lock in subrepo, otherwise the change isn't archived |
|
336 | Lock in subrepo, otherwise the change isn't archived | |
337 |
|
337 | |||
338 | $ hg ci -S -m "add normal file to top level" |
|
338 | $ hg ci -S -m "add normal file to top level" | |
339 | committing subrepository subrepo |
|
339 | committing subrepository subrepo | |
340 | Invoking status precommit hook |
|
340 | Invoking status precommit hook | |
341 | M large.txt |
|
341 | M large.txt | |
342 | A normal.txt |
|
342 | A normal.txt | |
343 | Invoking status precommit hook |
|
343 | Invoking status precommit hook | |
344 | M .hgsubstate |
|
344 | M .hgsubstate | |
345 | $ hg archive -S ../lf_subrepo_archive |
|
345 | $ hg archive -S ../lf_subrepo_archive | |
346 | $ find ../lf_subrepo_archive | sort |
|
346 | $ find ../lf_subrepo_archive | sort | |
347 | ../lf_subrepo_archive |
|
347 | ../lf_subrepo_archive | |
348 | ../lf_subrepo_archive/.hg_archival.txt |
|
348 | ../lf_subrepo_archive/.hg_archival.txt | |
349 | ../lf_subrepo_archive/.hgsub |
|
349 | ../lf_subrepo_archive/.hgsub | |
350 | ../lf_subrepo_archive/.hgsubstate |
|
350 | ../lf_subrepo_archive/.hgsubstate | |
351 | ../lf_subrepo_archive/a |
|
351 | ../lf_subrepo_archive/a | |
352 | ../lf_subrepo_archive/a/b |
|
352 | ../lf_subrepo_archive/a/b | |
353 | ../lf_subrepo_archive/a/b/c |
|
353 | ../lf_subrepo_archive/a/b/c | |
354 | ../lf_subrepo_archive/a/b/c/d |
|
354 | ../lf_subrepo_archive/a/b/c/d | |
355 | ../lf_subrepo_archive/a/b/c/d/e.large.txt |
|
355 | ../lf_subrepo_archive/a/b/c/d/e.large.txt | |
356 | ../lf_subrepo_archive/a/b/c/d/e.normal.txt |
|
356 | ../lf_subrepo_archive/a/b/c/d/e.normal.txt | |
357 | ../lf_subrepo_archive/a/b/c/x |
|
357 | ../lf_subrepo_archive/a/b/c/x | |
358 | ../lf_subrepo_archive/a/b/c/x/y.normal.txt |
|
358 | ../lf_subrepo_archive/a/b/c/x/y.normal.txt | |
359 | ../lf_subrepo_archive/subrepo |
|
359 | ../lf_subrepo_archive/subrepo | |
360 | ../lf_subrepo_archive/subrepo/large.txt |
|
360 | ../lf_subrepo_archive/subrepo/large.txt | |
361 | ../lf_subrepo_archive/subrepo/normal.txt |
|
361 | ../lf_subrepo_archive/subrepo/normal.txt | |
362 | $ cat ../lf_subrepo_archive/.hg_archival.txt |
|
362 | $ cat ../lf_subrepo_archive/.hg_archival.txt | |
363 | repo: 41bd42f10efa43698cc02052ea0977771cba506d |
|
363 | repo: 41bd42f10efa43698cc02052ea0977771cba506d | |
364 | node: d56a95e6522858bc08a724c4fe2bdee066d1c30b |
|
364 | node: d56a95e6522858bc08a724c4fe2bdee066d1c30b | |
365 | branch: default |
|
365 | branch: default | |
366 | latesttag: null |
|
366 | latesttag: null | |
367 | latesttagdistance: 4 |
|
367 | latesttagdistance: 4 | |
368 | changessincelatesttag: 4 |
|
368 | changessincelatesttag: 4 | |
369 |
|
369 | |||
370 | Test update with subrepos. |
|
370 | Test update with subrepos. | |
371 |
|
371 | |||
372 | $ hg update 0 |
|
372 | $ hg update 0 | |
373 | getting changed largefiles |
|
373 | getting changed largefiles | |
374 | 0 largefiles updated, 1 removed |
|
374 | 0 largefiles updated, 1 removed | |
375 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
375 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
376 | $ hg status -S |
|
376 | $ hg status -S | |
377 | $ hg update tip |
|
377 | $ hg update tip | |
378 | getting changed largefiles |
|
378 | getting changed largefiles | |
379 | 1 largefiles updated, 0 removed |
|
379 | 1 largefiles updated, 0 removed | |
380 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
380 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
381 | $ hg status -S |
|
381 | $ hg status -S | |
382 | # modify a large file |
|
382 | # modify a large file | |
383 | $ echo "modified" > subrepo/large.txt |
|
383 | $ echo "modified" > subrepo/large.txt | |
384 | $ hg st -S |
|
384 | $ hg st -S | |
385 | M subrepo/large.txt |
|
385 | M subrepo/large.txt | |
386 | # update -C should revert the change. |
|
386 | # update -C should revert the change. | |
387 | $ hg update -C |
|
387 | $ hg update -C | |
388 | getting changed largefiles |
|
388 | getting changed largefiles | |
389 | 1 largefiles updated, 0 removed |
|
389 | 1 largefiles updated, 0 removed | |
390 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
390 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
391 | $ hg status -S |
|
391 | $ hg status -S | |
392 |
|
392 | |||
|
393 | Forget doesn't change the content of the file | |||
|
394 | $ echo 'pre-forget content' > subrepo/large.txt | |||
393 | $ hg forget -v subrepo/large.txt |
|
395 | $ hg forget -v subrepo/large.txt | |
394 | removing subrepo/large.txt (glob) |
|
396 | removing subrepo/large.txt (glob) | |
|
397 | $ cat subrepo/large.txt | |||
|
398 | pre-forget content | |||
395 |
|
399 | |||
396 | Test reverting a forgotten file |
|
400 | Test reverting a forgotten file | |
397 | $ hg revert -R subrepo subrepo/large.txt |
|
401 | $ hg revert -R subrepo subrepo/large.txt | |
398 | $ hg status -SA subrepo/large.txt |
|
402 | $ hg status -SA subrepo/large.txt | |
399 | C subrepo/large.txt |
|
403 | C subrepo/large.txt | |
400 |
|
404 | |||
401 | $ hg rm -v subrepo/large.txt |
|
405 | $ hg rm -v subrepo/large.txt | |
402 | removing subrepo/large.txt (glob) |
|
406 | removing subrepo/large.txt (glob) | |
403 | $ hg revert -R subrepo subrepo/large.txt |
|
407 | $ hg revert -R subrepo subrepo/large.txt | |
404 | $ rm subrepo/large.txt |
|
408 | $ rm subrepo/large.txt | |
405 | $ hg addremove -S |
|
409 | $ hg addremove -S | |
406 | removing subrepo/large.txt |
|
410 | removing subrepo/large.txt | |
407 | $ hg st -S |
|
411 | $ hg st -S | |
408 | R subrepo/large.txt |
|
412 | R subrepo/large.txt | |
409 |
|
413 | |||
410 | Test archiving a revision that references a subrepo that is not yet |
|
414 | Test archiving a revision that references a subrepo that is not yet | |
411 | cloned (see test-subrepo-recursion.t): |
|
415 | cloned (see test-subrepo-recursion.t): | |
412 |
|
416 | |||
413 | $ hg clone -U . ../empty |
|
417 | $ hg clone -U . ../empty | |
414 | $ cd ../empty |
|
418 | $ cd ../empty | |
415 | $ hg archive --subrepos -r tip ../archive.tar.gz |
|
419 | $ hg archive --subrepos -r tip ../archive.tar.gz | |
416 | cloning subrepo subrepo from $TESTTMP/statusmatch/subrepo |
|
420 | cloning subrepo subrepo from $TESTTMP/statusmatch/subrepo | |
417 | $ cd .. |
|
421 | $ cd .. | |
418 |
|
422 | |||
419 |
|
423 | |||
420 |
|
424 | |||
421 |
|
425 | |||
422 |
|
426 | |||
423 |
|
427 | |||
424 | Test addremove, forget and others |
|
428 | Test addremove, forget and others | |
425 | ============================================== |
|
429 | ============================================== | |
426 |
|
430 | |||
427 | Test that addremove picks up largefiles prior to the initial commit (issue3541) |
|
431 | Test that addremove picks up largefiles prior to the initial commit (issue3541) | |
428 |
|
432 | |||
429 | $ hg init addrm2 |
|
433 | $ hg init addrm2 | |
430 | $ cd addrm2 |
|
434 | $ cd addrm2 | |
431 | $ touch large.dat |
|
435 | $ touch large.dat | |
432 | $ touch large2.dat |
|
436 | $ touch large2.dat | |
433 | $ touch normal |
|
437 | $ touch normal | |
434 | $ hg add --large large.dat |
|
438 | $ hg add --large large.dat | |
435 | $ hg addremove -v |
|
439 | $ hg addremove -v | |
436 | adding large2.dat as a largefile |
|
440 | adding large2.dat as a largefile | |
437 | adding normal |
|
441 | adding normal | |
438 |
|
442 | |||
439 | Test that forgetting all largefiles reverts to islfilesrepo() == False |
|
443 | Test that forgetting all largefiles reverts to islfilesrepo() == False | |
440 | (addremove will add *.dat as normal files now) |
|
444 | (addremove will add *.dat as normal files now) | |
441 | $ hg forget large.dat |
|
445 | $ hg forget large.dat | |
442 | $ hg forget large2.dat |
|
446 | $ hg forget large2.dat | |
443 | $ hg addremove -v |
|
447 | $ hg addremove -v | |
444 | adding large.dat |
|
448 | adding large.dat | |
445 | adding large2.dat |
|
449 | adding large2.dat | |
446 |
|
450 | |||
447 |
Test commit |
|
451 | Test commit's addremove option prior to the first commit | |
448 | $ hg forget large.dat |
|
452 | $ hg forget large.dat | |
449 | $ hg forget large2.dat |
|
453 | $ hg forget large2.dat | |
450 | $ hg add --large large.dat |
|
454 | $ hg add --large large.dat | |
451 | $ hg ci -Am "commit" |
|
455 | $ hg ci -Am "commit" | |
452 | adding large2.dat as a largefile |
|
456 | adding large2.dat as a largefile | |
453 | Invoking status precommit hook |
|
457 | Invoking status precommit hook | |
454 | A large.dat |
|
458 | A large.dat | |
455 | A large2.dat |
|
459 | A large2.dat | |
456 | A normal |
|
460 | A normal | |
457 | $ find .hglf | sort |
|
461 | $ find .hglf | sort | |
458 | .hglf |
|
462 | .hglf | |
459 | .hglf/large.dat |
|
463 | .hglf/large.dat | |
460 | .hglf/large2.dat |
|
464 | .hglf/large2.dat | |
461 |
|
465 | |||
462 | Test actions on largefiles using relative paths from subdir |
|
466 | Test actions on largefiles using relative paths from subdir | |
463 |
|
467 | |||
464 | $ mkdir sub |
|
468 | $ mkdir sub | |
465 | $ cd sub |
|
469 | $ cd sub | |
466 | $ echo anotherlarge > anotherlarge |
|
470 | $ echo anotherlarge > anotherlarge | |
467 | $ hg add --large anotherlarge |
|
471 | $ hg add --large anotherlarge | |
468 | $ hg st |
|
472 | $ hg st | |
469 | A sub/anotherlarge |
|
473 | A sub/anotherlarge | |
470 | $ hg st anotherlarge |
|
474 | $ hg st anotherlarge | |
471 | A anotherlarge |
|
475 | A anotherlarge | |
472 | $ hg commit -m anotherlarge anotherlarge |
|
476 | $ hg commit -m anotherlarge anotherlarge | |
473 | Invoking status precommit hook |
|
477 | Invoking status precommit hook | |
474 | A sub/anotherlarge |
|
478 | A sub/anotherlarge | |
475 | $ hg log anotherlarge |
|
479 | $ hg log anotherlarge | |
476 | changeset: 1:9627a577c5e9 |
|
480 | changeset: 1:9627a577c5e9 | |
477 | tag: tip |
|
481 | tag: tip | |
478 | user: test |
|
482 | user: test | |
479 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
483 | date: Thu Jan 01 00:00:00 1970 +0000 | |
480 | summary: anotherlarge |
|
484 | summary: anotherlarge | |
481 |
|
485 | |||
482 |
$ hg --debug log -T '{rev} |
|
486 | $ hg --debug log -T '{rev}: {desc}\n' ../sub/anotherlarge | |
483 | updated patterns: ../.hglf/sub/../sub/anotherlarge, ../sub/anotherlarge |
|
487 | updated patterns: ../.hglf/sub/../sub/anotherlarge, ../sub/anotherlarge | |
484 | 1: anotherlarge |
|
488 | 1: anotherlarge | |
485 |
|
489 | |||
486 | $ hg log -G anotherlarge |
|
490 | $ hg log -G anotherlarge | |
487 | @ changeset: 1:9627a577c5e9 |
|
491 | @ changeset: 1:9627a577c5e9 | |
488 | | tag: tip |
|
492 | | tag: tip | |
489 | ~ user: test |
|
493 | ~ user: test | |
490 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
494 | date: Thu Jan 01 00:00:00 1970 +0000 | |
491 | summary: anotherlarge |
|
495 | summary: anotherlarge | |
492 |
|
496 | |||
493 |
|
497 | |||
494 | $ hg log glob:another* |
|
498 | $ hg log glob:another* | |
495 | changeset: 1:9627a577c5e9 |
|
499 | changeset: 1:9627a577c5e9 | |
496 | tag: tip |
|
500 | tag: tip | |
497 | user: test |
|
501 | user: test | |
498 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
502 | date: Thu Jan 01 00:00:00 1970 +0000 | |
499 | summary: anotherlarge |
|
503 | summary: anotherlarge | |
500 |
|
504 | |||
501 |
$ hg --debug log -T '{rev} |
|
505 | $ hg --debug log -T '{rev}: {desc}\n' -G glob:another* | |
502 | updated patterns: glob:../.hglf/sub/another*, glob:another* |
|
506 | updated patterns: glob:../.hglf/sub/another*, glob:another* | |
503 | @ 1: anotherlarge |
|
507 | @ 1: anotherlarge | |
504 | | |
|
508 | | | |
505 | ~ |
|
509 | ~ | |
506 |
|
510 | |||
507 | #if no-msys |
|
511 | #if no-msys | |
508 | $ hg --debug log -T '{rev}: {desc}\n' 'glob:../.hglf/sub/another*' # no-msys |
|
512 | $ hg --debug log -T '{rev}: {desc}\n' 'glob:../.hglf/sub/another*' # no-msys | |
509 | updated patterns: glob:../.hglf/sub/another* |
|
513 | updated patterns: glob:../.hglf/sub/another* | |
510 | 1: anotherlarge |
|
514 | 1: anotherlarge | |
511 |
|
515 | |||
512 | $ hg --debug log -G -T '{rev}: {desc}\n' 'glob:../.hglf/sub/another*' # no-msys |
|
516 | $ hg --debug log -G -T '{rev}: {desc}\n' 'glob:../.hglf/sub/another*' # no-msys | |
513 | updated patterns: glob:../.hglf/sub/another* |
|
517 | updated patterns: glob:../.hglf/sub/another* | |
514 | @ 1: anotherlarge |
|
518 | @ 1: anotherlarge | |
515 | | |
|
519 | | | |
516 | ~ |
|
520 | ~ | |
517 | #endif |
|
521 | #endif | |
518 |
|
522 | |||
519 | $ echo more >> anotherlarge |
|
523 | $ echo more >> anotherlarge | |
520 | $ hg st . |
|
524 | $ hg st . | |
521 | M anotherlarge |
|
525 | M anotherlarge | |
522 | $ hg cat anotherlarge |
|
526 | $ hg cat anotherlarge | |
523 | anotherlarge |
|
527 | anotherlarge | |
524 | $ hg revert anotherlarge |
|
528 | $ hg revert anotherlarge | |
525 | $ hg st |
|
529 | $ hg st | |
526 | ? sub/anotherlarge.orig |
|
530 | ? sub/anotherlarge.orig | |
527 |
|
531 | |||
528 | Test orig files go where we want them |
|
532 | Test orig files go where we want them | |
529 | $ echo moremore >> anotherlarge |
|
533 | $ echo moremore >> anotherlarge | |
530 | $ hg revert anotherlarge -v --config 'ui.origbackuppath=.hg/origbackups' |
|
534 | $ hg revert anotherlarge -v --config 'ui.origbackuppath=.hg/origbackups' | |
531 | creating directory: $TESTTMP/addrm2/.hg/origbackups/.hglf/sub (glob) |
|
535 | creating directory: $TESTTMP/addrm2/.hg/origbackups/.hglf/sub (glob) | |
532 | saving current version of ../.hglf/sub/anotherlarge as $TESTTMP/addrm2/.hg/origbackups/.hglf/sub/anotherlarge (glob) |
|
536 | saving current version of ../.hglf/sub/anotherlarge as $TESTTMP/addrm2/.hg/origbackups/.hglf/sub/anotherlarge (glob) | |
533 | reverting ../.hglf/sub/anotherlarge (glob) |
|
537 | reverting ../.hglf/sub/anotherlarge (glob) | |
534 | creating directory: $TESTTMP/addrm2/.hg/origbackups/sub (glob) |
|
538 | creating directory: $TESTTMP/addrm2/.hg/origbackups/sub (glob) | |
535 | found 90c622cf65cebe75c5842f9136c459333faf392e in store |
|
539 | found 90c622cf65cebe75c5842f9136c459333faf392e in store | |
536 | found 90c622cf65cebe75c5842f9136c459333faf392e in store |
|
540 | found 90c622cf65cebe75c5842f9136c459333faf392e in store | |
537 | $ ls ../.hg/origbackups/sub |
|
541 | $ ls ../.hg/origbackups/sub | |
538 | anotherlarge |
|
542 | anotherlarge | |
539 | $ cd .. |
|
543 | $ cd .. | |
540 |
|
544 | |||
541 | Test glob logging from the root dir |
|
545 | Test glob logging from the root dir | |
542 | $ hg log glob:**another* |
|
546 | $ hg log glob:**another* | |
543 | changeset: 1:9627a577c5e9 |
|
547 | changeset: 1:9627a577c5e9 | |
544 | tag: tip |
|
548 | tag: tip | |
545 | user: test |
|
549 | user: test | |
546 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
550 | date: Thu Jan 01 00:00:00 1970 +0000 | |
547 | summary: anotherlarge |
|
551 | summary: anotherlarge | |
548 |
|
552 | |||
549 | $ hg log -G glob:**another* |
|
553 | $ hg log -G glob:**another* | |
550 | @ changeset: 1:9627a577c5e9 |
|
554 | @ changeset: 1:9627a577c5e9 | |
551 | | tag: tip |
|
555 | | tag: tip | |
552 | ~ user: test |
|
556 | ~ user: test | |
553 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
557 | date: Thu Jan 01 00:00:00 1970 +0000 | |
554 | summary: anotherlarge |
|
558 | summary: anotherlarge | |
555 |
|
559 | |||
556 |
|
560 | |||
557 | $ cd .. |
|
561 | $ cd .. | |
558 |
|
562 | |||
559 | Log from outer space |
|
563 | Log from outer space | |
560 | $ hg --debug log -R addrm2 -T '{rev}: {desc}\n' 'addrm2/sub/anotherlarge' |
|
564 | $ hg --debug log -R addrm2 -T '{rev}: {desc}\n' 'addrm2/sub/anotherlarge' | |
561 | updated patterns: addrm2/.hglf/sub/anotherlarge, addrm2/sub/anotherlarge |
|
565 | updated patterns: addrm2/.hglf/sub/anotherlarge, addrm2/sub/anotherlarge | |
562 | 1: anotherlarge |
|
566 | 1: anotherlarge | |
563 | $ hg --debug log -R addrm2 -T '{rev}: {desc}\n' 'addrm2/.hglf/sub/anotherlarge' |
|
567 | $ hg --debug log -R addrm2 -T '{rev}: {desc}\n' 'addrm2/.hglf/sub/anotherlarge' | |
564 | updated patterns: addrm2/.hglf/sub/anotherlarge |
|
568 | updated patterns: addrm2/.hglf/sub/anotherlarge | |
565 | 1: anotherlarge |
|
569 | 1: anotherlarge | |
566 |
|
570 | |||
567 |
|
571 | |||
568 | Check error message while exchange |
|
572 | Check error message while exchange | |
569 | ========================================================= |
|
573 | ========================================================= | |
570 |
|
574 | |||
571 | issue3651: summary/outgoing with largefiles shows "no remote repo" |
|
575 | issue3651: summary/outgoing with largefiles shows "no remote repo" | |
572 | unexpectedly |
|
576 | unexpectedly | |
573 |
|
577 | |||
574 | $ mkdir issue3651 |
|
578 | $ mkdir issue3651 | |
575 | $ cd issue3651 |
|
579 | $ cd issue3651 | |
576 |
|
580 | |||
577 | $ hg init src |
|
581 | $ hg init src | |
578 | $ echo a > src/a |
|
582 | $ echo a > src/a | |
579 | $ hg -R src add --large src/a |
|
583 | $ hg -R src add --large src/a | |
580 | $ hg -R src commit -m '#0' |
|
584 | $ hg -R src commit -m '#0' | |
581 | Invoking status precommit hook |
|
585 | Invoking status precommit hook | |
582 | A a |
|
586 | A a | |
583 |
|
587 | |||
584 | check messages when no remote repository is specified: |
|
588 | check messages when no remote repository is specified: | |
585 | "no remote repo" route for "hg outgoing --large" is not tested here, |
|
589 | "no remote repo" route for "hg outgoing --large" is not tested here, | |
586 | because it can't be reproduced easily. |
|
590 | because it can't be reproduced easily. | |
587 |
|
591 | |||
588 | $ hg init clone1 |
|
592 | $ hg init clone1 | |
589 | $ hg -R clone1 -q pull src |
|
593 | $ hg -R clone1 -q pull src | |
590 | $ hg -R clone1 -q update |
|
594 | $ hg -R clone1 -q update | |
591 | $ hg -R clone1 paths | grep default |
|
595 | $ hg -R clone1 paths | grep default | |
592 | [1] |
|
596 | [1] | |
593 |
|
597 | |||
594 | $ hg -R clone1 summary --large |
|
598 | $ hg -R clone1 summary --large | |
595 | parent: 0:fc0bd45326d3 tip |
|
599 | parent: 0:fc0bd45326d3 tip | |
596 | #0 |
|
600 | #0 | |
597 | branch: default |
|
601 | branch: default | |
598 | commit: (clean) |
|
602 | commit: (clean) | |
599 | update: (current) |
|
603 | update: (current) | |
600 | phases: 1 draft |
|
604 | phases: 1 draft | |
601 | largefiles: (no remote repo) |
|
605 | largefiles: (no remote repo) | |
602 |
|
606 | |||
603 | check messages when there is no files to upload: |
|
607 | check messages when there is no files to upload: | |
604 |
|
608 | |||
605 | $ hg -q clone src clone2 |
|
609 | $ hg -q clone src clone2 | |
606 | $ hg -R clone2 paths | grep default |
|
610 | $ hg -R clone2 paths | grep default | |
607 | default = $TESTTMP/issue3651/src (glob) |
|
611 | default = $TESTTMP/issue3651/src (glob) | |
608 |
|
612 | |||
609 | $ hg -R clone2 summary --large |
|
613 | $ hg -R clone2 summary --large | |
610 | parent: 0:fc0bd45326d3 tip |
|
614 | parent: 0:fc0bd45326d3 tip | |
611 | #0 |
|
615 | #0 | |
612 | branch: default |
|
616 | branch: default | |
613 | commit: (clean) |
|
617 | commit: (clean) | |
614 | update: (current) |
|
618 | update: (current) | |
615 | phases: 1 draft |
|
619 | phases: 1 draft | |
616 | largefiles: (no files to upload) |
|
620 | largefiles: (no files to upload) | |
617 | $ hg -R clone2 outgoing --large |
|
621 | $ hg -R clone2 outgoing --large | |
618 | comparing with $TESTTMP/issue3651/src (glob) |
|
622 | comparing with $TESTTMP/issue3651/src (glob) | |
619 | searching for changes |
|
623 | searching for changes | |
620 | no changes found |
|
624 | no changes found | |
621 | largefiles: no files to upload |
|
625 | largefiles: no files to upload | |
622 | [1] |
|
626 | [1] | |
623 |
|
627 | |||
624 |
$ hg -R clone2 outgoing --large --graph --template "{rev}" |
|
628 | $ hg -R clone2 outgoing --large --graph --template "{rev}" | |
625 | comparing with $TESTTMP/issue3651/src (glob) |
|
629 | comparing with $TESTTMP/issue3651/src (glob) | |
626 | searching for changes |
|
630 | searching for changes | |
627 | no changes found |
|
631 | no changes found | |
628 | largefiles: no files to upload |
|
632 | largefiles: no files to upload | |
629 |
|
633 | |||
630 | check messages when there are files to upload: |
|
634 | check messages when there are files to upload: | |
631 |
|
635 | |||
632 | $ echo b > clone2/b |
|
636 | $ echo b > clone2/b | |
633 | $ hg -R clone2 add --large clone2/b |
|
637 | $ hg -R clone2 add --large clone2/b | |
634 |
|
|
638 | $ hg -R clone2 commit -m '#1' | |
635 | Invoking status precommit hook |
|
639 | Invoking status precommit hook | |
636 | A b |
|
640 | A b | |
637 | $ hg -R clone2 summary --large |
|
641 | $ hg -R clone2 summary --large | |
638 | parent: 1:1acbe71ce432 tip |
|
642 | parent: 1:1acbe71ce432 tip | |
639 |
|
|
643 | #1 | |
640 | branch: default |
|
644 | branch: default | |
641 | commit: (clean) |
|
645 | commit: (clean) | |
642 | update: (current) |
|
646 | update: (current) | |
643 | phases: 2 draft |
|
647 | phases: 2 draft | |
644 | largefiles: 1 entities for 1 files to upload |
|
648 | largefiles: 1 entities for 1 files to upload | |
645 | $ hg -R clone2 outgoing --large |
|
649 | $ hg -R clone2 outgoing --large | |
646 | comparing with $TESTTMP/issue3651/src (glob) |
|
650 | comparing with $TESTTMP/issue3651/src (glob) | |
647 | searching for changes |
|
651 | searching for changes | |
648 | changeset: 1:1acbe71ce432 |
|
652 | changeset: 1:1acbe71ce432 | |
649 | tag: tip |
|
653 | tag: tip | |
650 | user: test |
|
654 | user: test | |
651 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
655 | date: Thu Jan 01 00:00:00 1970 +0000 | |
652 | summary: #1 |
|
656 | summary: #1 | |
653 |
|
|
657 | ||
654 | largefiles to upload (1 entities): |
|
658 | largefiles to upload (1 entities): | |
655 | b |
|
659 | b | |
656 |
|
|
660 | ||
657 |
$ hg -R clone2 outgoing --large --graph --template "{rev}" |
|
661 | $ hg -R clone2 outgoing --large --graph --template "{rev}" | |
658 | comparing with $TESTTMP/issue3651/src (glob) |
|
662 | comparing with $TESTTMP/issue3651/src (glob) | |
659 | searching for changes |
|
663 | searching for changes | |
660 | @ 1 |
|
664 | @ 1 | |
661 |
|
|
665 | ||
662 | largefiles to upload (1 entities): |
|
666 | largefiles to upload (1 entities): | |
663 | b |
|
667 | b | |
664 |
|
|
668 | ||
665 |
|
669 | |||
666 | $ cp clone2/b clone2/b1 |
|
670 | $ cp clone2/b clone2/b1 | |
667 | $ cp clone2/b clone2/b2 |
|
671 | $ cp clone2/b clone2/b2 | |
668 | $ hg -R clone2 add --large clone2/b1 clone2/b2 |
|
672 | $ hg -R clone2 add --large clone2/b1 clone2/b2 | |
669 |
|
|
673 | $ hg -R clone2 commit -m '#2: add largefiles referring same entity' | |
670 | Invoking status precommit hook |
|
674 | Invoking status precommit hook | |
671 | A b1 |
|
675 | A b1 | |
672 | A b2 |
|
676 | A b2 | |
673 | $ hg -R clone2 summary --large |
|
677 | $ hg -R clone2 summary --large | |
674 | parent: 2:6095d0695d70 tip |
|
678 | parent: 2:6095d0695d70 tip | |
675 |
|
|
679 | #2: add largefiles referring same entity | |
676 | branch: default |
|
680 | branch: default | |
677 | commit: (clean) |
|
681 | commit: (clean) | |
678 | update: (current) |
|
682 | update: (current) | |
679 | phases: 3 draft |
|
683 | phases: 3 draft | |
680 | largefiles: 1 entities for 3 files to upload |
|
684 | largefiles: 1 entities for 3 files to upload | |
681 |
$ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" |
|
685 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" | |
682 | comparing with $TESTTMP/issue3651/src (glob) |
|
686 | comparing with $TESTTMP/issue3651/src (glob) | |
683 | searching for changes |
|
687 | searching for changes | |
684 | 1:1acbe71ce432 |
|
688 | 1:1acbe71ce432 | |
685 | 2:6095d0695d70 |
|
689 | 2:6095d0695d70 | |
686 | largefiles to upload (1 entities): |
|
690 | largefiles to upload (1 entities): | |
687 | b |
|
691 | b | |
688 | b1 |
|
692 | b1 | |
689 | b2 |
|
693 | b2 | |
690 |
|
|
694 | ||
691 | $ hg -R clone2 cat -r 1 clone2/.hglf/b |
|
695 | $ hg -R clone2 cat -r 1 clone2/.hglf/b | |
692 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
696 | 89e6c98d92887913cadf06b2adb97f26cde4849b | |
693 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug --config progress.debug=true |
|
697 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug --config progress.debug=true | |
694 | comparing with $TESTTMP/issue3651/src (glob) |
|
698 | comparing with $TESTTMP/issue3651/src (glob) | |
695 | query 1; heads |
|
699 | query 1; heads | |
696 | searching for changes |
|
700 | searching for changes | |
697 | all remote heads known locally |
|
701 | all remote heads known locally | |
698 | 1:1acbe71ce432 |
|
702 | 1:1acbe71ce432 | |
699 | 2:6095d0695d70 |
|
703 | 2:6095d0695d70 | |
700 | finding outgoing largefiles: 0/2 revisions (0.00%) |
|
704 | finding outgoing largefiles: 0/2 revisions (0.00%) | |
701 | finding outgoing largefiles: 1/2 revisions (50.00%) |
|
705 | finding outgoing largefiles: 1/2 revisions (50.00%) | |
702 | largefiles to upload (1 entities): |
|
706 | largefiles to upload (1 entities): | |
703 | b |
|
707 | b | |
704 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
708 | 89e6c98d92887913cadf06b2adb97f26cde4849b | |
705 | b1 |
|
709 | b1 | |
706 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
710 | 89e6c98d92887913cadf06b2adb97f26cde4849b | |
707 | b2 |
|
711 | b2 | |
708 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
712 | 89e6c98d92887913cadf06b2adb97f26cde4849b | |
709 |
|
|
713 | ||
710 |
|
714 | |||
711 | $ echo bbb > clone2/b |
|
715 | $ echo bbb > clone2/b | |
712 |
|
|
716 | $ hg -R clone2 commit -m '#3: add new largefile entity as existing file' | |
713 | Invoking status precommit hook |
|
717 | Invoking status precommit hook | |
714 | M b |
|
718 | M b | |
715 | $ echo bbbb > clone2/b |
|
719 | $ echo bbbb > clone2/b | |
716 |
|
|
720 | $ hg -R clone2 commit -m '#4: add new largefile entity as existing file' | |
717 | Invoking status precommit hook |
|
721 | Invoking status precommit hook | |
718 | M b |
|
722 | M b | |
719 | $ cp clone2/b1 clone2/b |
|
723 | $ cp clone2/b1 clone2/b | |
720 |
|
|
724 | $ hg -R clone2 commit -m '#5: refer existing largefile entity again' | |
721 | Invoking status precommit hook |
|
725 | Invoking status precommit hook | |
722 | M b |
|
726 | M b | |
723 | $ hg -R clone2 summary --large |
|
727 | $ hg -R clone2 summary --large | |
724 | parent: 5:036794ea641c tip |
|
728 | parent: 5:036794ea641c tip | |
725 |
|
|
729 | #5: refer existing largefile entity again | |
726 | branch: default |
|
730 | branch: default | |
727 | commit: (clean) |
|
731 | commit: (clean) | |
728 | update: (current) |
|
732 | update: (current) | |
729 | phases: 6 draft |
|
733 | phases: 6 draft | |
730 | largefiles: 3 entities for 3 files to upload |
|
734 | largefiles: 3 entities for 3 files to upload | |
731 |
$ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" |
|
735 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" | |
732 | comparing with $TESTTMP/issue3651/src (glob) |
|
736 | comparing with $TESTTMP/issue3651/src (glob) | |
733 | searching for changes |
|
737 | searching for changes | |
734 | 1:1acbe71ce432 |
|
738 | 1:1acbe71ce432 | |
735 | 2:6095d0695d70 |
|
739 | 2:6095d0695d70 | |
736 | 3:7983dce246cc |
|
740 | 3:7983dce246cc | |
737 | 4:233f12ada4ae |
|
741 | 4:233f12ada4ae | |
738 | 5:036794ea641c |
|
742 | 5:036794ea641c | |
739 | largefiles to upload (3 entities): |
|
743 | largefiles to upload (3 entities): | |
740 | b |
|
744 | b | |
741 | b1 |
|
745 | b1 | |
742 | b2 |
|
746 | b2 | |
743 |
|
|
747 | ||
744 | $ hg -R clone2 cat -r 3 clone2/.hglf/b |
|
748 | $ hg -R clone2 cat -r 3 clone2/.hglf/b | |
745 | c801c9cfe94400963fcb683246217d5db77f9a9a |
|
749 | c801c9cfe94400963fcb683246217d5db77f9a9a | |
746 | $ hg -R clone2 cat -r 4 clone2/.hglf/b |
|
750 | $ hg -R clone2 cat -r 4 clone2/.hglf/b | |
747 | 13f9ed0898e315bf59dc2973fec52037b6f441a2 |
|
751 | 13f9ed0898e315bf59dc2973fec52037b6f441a2 | |
748 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug --config progress.debug=true |
|
752 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug --config progress.debug=true | |
749 | comparing with $TESTTMP/issue3651/src (glob) |
|
753 | comparing with $TESTTMP/issue3651/src (glob) | |
750 | query 1; heads |
|
754 | query 1; heads | |
751 | searching for changes |
|
755 | searching for changes | |
752 | all remote heads known locally |
|
756 | all remote heads known locally | |
753 | 1:1acbe71ce432 |
|
757 | 1:1acbe71ce432 | |
754 | 2:6095d0695d70 |
|
758 | 2:6095d0695d70 | |
755 | 3:7983dce246cc |
|
759 | 3:7983dce246cc | |
756 | 4:233f12ada4ae |
|
760 | 4:233f12ada4ae | |
757 | 5:036794ea641c |
|
761 | 5:036794ea641c | |
758 | finding outgoing largefiles: 0/5 revisions (0.00%) |
|
762 | finding outgoing largefiles: 0/5 revisions (0.00%) | |
759 | finding outgoing largefiles: 1/5 revisions (20.00%) |
|
763 | finding outgoing largefiles: 1/5 revisions (20.00%) | |
760 | finding outgoing largefiles: 2/5 revisions (40.00%) |
|
764 | finding outgoing largefiles: 2/5 revisions (40.00%) | |
761 | finding outgoing largefiles: 3/5 revisions (60.00%) |
|
765 | finding outgoing largefiles: 3/5 revisions (60.00%) | |
762 | finding outgoing largefiles: 4/5 revisions (80.00%) |
|
766 | finding outgoing largefiles: 4/5 revisions (80.00%) | |
763 | largefiles to upload (3 entities): |
|
767 | largefiles to upload (3 entities): | |
764 | b |
|
768 | b | |
765 | 13f9ed0898e315bf59dc2973fec52037b6f441a2 |
|
769 | 13f9ed0898e315bf59dc2973fec52037b6f441a2 | |
766 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
770 | 89e6c98d92887913cadf06b2adb97f26cde4849b | |
767 | c801c9cfe94400963fcb683246217d5db77f9a9a |
|
771 | c801c9cfe94400963fcb683246217d5db77f9a9a | |
768 | b1 |
|
772 | b1 | |
769 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
773 | 89e6c98d92887913cadf06b2adb97f26cde4849b | |
770 | b2 |
|
774 | b2 | |
771 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
775 | 89e6c98d92887913cadf06b2adb97f26cde4849b | |
772 |
|
|
776 | ||
773 |
|
777 | |||
774 | Pushing revision #1 causes uploading entity 89e6c98d9288, which is |
|
778 | Pushing revision #1 causes uploading entity 89e6c98d9288, which is | |
775 | shared also by largefiles b1, b2 in revision #2 and b in revision #5. |
|
779 | shared also by largefiles b1, b2 in revision #2 and b in revision #5. | |
776 |
|
780 | |||
777 | Then, entity 89e6c98d9288 is not treated as "outgoing entity" at "hg |
|
781 | Then, entity 89e6c98d9288 is not treated as "outgoing entity" at "hg | |
778 | summary" and "hg outgoing", even though files in outgoing revision #2 |
|
782 | summary" and "hg outgoing", even though files in outgoing revision #2 | |
779 | and #5 refer it. |
|
783 | and #5 refer it. | |
780 |
|
784 | |||
781 | $ hg -R clone2 push -r 1 -q |
|
785 | $ hg -R clone2 push -r 1 -q | |
782 | $ hg -R clone2 summary --large |
|
786 | $ hg -R clone2 summary --large | |
783 | parent: 5:036794ea641c tip |
|
787 | parent: 5:036794ea641c tip | |
784 |
|
|
788 | #5: refer existing largefile entity again | |
785 | branch: default |
|
789 | branch: default | |
786 | commit: (clean) |
|
790 | commit: (clean) | |
787 | update: (current) |
|
791 | update: (current) | |
788 | phases: 6 draft |
|
792 | phases: 6 draft | |
789 | largefiles: 2 entities for 1 files to upload |
|
793 | largefiles: 2 entities for 1 files to upload | |
790 |
$ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" |
|
794 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" | |
791 | comparing with $TESTTMP/issue3651/src (glob) |
|
795 | comparing with $TESTTMP/issue3651/src (glob) | |
792 | searching for changes |
|
796 | searching for changes | |
793 | 2:6095d0695d70 |
|
797 | 2:6095d0695d70 | |
794 | 3:7983dce246cc |
|
798 | 3:7983dce246cc | |
795 | 4:233f12ada4ae |
|
799 | 4:233f12ada4ae | |
796 | 5:036794ea641c |
|
800 | 5:036794ea641c | |
797 | largefiles to upload (2 entities): |
|
801 | largefiles to upload (2 entities): | |
798 | b |
|
802 | b | |
799 |
|
|
803 | ||
800 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug --config progress.debug=true |
|
804 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug --config progress.debug=true | |
801 | comparing with $TESTTMP/issue3651/src (glob) |
|
805 | comparing with $TESTTMP/issue3651/src (glob) | |
802 | query 1; heads |
|
806 | query 1; heads | |
803 | searching for changes |
|
807 | searching for changes | |
804 | all remote heads known locally |
|
808 | all remote heads known locally | |
805 | 2:6095d0695d70 |
|
809 | 2:6095d0695d70 | |
806 | 3:7983dce246cc |
|
810 | 3:7983dce246cc | |
807 | 4:233f12ada4ae |
|
811 | 4:233f12ada4ae | |
808 | 5:036794ea641c |
|
812 | 5:036794ea641c | |
809 | finding outgoing largefiles: 0/4 revisions (0.00%) |
|
813 | finding outgoing largefiles: 0/4 revisions (0.00%) | |
810 | finding outgoing largefiles: 1/4 revisions (25.00%) |
|
814 | finding outgoing largefiles: 1/4 revisions (25.00%) | |
811 | finding outgoing largefiles: 2/4 revisions (50.00%) |
|
815 | finding outgoing largefiles: 2/4 revisions (50.00%) | |
812 | finding outgoing largefiles: 3/4 revisions (75.00%) |
|
816 | finding outgoing largefiles: 3/4 revisions (75.00%) | |
813 | largefiles to upload (2 entities): |
|
817 | largefiles to upload (2 entities): | |
814 | b |
|
818 | b | |
815 | 13f9ed0898e315bf59dc2973fec52037b6f441a2 |
|
819 | 13f9ed0898e315bf59dc2973fec52037b6f441a2 | |
816 | c801c9cfe94400963fcb683246217d5db77f9a9a |
|
820 | c801c9cfe94400963fcb683246217d5db77f9a9a | |
817 |
|
|
821 | ||
818 |
|
822 | |||
819 | $ cd .. |
|
823 | $ cd .. | |
820 |
|
824 | |||
821 |
merge action 'd' |
|
825 | merge action 'd' for 'local renamed directory to d2/g' which has no filename | |
822 | ================================================================================== |
|
826 | ================================================================================== | |
823 |
|
827 | |||
824 | $ hg init merge-action |
|
828 | $ hg init merge-action | |
825 | $ cd merge-action |
|
829 | $ cd merge-action | |
826 | $ touch l |
|
830 | $ touch l | |
827 | $ hg add --large l |
|
831 | $ hg add --large l | |
828 | $ mkdir d1 |
|
832 | $ mkdir d1 | |
829 | $ touch d1/f |
|
833 | $ touch d1/f | |
830 | $ hg ci -Aqm0 |
|
834 | $ hg ci -Aqm0 | |
831 | Invoking status precommit hook |
|
835 | Invoking status precommit hook | |
832 | A d1/f |
|
836 | A d1/f | |
833 | A l |
|
837 | A l | |
834 | $ echo > d1/f |
|
838 | $ echo > d1/f | |
835 | $ touch d1/g |
|
839 | $ touch d1/g | |
836 | $ hg ci -Aqm1 |
|
840 | $ hg ci -Aqm1 | |
837 | Invoking status precommit hook |
|
841 | Invoking status precommit hook | |
838 | M d1/f |
|
842 | M d1/f | |
839 | A d1/g |
|
843 | A d1/g | |
840 | $ hg up -qr0 |
|
844 | $ hg up -qr0 | |
841 | $ hg mv d1 d2 |
|
845 | $ hg mv d1 d2 | |
842 | moving d1/f to d2/f (glob) |
|
846 | moving d1/f to d2/f (glob) | |
843 | $ hg ci -qm2 |
|
847 | $ hg ci -qm2 | |
844 | Invoking status precommit hook |
|
848 | Invoking status precommit hook | |
845 | A d2/f |
|
849 | A d2/f | |
846 | R d1/f |
|
850 | R d1/f | |
847 | $ hg merge |
|
851 | $ hg merge | |
848 | merging d2/f and d1/f to d2/f |
|
852 | merging d2/f and d1/f to d2/f | |
849 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
853 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
850 |
|
|
854 | (branch merge, don't forget to commit) | |
851 | $ cd .. |
|
855 | $ cd .. | |
852 |
|
856 | |||
853 |
|
857 | |||
854 | Merge conflicts: |
|
858 | Merge conflicts: | |
855 | ===================== |
|
859 | ===================== | |
856 |
|
860 | |||
857 | $ hg init merge |
|
861 | $ hg init merge | |
858 | $ cd merge |
|
862 | $ cd merge | |
859 | $ echo 0 > f-different |
|
863 | $ echo 0 > f-different | |
860 | $ echo 0 > f-same |
|
864 | $ echo 0 > f-same | |
861 | $ echo 0 > f-unchanged-1 |
|
865 | $ echo 0 > f-unchanged-1 | |
862 | $ echo 0 > f-unchanged-2 |
|
866 | $ echo 0 > f-unchanged-2 | |
863 | $ hg add --large * |
|
867 | $ hg add --large * | |
864 | $ hg ci -m0 |
|
868 | $ hg ci -m0 | |
865 | Invoking status precommit hook |
|
869 | Invoking status precommit hook | |
866 | A f-different |
|
870 | A f-different | |
867 | A f-same |
|
871 | A f-same | |
868 | A f-unchanged-1 |
|
872 | A f-unchanged-1 | |
869 | A f-unchanged-2 |
|
873 | A f-unchanged-2 | |
870 | $ echo tmp1 > f-unchanged-1 |
|
874 | $ echo tmp1 > f-unchanged-1 | |
871 | $ echo tmp1 > f-unchanged-2 |
|
875 | $ echo tmp1 > f-unchanged-2 | |
872 | $ echo tmp1 > f-same |
|
876 | $ echo tmp1 > f-same | |
873 | $ hg ci -m1 |
|
877 | $ hg ci -m1 | |
874 | Invoking status precommit hook |
|
878 | Invoking status precommit hook | |
875 | M f-same |
|
879 | M f-same | |
876 | M f-unchanged-1 |
|
880 | M f-unchanged-1 | |
877 | M f-unchanged-2 |
|
881 | M f-unchanged-2 | |
878 | $ echo 2 > f-different |
|
882 | $ echo 2 > f-different | |
879 | $ echo 0 > f-unchanged-1 |
|
883 | $ echo 0 > f-unchanged-1 | |
880 | $ echo 1 > f-unchanged-2 |
|
884 | $ echo 1 > f-unchanged-2 | |
881 | $ echo 1 > f-same |
|
885 | $ echo 1 > f-same | |
882 | $ hg ci -m2 |
|
886 | $ hg ci -m2 | |
883 | Invoking status precommit hook |
|
887 | Invoking status precommit hook | |
884 | M f-different |
|
888 | M f-different | |
885 | M f-same |
|
889 | M f-same | |
886 | M f-unchanged-1 |
|
890 | M f-unchanged-1 | |
887 | M f-unchanged-2 |
|
891 | M f-unchanged-2 | |
888 | $ hg up -qr0 |
|
892 | $ hg up -qr0 | |
889 | $ echo tmp2 > f-unchanged-1 |
|
893 | $ echo tmp2 > f-unchanged-1 | |
890 | $ echo tmp2 > f-unchanged-2 |
|
894 | $ echo tmp2 > f-unchanged-2 | |
891 | $ echo tmp2 > f-same |
|
895 | $ echo tmp2 > f-same | |
892 | $ hg ci -m3 |
|
896 | $ hg ci -m3 | |
893 | Invoking status precommit hook |
|
897 | Invoking status precommit hook | |
894 | M f-same |
|
898 | M f-same | |
895 | M f-unchanged-1 |
|
899 | M f-unchanged-1 | |
896 | M f-unchanged-2 |
|
900 | M f-unchanged-2 | |
897 | created new head |
|
901 | created new head | |
898 | $ echo 1 > f-different |
|
902 | $ echo 1 > f-different | |
899 | $ echo 1 > f-unchanged-1 |
|
903 | $ echo 1 > f-unchanged-1 | |
900 | $ echo 0 > f-unchanged-2 |
|
904 | $ echo 0 > f-unchanged-2 | |
901 | $ echo 1 > f-same |
|
905 | $ echo 1 > f-same | |
902 | $ hg ci -m4 |
|
906 | $ hg ci -m4 | |
903 | Invoking status precommit hook |
|
907 | Invoking status precommit hook | |
904 | M f-different |
|
908 | M f-different | |
905 | M f-same |
|
909 | M f-same | |
906 | M f-unchanged-1 |
|
910 | M f-unchanged-1 | |
907 | M f-unchanged-2 |
|
911 | M f-unchanged-2 | |
908 | $ hg merge |
|
912 | $ hg merge | |
909 | largefile f-different has a merge conflict |
|
913 | largefile f-different has a merge conflict | |
910 | ancestor was 09d2af8dd22201dd8d48e5dcfcaed281ff9422c7 |
|
914 | ancestor was 09d2af8dd22201dd8d48e5dcfcaed281ff9422c7 | |
911 | keep (l)ocal e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e or |
|
915 | keep (l)ocal e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e or | |
912 | take (o)ther 7448d8798a4380162d4b56f9b452e2f6f9e24e7a? l |
|
916 | take (o)ther 7448d8798a4380162d4b56f9b452e2f6f9e24e7a? l | |
913 | getting changed largefiles |
|
917 | getting changed largefiles | |
914 | 1 largefiles updated, 0 removed |
|
918 | 1 largefiles updated, 0 removed | |
915 | 0 files updated, 4 files merged, 0 files removed, 0 files unresolved |
|
919 | 0 files updated, 4 files merged, 0 files removed, 0 files unresolved | |
916 | (branch merge, don't forget to commit) |
|
920 | (branch merge, don't forget to commit) | |
917 | $ cat f-different |
|
921 | $ cat f-different | |
918 | 1 |
|
922 | 1 | |
919 | $ cat f-same |
|
923 | $ cat f-same | |
920 | 1 |
|
924 | 1 | |
921 | $ cat f-unchanged-1 |
|
925 | $ cat f-unchanged-1 | |
922 | 1 |
|
926 | 1 | |
923 | $ cat f-unchanged-2 |
|
927 | $ cat f-unchanged-2 | |
924 | 1 |
|
928 | 1 | |
925 | $ cd .. |
|
929 | $ cd .. | |
926 |
|
930 | |||
927 | Test largefile insulation (do not enabled a side effect |
|
931 | Test largefile insulation (do not enabled a side effect | |
928 | ======================================================== |
|
932 | ======================================================== | |
929 |
|
933 | |||
930 | Check whether "largefiles" feature is supported only in repositories |
|
934 | Check whether "largefiles" feature is supported only in repositories | |
931 | enabling largefiles extension. |
|
935 | enabling largefiles extension. | |
932 |
|
936 | |||
933 | $ mkdir individualenabling |
|
937 | $ mkdir individualenabling | |
934 | $ cd individualenabling |
|
938 | $ cd individualenabling | |
935 |
|
939 | |||
936 | $ hg init enabledlocally |
|
940 | $ hg init enabledlocally | |
937 | $ echo large > enabledlocally/large |
|
941 | $ echo large > enabledlocally/large | |
938 | $ hg -R enabledlocally add --large enabledlocally/large |
|
942 | $ hg -R enabledlocally add --large enabledlocally/large | |
939 |
|
|
943 | $ hg -R enabledlocally commit -m '#0' | |
940 | Invoking status precommit hook |
|
944 | Invoking status precommit hook | |
941 | A large |
|
945 | A large | |
942 |
|
946 | |||
943 | $ hg init notenabledlocally |
|
947 | $ hg init notenabledlocally | |
944 | $ echo large > notenabledlocally/large |
|
948 | $ echo large > notenabledlocally/large | |
945 | $ hg -R notenabledlocally add --large notenabledlocally/large |
|
949 | $ hg -R notenabledlocally add --large notenabledlocally/large | |
946 |
|
|
950 | $ hg -R notenabledlocally commit -m '#0' | |
947 | Invoking status precommit hook |
|
951 | Invoking status precommit hook | |
948 | A large |
|
952 | A large | |
949 |
|
953 | |||
950 | $ cat >> $HGRCPATH <<EOF |
|
954 | $ cat >> $HGRCPATH <<EOF | |
951 | > [extensions] |
|
955 | > [extensions] | |
952 | > # disable globally |
|
956 | > # disable globally | |
953 | > largefiles=! |
|
957 | > largefiles=! | |
954 | > EOF |
|
958 | > EOF | |
955 | $ cat >> enabledlocally/.hg/hgrc <<EOF |
|
959 | $ cat >> enabledlocally/.hg/hgrc <<EOF | |
956 | > [extensions] |
|
960 | > [extensions] | |
957 | > # enable locally |
|
961 | > # enable locally | |
958 | > largefiles= |
|
962 | > largefiles= | |
959 | > EOF |
|
963 | > EOF | |
960 | $ hg -R enabledlocally root |
|
964 | $ hg -R enabledlocally root | |
961 | $TESTTMP/individualenabling/enabledlocally (glob) |
|
965 | $TESTTMP/individualenabling/enabledlocally (glob) | |
962 | $ hg -R notenabledlocally root |
|
966 | $ hg -R notenabledlocally root | |
963 | abort: repository requires features unknown to this Mercurial: largefiles! |
|
967 | abort: repository requires features unknown to this Mercurial: largefiles! | |
964 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
|
968 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) | |
965 | [255] |
|
969 | [255] | |
966 |
|
970 | |||
967 | $ hg init push-dst |
|
971 | $ hg init push-dst | |
968 | $ hg -R enabledlocally push push-dst |
|
972 | $ hg -R enabledlocally push push-dst | |
969 | pushing to push-dst |
|
973 | pushing to push-dst | |
970 | abort: required features are not supported in the destination: largefiles |
|
974 | abort: required features are not supported in the destination: largefiles | |
971 | [255] |
|
975 | [255] | |
972 |
|
976 | |||
973 | $ hg init pull-src |
|
977 | $ hg init pull-src | |
974 | $ hg -R pull-src pull enabledlocally |
|
978 | $ hg -R pull-src pull enabledlocally | |
975 | pulling from enabledlocally |
|
979 | pulling from enabledlocally | |
976 | abort: required features are not supported in the destination: largefiles |
|
980 | abort: required features are not supported in the destination: largefiles | |
977 | [255] |
|
981 | [255] | |
978 |
|
982 | |||
979 | $ hg clone enabledlocally clone-dst |
|
983 | $ hg clone enabledlocally clone-dst | |
980 | abort: repository requires features unknown to this Mercurial: largefiles! |
|
984 | abort: repository requires features unknown to this Mercurial: largefiles! | |
981 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
|
985 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) | |
982 | [255] |
|
986 | [255] | |
983 | $ test -d clone-dst |
|
987 | $ test -d clone-dst | |
984 | [1] |
|
988 | [1] | |
985 | $ hg clone --pull enabledlocally clone-pull-dst |
|
989 | $ hg clone --pull enabledlocally clone-pull-dst | |
986 | abort: required features are not supported in the destination: largefiles |
|
990 | abort: required features are not supported in the destination: largefiles | |
987 | [255] |
|
991 | [255] | |
988 | $ test -d clone-pull-dst |
|
992 | $ test -d clone-pull-dst | |
989 | [1] |
|
993 | [1] | |
990 |
|
994 | |||
991 | #if serve |
|
995 | #if serve | |
992 |
|
996 | |||
993 | Test largefiles specific peer setup, when largefiles is enabled |
|
997 | Test largefiles specific peer setup, when largefiles is enabled | |
994 | locally (issue4109) |
|
998 | locally (issue4109) | |
995 |
|
999 | |||
996 | $ hg showconfig extensions | grep largefiles |
|
1000 | $ hg showconfig extensions | grep largefiles | |
997 | extensions.largefiles=! |
|
1001 | extensions.largefiles=! | |
998 | $ mkdir -p $TESTTMP/individualenabling/usercache |
|
1002 | $ mkdir -p $TESTTMP/individualenabling/usercache | |
999 |
|
1003 | |||
1000 | $ hg serve -R enabledlocally -d -p $HGPORT --pid-file hg.pid |
|
1004 | $ hg serve -R enabledlocally -d -p $HGPORT --pid-file hg.pid | |
1001 | $ cat hg.pid >> $DAEMON_PIDS |
|
1005 | $ cat hg.pid >> $DAEMON_PIDS | |
1002 |
|
1006 | |||
1003 | $ hg init pull-dst |
|
1007 | $ hg init pull-dst | |
1004 | $ cat > pull-dst/.hg/hgrc <<EOF |
|
1008 | $ cat > pull-dst/.hg/hgrc <<EOF | |
1005 | > [extensions] |
|
1009 | > [extensions] | |
1006 | > # enable locally |
|
1010 | > # enable locally | |
1007 | > largefiles= |
|
1011 | > largefiles= | |
1008 | > [largefiles] |
|
1012 | > [largefiles] | |
1009 | > # ignore system cache to force largefiles specific wire proto access |
|
1013 | > # ignore system cache to force largefiles specific wire proto access | |
1010 | > usercache=$TESTTMP/individualenabling/usercache |
|
1014 | > usercache=$TESTTMP/individualenabling/usercache | |
1011 | > EOF |
|
1015 | > EOF | |
1012 | $ hg -R pull-dst -q pull -u http://localhost:$HGPORT |
|
1016 | $ hg -R pull-dst -q pull -u http://localhost:$HGPORT | |
1013 |
|
1017 | |||
1014 | $ killdaemons.py |
|
1018 | $ killdaemons.py | |
1015 | #endif |
|
1019 | #endif | |
1016 |
|
1020 | |||
1017 | Test overridden functions work correctly even for repos disabling |
|
1021 | Test overridden functions work correctly even for repos disabling | |
1018 | largefiles (issue4547) |
|
1022 | largefiles (issue4547) | |
1019 |
|
1023 | |||
1020 | $ hg showconfig extensions | grep largefiles |
|
1024 | $ hg showconfig extensions | grep largefiles | |
1021 | extensions.largefiles=! |
|
1025 | extensions.largefiles=! | |
1022 |
|
1026 | |||
1023 | (test updating implied by clone) |
|
1027 | (test updating implied by clone) | |
1024 |
|
1028 | |||
1025 | $ hg init enabled-but-no-largefiles |
|
1029 | $ hg init enabled-but-no-largefiles | |
1026 | $ echo normal1 > enabled-but-no-largefiles/normal1 |
|
1030 | $ echo normal1 > enabled-but-no-largefiles/normal1 | |
1027 | $ hg -R enabled-but-no-largefiles add enabled-but-no-largefiles/normal1 |
|
1031 | $ hg -R enabled-but-no-largefiles add enabled-but-no-largefiles/normal1 | |
1028 | $ hg -R enabled-but-no-largefiles commit -m '#0@enabled-but-no-largefiles' |
|
1032 | $ hg -R enabled-but-no-largefiles commit -m '#0@enabled-but-no-largefiles' | |
1029 | Invoking status precommit hook |
|
1033 | Invoking status precommit hook | |
1030 | A normal1 |
|
1034 | A normal1 | |
1031 | $ cat >> enabled-but-no-largefiles/.hg/hgrc <<EOF |
|
1035 | $ cat >> enabled-but-no-largefiles/.hg/hgrc <<EOF | |
1032 | > [extensions] |
|
1036 | > [extensions] | |
1033 | > # enable locally |
|
1037 | > # enable locally | |
1034 | > largefiles= |
|
1038 | > largefiles= | |
1035 | > EOF |
|
1039 | > EOF | |
1036 | $ hg clone -q enabled-but-no-largefiles no-largefiles |
|
1040 | $ hg clone -q enabled-but-no-largefiles no-largefiles | |
1037 |
|
1041 | |||
1038 | $ echo normal2 > enabled-but-no-largefiles/normal2 |
|
1042 | $ echo normal2 > enabled-but-no-largefiles/normal2 | |
1039 | $ hg -R enabled-but-no-largefiles add enabled-but-no-largefiles/normal2 |
|
1043 | $ hg -R enabled-but-no-largefiles add enabled-but-no-largefiles/normal2 | |
1040 | $ hg -R enabled-but-no-largefiles commit -m '#1@enabled-but-no-largefiles' |
|
1044 | $ hg -R enabled-but-no-largefiles commit -m '#1@enabled-but-no-largefiles' | |
1041 | Invoking status precommit hook |
|
1045 | Invoking status precommit hook | |
1042 | A normal2 |
|
1046 | A normal2 | |
1043 |
|
1047 | |||
1044 | $ echo normal3 > no-largefiles/normal3 |
|
1048 | $ echo normal3 > no-largefiles/normal3 | |
1045 | $ hg -R no-largefiles add no-largefiles/normal3 |
|
1049 | $ hg -R no-largefiles add no-largefiles/normal3 | |
1046 | $ hg -R no-largefiles commit -m '#1@no-largefiles' |
|
1050 | $ hg -R no-largefiles commit -m '#1@no-largefiles' | |
1047 | Invoking status precommit hook |
|
1051 | Invoking status precommit hook | |
1048 | A normal3 |
|
1052 | A normal3 | |
1049 |
|
1053 | |||
1050 | $ hg -R no-largefiles -q pull --rebase |
|
1054 | $ hg -R no-largefiles -q pull --rebase | |
1051 | Invoking status precommit hook |
|
1055 | Invoking status precommit hook | |
1052 | A normal3 |
|
1056 | A normal3 | |
1053 |
|
1057 | |||
1054 | (test reverting) |
|
1058 | (test reverting) | |
1055 |
|
1059 | |||
1056 | $ hg init subrepo-root |
|
1060 | $ hg init subrepo-root | |
1057 | $ cat >> subrepo-root/.hg/hgrc <<EOF |
|
1061 | $ cat >> subrepo-root/.hg/hgrc <<EOF | |
1058 | > [extensions] |
|
1062 | > [extensions] | |
1059 | > # enable locally |
|
1063 | > # enable locally | |
1060 | > largefiles= |
|
1064 | > largefiles= | |
1061 | > EOF |
|
1065 | > EOF | |
1062 | $ echo large > subrepo-root/large |
|
1066 | $ echo large > subrepo-root/large | |
1063 | $ hg -R subrepo-root add --large subrepo-root/large |
|
1067 | $ mkdir -p subrepo-root/dir/subdir | |
|
1068 | $ echo large2 > subrepo-root/dir/subdir/large.bin | |||
|
1069 | $ hg -R subrepo-root add --large subrepo-root/large subrepo-root/dir/subdir/large.bin | |||
1064 | $ hg clone -q no-largefiles subrepo-root/no-largefiles |
|
1070 | $ hg clone -q no-largefiles subrepo-root/no-largefiles | |
1065 | $ cat > subrepo-root/.hgsub <<EOF |
|
1071 | $ cat > subrepo-root/.hgsub <<EOF | |
1066 | > no-largefiles = no-largefiles |
|
1072 | > no-largefiles = no-largefiles | |
1067 | > EOF |
|
1073 | > EOF | |
1068 | $ hg -R subrepo-root add subrepo-root/.hgsub |
|
1074 | $ hg -R subrepo-root add subrepo-root/.hgsub | |
1069 | $ hg -R subrepo-root commit -m '#0' |
|
1075 | $ hg -R subrepo-root commit -m '#0' | |
1070 | Invoking status precommit hook |
|
1076 | Invoking status precommit hook | |
1071 | A .hgsub |
|
1077 | A .hgsub | |
|
1078 | A dir/subdir/large.bin | |||
1072 | A large |
|
1079 | A large | |
1073 | ? .hgsubstate |
|
1080 | ? .hgsubstate | |
1074 | $ echo dirty >> subrepo-root/large |
|
1081 | $ echo dirty >> subrepo-root/large | |
1075 | $ echo dirty >> subrepo-root/no-largefiles/normal1 |
|
1082 | $ echo dirty >> subrepo-root/no-largefiles/normal1 | |
1076 | $ hg -R subrepo-root status -S |
|
1083 | $ hg -R subrepo-root status -S | |
1077 | M large |
|
1084 | M large | |
1078 | M no-largefiles/normal1 |
|
1085 | M no-largefiles/normal1 | |
1079 | $ hg -R subrepo-root extdiff -p echo -S --config extensions.extdiff= |
|
1086 | $ hg -R subrepo-root extdiff -p echo -S --config extensions.extdiff= | |
1080 | "*\\no-largefiles\\normal1" "*\\no-largefiles\\normal1" (glob) (windows !) |
|
1087 | "*\\no-largefiles\\normal1" "*\\no-largefiles\\normal1" (glob) (windows !) | |
1081 | */no-largefiles/normal1 */no-largefiles/normal1 (glob) (no-windows !) |
|
1088 | */no-largefiles/normal1 */no-largefiles/normal1 (glob) (no-windows !) | |
1082 | [1] |
|
1089 | [1] | |
1083 | $ hg -R subrepo-root revert --all |
|
1090 | $ hg -R subrepo-root revert --all | |
1084 | reverting subrepo-root/.hglf/large (glob) |
|
1091 | reverting subrepo-root/.hglf/large (glob) | |
1085 | reverting subrepo no-largefiles |
|
1092 | reverting subrepo no-largefiles | |
1086 | reverting subrepo-root/no-largefiles/normal1 (glob) |
|
1093 | reverting subrepo-root/no-largefiles/normal1 (glob) | |
1087 |
|
1094 | |||
1088 | $ cd .. |
|
1095 | Move (and then undo) a directory move with only largefiles. | |
|
1096 | ||||
|
1097 | $ listtree() { | |||
|
1098 | > find $@ \( -type d -printf "%p/\n" -o -type f -printf "%p\n" \) \ | |||
|
1099 | > -a -name .hg -prune | sort | |||
|
1100 | > } | |||
|
1101 | ||||
|
1102 | $ cd subrepo-root | |||
|
1103 | $ listtree .hglf dir* large* | |||
|
1104 | .hglf/ | |||
|
1105 | .hglf/dir/ | |||
|
1106 | .hglf/dir/subdir/ | |||
|
1107 | .hglf/dir/subdir/large.bin | |||
|
1108 | .hglf/large | |||
|
1109 | dir/ | |||
|
1110 | dir/subdir/ | |||
|
1111 | dir/subdir/large.bin | |||
|
1112 | large | |||
|
1113 | large.orig | |||
|
1114 | ||||
|
1115 | $ hg mv dir/subdir dir/subdir2 | |||
|
1116 | moving .hglf/dir/subdir/large.bin to .hglf/dir/subdir2/large.bin (glob) | |||
|
1117 | ||||
|
1118 | $ listtree .hglf dir* large* | |||
|
1119 | .hglf/ | |||
|
1120 | .hglf/dir/ | |||
|
1121 | .hglf/dir/subdir2/ | |||
|
1122 | .hglf/dir/subdir2/large.bin | |||
|
1123 | .hglf/large | |||
|
1124 | dir/ | |||
|
1125 | dir/subdir2/ | |||
|
1126 | dir/subdir2/large.bin | |||
|
1127 | large | |||
|
1128 | large.orig | |||
|
1129 | $ hg status -C | |||
|
1130 | A dir/subdir2/large.bin | |||
|
1131 | dir/subdir/large.bin | |||
|
1132 | R dir/subdir/large.bin | |||
|
1133 | ? large.orig | |||
|
1134 | ||||
|
1135 | $ echo 'modified' > dir/subdir2/large.bin | |||
|
1136 | $ hg status -C | |||
|
1137 | A dir/subdir2/large.bin | |||
|
1138 | dir/subdir/large.bin | |||
|
1139 | R dir/subdir/large.bin | |||
|
1140 | ? large.orig | |||
|
1141 | ||||
|
1142 | $ hg revert --all | |||
|
1143 | undeleting .hglf/dir/subdir/large.bin (glob) | |||
|
1144 | forgetting .hglf/dir/subdir2/large.bin (glob) | |||
|
1145 | reverting subrepo no-largefiles | |||
|
1146 | ||||
|
1147 | $ hg status -C | |||
|
1148 | ? dir/subdir2/large.bin | |||
|
1149 | ? large.orig | |||
|
1150 | ||||
|
1151 | BUG: The content of the forgotten file shouldn't be clobbered | |||
|
1152 | ||||
|
1153 | $ cat dir/subdir2/large.bin | |||
|
1154 | large2 | |||
|
1155 | ||||
|
1156 | BUG: the standin for subdir2 should be deleted, not just dropped | |||
|
1157 | ||||
|
1158 | $ listtree .hglf dir* large* | |||
|
1159 | .hglf/ | |||
|
1160 | .hglf/dir/ | |||
|
1161 | .hglf/dir/subdir/ | |||
|
1162 | .hglf/dir/subdir/large.bin | |||
|
1163 | .hglf/dir/subdir2/ | |||
|
1164 | .hglf/dir/subdir2/large.bin | |||
|
1165 | .hglf/large | |||
|
1166 | dir/ | |||
|
1167 | dir/subdir/ | |||
|
1168 | dir/subdir/large.bin | |||
|
1169 | dir/subdir2/ | |||
|
1170 | dir/subdir2/large.bin | |||
|
1171 | large | |||
|
1172 | large.orig | |||
1089 |
|
1173 | |||
|
1174 | $ rm -r dir/subdir2 | |||
|
1175 | ||||
|
1176 | BUG: subdir should not be in the destination. This is caused by the directory | |||
|
1177 | existing under .hglf/. | |||
|
1178 | $ hg mv dir/subdir dir/subdir2 | |||
|
1179 | moving .hglf/dir/subdir/large.bin to .hglf/dir/subdir2/subdir/large.bin (glob) | |||
|
1180 | ||||
|
1181 | $ hg status -C | |||
|
1182 | A dir/subdir2/subdir/large.bin | |||
|
1183 | dir/subdir/large.bin | |||
|
1184 | R dir/subdir/large.bin | |||
|
1185 | ? large.orig | |||
|
1186 | ||||
|
1187 | $ listtree .hglf dir* large* | |||
|
1188 | .hglf/ | |||
|
1189 | .hglf/dir/ | |||
|
1190 | .hglf/dir/subdir2/ | |||
|
1191 | .hglf/dir/subdir2/large.bin | |||
|
1192 | .hglf/dir/subdir2/subdir/ | |||
|
1193 | .hglf/dir/subdir2/subdir/large.bin | |||
|
1194 | .hglf/large | |||
|
1195 | dir/ | |||
|
1196 | dir/subdir2/ | |||
|
1197 | dir/subdir2/subdir/ | |||
|
1198 | dir/subdir2/subdir/large.bin | |||
|
1199 | large | |||
|
1200 | large.orig | |||
|
1201 | ||||
|
1202 | Start from scratch, and rename something other than the final path component. | |||
|
1203 | ||||
|
1204 | $ hg up -qC . | |||
|
1205 | $ hg --config extensions.purge= purge | |||
|
1206 | ||||
|
1207 | $ hg mv dir/subdir dir2/subdir | |||
|
1208 | moving .hglf/dir/subdir/large.bin to .hglf/dir2/subdir/large.bin (glob) | |||
|
1209 | ||||
|
1210 | $ hg status -C | |||
|
1211 | A dir2/subdir/large.bin | |||
|
1212 | dir/subdir/large.bin | |||
|
1213 | R dir/subdir/large.bin | |||
|
1214 | ||||
|
1215 | $ listtree .hglf dir* large* | |||
|
1216 | .hglf/ | |||
|
1217 | .hglf/dir2/ | |||
|
1218 | .hglf/dir2/subdir/ | |||
|
1219 | .hglf/dir2/subdir/large.bin | |||
|
1220 | .hglf/large | |||
|
1221 | dir2/ | |||
|
1222 | dir2/subdir/ | |||
|
1223 | dir2/subdir/large.bin | |||
|
1224 | large | |||
|
1225 | ||||
|
1226 | $ hg revert --all | |||
|
1227 | undeleting .hglf/dir/subdir/large.bin (glob) | |||
|
1228 | forgetting .hglf/dir2/subdir/large.bin (glob) | |||
|
1229 | reverting subrepo no-largefiles | |||
|
1230 | ||||
|
1231 | $ hg status -C | |||
|
1232 | ? dir2/subdir/large.bin | |||
|
1233 | ||||
|
1234 | $ listtree .hglf dir* large* | |||
|
1235 | .hglf/ | |||
|
1236 | .hglf/dir/ | |||
|
1237 | .hglf/dir/subdir/ | |||
|
1238 | .hglf/dir/subdir/large.bin | |||
|
1239 | .hglf/dir2/ | |||
|
1240 | .hglf/dir2/subdir/ | |||
|
1241 | .hglf/dir2/subdir/large.bin | |||
|
1242 | .hglf/large | |||
|
1243 | dir/ | |||
|
1244 | dir/subdir/ | |||
|
1245 | dir/subdir/large.bin | |||
|
1246 | dir2/ | |||
|
1247 | dir2/subdir/ | |||
|
1248 | dir2/subdir/large.bin | |||
|
1249 | large | |||
|
1250 | ||||
|
1251 | $ cd ../.. | |||
1090 |
|
1252 | |||
1091 | Test "pull --rebase" when rebase is enabled before largefiles (issue3861) |
|
1253 | Test "pull --rebase" when rebase is enabled before largefiles (issue3861) | |
1092 | ========================================================================= |
|
1254 | ========================================================================= | |
1093 |
|
1255 | |||
1094 | $ hg showconfig extensions | grep largefiles |
|
1256 | $ hg showconfig extensions | grep largefiles | |
1095 | extensions.largefiles=! |
|
1257 | extensions.largefiles=! | |
1096 |
|
1258 | |||
1097 | $ mkdir issue3861 |
|
1259 | $ mkdir issue3861 | |
1098 | $ cd issue3861 |
|
1260 | $ cd issue3861 | |
1099 | $ hg init src |
|
1261 | $ hg init src | |
1100 | $ hg clone -q src dst |
|
1262 | $ hg clone -q src dst | |
1101 | $ echo a > src/a |
|
1263 | $ echo a > src/a | |
1102 | $ hg -R src commit -Aqm "#0" |
|
1264 | $ hg -R src commit -Aqm "#0" | |
1103 | Invoking status precommit hook |
|
1265 | Invoking status precommit hook | |
1104 | A a |
|
1266 | A a | |
1105 |
|
1267 | |||
1106 | $ cat >> dst/.hg/hgrc <<EOF |
|
1268 | $ cat >> dst/.hg/hgrc <<EOF | |
1107 | > [extensions] |
|
1269 | > [extensions] | |
1108 | > largefiles= |
|
1270 | > largefiles= | |
1109 | > EOF |
|
1271 | > EOF | |
1110 | $ hg -R dst pull --rebase |
|
1272 | $ hg -R dst pull --rebase | |
1111 | pulling from $TESTTMP/issue3861/src (glob) |
|
1273 | pulling from $TESTTMP/issue3861/src (glob) | |
1112 | requesting all changes |
|
1274 | requesting all changes | |
1113 | adding changesets |
|
1275 | adding changesets | |
1114 | adding manifests |
|
1276 | adding manifests | |
1115 | adding file changes |
|
1277 | adding file changes | |
1116 | added 1 changesets with 1 changes to 1 files |
|
1278 | added 1 changesets with 1 changes to 1 files | |
1117 | new changesets bf5e395ced2c |
|
1279 | new changesets bf5e395ced2c | |
1118 | nothing to rebase - updating instead |
|
1280 | nothing to rebase - updating instead | |
1119 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1281 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1120 |
|
1282 | |||
1121 | $ cd .. |
|
1283 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now