Can I use GPLv2 code of mercurial for implementing bzr's code?

John Arbash Meinel john at arbash-meinel.com
Tue May 3 17:02:44 UTC 2011


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

On 5/3/2011 5:49 PM, INADA Naoki wrote:
> I'm implementing i18n code on lp:~songofacandy/bzr/from-hg.
> I reused mercurial's per-paragraph i18n code.
> And I want to reuse mercurial's MBTextWrapper_ too.
> 
> _MBTextWrapper:
> https://bitbucket.org/mirror/mercurial/src/d8ba6fb2ce15/mercurial/util.py#cl-1128
> 
> Mercurial and Bazaar are licensed under GPLv2. So I think I can reuse
> mercurial's code for bzr. Is it collect? Does the Bazaar's single copyright
> holder policy blocks other GPL code?
> 

Legally, I believe it is fine for us to include a copy of Mercurial's
code, since both are GPLv2.

For code that we include from others (but don't hold the copyright) our
policy has been to put it under bzrlib.util.*

So if you are taking Mercurial's code, I would put a copy in
bzrlib.util.XXX and then create a bzrlib.XXX file that hopefully can
just inherit from the Mercurial implementation for any adaptation that
we need.

I'm sure it is possible to just edit it directly, but this leaves things
in a clear state. Especially since it makes it easier (in the future) to
do clean code drops if we want to upgrade to a newer version. (it
becomes *very* clear what was the original code, and what our additions
are to it.)

That said, the code might not have been written to be easily extendable.
If so, do what works.

I think it would be good to have it clearly marked as not owned by us. I
believe the (c) Canonical stuff means that if we need to, we may rewrite
critical code to make sure to be the copyright holder. I don't think the
gettext stuff is that critical, but I'm not positive.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3ANTQACgkQJdeBCYSNAAOCDgCggwGV1gWpw0rjQAidbYNywRbc
3/kAn3elzhlRwTxdIrIRQMQPciYgPk3b
=6kxt
-----END PGP SIGNATURE-----



More information about the bazaar mailing list