Show More
@@ -1,795 +1,796 | |||||
1 | #require no-reposimplestore |
|
1 | #require no-reposimplestore | |
2 |
|
2 | |||
3 | This file focuses mainly on updating largefiles in the working |
|
3 | This file focuses mainly on updating largefiles in the working | |
4 | directory (and ".hg/largefiles/dirstate") |
|
4 | directory (and ".hg/largefiles/dirstate") | |
5 |
|
5 | |||
|
6 | $ unset HGMERGE | |||
6 |
$ |
|
7 | $ cat >> $HGRCPATH <<EOF | |
7 | > [ui] |
|
8 | > [ui] | |
8 |
> merge = internal: |
|
9 | > merge = internal:merge | |
9 | > [extensions] |
|
10 | > [extensions] | |
10 | > largefiles = |
|
11 | > largefiles = | |
11 | > [extdiff] |
|
12 | > [extdiff] | |
12 |
> # |
|
13 | > # for portability: | |
13 |
> pdiff = sh |
|
14 | > pdiff = sh "$RUNTESTDIR/pdiff" | |
14 | > EOF |
|
15 | > EOF | |
15 |
|
16 | |||
16 |
$ hg |
|
17 | $ hg init repo | |
17 |
$ |
|
18 | $ cd repo | |
18 |
|
19 | |||
19 |
$ |
|
20 | $ echo large1 > large1 | |
20 |
$ |
|
21 | $ echo large2 > large2 | |
21 |
$ |
|
22 | $ hg add --large large1 large2 | |
22 |
$ |
|
23 | $ echo normal1 > normal1 | |
23 |
$ |
|
24 | $ hg add normal1 | |
24 |
$ |
|
25 | $ hg commit -m '#0' | |
25 |
$ echo |
|
26 | $ echo 'large1 in #1' > large1 | |
26 |
$ echo |
|
27 | $ echo 'normal1 in #1' > normal1 | |
27 |
$ hg |
|
28 | $ hg commit -m '#1' | |
28 |
$ hg |
|
29 | $ hg pdiff -r '.^' --config extensions.extdiff= | |
29 |
diff -Nru |
|
30 | diff -Nru repo.0d9d9b8dc9a3/.hglf/large1 repo/.hglf/large1 | |
30 |
--- repo.0 |
|
31 | --- repo.0d9d9b8dc9a3/.hglf/large1 * (glob) | |
31 | +++ repo/.hglf/large1 * (glob) |
|
32 | +++ repo/.hglf/large1 * (glob) | |
32 | @@ -1* +1* @@ (glob) |
|
33 | @@ -1* +1* @@ (glob) | |
33 |
-4669e532 |
|
34 | -4669e532d5b2c093a78eca010077e708a071bb64 | |
34 |
+58e24 |
|
35 | +58e24f733a964da346e2407a2bee99d9001184f5 | |
35 |
|
|
36 | diff -Nru repo.0d9d9b8dc9a3/normal1 repo/normal1 | |
36 |
--- repo.0 |
|
37 | --- repo.0d9d9b8dc9a3/normal1 * (glob) | |
37 | +++ repo/normal1 * (glob) |
|
38 | +++ repo/normal1 * (glob) | |
38 | @@ -1* +1* @@ (glob) |
|
39 | @@ -1* +1* @@ (glob) | |
39 | -normal1 |
|
40 | -normal1 | |
40 |
+normal1 |
|
41 | +normal1 in #1 | |
41 | [1] |
|
42 | [1] | |
42 |
$ hg |
|
43 | $ hg update -q -C 0 | |
43 |
$ echo |
|
44 | $ echo 'large2 in #2' > large2 | |
44 |
$ hg |
|
45 | $ hg commit -m '#2' | |
45 |
|
|
46 | created new head | |
46 |
|
47 | |||
47 |
|
|
48 | Test that update also updates the lfdirstate of 'unsure' largefiles after | |
48 |
|
|
49 | hashing them: | |
49 |
|
50 | |||
50 |
|
|
51 | The previous operations will usually have left us with largefiles with a mtime | |
51 |
|
|
52 | within the same second as the dirstate was written. | |
52 |
The |
|
53 | The lfdirstate entries will thus have been written with an invalidated/unset | |
53 |
|
|
54 | mtime to make sure further changes within the same second is detected. | |
54 |
We |
|
55 | We will however occasionally be "lucky" and get a tick between writing | |
55 |
|
|
56 | largefiles and writing dirstate so we get valid lfdirstate timestamps. The | |
56 |
|
|
57 | following verification is thus disabled but can be verified manually. | |
57 |
|
58 | |||
58 | #if false |
|
59 | #if false | |
59 |
$ |
|
60 | $ hg debugdirstate --large --nodate | |
60 |
|
|
61 | n 644 7 unset large1 | |
61 |
|
|
62 | n 644 13 unset large2 | |
62 | #endif |
|
63 | #endif | |
63 |
|
64 | |||
64 |
|
|
65 | Wait to make sure we get a tick so the mtime of the largefiles become valid. | |
65 |
|
66 | |||
66 |
$ |
|
67 | $ sleep 1 | |
67 |
|
68 | |||
68 |
|
|
69 | A linear merge will update standins before performing the actual merge. It will | |
69 |
|
|
70 | do a lfdirstate status walk and find 'unset'/'unsure' files, hash them, and | |
70 |
|
|
71 | update the corresponding standins. | |
71 |
Verify |
|
72 | Verify that it actually marks the clean files as clean in lfdirstate so | |
72 |
|
|
73 | we don't have to hash them again next time we update. | |
73 |
|
74 | |||
74 | $ hg up |
|
75 | $ hg up | |
75 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
76 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
76 | updated to "f74e50bd9e55: #2" |
|
77 | updated to "f74e50bd9e55: #2" | |
77 | 1 other heads for branch "default" |
|
78 | 1 other heads for branch "default" | |
78 | $ hg debugdirstate --large --nodate |
|
79 | $ hg debugdirstate --large --nodate | |
79 | n 644 7 set large1 |
|
80 | n 644 7 set large1 | |
80 | n 644 13 set large2 |
|
81 | n 644 13 set large2 | |
81 |
|
82 | |||
82 | Test that lfdirstate keeps track of last modification of largefiles and |
|
83 | Test that lfdirstate keeps track of last modification of largefiles and | |
83 | prevents unnecessary hashing of content - also after linear/noop update |
|
84 | prevents unnecessary hashing of content - also after linear/noop update | |
84 |
|
85 | |||
85 | $ sleep 1 |
|
86 | $ sleep 1 | |
86 | $ hg st |
|
87 | $ hg st | |
87 | $ hg debugdirstate --large --nodate |
|
88 | $ hg debugdirstate --large --nodate | |
88 | n 644 7 set large1 |
|
89 | n 644 7 set large1 | |
89 | n 644 13 set large2 |
|
90 | n 644 13 set large2 | |
90 | $ hg up |
|
91 | $ hg up | |
91 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
92 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
92 | updated to "f74e50bd9e55: #2" |
|
93 | updated to "f74e50bd9e55: #2" | |
93 | 1 other heads for branch "default" |
|
94 | 1 other heads for branch "default" | |
94 | $ hg debugdirstate --large --nodate |
|
95 | $ hg debugdirstate --large --nodate | |
95 | n 644 7 set large1 |
|
96 | n 644 7 set large1 | |
96 | n 644 13 set large2 |
|
97 | n 644 13 set large2 | |
97 |
|
98 | |||
98 | Test that "hg merge" updates largefiles from "other" correctly |
|
99 | Test that "hg merge" updates largefiles from "other" correctly | |
99 |
|
100 | |||
100 | (getting largefiles from "other" normally) |
|
101 | (getting largefiles from "other" normally) | |
101 |
|
102 | |||
102 | $ hg status -A large1 |
|
103 | $ hg status -A large1 | |
103 | C large1 |
|
104 | C large1 | |
104 | $ cat large1 |
|
105 | $ cat large1 | |
105 | large1 |
|
106 | large1 | |
106 | $ cat .hglf/large1 |
|
107 | $ cat .hglf/large1 | |
107 | 4669e532d5b2c093a78eca010077e708a071bb64 |
|
108 | 4669e532d5b2c093a78eca010077e708a071bb64 | |
108 | $ hg merge --config debug.dirstate.delaywrite=2 |
|
109 | $ hg merge --config debug.dirstate.delaywrite=2 | |
109 | getting changed largefiles |
|
110 | getting changed largefiles | |
110 | 1 largefiles updated, 0 removed |
|
111 | 1 largefiles updated, 0 removed | |
111 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
112 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
112 |
(branch merge, don' |
|
113 | (branch merge, don't forget to commit) | |
113 |
|
|
114 | $ hg status -A large1 | |
114 |
|
|
115 | M large1 | |
115 |
$ |
|
116 | $ cat large1 | |
116 |
|
|
117 | large1 in #1 | |
117 | $ cat .hglf/large1 |
|
118 | $ cat .hglf/large1 | |
118 |
|
|
119 | 58e24f733a964da346e2407a2bee99d9001184f5 | |
119 |
$ |
|
120 | $ hg diff -c 1 --nodates .hglf/large1 | grep '^[+-][0-9a-z]' | |
120 |
-4669e532 |
|
121 | -4669e532d5b2c093a78eca010077e708a071bb64 | |
121 |
+58e24 |
|
122 | +58e24f733a964da346e2407a2bee99d9001184f5 | |
122 |
|
123 | |||
123 |
(getting |
|
124 | (getting largefiles from "other" via conflict prompt) | |
124 |
|
125 | |||
125 |
|
|
126 | $ hg update -q -C 2 | |
126 |
$ echo |
|
127 | $ echo 'large1 in #3' > large1 | |
127 |
$ echo |
|
128 | $ echo 'normal1 in #3' > normal1 | |
128 |
$ hg |
|
129 | $ hg commit -m '#3' | |
129 | $ cat .hglf/large1 |
|
130 | $ cat .hglf/large1 | |
130 |
|
|
131 | e5bb990443d6a92aaf7223813720f7566c9dd05b | |
131 |
$ |
|
132 | $ hg merge --config debug.dirstate.delaywrite=2 --config ui.interactive=True <<EOF | |
132 | > o |
|
133 | > o | |
133 | > EOF |
|
134 | > EOF | |
134 |
|
|
135 | largefile large1 has a merge conflict | |
135 |
|
|
136 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 | |
136 |
|
|
137 | keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or | |
137 |
|
|
138 | take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o | |
138 |
merging |
|
139 | merging normal1 | |
139 |
warning: |
|
140 | warning: conflicts while merging normal1! (edit, then use 'hg resolve --mark') | |
140 |
|
|
141 | getting changed largefiles | |
141 |
|
|
142 | 1 largefiles updated, 0 removed | |
142 |
|
|
143 | 0 files updated, 1 files merged, 0 files removed, 1 files unresolved | |
143 |
|
|
144 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
144 | [1] |
|
145 | [1] | |
145 |
$ |
|
146 | $ hg status -A large1 | |
146 |
|
|
147 | M large1 | |
147 |
$ |
|
148 | $ cat large1 | |
148 |
|
|
149 | large1 in #1 | |
149 | $ cat .hglf/large1 |
|
150 | $ cat .hglf/large1 | |
150 |
|
|
151 | 58e24f733a964da346e2407a2bee99d9001184f5 | |
151 |
$ |
|
152 | $ rm normal1.orig | |
152 |
|
153 | |||
153 |
(merge |
|
154 | (merge non-existing largefiles from "other" via conflict prompt - | |
154 |
make |
|
155 | make sure the following commit doesn't abort in a confusing way when trying to | |
155 | mark the non-existing file as normal in lfdirstate) |
|
156 | mark the non-existing file as normal in lfdirstate) | |
156 |
|
157 | |||
157 | $ mv .hg/largefiles/58e24f733a964da346e2407a2bee99d9001184f5 . |
|
158 | $ mv .hg/largefiles/58e24f733a964da346e2407a2bee99d9001184f5 . | |
158 | $ hg update -q -C 3 |
|
159 | $ hg update -q -C 3 | |
159 | $ hg merge --config largefiles.usercache=not --config debug.dirstate.delaywrite=2 --tool :local --config ui.interactive=True <<EOF |
|
160 | $ hg merge --config largefiles.usercache=not --config debug.dirstate.delaywrite=2 --tool :local --config ui.interactive=True <<EOF | |
160 | > o |
|
161 | > o | |
161 | > EOF |
|
162 | > EOF | |
162 | largefile large1 has a merge conflict |
|
163 | largefile large1 has a merge conflict | |
163 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
164 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 | |
164 | keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or |
|
165 | keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or | |
165 | take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o |
|
166 | take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o | |
166 | getting changed largefiles |
|
167 | getting changed largefiles | |
167 | large1: largefile 58e24f733a964da346e2407a2bee99d9001184f5 not available from file:/*/$TESTTMP/repo (glob) |
|
168 | large1: largefile 58e24f733a964da346e2407a2bee99d9001184f5 not available from file:/*/$TESTTMP/repo (glob) | |
168 | 0 largefiles updated, 0 removed |
|
169 | 0 largefiles updated, 0 removed | |
169 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
170 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
170 | (branch merge, don't forget to commit) |
|
171 | (branch merge, don't forget to commit) | |
171 | $ hg commit -m '1-2-3 testing' --config largefiles.usercache=not |
|
172 | $ hg commit -m '1-2-3 testing' --config largefiles.usercache=not | |
172 | large1: largefile 58e24f733a964da346e2407a2bee99d9001184f5 not available from local store |
|
173 | large1: largefile 58e24f733a964da346e2407a2bee99d9001184f5 not available from local store | |
173 | $ hg up -C . --config largefiles.usercache=not |
|
174 | $ hg up -C . --config largefiles.usercache=not | |
174 | getting changed largefiles |
|
175 | getting changed largefiles | |
175 | large1: largefile 58e24f733a964da346e2407a2bee99d9001184f5 not available from file:/*/$TESTTMP/repo (glob) |
|
176 | large1: largefile 58e24f733a964da346e2407a2bee99d9001184f5 not available from file:/*/$TESTTMP/repo (glob) | |
176 | 0 largefiles updated, 0 removed |
|
177 | 0 largefiles updated, 0 removed | |
177 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
178 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
178 | $ hg st large1 |
|
179 | $ hg st large1 | |
179 | ! large1 |
|
180 | ! large1 | |
180 | $ hg rollback -q |
|
181 | $ hg rollback -q | |
181 | $ mv 58e24f733a964da346e2407a2bee99d9001184f5 .hg/largefiles/ |
|
182 | $ mv 58e24f733a964da346e2407a2bee99d9001184f5 .hg/largefiles/ | |
182 |
|
183 | |||
183 | Test that "hg revert -r REV" updates largefiles from "REV" correctly |
|
184 | Test that "hg revert -r REV" updates largefiles from "REV" correctly | |
184 |
|
185 | |||
185 | $ hg update -q -C 3 |
|
186 | $ hg update -q -C 3 | |
186 | $ hg status -A large1 |
|
187 | $ hg status -A large1 | |
187 | C large1 |
|
188 | C large1 | |
188 | $ cat large1 |
|
189 | $ cat large1 | |
189 | large1 in #3 |
|
190 | large1 in #3 | |
190 | $ cat .hglf/large1 |
|
191 | $ cat .hglf/large1 | |
191 | e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
192 | e5bb990443d6a92aaf7223813720f7566c9dd05b | |
192 | $ hg diff -c 1 --nodates .hglf/large1 | grep '^[+-][0-9a-z]' |
|
193 | $ hg diff -c 1 --nodates .hglf/large1 | grep '^[+-][0-9a-z]' | |
193 | -4669e532d5b2c093a78eca010077e708a071bb64 |
|
194 | -4669e532d5b2c093a78eca010077e708a071bb64 | |
194 | +58e24f733a964da346e2407a2bee99d9001184f5 |
|
195 | +58e24f733a964da346e2407a2bee99d9001184f5 | |
195 | $ hg revert --no-backup -r 1 --config debug.dirstate.delaywrite=2 large1 |
|
196 | $ hg revert --no-backup -r 1 --config debug.dirstate.delaywrite=2 large1 | |
196 | $ hg status -A large1 |
|
197 | $ hg status -A large1 | |
197 | M large1 |
|
198 | M large1 | |
198 | $ cat large1 |
|
199 | $ cat large1 | |
199 | large1 in #1 |
|
200 | large1 in #1 | |
200 | $ cat .hglf/large1 |
|
201 | $ cat .hglf/large1 | |
201 | 58e24f733a964da346e2407a2bee99d9001184f5 |
|
202 | 58e24f733a964da346e2407a2bee99d9001184f5 | |
202 |
|
203 | |||
203 | Test that "hg rollback" restores status of largefiles correctly |
|
204 | Test that "hg rollback" restores status of largefiles correctly | |
204 |
|
205 | |||
205 | $ hg update -C -q |
|
206 | $ hg update -C -q | |
206 | $ hg remove large1 |
|
207 | $ hg remove large1 | |
207 | $ test -f .hglf/large1 |
|
208 | $ test -f .hglf/large1 | |
208 | [1] |
|
209 | [1] | |
209 | $ hg forget large2 |
|
210 | $ hg forget large2 | |
210 | $ test -f .hglf/large2 |
|
211 | $ test -f .hglf/large2 | |
211 | [1] |
|
212 | [1] | |
212 | $ echo largeX > largeX |
|
213 | $ echo largeX > largeX | |
213 | $ hg add --large largeX |
|
214 | $ hg add --large largeX | |
214 | $ cat .hglf/largeX |
|
215 | $ cat .hglf/largeX | |
215 |
|
216 | |||
216 | $ hg commit -m 'will be rollback-ed soon' |
|
217 | $ hg commit -m 'will be rollback-ed soon' | |
217 | $ echo largeY > largeY |
|
218 | $ echo largeY > largeY | |
218 | $ hg add --large largeY |
|
219 | $ hg add --large largeY | |
219 |
|
220 | |||
220 | $ hg status -A large1 |
|
221 | $ hg status -A large1 | |
221 | large1: $ENOENT$ |
|
222 | large1: $ENOENT$ | |
222 |
|
223 | |||
223 | $ hg status -A large2 |
|
224 | $ hg status -A large2 | |
224 | ? large2 |
|
225 | ? large2 | |
225 | $ hg status -A largeX |
|
226 | $ hg status -A largeX | |
226 | C largeX |
|
227 | C largeX | |
227 | $ hg status -A largeY |
|
228 | $ hg status -A largeY | |
228 | A largeY |
|
229 | A largeY | |
229 | $ hg rollback |
|
230 | $ hg rollback | |
230 | repository tip rolled back to revision 3 (undo commit) |
|
231 | repository tip rolled back to revision 3 (undo commit) | |
231 | working directory now based on revision 3 |
|
232 | working directory now based on revision 3 | |
232 | $ hg status -A large1 |
|
233 | $ hg status -A large1 | |
233 | R large1 |
|
234 | R large1 | |
234 | $ test -f .hglf/large1 |
|
235 | $ test -f .hglf/large1 | |
235 | [1] |
|
236 | [1] | |
236 | $ hg status -A large2 |
|
237 | $ hg status -A large2 | |
237 | R large2 |
|
238 | R large2 | |
238 | $ test -f .hglf/large2 |
|
239 | $ test -f .hglf/large2 | |
239 | [1] |
|
240 | [1] | |
240 | $ hg status -A largeX |
|
241 | $ hg status -A largeX | |
241 | A largeX |
|
242 | A largeX | |
242 | $ cat .hglf/largeX |
|
243 | $ cat .hglf/largeX | |
243 |
|
244 | |||
244 | $ hg status -A largeY |
|
245 | $ hg status -A largeY | |
245 | ? largeY |
|
246 | ? largeY | |
246 | $ test -f .hglf/largeY |
|
247 | $ test -f .hglf/largeY | |
247 | [1] |
|
248 | [1] | |
248 | $ rm largeY |
|
249 | $ rm largeY | |
249 |
|
250 | |||
250 | Test that "hg rollback" restores standins correctly |
|
251 | Test that "hg rollback" restores standins correctly | |
251 |
|
252 | |||
252 | $ hg commit -m 'will be rollback-ed soon' |
|
253 | $ hg commit -m 'will be rollback-ed soon' | |
253 | $ hg update -q -C 2 |
|
254 | $ hg update -q -C 2 | |
254 | $ cat large1 |
|
255 | $ cat large1 | |
255 | large1 |
|
256 | large1 | |
256 | $ cat .hglf/large1 |
|
257 | $ cat .hglf/large1 | |
257 | 4669e532d5b2c093a78eca010077e708a071bb64 |
|
258 | 4669e532d5b2c093a78eca010077e708a071bb64 | |
258 | $ cat large2 |
|
259 | $ cat large2 | |
259 | large2 in #2 |
|
260 | large2 in #2 | |
260 | $ cat .hglf/large2 |
|
261 | $ cat .hglf/large2 | |
261 | 3cfce6277e7668985707b6887ce56f9f62f6ccd9 |
|
262 | 3cfce6277e7668985707b6887ce56f9f62f6ccd9 | |
262 |
|
263 | |||
263 | $ hg rollback -q -f |
|
264 | $ hg rollback -q -f | |
264 | $ cat large1 |
|
265 | $ cat large1 | |
265 | large1 |
|
266 | large1 | |
266 | $ cat .hglf/large1 |
|
267 | $ cat .hglf/large1 | |
267 | 4669e532d5b2c093a78eca010077e708a071bb64 |
|
268 | 4669e532d5b2c093a78eca010077e708a071bb64 | |
268 | $ cat large2 |
|
269 | $ cat large2 | |
269 | large2 in #2 |
|
270 | large2 in #2 | |
270 | $ cat .hglf/large2 |
|
271 | $ cat .hglf/large2 | |
271 | 3cfce6277e7668985707b6887ce56f9f62f6ccd9 |
|
272 | 3cfce6277e7668985707b6887ce56f9f62f6ccd9 | |
272 |
|
273 | |||
273 | (rollback the parent of the working directory, when the parent of it |
|
274 | (rollback the parent of the working directory, when the parent of it | |
274 | is not branch-tip) |
|
275 | is not branch-tip) | |
275 |
|
276 | |||
276 | $ hg update -q -C 1 |
|
277 | $ hg update -q -C 1 | |
277 | $ cat .hglf/large1 |
|
278 | $ cat .hglf/large1 | |
278 | 58e24f733a964da346e2407a2bee99d9001184f5 |
|
279 | 58e24f733a964da346e2407a2bee99d9001184f5 | |
279 | $ cat .hglf/large2 |
|
280 | $ cat .hglf/large2 | |
280 | 1deebade43c8c498a3c8daddac0244dc55d1331d |
|
281 | 1deebade43c8c498a3c8daddac0244dc55d1331d | |
281 |
|
282 | |||
282 | $ echo normalX > normalX |
|
283 | $ echo normalX > normalX | |
283 | $ hg add normalX |
|
284 | $ hg add normalX | |
284 | $ hg commit -m 'will be rollback-ed soon' |
|
285 | $ hg commit -m 'will be rollback-ed soon' | |
285 | $ hg rollback -q |
|
286 | $ hg rollback -q | |
286 |
|
287 | |||
287 | $ cat .hglf/large1 |
|
288 | $ cat .hglf/large1 | |
288 | 58e24f733a964da346e2407a2bee99d9001184f5 |
|
289 | 58e24f733a964da346e2407a2bee99d9001184f5 | |
289 | $ cat .hglf/large2 |
|
290 | $ cat .hglf/large2 | |
290 | 1deebade43c8c498a3c8daddac0244dc55d1331d |
|
291 | 1deebade43c8c498a3c8daddac0244dc55d1331d | |
291 | $ rm normalX |
|
292 | $ rm normalX | |
292 |
|
293 | |||
293 | Test that "hg status" shows status of largefiles correctly just after |
|
294 | Test that "hg status" shows status of largefiles correctly just after | |
294 | automated commit like rebase/transplant |
|
295 | automated commit like rebase/transplant | |
295 |
|
296 | |||
296 | $ cat >> .hg/hgrc <<EOF |
|
297 | $ cat >> .hg/hgrc <<EOF | |
297 | > [extensions] |
|
298 | > [extensions] | |
298 | > rebase = |
|
299 | > rebase = | |
299 | > strip = |
|
300 | > strip = | |
300 | > transplant = |
|
301 | > transplant = | |
301 | > EOF |
|
302 | > EOF | |
302 | $ hg update -q -C 1 |
|
303 | $ hg update -q -C 1 | |
303 | $ hg remove large1 |
|
304 | $ hg remove large1 | |
304 | $ echo largeX > largeX |
|
305 | $ echo largeX > largeX | |
305 | $ hg add --large largeX |
|
306 | $ hg add --large largeX | |
306 | $ hg commit -m '#4' |
|
307 | $ hg commit -m '#4' | |
307 |
|
308 | |||
308 | $ hg rebase -s 1 -d 2 --keep |
|
309 | $ hg rebase -s 1 -d 2 --keep | |
309 | rebasing 1:72518492caa6 "#1" |
|
310 | rebasing 1:72518492caa6 "#1" | |
310 | rebasing 4:07d6153b5c04 "#4" (tip) |
|
311 | rebasing 4:07d6153b5c04 "#4" (tip) | |
311 |
|
312 | |||
312 | $ hg status -A large1 |
|
313 | $ hg status -A large1 | |
313 | large1: $ENOENT$ |
|
314 | large1: $ENOENT$ | |
314 |
|
315 | |||
315 | $ hg status -A largeX |
|
316 | $ hg status -A largeX | |
316 | C largeX |
|
317 | C largeX | |
317 | $ hg strip -q 5 |
|
318 | $ hg strip -q 5 | |
318 |
|
319 | |||
319 | $ hg update -q -C 2 |
|
320 | $ hg update -q -C 2 | |
320 | $ hg transplant -q 1 4 |
|
321 | $ hg transplant -q 1 4 | |
321 |
|
322 | |||
322 | $ hg status -A large1 |
|
323 | $ hg status -A large1 | |
323 | large1: $ENOENT$ |
|
324 | large1: $ENOENT$ | |
324 |
|
325 | |||
325 | $ hg status -A largeX |
|
326 | $ hg status -A largeX | |
326 | C largeX |
|
327 | C largeX | |
327 | $ hg strip -q 5 |
|
328 | $ hg strip -q 5 | |
328 |
|
329 | |||
329 | $ hg update -q -C 2 |
|
330 | $ hg update -q -C 2 | |
330 | $ hg transplant -q --merge 1 --merge 4 |
|
331 | $ hg transplant -q --merge 1 --merge 4 | |
331 |
|
332 | |||
332 | $ hg status -A large1 |
|
333 | $ hg status -A large1 | |
333 | large1: $ENOENT$ |
|
334 | large1: $ENOENT$ | |
334 |
|
335 | |||
335 | $ hg status -A largeX |
|
336 | $ hg status -A largeX | |
336 | C largeX |
|
337 | C largeX | |
337 | $ hg strip -q 5 |
|
338 | $ hg strip -q 5 | |
338 |
|
339 | |||
339 | Test that linear merge can detect modification (and conflict) correctly |
|
340 | Test that linear merge can detect modification (and conflict) correctly | |
340 |
|
341 | |||
341 | (linear merge without conflict) |
|
342 | (linear merge without conflict) | |
342 |
|
343 | |||
343 | $ echo 'large2 for linear merge (no conflict)' > large2 |
|
344 | $ echo 'large2 for linear merge (no conflict)' > large2 | |
344 | $ hg update 3 --config debug.dirstate.delaywrite=2 |
|
345 | $ hg update 3 --config debug.dirstate.delaywrite=2 | |
345 | getting changed largefiles |
|
346 | getting changed largefiles | |
346 | 1 largefiles updated, 0 removed |
|
347 | 1 largefiles updated, 0 removed | |
347 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
348 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
348 | $ hg status -A large2 |
|
349 | $ hg status -A large2 | |
349 | M large2 |
|
350 | M large2 | |
350 | $ cat large2 |
|
351 | $ cat large2 | |
351 | large2 for linear merge (no conflict) |
|
352 | large2 for linear merge (no conflict) | |
352 | $ cat .hglf/large2 |
|
353 | $ cat .hglf/large2 | |
353 | 9c4bf8f1b33536d6e5f89447e10620cfe52ea710 |
|
354 | 9c4bf8f1b33536d6e5f89447e10620cfe52ea710 | |
354 |
|
355 | |||
355 | (linear merge with conflict, choosing "other") |
|
356 | (linear merge with conflict, choosing "other") | |
356 |
|
357 | |||
357 | $ hg update -q -C 2 |
|
358 | $ hg update -q -C 2 | |
358 | $ echo 'large1 for linear merge (conflict)' > large1 |
|
359 | $ echo 'large1 for linear merge (conflict)' > large1 | |
359 | $ hg update 3 --config ui.interactive=True <<EOF |
|
360 | $ hg update 3 --config ui.interactive=True <<EOF | |
360 | > o |
|
361 | > o | |
361 | > EOF |
|
362 | > EOF | |
362 | largefile large1 has a merge conflict |
|
363 | largefile large1 has a merge conflict | |
363 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
364 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 | |
364 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or |
|
365 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or | |
365 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? o |
|
366 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? o | |
366 | getting changed largefiles |
|
367 | getting changed largefiles | |
367 | 1 largefiles updated, 0 removed |
|
368 | 1 largefiles updated, 0 removed | |
368 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
369 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
369 | $ hg status -A large1 |
|
370 | $ hg status -A large1 | |
370 | C large1 |
|
371 | C large1 | |
371 | $ cat large1 |
|
372 | $ cat large1 | |
372 | large1 in #3 |
|
373 | large1 in #3 | |
373 | $ cat .hglf/large1 |
|
374 | $ cat .hglf/large1 | |
374 | e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
375 | e5bb990443d6a92aaf7223813720f7566c9dd05b | |
375 |
|
376 | |||
376 | (linear merge with conflict, choosing "local") |
|
377 | (linear merge with conflict, choosing "local") | |
377 |
|
378 | |||
378 | $ hg update -q -C 2 |
|
379 | $ hg update -q -C 2 | |
379 | $ echo 'large1 for linear merge (conflict)' > large1 |
|
380 | $ echo 'large1 for linear merge (conflict)' > large1 | |
380 | $ hg update 3 --config debug.dirstate.delaywrite=2 |
|
381 | $ hg update 3 --config debug.dirstate.delaywrite=2 | |
381 | largefile large1 has a merge conflict |
|
382 | largefile large1 has a merge conflict | |
382 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
383 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 | |
383 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or |
|
384 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or | |
384 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l |
|
385 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l | |
385 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
386 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
386 | $ hg status -A large1 |
|
387 | $ hg status -A large1 | |
387 | M large1 |
|
388 | M large1 | |
388 | $ cat large1 |
|
389 | $ cat large1 | |
389 | large1 for linear merge (conflict) |
|
390 | large1 for linear merge (conflict) | |
390 | $ cat .hglf/large1 |
|
391 | $ cat .hglf/large1 | |
391 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 |
|
392 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 | |
392 |
|
393 | |||
393 | Test a linear merge to a revision containing same-name normal file |
|
394 | Test a linear merge to a revision containing same-name normal file | |
394 |
|
395 | |||
395 | $ hg update -q -C 3 |
|
396 | $ hg update -q -C 3 | |
396 | $ hg remove large2 |
|
397 | $ hg remove large2 | |
397 | $ echo 'large2 as normal file' > large2 |
|
398 | $ echo 'large2 as normal file' > large2 | |
398 | $ hg add large2 |
|
399 | $ hg add large2 | |
399 | $ echo 'large3 as normal file' > large3 |
|
400 | $ echo 'large3 as normal file' > large3 | |
400 | $ hg add large3 |
|
401 | $ hg add large3 | |
401 | $ hg commit -m '#5' |
|
402 | $ hg commit -m '#5' | |
402 | $ hg manifest |
|
403 | $ hg manifest | |
403 | .hglf/large1 |
|
404 | .hglf/large1 | |
404 | large2 |
|
405 | large2 | |
405 | large3 |
|
406 | large3 | |
406 | normal1 |
|
407 | normal1 | |
407 |
|
408 | |||
408 | (modified largefile is already switched to normal) |
|
409 | (modified largefile is already switched to normal) | |
409 |
|
410 | |||
410 | $ hg update -q -C 2 |
|
411 | $ hg update -q -C 2 | |
411 | $ echo 'modified large2 for linear merge' > large2 |
|
412 | $ echo 'modified large2 for linear merge' > large2 | |
412 | $ hg update -q 5 |
|
413 | $ hg update -q 5 | |
413 | remote turned local largefile large2 into a normal file |
|
414 | remote turned local largefile large2 into a normal file | |
414 | keep (l)argefile or use (n)ormal file? l |
|
415 | keep (l)argefile or use (n)ormal file? l | |
415 | $ hg debugdirstate --no-dates | grep large2 |
|
416 | $ hg debugdirstate --no-dates | grep large2 | |
416 | a 0 -1 unset .hglf/large2 |
|
417 | a 0 -1 unset .hglf/large2 | |
417 | r 0 0 set large2 |
|
418 | r 0 0 set large2 | |
418 | $ hg status -A large2 |
|
419 | $ hg status -A large2 | |
419 | A large2 |
|
420 | A large2 | |
420 | $ cat large2 |
|
421 | $ cat large2 | |
421 | modified large2 for linear merge |
|
422 | modified large2 for linear merge | |
422 |
|
423 | |||
423 | (added largefile is already committed as normal) |
|
424 | (added largefile is already committed as normal) | |
424 |
|
425 | |||
425 | $ hg update -q -C 2 |
|
426 | $ hg update -q -C 2 | |
426 | $ echo 'large3 as large file for linear merge' > large3 |
|
427 | $ echo 'large3 as large file for linear merge' > large3 | |
427 | $ hg add --large large3 |
|
428 | $ hg add --large large3 | |
428 | $ hg update -q 5 |
|
429 | $ hg update -q 5 | |
429 | remote turned local largefile large3 into a normal file |
|
430 | remote turned local largefile large3 into a normal file | |
430 | keep (l)argefile or use (n)ormal file? l |
|
431 | keep (l)argefile or use (n)ormal file? l | |
431 | $ hg debugdirstate --no-dates | grep large3 |
|
432 | $ hg debugdirstate --no-dates | grep large3 | |
432 | a 0 -1 unset .hglf/large3 |
|
433 | a 0 -1 unset .hglf/large3 | |
433 | r 0 0 set large3 |
|
434 | r 0 0 set large3 | |
434 | $ hg status -A large3 |
|
435 | $ hg status -A large3 | |
435 | A large3 |
|
436 | A large3 | |
436 | $ cat large3 |
|
437 | $ cat large3 | |
437 | large3 as large file for linear merge |
|
438 | large3 as large file for linear merge | |
438 | $ rm -f large3 .hglf/large3 |
|
439 | $ rm -f large3 .hglf/large3 | |
439 |
|
440 | |||
440 | Test that the internal linear merging works correctly |
|
441 | Test that the internal linear merging works correctly | |
441 | (both heads are stripped to keep pairing of revision number and commit log) |
|
442 | (both heads are stripped to keep pairing of revision number and commit log) | |
442 |
|
443 | |||
443 | $ hg update -q -C 2 |
|
444 | $ hg update -q -C 2 | |
444 | $ hg strip 3 4 |
|
445 | $ hg strip 3 4 | |
445 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9530e27857f7-2e7b195d-backup.hg |
|
446 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9530e27857f7-2e7b195d-backup.hg | |
446 | $ mv .hg/strip-backup/9530e27857f7-2e7b195d-backup.hg $TESTTMP |
|
447 | $ mv .hg/strip-backup/9530e27857f7-2e7b195d-backup.hg $TESTTMP | |
447 |
|
448 | |||
448 | (internal linear merging at "hg pull --update") |
|
449 | (internal linear merging at "hg pull --update") | |
449 |
|
450 | |||
450 | $ echo 'large1 for linear merge (conflict)' > large1 |
|
451 | $ echo 'large1 for linear merge (conflict)' > large1 | |
451 | $ echo 'large2 for linear merge (conflict with normal file)' > large2 |
|
452 | $ echo 'large2 for linear merge (conflict with normal file)' > large2 | |
452 | $ hg pull --update --config debug.dirstate.delaywrite=2 $TESTTMP/9530e27857f7-2e7b195d-backup.hg |
|
453 | $ hg pull --update --config debug.dirstate.delaywrite=2 $TESTTMP/9530e27857f7-2e7b195d-backup.hg | |
453 | pulling from $TESTTMP/9530e27857f7-2e7b195d-backup.hg |
|
454 | pulling from $TESTTMP/9530e27857f7-2e7b195d-backup.hg | |
454 | searching for changes |
|
455 | searching for changes | |
455 | adding changesets |
|
456 | adding changesets | |
456 | adding manifests |
|
457 | adding manifests | |
457 | adding file changes |
|
458 | adding file changes | |
458 | added 3 changesets with 5 changes to 5 files |
|
459 | added 3 changesets with 5 changes to 5 files | |
459 | new changesets 9530e27857f7:d65e59e952a9 (3 drafts) |
|
460 | new changesets 9530e27857f7:d65e59e952a9 (3 drafts) | |
460 | remote turned local largefile large2 into a normal file |
|
461 | remote turned local largefile large2 into a normal file | |
461 | keep (l)argefile or use (n)ormal file? l |
|
462 | keep (l)argefile or use (n)ormal file? l | |
462 | largefile large1 has a merge conflict |
|
463 | largefile large1 has a merge conflict | |
463 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
464 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 | |
464 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or |
|
465 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or | |
465 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l |
|
466 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l | |
466 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
467 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
467 | updated to "d65e59e952a9: #5" |
|
468 | updated to "d65e59e952a9: #5" | |
468 | 1 other heads for branch "default" |
|
469 | 1 other heads for branch "default" | |
469 |
|
470 | |||
470 | $ hg status -A large1 |
|
471 | $ hg status -A large1 | |
471 | M large1 |
|
472 | M large1 | |
472 | $ cat large1 |
|
473 | $ cat large1 | |
473 | large1 for linear merge (conflict) |
|
474 | large1 for linear merge (conflict) | |
474 | $ cat .hglf/large1 |
|
475 | $ cat .hglf/large1 | |
475 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 |
|
476 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 | |
476 | $ hg status -A large2 |
|
477 | $ hg status -A large2 | |
477 | A large2 |
|
478 | A large2 | |
478 | $ cat large2 |
|
479 | $ cat large2 | |
479 | large2 for linear merge (conflict with normal file) |
|
480 | large2 for linear merge (conflict with normal file) | |
480 | $ cat .hglf/large2 |
|
481 | $ cat .hglf/large2 | |
481 | d7591fe9be0f6227d90bddf3e4f52ff41fc1f544 |
|
482 | d7591fe9be0f6227d90bddf3e4f52ff41fc1f544 | |
482 |
|
483 | |||
483 | (internal linear merging at "hg unbundle --update") |
|
484 | (internal linear merging at "hg unbundle --update") | |
484 |
|
485 | |||
485 | $ hg update -q -C 2 |
|
486 | $ hg update -q -C 2 | |
486 | $ hg rollback -q |
|
487 | $ hg rollback -q | |
487 |
|
488 | |||
488 | $ echo 'large1 for linear merge (conflict)' > large1 |
|
489 | $ echo 'large1 for linear merge (conflict)' > large1 | |
489 | $ echo 'large2 for linear merge (conflict with normal file)' > large2 |
|
490 | $ echo 'large2 for linear merge (conflict with normal file)' > large2 | |
490 | $ hg unbundle --update --config debug.dirstate.delaywrite=2 $TESTTMP/9530e27857f7-2e7b195d-backup.hg |
|
491 | $ hg unbundle --update --config debug.dirstate.delaywrite=2 $TESTTMP/9530e27857f7-2e7b195d-backup.hg | |
491 | adding changesets |
|
492 | adding changesets | |
492 | adding manifests |
|
493 | adding manifests | |
493 | adding file changes |
|
494 | adding file changes | |
494 | added 3 changesets with 5 changes to 5 files |
|
495 | added 3 changesets with 5 changes to 5 files | |
495 | new changesets 9530e27857f7:d65e59e952a9 (3 drafts) |
|
496 | new changesets 9530e27857f7:d65e59e952a9 (3 drafts) | |
496 | remote turned local largefile large2 into a normal file |
|
497 | remote turned local largefile large2 into a normal file | |
497 | keep (l)argefile or use (n)ormal file? l |
|
498 | keep (l)argefile or use (n)ormal file? l | |
498 | largefile large1 has a merge conflict |
|
499 | largefile large1 has a merge conflict | |
499 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
500 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 | |
500 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or |
|
501 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or | |
501 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l |
|
502 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l | |
502 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
503 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
503 | updated to "d65e59e952a9: #5" |
|
504 | updated to "d65e59e952a9: #5" | |
504 | 1 other heads for branch "default" |
|
505 | 1 other heads for branch "default" | |
505 |
|
506 | |||
506 | $ hg status -A large1 |
|
507 | $ hg status -A large1 | |
507 | M large1 |
|
508 | M large1 | |
508 | $ cat large1 |
|
509 | $ cat large1 | |
509 | large1 for linear merge (conflict) |
|
510 | large1 for linear merge (conflict) | |
510 | $ cat .hglf/large1 |
|
511 | $ cat .hglf/large1 | |
511 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 |
|
512 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 | |
512 | $ hg status -A large2 |
|
513 | $ hg status -A large2 | |
513 | A large2 |
|
514 | A large2 | |
514 | $ cat large2 |
|
515 | $ cat large2 | |
515 | large2 for linear merge (conflict with normal file) |
|
516 | large2 for linear merge (conflict with normal file) | |
516 | $ cat .hglf/large2 |
|
517 | $ cat .hglf/large2 | |
517 | d7591fe9be0f6227d90bddf3e4f52ff41fc1f544 |
|
518 | d7591fe9be0f6227d90bddf3e4f52ff41fc1f544 | |
518 |
|
519 | |||
519 | (internal linear merging in subrepo at "hg update") |
|
520 | (internal linear merging in subrepo at "hg update") | |
520 |
|
521 | |||
521 | $ cd .. |
|
522 | $ cd .. | |
522 | $ hg init subparent |
|
523 | $ hg init subparent | |
523 | $ cd subparent |
|
524 | $ cd subparent | |
524 |
|
525 | |||
525 | $ hg clone -q -u 2 ../repo sub |
|
526 | $ hg clone -q -u 2 ../repo sub | |
526 | $ cat > .hgsub <<EOF |
|
527 | $ cat > .hgsub <<EOF | |
527 | > sub = sub |
|
528 | > sub = sub | |
528 | > EOF |
|
529 | > EOF | |
529 | $ hg add .hgsub |
|
530 | $ hg add .hgsub | |
530 | $ hg commit -m '#0@parent' |
|
531 | $ hg commit -m '#0@parent' | |
531 | $ cat .hgsubstate |
|
532 | $ cat .hgsubstate | |
532 | f74e50bd9e5594b7cf1e6c5cbab86ddd25f3ca2f sub |
|
533 | f74e50bd9e5594b7cf1e6c5cbab86ddd25f3ca2f sub | |
533 | $ hg -R sub update -q |
|
534 | $ hg -R sub update -q | |
534 | $ hg commit -m '#1@parent' |
|
535 | $ hg commit -m '#1@parent' | |
535 | $ cat .hgsubstate |
|
536 | $ cat .hgsubstate | |
536 | d65e59e952a9638e2ce863b41a420ca723dd3e8d sub |
|
537 | d65e59e952a9638e2ce863b41a420ca723dd3e8d sub | |
537 | $ hg update -q 0 |
|
538 | $ hg update -q 0 | |
538 |
|
539 | |||
539 | $ echo 'large1 for linear merge (conflict)' > sub/large1 |
|
540 | $ echo 'large1 for linear merge (conflict)' > sub/large1 | |
540 | $ echo 'large2 for linear merge (conflict with normal file)' > sub/large2 |
|
541 | $ echo 'large2 for linear merge (conflict with normal file)' > sub/large2 | |
541 | $ hg update --config ui.interactive=True --config debug.dirstate.delaywrite=2 <<EOF |
|
542 | $ hg update --config ui.interactive=True --config debug.dirstate.delaywrite=2 <<EOF | |
542 | > m |
|
543 | > m | |
543 | > r |
|
544 | > r | |
544 | > l |
|
545 | > l | |
545 | > l |
|
546 | > l | |
546 | > EOF |
|
547 | > EOF | |
547 | subrepository sub diverged (local revision: f74e50bd9e55, remote revision: d65e59e952a9) |
|
548 | subrepository sub diverged (local revision: f74e50bd9e55, remote revision: d65e59e952a9) | |
548 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m |
|
549 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m | |
549 | subrepository sources for sub differ (in checked out version) |
|
550 | subrepository sources for sub differ (in checked out version) | |
550 | use (l)ocal source (f74e50bd9e55) or (r)emote source (d65e59e952a9)? r |
|
551 | use (l)ocal source (f74e50bd9e55) or (r)emote source (d65e59e952a9)? r | |
551 | remote turned local largefile large2 into a normal file |
|
552 | remote turned local largefile large2 into a normal file | |
552 | keep (l)argefile or use (n)ormal file? l |
|
553 | keep (l)argefile or use (n)ormal file? l | |
553 | largefile large1 has a merge conflict |
|
554 | largefile large1 has a merge conflict | |
554 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
555 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 | |
555 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or |
|
556 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or | |
556 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l |
|
557 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l | |
557 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
558 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
558 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
559 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
559 |
|
560 | |||
560 | $ hg -R sub status -A sub/large1 |
|
561 | $ hg -R sub status -A sub/large1 | |
561 | M sub/large1 |
|
562 | M sub/large1 | |
562 | $ cat sub/large1 |
|
563 | $ cat sub/large1 | |
563 | large1 for linear merge (conflict) |
|
564 | large1 for linear merge (conflict) | |
564 | $ cat sub/.hglf/large1 |
|
565 | $ cat sub/.hglf/large1 | |
565 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 |
|
566 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 | |
566 | $ hg -R sub status -A sub/large2 |
|
567 | $ hg -R sub status -A sub/large2 | |
567 | A sub/large2 |
|
568 | A sub/large2 | |
568 | $ cat sub/large2 |
|
569 | $ cat sub/large2 | |
569 | large2 for linear merge (conflict with normal file) |
|
570 | large2 for linear merge (conflict with normal file) | |
570 | $ cat sub/.hglf/large2 |
|
571 | $ cat sub/.hglf/large2 | |
571 | d7591fe9be0f6227d90bddf3e4f52ff41fc1f544 |
|
572 | d7591fe9be0f6227d90bddf3e4f52ff41fc1f544 | |
572 |
|
573 | |||
573 | $ cd .. |
|
574 | $ cd .. | |
574 | $ cd repo |
|
575 | $ cd repo | |
575 |
|
576 | |||
576 | Test that rebase updates largefiles in the working directory even if |
|
577 | Test that rebase updates largefiles in the working directory even if | |
577 | it is aborted by conflict. |
|
578 | it is aborted by conflict. | |
578 |
|
579 | |||
579 | $ hg update -q -C 3 |
|
580 | $ hg update -q -C 3 | |
580 | $ cat .hglf/large1 |
|
581 | $ cat .hglf/large1 | |
581 | e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
582 | e5bb990443d6a92aaf7223813720f7566c9dd05b | |
582 | $ cat large1 |
|
583 | $ cat large1 | |
583 | large1 in #3 |
|
584 | large1 in #3 | |
584 | $ hg rebase -s 1 -d 3 --keep --config ui.interactive=True <<EOF |
|
585 | $ hg rebase -s 1 -d 3 --keep --config ui.interactive=True <<EOF | |
585 | > o |
|
586 | > o | |
586 | > EOF |
|
587 | > EOF | |
587 | rebasing 1:72518492caa6 "#1" |
|
588 | rebasing 1:72518492caa6 "#1" | |
588 | largefile large1 has a merge conflict |
|
589 | largefile large1 has a merge conflict | |
589 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
590 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 | |
590 | keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or |
|
591 | keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or | |
591 | take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o |
|
592 | take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o | |
592 | merging normal1 |
|
593 | merging normal1 | |
593 | warning: conflicts while merging normal1! (edit, then use 'hg resolve --mark') |
|
594 | warning: conflicts while merging normal1! (edit, then use 'hg resolve --mark') | |
594 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
595 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
595 | [1] |
|
596 | [1] | |
596 | $ cat .hglf/large1 |
|
597 | $ cat .hglf/large1 | |
597 | 58e24f733a964da346e2407a2bee99d9001184f5 |
|
598 | 58e24f733a964da346e2407a2bee99d9001184f5 | |
598 | $ cat large1 |
|
599 | $ cat large1 | |
599 | large1 in #1 |
|
600 | large1 in #1 | |
600 | $ rm normal1.orig |
|
601 | $ rm normal1.orig | |
601 |
|
602 | |||
602 | Test that rebase updates standins for manually modified largefiles at |
|
603 | Test that rebase updates standins for manually modified largefiles at | |
603 | the 1st commit of resuming. |
|
604 | the 1st commit of resuming. | |
604 |
|
605 | |||
605 | $ echo "manually modified before 'hg rebase --continue'" > large1 |
|
606 | $ echo "manually modified before 'hg rebase --continue'" > large1 | |
606 | $ hg resolve -m normal1 |
|
607 | $ hg resolve -m normal1 | |
607 | (no more unresolved files) |
|
608 | (no more unresolved files) | |
608 | continue: hg rebase --continue |
|
609 | continue: hg rebase --continue | |
609 | $ hg rebase --continue --config ui.interactive=True <<EOF |
|
610 | $ hg rebase --continue --config ui.interactive=True <<EOF | |
610 | > c |
|
611 | > c | |
611 | > EOF |
|
612 | > EOF | |
612 | rebasing 1:72518492caa6 "#1" |
|
613 | rebasing 1:72518492caa6 "#1" | |
613 | rebasing 4:07d6153b5c04 "#4" |
|
614 | rebasing 4:07d6153b5c04 "#4" | |
614 | file '.hglf/large1' was deleted in other [source] but was modified in local [dest]. |
|
615 | file '.hglf/large1' was deleted in other [source] but was modified in local [dest]. | |
615 | What do you want to do? |
|
616 | What do you want to do? | |
616 | use (c)hanged version, (d)elete, or leave (u)nresolved? c |
|
617 | use (c)hanged version, (d)elete, or leave (u)nresolved? c | |
617 |
|
618 | |||
618 | $ hg diff -c "tip~1" --nodates .hglf/large1 | grep '^[+-][0-9a-z]' |
|
619 | $ hg diff -c "tip~1" --nodates .hglf/large1 | grep '^[+-][0-9a-z]' | |
619 | -e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
620 | -e5bb990443d6a92aaf7223813720f7566c9dd05b | |
620 | +8a4f783556e7dea21139ca0466eafce954c75c13 |
|
621 | +8a4f783556e7dea21139ca0466eafce954c75c13 | |
621 | $ rm -f large1 |
|
622 | $ rm -f large1 | |
622 | $ hg update -q -C tip |
|
623 | $ hg update -q -C tip | |
623 | $ cat large1 |
|
624 | $ cat large1 | |
624 | manually modified before 'hg rebase --continue' |
|
625 | manually modified before 'hg rebase --continue' | |
625 |
|
626 | |||
626 | Test that transplant updates largefiles, of which standins are safely |
|
627 | Test that transplant updates largefiles, of which standins are safely | |
627 | changed, even if it is aborted by conflict of other. |
|
628 | changed, even if it is aborted by conflict of other. | |
628 |
|
629 | |||
629 | $ hg update -q -C 5 |
|
630 | $ hg update -q -C 5 | |
630 | $ cat .hglf/large1 |
|
631 | $ cat .hglf/large1 | |
631 | e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
632 | e5bb990443d6a92aaf7223813720f7566c9dd05b | |
632 | $ cat large1 |
|
633 | $ cat large1 | |
633 | large1 in #3 |
|
634 | large1 in #3 | |
634 | $ hg diff -c 4 .hglf/largeX | grep '^[+-][0-9a-z]' |
|
635 | $ hg diff -c 4 .hglf/largeX | grep '^[+-][0-9a-z]' | |
635 | +fa44618ea25181aff4f48b70428294790cec9f61 |
|
636 | +fa44618ea25181aff4f48b70428294790cec9f61 | |
636 | $ hg transplant 4 |
|
637 | $ hg transplant 4 | |
637 | applying 07d6153b5c04 |
|
638 | applying 07d6153b5c04 | |
638 | patching file .hglf/large1 |
|
639 | patching file .hglf/large1 | |
639 | Hunk #1 FAILED at 0 |
|
640 | Hunk #1 FAILED at 0 | |
640 | 1 out of 1 hunks FAILED -- saving rejects to file .hglf/large1.rej |
|
641 | 1 out of 1 hunks FAILED -- saving rejects to file .hglf/large1.rej | |
641 | patch failed to apply |
|
642 | patch failed to apply | |
642 | abort: fix up the working directory and run hg transplant --continue |
|
643 | abort: fix up the working directory and run hg transplant --continue | |
643 | [255] |
|
644 | [255] | |
644 | $ hg status -A large1 |
|
645 | $ hg status -A large1 | |
645 | C large1 |
|
646 | C large1 | |
646 | $ cat .hglf/large1 |
|
647 | $ cat .hglf/large1 | |
647 | e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
648 | e5bb990443d6a92aaf7223813720f7566c9dd05b | |
648 | $ cat large1 |
|
649 | $ cat large1 | |
649 | large1 in #3 |
|
650 | large1 in #3 | |
650 | $ hg status -A largeX |
|
651 | $ hg status -A largeX | |
651 | A largeX |
|
652 | A largeX | |
652 | $ cat .hglf/largeX |
|
653 | $ cat .hglf/largeX | |
653 | fa44618ea25181aff4f48b70428294790cec9f61 |
|
654 | fa44618ea25181aff4f48b70428294790cec9f61 | |
654 | $ cat largeX |
|
655 | $ cat largeX | |
655 | largeX |
|
656 | largeX | |
656 |
|
657 | |||
657 | Test that transplant updates standins for manually modified largefiles |
|
658 | Test that transplant updates standins for manually modified largefiles | |
658 | at the 1st commit of resuming. |
|
659 | at the 1st commit of resuming. | |
659 |
|
660 | |||
660 | $ echo "manually modified before 'hg transplant --continue'" > large1 |
|
661 | $ echo "manually modified before 'hg transplant --continue'" > large1 | |
661 | $ hg transplant --continue |
|
662 | $ hg transplant --continue | |
662 | 07d6153b5c04 transplanted as f1bf30eb88cc |
|
663 | 07d6153b5c04 transplanted as f1bf30eb88cc | |
663 | $ hg diff -c tip .hglf/large1 | grep '^[+-][0-9a-z]' |
|
664 | $ hg diff -c tip .hglf/large1 | grep '^[+-][0-9a-z]' | |
664 | -e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
665 | -e5bb990443d6a92aaf7223813720f7566c9dd05b | |
665 | +6a4f36d4075fbe0f30ec1d26ca44e63c05903671 |
|
666 | +6a4f36d4075fbe0f30ec1d26ca44e63c05903671 | |
666 | $ rm -f large1 |
|
667 | $ rm -f large1 | |
667 | $ hg update -q -C tip |
|
668 | $ hg update -q -C tip | |
668 | $ cat large1 |
|
669 | $ cat large1 | |
669 | manually modified before 'hg transplant --continue' |
|
670 | manually modified before 'hg transplant --continue' | |
670 |
|
671 | |||
671 | Test that "hg status" doesn't show removal of largefiles not managed |
|
672 | Test that "hg status" doesn't show removal of largefiles not managed | |
672 | in the target context. |
|
673 | in the target context. | |
673 |
|
674 | |||
674 | $ hg update -q -C 4 |
|
675 | $ hg update -q -C 4 | |
675 | $ hg remove largeX |
|
676 | $ hg remove largeX | |
676 | $ hg status -A largeX |
|
677 | $ hg status -A largeX | |
677 | R largeX |
|
678 | R largeX | |
678 | $ hg status -A --rev '.^1' largeX |
|
679 | $ hg status -A --rev '.^1' largeX | |
679 |
|
680 | |||
680 | #if execbit |
|
681 | #if execbit | |
681 |
|
682 | |||
682 | Test that "hg status" against revisions other than parent notices exec |
|
683 | Test that "hg status" against revisions other than parent notices exec | |
683 | bit changes of largefiles. |
|
684 | bit changes of largefiles. | |
684 |
|
685 | |||
685 | $ hg update -q -C 4 |
|
686 | $ hg update -q -C 4 | |
686 |
|
687 | |||
687 | (the case that large2 doesn't have exec bit in the target context but |
|
688 | (the case that large2 doesn't have exec bit in the target context but | |
688 | in the working context) |
|
689 | in the working context) | |
689 |
|
690 | |||
690 | $ chmod +x large2 |
|
691 | $ chmod +x large2 | |
691 | $ hg status -A --rev 0 large2 |
|
692 | $ hg status -A --rev 0 large2 | |
692 | M large2 |
|
693 | M large2 | |
693 | $ hg commit -m 'chmod +x large2' |
|
694 | $ hg commit -m 'chmod +x large2' | |
694 |
|
695 | |||
695 | (the case that large2 has exec bit in the target context but not in |
|
696 | (the case that large2 has exec bit in the target context but not in | |
696 | the working context) |
|
697 | the working context) | |
697 |
|
698 | |||
698 | $ echo dummy > dummy |
|
699 | $ echo dummy > dummy | |
699 | $ hg add dummy |
|
700 | $ hg add dummy | |
700 | $ hg commit -m 'revision for separation' |
|
701 | $ hg commit -m 'revision for separation' | |
701 | $ chmod -x large2 |
|
702 | $ chmod -x large2 | |
702 | $ hg status -A --rev '.^1' large2 |
|
703 | $ hg status -A --rev '.^1' large2 | |
703 | M large2 |
|
704 | M large2 | |
704 |
|
705 | |||
705 | #else |
|
706 | #else | |
706 |
|
707 | |||
707 | Test that "hg status" against revisions other than parent ignores exec |
|
708 | Test that "hg status" against revisions other than parent ignores exec | |
708 | bit correctly on the platform being unaware of it. |
|
709 | bit correctly on the platform being unaware of it. | |
709 |
|
710 | |||
710 | $ hg update -q -C 4 |
|
711 | $ hg update -q -C 4 | |
711 |
|
712 | |||
712 | $ cat > ../exec-bit.patch <<EOF |
|
713 | $ cat > ../exec-bit.patch <<EOF | |
713 | > # HG changeset patch |
|
714 | > # HG changeset patch | |
714 | > # User test |
|
715 | > # User test | |
715 | > # Date 0 0 |
|
716 | > # Date 0 0 | |
716 | > # Thu Jan 01 00:00:00 1970 +0000 |
|
717 | > # Thu Jan 01 00:00:00 1970 +0000 | |
717 | > # Node ID be1b433a65b12b27b5519d92213e14f7e1769b90 |
|
718 | > # Node ID be1b433a65b12b27b5519d92213e14f7e1769b90 | |
718 | > # Parent 07d6153b5c04313efb75deec9ba577de7faeb727 |
|
719 | > # Parent 07d6153b5c04313efb75deec9ba577de7faeb727 | |
719 | > chmod +x large2 |
|
720 | > chmod +x large2 | |
720 | > |
|
721 | > | |
721 | > diff --git a/.hglf/large2 b/.hglf/large2 |
|
722 | > diff --git a/.hglf/large2 b/.hglf/large2 | |
722 | > old mode 100644 |
|
723 | > old mode 100644 | |
723 | > new mode 100755 |
|
724 | > new mode 100755 | |
724 | > EOF |
|
725 | > EOF | |
725 | $ hg import --exact --bypass ../exec-bit.patch |
|
726 | $ hg import --exact --bypass ../exec-bit.patch | |
726 | applying ../exec-bit.patch |
|
727 | applying ../exec-bit.patch | |
727 | $ hg status -A --rev tip large2 |
|
728 | $ hg status -A --rev tip large2 | |
728 | C large2 |
|
729 | C large2 | |
729 |
|
730 | |||
730 | #endif |
|
731 | #endif | |
731 |
|
732 | |||
732 | The fileset revset is evaluated for each revision, instead of once on wdir(), |
|
733 | The fileset revset is evaluated for each revision, instead of once on wdir(), | |
733 | and then patterns matched on each revision. Here, no exec bits are set in |
|
734 | and then patterns matched on each revision. Here, no exec bits are set in | |
734 | wdir(), but a matching revision is detected. |
|
735 | wdir(), but a matching revision is detected. | |
735 |
|
736 | |||
736 | (Teach large2 is not an executable. Maybe this is a bug of largefiles.) |
|
737 | (Teach large2 is not an executable. Maybe this is a bug of largefiles.) | |
737 | #if execbit |
|
738 | #if execbit | |
738 | $ chmod -x .hglf/large2 |
|
739 | $ chmod -x .hglf/large2 | |
739 | #endif |
|
740 | #endif | |
740 |
|
741 | |||
741 | $ hg files 'set:exec()' |
|
742 | $ hg files 'set:exec()' | |
742 | [1] |
|
743 | [1] | |
743 | $ hg log -qr 'file("set:exec()")' |
|
744 | $ hg log -qr 'file("set:exec()")' | |
744 | 9:be1b433a65b1 |
|
745 | 9:be1b433a65b1 | |
745 |
|
746 | |||
746 | Test a fatal error interrupting an update. Verify that status report dirty |
|
747 | Test a fatal error interrupting an update. Verify that status report dirty | |
747 | files correctly after an interrupted update. Also verify that checking all |
|
748 | files correctly after an interrupted update. Also verify that checking all | |
748 | hashes reveals it isn't clean. |
|
749 | hashes reveals it isn't clean. | |
749 |
|
750 | |||
750 | Start with clean dirstates: |
|
751 | Start with clean dirstates: | |
751 | $ hg up --quiet --clean --rev "8^" |
|
752 | $ hg up --quiet --clean --rev "8^" | |
752 | $ sleep 1 |
|
753 | $ sleep 1 | |
753 | $ hg st |
|
754 | $ hg st | |
754 | Update standins without updating largefiles - large1 is modified and largeX is |
|
755 | Update standins without updating largefiles - large1 is modified and largeX is | |
755 | added: |
|
756 | added: | |
756 | $ cat << EOF > ../crashupdatelfiles.py |
|
757 | $ cat << EOF > ../crashupdatelfiles.py | |
757 | > import hgext.largefiles.lfutil |
|
758 | > import hgext.largefiles.lfutil | |
758 | > def getlfilestoupdate(oldstandins, newstandins): |
|
759 | > def getlfilestoupdate(oldstandins, newstandins): | |
759 | > raise SystemExit(7) |
|
760 | > raise SystemExit(7) | |
760 | > hgext.largefiles.lfutil.getlfilestoupdate = getlfilestoupdate |
|
761 | > hgext.largefiles.lfutil.getlfilestoupdate = getlfilestoupdate | |
761 | > EOF |
|
762 | > EOF | |
762 | $ hg up -Cr "8" --config extensions.crashupdatelfiles=../crashupdatelfiles.py |
|
763 | $ hg up -Cr "8" --config extensions.crashupdatelfiles=../crashupdatelfiles.py | |
763 | [7] |
|
764 | [7] | |
764 | Check large1 content and status ... and that update will undo modifications: |
|
765 | Check large1 content and status ... and that update will undo modifications: | |
765 | $ cat large1 |
|
766 | $ cat large1 | |
766 | large1 in #3 |
|
767 | large1 in #3 | |
767 | $ hg st |
|
768 | $ hg st | |
768 | M large1 |
|
769 | M large1 | |
769 | ! largeX |
|
770 | ! largeX | |
770 | $ hg up -Cr . |
|
771 | $ hg up -Cr . | |
771 | getting changed largefiles |
|
772 | getting changed largefiles | |
772 | 2 largefiles updated, 0 removed |
|
773 | 2 largefiles updated, 0 removed | |
773 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
774 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
774 | $ cat large1 |
|
775 | $ cat large1 | |
775 | manually modified before 'hg transplant --continue' |
|
776 | manually modified before 'hg transplant --continue' | |
776 | $ hg st |
|
777 | $ hg st | |
777 | Force largefiles rehashing and check that all changes have been caught by |
|
778 | Force largefiles rehashing and check that all changes have been caught by | |
778 | status and update: |
|
779 | status and update: | |
779 | $ rm .hg/largefiles/dirstate |
|
780 | $ rm .hg/largefiles/dirstate | |
780 | $ hg st |
|
781 | $ hg st | |
781 |
|
782 | |||
782 | $ cd .. |
|
783 | $ cd .. | |
783 |
|
784 | |||
784 | Test that "hg convert" avoids copying largefiles from the working |
|
785 | Test that "hg convert" avoids copying largefiles from the working | |
785 | directory into store, because "hg convert" doesn't update largefiles |
|
786 | directory into store, because "hg convert" doesn't update largefiles | |
786 | in the working directory (removing files under ".cache/largefiles" |
|
787 | in the working directory (removing files under ".cache/largefiles" | |
787 | forces "hg convert" to copy corresponding largefiles) |
|
788 | forces "hg convert" to copy corresponding largefiles) | |
788 |
|
789 | |||
789 | $ cat >> $HGRCPATH <<EOF |
|
790 | $ cat >> $HGRCPATH <<EOF | |
790 | > [extensions] |
|
791 | > [extensions] | |
791 | > convert = |
|
792 | > convert = | |
792 | > EOF |
|
793 | > EOF | |
793 |
|
794 | |||
794 | $ rm $TESTTMP/.cache/largefiles/6a4f36d4075fbe0f30ec1d26ca44e63c05903671 |
|
795 | $ rm $TESTTMP/.cache/largefiles/6a4f36d4075fbe0f30ec1d26ca44e63c05903671 | |
795 | $ hg convert -q repo repo.converted |
|
796 | $ hg convert -q repo repo.converted |
General Comments 0
You need to be logged in to leave comments.
Login now