bzr send support for git-am-style patches

Jelmer Vernooij jelmer at samba.org
Sat Mar 28 17:00:22 GMT 2009


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

Hi Aaron,

Now that bzr-git can properly track upstream projects in git, I'd like
to add support for generating git-compatible patches with Bazaar+bzr-git
so it's possible to contribute back in upstream's preferred format that
they can apply to their git repository without needing bzr and still
keeping most revision metadata.

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". I'd like to
allow e.g.:

bzr send --format=git git://git.samba.org/samba.git
- --mail-to=samba-technical at samba.org

(perhaps the default format could even be determined by using
submit_branch.get_default_send_format(), and that could return "git" by
default if submit_branch is a git branch).

Can you advice on what the best approach is to allow registering new
- --formats for "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.
It seems to me that while a particular bundle format atm implies a
particular merge directive, this is will not necessarily always be the
case in the future.

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?

Cheers,

Jelmer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iJwEAQECAAYFAknOV6MACgkQDLQl4QYPZuWPAwP/fK4zRV3uJ8yaJ6qjJL89RrUL
VG+WVyy5A/NAlvzij0nNEGOd7LuOuv7ZL6zYSgo8HM2tcgCKicoJ4bLn/zTbgu01
nzl81Y94EGATEc4cY9Z+VXGkjA7o3V8+XeVxBP72ePkHuD4MAYDLKf8e57W+3B1a
JeloTqasb16fCvpfaTc=
=2VtZ
-----END PGP SIGNATURE-----



More information about the bazaar mailing list