Full files in changesets?
Michael Ellerman
michael at ellerman.id.au
Mon May 30 01:45:55 BST 2005
On Sun, 29 May 2005 14:46, Aaron Bentley wrote:
> 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.
Ok for patches that patch can't apply I see your point. And I agree it should
break early and obviously rather than silently not do what you want.
> Renames are on the fringe, because patch can apply them, but only at the
> cost of much verbosity in the changeset.
> ...
> Definitely not all changesets. Maybe not rename changesets. I think
> it's the best option for changesets with binaries, though.
I think the difference is that there's a standard well accepted way of sending
rename patches, which is admittedly verbose, but human readable and *does not
require bzr* to consume. Not using that format would IMHO be a bad design
decision.
Binaries on the other hand can not be expressed using patch, so you're not
breaking compatibility. Although it'd be interesting to see how
svn/cvs/bk/etc do binary changes and whether there's any standard that's
useful to follow.
I also think if you're going to have bzr patches that can't be applied with
patch, you can't call them patches. And changesets that contain a binary
patch should be clearly marked as such.
eg.
## bzr changeset
## you can apply this changeset with "bzr receive" or "patch"
##
## revision-id: mbp at foo-2005010101055555-sajhdakjsdhkjahsdkja
## predecessor: john at bar-kasjdlkajsdlkjaskld-asdjhasdkjhasdhahd
## comments:
## Here is my nice patch.
## date: 2005-04-01 12:34:23
## ....
## bzr changeset
## you can apply this changeset with "bzr receive"
##
## Warning: This changeset can not be applied with patch as it
## contains a binary diff. The receiver of this patch must use
## bzr receive to apply it.
##
## revision-id: mbp at foo-2005010101055555-sajhdakjsdhkjahsdkja
## predecessor: john at bar-kasjdlkajsdlkjaskld-asdjhasdkjhasdhahd
## comments:
## Here is my nice patch.
## date: 2005-04-01 12:34:23
## ....
As an aside, I wonder if anyone's thought of updating the patch(1) format to
do less verbose renames? You'd still require one copy of the full text, but
that's better than two.
cheers
--
Michael Ellerman
IBM OzLabs
email: michael:ellerman.id.au
inmsg: mpe:jabber.org
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050530/1ebfd95c/attachment.pgp
More information about the bazaar
mailing list