Full files in changesets?

Aaron Bentley aaron.bentley at utoronto.ca
Sun May 29 05:46:18 BST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Ellerman wrote:
> On Tue, 24 May 2005 03:22, Aaron Bentley wrote:
> 
>>There's no way of escaping the fact that we need to be able to produce
>>'patch'-incompatible changesets, e.g. for binaries.  So it might make
>>sense to introduce a patch 'syntax error' into patch-incompatible
>>changesets.  (and change the wording to 'you can apply this patch with
>>"bzr receive", but NOT "patch"')
> 
> 
> That would suck a lot. It looks like a patch, smells like a patch, but when I 
> apply it with patch it breaks. -ENOTDWIM

I'm not proposing adding a syntax error all the time, but there are
changes patch cannot apply.  For those cases, I think introducing a
syntax error is better than the alternative, which is to have patch do
an incomplete job, while giving the impression that it has done a
complete one.

Renames are on the fringe, because patch can apply them, but only at the
cost of much verbosity in the changeset.

> IMHO, renames are resonably rare (and binaries even rarer), so making the 
> changset format incompatible with patch just to make renames look nicer would 
> be not good.

Definitely not all changesets.  Maybe not rename changesets.  I think
it's the best option for changesets with binaries, though.

> I think the best option would be to put all rename patches at the end and make 
> a comment about renames in the top of the patch (or maybe an intelligent 
> diffstat?), so you can eyeball the renames straight away, and when scanning 
> the diff you can stop as soon as you see:
> 
> ## renamed file foo.c to bar.c
> 
> because you know that the diff and any following it are just for renames.

That could work.  I was certainly thinking of putting most of the
metadata below all the text changes, so that's a similar approach to
renames.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCmUkZ0F+nu1YWqI0RAmScAJ4jIB0/09HUZYzDxtJwEefOrBx7YACbBfQU
NMPn5Se5Xh5HGVnbb8eOyYw=
=u1Zy
-----END PGP SIGNATURE-----




More information about the bazaar mailing list