comparison tests/test-convert-filemap.t @ 17797:e4da793998bf

convert: normalize paths in filemaps (issue3612) convert doesn't normalise double slashes in paths. Path normalization is applied when a path is loaded into filemap and when a file lookup request is issued to filemap.
author Huayang <huayang@fb.com>
date Fri, 05 Oct 2012 16:27:34 -0700
parents f76e2196ee70
children 1f34b57ca319
comparison
equal deleted inserted replaced
17796:1b51638bf44a 17797:e4da793998bf
227 $ hg --cwd foo-copied.repo debugrename copied 227 $ hg --cwd foo-copied.repo debugrename copied
228 copied renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd 228 copied renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd
229 $ cat > renames.fmap <<EOF 229 $ cat > renames.fmap <<EOF
230 > include dir 230 > include dir
231 > exclude dir/file2 231 > exclude dir/file2
232 > rename dir dir2 232 > rename dir dir2//../dir2/
233 > include foo 233 > include foo
234 > include copied 234 > include copied
235 > rename foo foo2 235 > rename foo foo2/
236 > rename copied copied2 236 > rename copied ./copied2
237 > exclude dir/subdir 237 > exclude dir/subdir
238 > include dir/subdir/file3 238 > include dir/subdir/file3
239 > EOF 239 > EOF
240 $ rm source/.hg/store/data/dir/file3.i 240 $ rm source/.hg/store/data/dir/file3.i
241 $ rm source/.hg/store/data/dir/file4.i 241 $ rm source/.hg/store/data/dir/file4.i
282 > exclude /dir 282 > exclude /dir
283 > rename dir//dir /dir//dir/ "out of sync" 283 > rename dir//dir /dir//dir/ "out of sync"
284 > include 284 > include
285 > EOF 285 > EOF
286 $ hg -q convert --filemap errors.fmap source errors.repo 286 $ hg -q convert --filemap errors.fmap source errors.repo
287 errors.fmap:1: superfluous / in exclude 'dir/'
288 errors.fmap:3: superfluous / in include '/dir' 287 errors.fmap:3: superfluous / in include '/dir'
289 errors.fmap:3: superfluous / in rename '/dir' 288 errors.fmap:3: superfluous / in rename '/dir'
290 errors.fmap:3: superfluous / in exclude 'dir//dir'
291 errors.fmap:4: unknown directive 'out of sync' 289 errors.fmap:4: unknown directive 'out of sync'
292 errors.fmap:5: path to exclude is missing 290 errors.fmap:5: path to exclude is missing
293 abort: errors in filemap 291 abort: errors in filemap
294 [255] 292 [255]
295 293