view tests/test-relink.out @ 11715:4f9dfb54c8b5 stable

qpush --move: move the right patch even with comment lines 88fc876a4833 caused that we find the index of the moving patch in self.series but look it up in self.full_series. The difference between these is that full_series also contains comment lines, and we thus moved the wrong patch. Use back self.full_series to find the moving patch, but take care of striping the patch guard markers before comparing the patch name. Test cases have been added for comments and empty lines in self.full_series, and for the case of guarded patches. Original patch contributed by Mads Kiilerich <mads@kiilerich.com>
author Gilles Moris <gilles.moris@free.fr>
date Sat, 10 Jul 2010 21:23:00 +0200
parents 7914628b4751
children
line wrap: on
line source

% create source repository
adding a
adding b
% clone and pull to break links
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 2 changes to 2 files
updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
created new head
% relink
relinking .hg/store
tip has 2 files, estimated total number of files: 3
collecting: 00changelog.i 1/3 files (33.33%)
collecting: 00manifest.i 2/3 files (66.67%)
collecting: a.i 3/3 files (100.00%)
collecting: b.i 4/3 files (133.33%)
collecting: dummy.i 5/3 files (166.67%)
collected 5 candidate storage files
not linkable: 00changelog.i
not linkable: 00manifest.i
pruning: data/a.i 3/5  files (60.00%)
not linkable: data/b.i
pruning: data/dummy.i 5/5  files (100.00%)
pruned down to 2 probably relinkable files
relinking: data/a.i 1/2  files (50.00%)
not linkable: data/dummy.i
relinked 1 files (136 bytes reclaimed)
% check hardlinks
repo/.hg/store/data/a.i == clone/.hg/store/data/a.i
repo/.hg/store/data/b.i != clone/.hg/store/data/b.i