Show More
@@ -1,170 +1,223 b'' | |||||
1 | This file focuses mainly on updating largefiles in the working |
|
1 | This file focuses mainly on updating largefiles in the working | |
2 | directory (and ".hg/largefiles/dirstate") |
|
2 | directory (and ".hg/largefiles/dirstate") | |
3 |
|
3 | |||
4 | $ cat >> $HGRCPATH <<EOF |
|
4 | $ cat >> $HGRCPATH <<EOF | |
5 | > [ui] |
|
5 | > [ui] | |
6 | > merge = internal:fail |
|
6 | > merge = internal:fail | |
7 | > [extensions] |
|
7 | > [extensions] | |
8 | > largefiles = |
|
8 | > largefiles = | |
9 | > EOF |
|
9 | > EOF | |
10 |
|
10 | |||
11 | $ hg init repo |
|
11 | $ hg init repo | |
12 | $ cd repo |
|
12 | $ cd repo | |
13 |
|
13 | |||
14 | $ echo large1 > large1 |
|
14 | $ echo large1 > large1 | |
15 | $ echo large2 > large2 |
|
15 | $ echo large2 > large2 | |
16 | $ hg add --large large1 large2 |
|
16 | $ hg add --large large1 large2 | |
17 | $ echo normal1 > normal1 |
|
17 | $ echo normal1 > normal1 | |
18 | $ hg add normal1 |
|
18 | $ hg add normal1 | |
19 | $ hg commit -m '#0' |
|
19 | $ hg commit -m '#0' | |
20 | $ echo 'large1 in #1' > large1 |
|
20 | $ echo 'large1 in #1' > large1 | |
21 | $ echo 'normal1 in #1' > normal1 |
|
21 | $ echo 'normal1 in #1' > normal1 | |
22 | $ hg commit -m '#1' |
|
22 | $ hg commit -m '#1' | |
23 | $ hg update -q -C 0 |
|
23 | $ hg update -q -C 0 | |
24 | $ echo 'large2 in #2' > large2 |
|
24 | $ echo 'large2 in #2' > large2 | |
25 | $ hg commit -m '#2' |
|
25 | $ hg commit -m '#2' | |
26 | created new head |
|
26 | created new head | |
27 |
|
27 | |||
28 | Test that "hg merge" updates largefiles from "other" correctly |
|
28 | Test that "hg merge" updates largefiles from "other" correctly | |
29 |
|
29 | |||
30 | (getting largefiles from "other" normally) |
|
30 | (getting largefiles from "other" normally) | |
31 |
|
31 | |||
32 | $ hg status -A large1 |
|
32 | $ hg status -A large1 | |
33 | C large1 |
|
33 | C large1 | |
34 | $ cat large1 |
|
34 | $ cat large1 | |
35 | large1 |
|
35 | large1 | |
36 | $ cat .hglf/large1 |
|
36 | $ cat .hglf/large1 | |
37 | 4669e532d5b2c093a78eca010077e708a071bb64 |
|
37 | 4669e532d5b2c093a78eca010077e708a071bb64 | |
38 | $ hg merge --config debug.dirstate.delaywrite=2 |
|
38 | $ hg merge --config debug.dirstate.delaywrite=2 | |
39 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
39 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
40 | (branch merge, don't forget to commit) |
|
40 | (branch merge, don't forget to commit) | |
41 | getting changed largefiles |
|
41 | getting changed largefiles | |
42 | 1 largefiles updated, 0 removed |
|
42 | 1 largefiles updated, 0 removed | |
43 | $ hg status -A large1 |
|
43 | $ hg status -A large1 | |
44 | M large1 |
|
44 | M large1 | |
45 | $ cat large1 |
|
45 | $ cat large1 | |
46 | large1 in #1 |
|
46 | large1 in #1 | |
47 | $ cat .hglf/large1 |
|
47 | $ cat .hglf/large1 | |
48 | 58e24f733a964da346e2407a2bee99d9001184f5 |
|
48 | 58e24f733a964da346e2407a2bee99d9001184f5 | |
49 | $ hg diff -c 1 --nodates .hglf/large1 | grep '^[+-][0-9a-z]' |
|
49 | $ hg diff -c 1 --nodates .hglf/large1 | grep '^[+-][0-9a-z]' | |
50 | -4669e532d5b2c093a78eca010077e708a071bb64 |
|
50 | -4669e532d5b2c093a78eca010077e708a071bb64 | |
51 | +58e24f733a964da346e2407a2bee99d9001184f5 |
|
51 | +58e24f733a964da346e2407a2bee99d9001184f5 | |
52 |
|
52 | |||
53 | (getting largefiles from "other" via conflict prompt) |
|
53 | (getting largefiles from "other" via conflict prompt) | |
54 |
|
54 | |||
55 | $ hg update -q -C 2 |
|
55 | $ hg update -q -C 2 | |
56 | $ echo 'large1 in #3' > large1 |
|
56 | $ echo 'large1 in #3' > large1 | |
57 | $ echo 'normal1 in #3' > normal1 |
|
57 | $ echo 'normal1 in #3' > normal1 | |
58 | $ hg commit -m '#3' |
|
58 | $ hg commit -m '#3' | |
59 | $ cat .hglf/large1 |
|
59 | $ cat .hglf/large1 | |
60 | e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
60 | e5bb990443d6a92aaf7223813720f7566c9dd05b | |
61 | $ hg merge --config debug.dirstate.delaywrite=2 --config ui.interactive=True <<EOF |
|
61 | $ hg merge --config debug.dirstate.delaywrite=2 --config ui.interactive=True <<EOF | |
62 | > o |
|
62 | > o | |
63 | > EOF |
|
63 | > EOF | |
64 | largefile large1 has a merge conflict |
|
64 | largefile large1 has a merge conflict | |
65 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
65 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 | |
66 | keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or |
|
66 | keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or | |
67 | take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? merging normal1 |
|
67 | take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? merging normal1 | |
68 | warning: conflicts during merge. |
|
68 | warning: conflicts during merge. | |
69 | merging normal1 incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
69 | merging normal1 incomplete! (edit conflicts, then use 'hg resolve --mark') | |
70 | 0 files updated, 1 files merged, 0 files removed, 1 files unresolved |
|
70 | 0 files updated, 1 files merged, 0 files removed, 1 files unresolved | |
71 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
71 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
72 | getting changed largefiles |
|
72 | getting changed largefiles | |
73 | 1 largefiles updated, 0 removed |
|
73 | 1 largefiles updated, 0 removed | |
74 | [1] |
|
74 | [1] | |
75 | $ hg status -A large1 |
|
75 | $ hg status -A large1 | |
76 | M large1 |
|
76 | M large1 | |
77 | $ cat large1 |
|
77 | $ cat large1 | |
78 | large1 in #1 |
|
78 | large1 in #1 | |
79 | $ cat .hglf/large1 |
|
79 | $ cat .hglf/large1 | |
80 | 58e24f733a964da346e2407a2bee99d9001184f5 |
|
80 | 58e24f733a964da346e2407a2bee99d9001184f5 | |
81 |
|
81 | |||
82 | Test that "hg revert -r REV" updates largefiles from "REV" correctly |
|
82 | Test that "hg revert -r REV" updates largefiles from "REV" correctly | |
83 |
|
83 | |||
84 | $ hg update -q -C 3 |
|
84 | $ hg update -q -C 3 | |
85 | $ hg status -A large1 |
|
85 | $ hg status -A large1 | |
86 | C large1 |
|
86 | C large1 | |
87 | $ cat large1 |
|
87 | $ cat large1 | |
88 | large1 in #3 |
|
88 | large1 in #3 | |
89 | $ cat .hglf/large1 |
|
89 | $ cat .hglf/large1 | |
90 | e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
90 | e5bb990443d6a92aaf7223813720f7566c9dd05b | |
91 | $ hg diff -c 1 --nodates .hglf/large1 | grep '^[+-][0-9a-z]' |
|
91 | $ hg diff -c 1 --nodates .hglf/large1 | grep '^[+-][0-9a-z]' | |
92 | -4669e532d5b2c093a78eca010077e708a071bb64 |
|
92 | -4669e532d5b2c093a78eca010077e708a071bb64 | |
93 | +58e24f733a964da346e2407a2bee99d9001184f5 |
|
93 | +58e24f733a964da346e2407a2bee99d9001184f5 | |
94 | $ hg revert --no-backup -r 1 --config debug.dirstate.delaywrite=2 large1 |
|
94 | $ hg revert --no-backup -r 1 --config debug.dirstate.delaywrite=2 large1 | |
95 | $ hg status -A large1 |
|
95 | $ hg status -A large1 | |
96 | M large1 |
|
96 | M large1 | |
97 | $ cat large1 |
|
97 | $ cat large1 | |
98 | large1 in #1 |
|
98 | large1 in #1 | |
99 | $ cat .hglf/large1 |
|
99 | $ cat .hglf/large1 | |
100 | 58e24f733a964da346e2407a2bee99d9001184f5 |
|
100 | 58e24f733a964da346e2407a2bee99d9001184f5 | |
101 |
|
101 | |||
102 | Test that "hg rollback" restores status of largefiles correctly |
|
102 | Test that "hg rollback" restores status of largefiles correctly | |
103 |
|
103 | |||
104 | $ hg update -C -q |
|
104 | $ hg update -C -q | |
105 | $ hg remove large1 |
|
105 | $ hg remove large1 | |
106 | $ hg forget large2 |
|
106 | $ hg forget large2 | |
107 | $ echo largeX > largeX |
|
107 | $ echo largeX > largeX | |
108 | $ hg add --large largeX |
|
108 | $ hg add --large largeX | |
109 | $ hg commit -m 'will be rollback-ed soon' |
|
109 | $ hg commit -m 'will be rollback-ed soon' | |
110 | $ echo largeY > largeY |
|
110 | $ echo largeY > largeY | |
111 | $ hg add --large largeY |
|
111 | $ hg add --large largeY | |
112 | $ hg status -A large1 |
|
112 | $ hg status -A large1 | |
113 | large1: No such file or directory |
|
113 | large1: No such file or directory | |
114 | $ hg status -A large2 |
|
114 | $ hg status -A large2 | |
115 | ? large2 |
|
115 | ? large2 | |
116 | $ hg status -A largeX |
|
116 | $ hg status -A largeX | |
117 | C largeX |
|
117 | C largeX | |
118 | $ hg status -A largeY |
|
118 | $ hg status -A largeY | |
119 | A largeY |
|
119 | A largeY | |
120 | $ hg rollback |
|
120 | $ hg rollback | |
121 | repository tip rolled back to revision 3 (undo commit) |
|
121 | repository tip rolled back to revision 3 (undo commit) | |
122 | working directory now based on revision 3 |
|
122 | working directory now based on revision 3 | |
123 | $ hg status -A large1 |
|
123 | $ hg status -A large1 | |
124 | R large1 |
|
124 | R large1 | |
125 | $ hg status -A large2 |
|
125 | $ hg status -A large2 | |
126 | R large2 |
|
126 | R large2 | |
127 | $ hg status -A largeX |
|
127 | $ hg status -A largeX | |
128 | A largeX |
|
128 | A largeX | |
129 | $ hg status -A largeY |
|
129 | $ hg status -A largeY | |
130 | ? largeY |
|
130 | ? largeY | |
131 |
|
131 | |||
132 | Test that "hg status" shows status of largefiles correctly just after |
|
132 | Test that "hg status" shows status of largefiles correctly just after | |
133 | automated commit like rebase/transplant |
|
133 | automated commit like rebase/transplant | |
134 |
|
134 | |||
135 | $ cat >> .hg/hgrc <<EOF |
|
135 | $ cat >> .hg/hgrc <<EOF | |
136 | > [extensions] |
|
136 | > [extensions] | |
137 | > rebase = |
|
137 | > rebase = | |
138 | > strip = |
|
138 | > strip = | |
139 | > transplant = |
|
139 | > transplant = | |
140 | > EOF |
|
140 | > EOF | |
141 | $ hg update -q -C 1 |
|
141 | $ hg update -q -C 1 | |
142 | $ hg remove large1 |
|
142 | $ hg remove large1 | |
143 | $ echo largeX > largeX |
|
143 | $ echo largeX > largeX | |
144 | $ hg add --large largeX |
|
144 | $ hg add --large largeX | |
145 | $ hg commit -m '#4' |
|
145 | $ hg commit -m '#4' | |
146 |
|
146 | |||
147 | $ hg rebase -s 1 -d 2 --keep |
|
147 | $ hg rebase -s 1 -d 2 --keep | |
148 | $ hg status -A large1 |
|
148 | $ hg status -A large1 | |
149 | large1: No such file or directory |
|
149 | large1: No such file or directory | |
150 | $ hg status -A largeX |
|
150 | $ hg status -A largeX | |
151 | C largeX |
|
151 | C largeX | |
152 | $ hg strip -q 5 |
|
152 | $ hg strip -q 5 | |
153 |
|
153 | |||
154 | $ hg update -q -C 2 |
|
154 | $ hg update -q -C 2 | |
155 | $ hg transplant -q 1 4 |
|
155 | $ hg transplant -q 1 4 | |
156 | $ hg status -A large1 |
|
156 | $ hg status -A large1 | |
157 | large1: No such file or directory |
|
157 | large1: No such file or directory | |
158 | $ hg status -A largeX |
|
158 | $ hg status -A largeX | |
159 | C largeX |
|
159 | C largeX | |
160 | $ hg strip -q 5 |
|
160 | $ hg strip -q 5 | |
161 |
|
161 | |||
162 | $ hg update -q -C 2 |
|
162 | $ hg update -q -C 2 | |
163 | $ hg transplant -q --merge 1 --merge 4 |
|
163 | $ hg transplant -q --merge 1 --merge 4 | |
164 | $ hg status -A large1 |
|
164 | $ hg status -A large1 | |
165 | large1: No such file or directory |
|
165 | large1: No such file or directory | |
166 | $ hg status -A largeX |
|
166 | $ hg status -A largeX | |
167 | C largeX |
|
167 | C largeX | |
168 | $ hg strip -q 5 |
|
168 | $ hg strip -q 5 | |
169 |
|
169 | |||
|
170 | Test that linear merge can detect modification (and conflict) correctly | |||
|
171 | ||||
|
172 | (linear merge without conflict) | |||
|
173 | ||||
|
174 | $ echo 'large2 for linear merge (no conflict)' > large2 | |||
|
175 | $ hg update 3 --config debug.dirstate.delaywrite=2 | |||
|
176 | getting changed largefiles | |||
|
177 | 1 largefiles updated, 0 removed | |||
|
178 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
179 | $ hg status -A large2 | |||
|
180 | M large2 | |||
|
181 | $ cat large2 | |||
|
182 | large2 for linear merge (no conflict) | |||
|
183 | $ cat .hglf/large2 | |||
|
184 | 9c4bf8f1b33536d6e5f89447e10620cfe52ea710 | |||
|
185 | ||||
|
186 | (linear merge with conflict, choosing "other") | |||
|
187 | ||||
|
188 | $ hg update -q -C 2 | |||
|
189 | $ echo 'large1 for linear merge (conflict)' > large1 | |||
|
190 | $ hg update 3 --config ui.interactive=True <<EOF | |||
|
191 | > o | |||
|
192 | > EOF | |||
|
193 | largefile large1 has a merge conflict | |||
|
194 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 | |||
|
195 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or | |||
|
196 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? getting changed largefiles | |||
|
197 | 1 largefiles updated, 0 removed | |||
|
198 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |||
|
199 | $ hg status -A large1 | |||
|
200 | C large1 | |||
|
201 | $ cat large1 | |||
|
202 | large1 in #3 | |||
|
203 | $ cat .hglf/large1 | |||
|
204 | e5bb990443d6a92aaf7223813720f7566c9dd05b | |||
|
205 | ||||
|
206 | (linear merge with conflict, choosing "local") | |||
|
207 | ||||
|
208 | $ hg update -q -C 2 | |||
|
209 | $ echo 'large1 for linear merge (conflict)' > large1 | |||
|
210 | $ hg update 3 --config debug.dirstate.delaywrite=2 | |||
|
211 | largefile large1 has a merge conflict | |||
|
212 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 | |||
|
213 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or | |||
|
214 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l | |||
|
215 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |||
|
216 | $ hg status -A large1 | |||
|
217 | M large1 | |||
|
218 | $ cat large1 | |||
|
219 | large1 for linear merge (conflict) | |||
|
220 | $ cat .hglf/large1 | |||
|
221 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 | |||
|
222 | ||||
170 | $ cd .. |
|
223 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now