pre-commit hooks and $Id$ banners?

Jan Hudec bulb at ucw.cz
Wed Apr 26 19:43:19 BST 2006


On Wed, Apr 26, 2006 at 13:57:02 -0400, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Jan Hudec wrote:
> >>Many script authors assume two
> >>files
> >>are identical if their diff is empty.
> > 
> > 
> > Picky note: you mean the other way 'round -- if their diff is non-empty, they
> > are changed.
> 
> It would not surprise me if many script authors assume exactly what John
> posted.  An empty diff does mean no content differences, AFAIK.
> ('Binary files differ' is not 'empty')

Yes, but that is an argument for diffing with expanded keywords rather than
collapsed, which is how I unerstod the original thougt.

> > While you don't want any diff output if only keyword expansion changes, you
> > usually want the diff to apply cleanly to the working tree.
> 
> I think you also want the diff to apply cleanly to someone else's
> working tree, which may not have the same expansion.

Which is, of course, a problem, because no diff will apply to two trees with
different expansions. At least with normal diff.

> > You even usually
> > assume, that if you make a diff between two revisions and than apply it to
> > exported working tree from the first, you get the secodn -- and that means
> > doing the diff on the *external* representation, ie. with keywords
> > *expanded*. But that's the reason I say we want both ways.
> 
> An alternative would be diff the internal representation, and to do
> patch application on the internal representation, also.  That would
> allow patches with differing line endings to work properly.

Yes -- but would need a bzr-aware patch. Ie. we can have bzr changesets that
will work properly on working trees with different expansions, but they won't
be always applicable by standard diff.

Note, that applying such changeset is still not trivial, because the
conversion to internal format and back is not necessarily identity.

-- 
						 Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060426/e3191ed1/attachment.pgp 


More information about the bazaar mailing list