[RFC] generalized diff plugin - option name?

John Arbash Meinel john at arbash-meinel.com
Thu Apr 27 16:00:14 BST 2006


Aaron Bentley wrote:
> John Arbash Meinel wrote:
>> Aaron Bentley wrote:
>>
>> I completely agree. I just didn't know of any source data to test it on.
>>
>> I know in the past I found a bug or two by trying to convert all of
>> bzr.dev to a cdv style weaves. So bzr.dev does exercise most of the code
>> paths. (I do believe I added tests to prevent regressions).
> 
> Well, one obvious choice would be the entire bzr.dev ancestry.  'bzr cat
> bzr -r1 > bzr; bzr diff -r1..2 bzr|patch; bzr cat -r2 bzr.new; diff bzr
> bzr.new'
> 
> Aaron
> 

And if you wanted to get real fancy, you could try to do arbitrary diffs
as well.

The above has the disadvantage that it doesn't check all of the side
branches. And since bzr.dev has about 4900 revisions, and only 1700
mainline revs, that is a lot it is leaving out.

I would tend to say:

  for each weave/knit:
	for each revision:
		extract old text
		patience diff into new text
		extract new text
		check sha1 sum

Which is actually very close to what bzr upgrade does. (And probably it
should do all of that as an integrity check).
Actually, as long as upgrade checks that the new sha1 sum is the same as
the old one, just running "bzr check" after bzr upgrade should make sure
that the contents are all converted correctly.

John
=:->



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060427/e137dab0/attachment.pgp 


More information about the bazaar mailing list