comparison tests/test-convert-filemap.t @ 13968:82845434e974 stable

convert: make filemap prune useless branch closing revs (issue2774) A branch closing revision only applies if one of its parents belongs to the branch being closed. Otherwise the filemap can prune it too.
author Patrick Mezard <pmezard@gmail.com>
date Wed, 20 Apr 2011 23:15:18 +0200
parents 4c4aeaab2339
children 1fe82c93b8e2
comparison
equal deleted inserted replaced
13963:3c753f9a2fbc 13968:82845434e974
280 errors.fmap:3: superfluous / in exclude 'dir//dir' 280 errors.fmap:3: superfluous / in exclude 'dir//dir'
281 errors.fmap:4: unknown directive 'out of sync' 281 errors.fmap:4: unknown directive 'out of sync'
282 errors.fmap:5: path to exclude is missing 282 errors.fmap:5: path to exclude is missing
283 abort: errors in filemap 283 abort: errors in filemap
284 [255] 284 [255]
285
286 test branch closing revision pruning if branch is pruned
287
288 $ hg init branchpruning
289 $ cd branchpruning
290 $ hg branch foo
291 marked working directory as branch foo
292 $ echo a > a
293 $ hg ci -Am adda
294 adding a
295 $ hg ci --close-branch -m closefoo
296 $ hg up 0
297 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
298 $ hg branch empty
299 marked working directory as branch empty
300 $ hg ci -m emptybranch
301 $ hg ci --close-branch -m closeempty
302 $ hg up 0
303 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
304 $ hg branch default
305 marked working directory as branch default
306 $ echo b > b
307 $ hg ci -Am addb
308 adding b
309 $ hg ci --close-branch -m closedefault
310 $ cat > filemap <<EOF
311 > include b
312 > EOF
313 $ cd ..
314 $ hg convert branchpruning branchpruning-hg1
315 initializing destination branchpruning-hg1 repository
316 scanning source...
317 sorting...
318 converting...
319 5 adda
320 4 closefoo
321 3 emptybranch
322 2 closeempty
323 1 addb
324 0 closedefault
325 $ glog -R branchpruning-hg1
326 o 5 "closedefault" files:
327 |
328 o 4 "addb" files: b
329 |
330 | o 3 "closeempty" files:
331 | |
332 | o 2 "emptybranch" files:
333 |/
334 | o 1 "closefoo" files:
335 |/
336 o 0 "adda" files: a
337
338
339 exercise incremental conversion at the same time
340
341 $ hg convert -r0 --filemap branchpruning/filemap branchpruning branchpruning-hg2
342 initializing destination branchpruning-hg2 repository
343 scanning source...
344 sorting...
345 converting...
346 0 adda
347 $ hg convert -r4 --filemap branchpruning/filemap branchpruning branchpruning-hg2
348 scanning source...
349 sorting...
350 converting...
351 0 addb
352 $ hg convert --filemap branchpruning/filemap branchpruning branchpruning-hg2
353 scanning source...
354 sorting...
355 converting...
356 3 closefoo
357 2 emptybranch
358 1 closeempty
359 0 closedefault
360 $ glog -R branchpruning-hg2
361 o 1 "closedefault" files:
362 |
363 o 0 "addb" files: b
364