Creating a derivate work, asking for a licence "linking exception"

Matt Mackall mpm at
Sun May 25 08:25:41 CDT 2008

On Sat, 2008-05-24 at 15:15 +0200, stefan at wrote:
> Hi
> I'm writing a java library which intends to be able interact with a
> mercurial repository. While the ultimate goal would be to be full-fledged,
> a more immediate goal is to be able to read revlogs, changelog and
> dirstate.
> To do this I have looked at the mercurial source which makes my work a
> derivate work (sort of equivalent of translating).
> This project of mine started as an attempt to speed up the "hg status" for
> files in the Mercrual Eclipse Plugin. While it has a long way to go, I
> have come further than I expected.
> This is most probably a derivate work and as I understand it since hg is
> GPL my work has to be GPL. And as such, my java library cannot be included
> into the eclipse plugin without having some sort of "linking" exception
> such as the classpath exception.
> I understand that FSF sometimes grants exceptions
>    See bullet 10) at
> Therefore I ask who could (even if s/he doesn't wan't to :-)) grant me
> such and exception? (ie, who owns the licence). And if so, under what
> conditions?
> I'd be happy to make my derivate work GPL with an classpath exception or
> similar, protecting your and my work while maintaining linking possible.
> The following files I have currently studied
>,, mpatch.c
> and the corresponding wiki content of developerinfo
> with addition of the DirState, Manifest and ChangeLog

You're into a slightly gray area, but the general understanding is that
reimplementations of code are probably not covered by copyright unless
they are easily identified as copies. Considering that you're coding in
another language, you're probably in the clear. But this is an area of
law that's relatively untested, so you can't be sure until you actually
get to court.

It's also not clear who controls the license of a collective work such
as Mercurial. There are various legal theories that suggests that the
"primary author" (ie me in this case) has some authority in this area,
and there are others that suggest he doesn't. Works like Mozilla have
gone to great pains to relicense their code by contacting all the past

So it's not clear if you need an exception (probably not) and it's also
not clear who can grant you one (maybe me, but maybe not).

But if your code is under a decent open source license, I for one
certainly won't care whether it's a derived work or not which is
probably true for everyone else involved. So I grant you permission to
make a GPLed derived work of Mercurial that links with Classpath.

(And for the record, I am not a lawyer.)

Mathematics is the supreme nostalgia of our time.

More information about the Mercurial-devel mailing list