[merge] fix bundles with binary files
John Arbash Meinel
john at arbash-meinel.com
Tue Jul 11 02:11:31 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Pool wrote:
> On 11/07/2006, at 7:03 AM, John Arbash Meinel wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> I was able to get a test to fail if I put '\r' into the contents of a
>> binary file. I still don't really know why merging the .ico file worked
>> for me, but not for Alexander, but I can say the attached test fails if
>> you use 'string.splitlines(True)' instead of
>> StringIO(string).readlines().
>
> +1
>
>>
...
> This is starting to look like it should be split into several tests maybe?
>
> --Martin
The bundle tests are not very pretty. (Blame my testing skills from 1
year ago).
But there are a few that focus on one specific feature (symlinks/binary
files, etc). and then do an 'add', an 'update', a 'rename' and a
'delete' (not necessarily in that order), and then a rollup at the end.
That way we check a forward patch, a reverse patch, and the 'rename'
line, which is different from the others.
You could split each step into a different test. But to do 'rename' you
first have to add, same for 'delete'.
We could probably also switch to doing smaller, more invasive tests
rather than doing 'create a bundle with these properties, and make sure
it works'.
At this point I didn't feel a big need to clean up the bundle code +
tests. I would like to, the whole thing is a little crufty. But it isn't
on the top of my list.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEsvrDJdeBCYSNAAMRAlX1AJ4nQiVnlu7R1Zqhdn6WX+eHBfjgogCgntl7
2gWmdcaeall9ovZDu5TtPU0=
=DTzY
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list