Mercurial > hg
comparison tests/test-audit-path.t @ 34942:2a774cae3a03 stable
merge: disable path conflict checking by default (issue5716)
We shouldn't ship a severe perf regression in hg update for 4.4.
Differential Revision: https://phab.mercurial-scm.org/D1223
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Tue, 24 Oct 2017 11:15:30 -0700 |
parents | 07bbb208a924 |
children | 4441705b7111 |
comparison
equal
deleted
inserted
replaced
34941:37450a122128 | 34942:2a774cae3a03 |
---|---|
102 $ hg manifest -r2 | 102 $ hg manifest -r2 |
103 back | 103 back |
104 back/test | 104 back/test |
105 #if symlink | 105 #if symlink |
106 $ hg update -Cr2 | 106 $ hg update -Cr2 |
107 back: is both a file and a directory | 107 abort: path 'back/test' traverses symbolic link 'back' |
108 abort: destination manifest contains path conflicts | |
109 [255] | 108 [255] |
110 #else | 109 #else |
111 ('back' will be a file and cause some other system specific error) | 110 ('back' will be a file and cause some other system specific error) |
112 $ hg update -Cr2 | 111 $ hg update -Cr2 |
113 back: is both a file and a directory | 112 back: is both a file and a directory |
165 | 164 |
166 try trivial merge | 165 try trivial merge |
167 | 166 |
168 $ hg up -qC 1 | 167 $ hg up -qC 1 |
169 $ hg merge 2 | 168 $ hg merge 2 |
170 a: path conflict - a file or link has the same name as a directory | 169 abort: path 'a/poisoned' traverses symbolic link 'a' |
171 the local file has been renamed to a~aa04623eb0c3 | 170 [255] |
172 resolve manually then use 'hg resolve --mark a' | |
173 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
174 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
175 [1] | |
176 | 171 |
177 try rebase onto other revision: cache of audited paths should be discarded, | 172 try rebase onto other revision: cache of audited paths should be discarded, |
178 and the rebase should fail (issue5628) | 173 and the rebase should fail (issue5628) |
179 | 174 |
180 $ hg up -qC 2 | 175 $ hg up -qC 2 |
181 $ hg rebase -s 2 -d 1 --config extensions.rebase= | 176 $ hg rebase -s 2 -d 1 --config extensions.rebase= |
182 rebasing 2:e73c21d6b244 "file a/poisoned" (tip) | 177 rebasing 2:e73c21d6b244 "file a/poisoned" (tip) |
183 a: path conflict - a file or link has the same name as a directory | 178 abort: path 'a/poisoned' traverses symbolic link 'a' |
184 the local file has been renamed to a~aa04623eb0c3 | 179 [255] |
185 resolve manually then use 'hg resolve --mark a' | |
186 unresolved conflicts (see hg resolve, then hg rebase --continue) | |
187 [1] | |
188 $ ls ../merge-symlink-out | 180 $ ls ../merge-symlink-out |
189 | 181 |
190 $ cd .. | 182 $ cd .. |
191 | 183 |
192 Test symlink traversal on update: | 184 Test symlink traversal on update: |
214 | 206 |
215 try linear update where symlink already exists: | 207 try linear update where symlink already exists: |
216 | 208 |
217 $ hg up -qC 0 | 209 $ hg up -qC 0 |
218 $ hg up 1 | 210 $ hg up 1 |
219 a: is both a file and a directory | 211 abort: path 'a/b' traverses symbolic link 'a' |
220 abort: destination manifest contains path conflicts | |
221 [255] | 212 [255] |
222 | 213 |
223 try linear update including symlinked directory and its content: paths are | 214 try linear update including symlinked directory and its content: paths are |
224 audited first by calculateupdates(), where no symlink is created so both | 215 audited first by calculateupdates(), where no symlink is created so both |
225 'a' and 'a/b' are taken as good paths. still applyupdates() should fail. | 216 'a' and 'a/b' are taken as good paths. still applyupdates() should fail. |
226 | 217 |
227 $ hg up -qC null | 218 $ hg up -qC null |
228 $ hg up 1 | 219 $ hg up 1 |
229 a: is both a file and a directory | 220 abort: path 'a/b' traverses symbolic link 'a' |
230 abort: destination manifest contains path conflicts | |
231 [255] | 221 [255] |
232 $ ls ../update-symlink-out | 222 $ ls ../update-symlink-out |
233 | 223 |
234 try branch update replacing directory with symlink, and its content: the | 224 try branch update replacing directory with symlink, and its content: the |
235 path 'a' is audited as a directory first, which should be audited again as | 225 path 'a' is audited as a directory first, which should be audited again as |
236 a symlink. | 226 a symlink. |
237 | 227 |
238 $ rm -f a | 228 $ rm -f a |
239 $ hg up -qC 2 | 229 $ hg up -qC 2 |
240 $ hg up 1 | 230 $ hg up 1 |
241 a: is both a file and a directory | 231 abort: path 'a/b' traverses symbolic link 'a' |
242 abort: destination manifest contains path conflicts | |
243 [255] | 232 [255] |
244 $ ls ../update-symlink-out | 233 $ ls ../update-symlink-out |
245 | 234 |
246 $ cd .. | 235 $ cd .. |
247 | 236 |