bzr send support for git-am-style patches

Jelmer Vernooij jelmer at samba.org
Mon Mar 30 18:59:00 BST 2009


Aaron Bentley wrote:
> Jelmer Vernooij wrote:
> > I'd like
> > to add support for generating git-compatible patches with Bazaar+bzr-git
>
> I assume this is a special git format, equivalent to a merge directive?
Yep; it's usually sent as a set of files; each with a small header with
metadata and the diff for a particular revision. The convention is to
create a directory with all these files in it. When emailing, all files
are attached. There is no way to specify just a URL to merge;
--no-bundle shouldn't work.
> > The main thing that seems to be missing in bzr core for this is support
> > for registering new a new --format as used by "bzr send".
>
> > The current allowed options for --format in "bzr send" is hardcoded, and
> > (IIUC) controls both the bundle format and the merge directive format.
>
> Yes.  I was applying YAGNI.  I didn't want to go crazy with formats if
> that wasn't necessary.  It sounds like Now You Need It (NYNI?).
Acronym overload :-)
> > Would it make sense to have a (separate of
> > bzrlib.merge_directive._format_registry) registry for
> > bundle-format+merge-directive-format combinations that's used for
> --format?
>
> I think so.  Selecting a combination of formats should be enough
> flexibility for the average user.  BTW, I expect the next new format to
> be a bundle format that supports CHK.
Why does CHK need a new format; it doesn't add any new data to the model
as far as I've understood, or is this just for performance reasons?
> I do wonder whether you'll want to change the codepath further to
> support git-compatible patches, though.
I don't think this should be too problematic; it would mainly involve
adding a registry with the bundle+merge-directive formats to use and
getting the two existing pairs to use that registry.

Cheers,

Jelmer



More information about the bazaar mailing list