[PATCH]: Optional explanation for options

John A Meinel john at arbash-meinel.com
Tue Sep 20 05:06:22 BST 2005


Robey Pointer wrote:
...

>
> I think you're right that the best thing to do is to include a
> verification hash (SHA1 or whatever) so we can detect munged patches
> before trying to apply them... and encourage people to send  changesets
> as attachments.

Well, the current changeset code does verify that all of the hashes are
correct. But since we don't transmit the text hashes, it only figures it
out once it has generated the inventory, which also means that it can't
figure out which file is bogus, just that something is.

Now, we could put a bunch more hashes into the changeset, but part of
the goal was to remove as much noise as possible.

One outstanding change that needs to be made is to remove the text-id of
files, and make them known (based off of the last revision which changed
them). That way they don't have to be transmitted.

This would let you put the hash of the file in it's place, so that you
could know a little bit earlier if everything was okay.

The other possibility would be to just have the last line be:

# changeset sha1: aoeuaoeuaoeuaoeu

And then just check that everything up to that point hashed to the
correct value (you would obviously leave off the last line).

Then you could check the changeset earlier, but you still wouldn't know
if the files you create are correct until you have regenerated all of
them, and checked the inventory hash.

So my preference is to add per-file hashes, get rid of the text-id, and
if you want to be paranoid, add a changeset hash.

John
=:->

>
> robey
>
>
>

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


More information about the bazaar mailing list