About an IRC discussion on using pull requests for hg development

Dennis Brakhane brakhane at googlemail.com
Wed May 9 12:13:50 CDT 2012


On Wed, May 9, 2012 at 6:01 PM, Noel Grandin <noelgrandin at gmail.com> wrote:
> Gerrit is pretty decent.
> http://code.google.com/p/gerrit/
> Maybe we should see if we can persuade the project people to let us add a
> Mercurial back-end to it.

That won't happen.

First of all, Gerrit relies heavily on history rewriting to resubmit patches.

Secondly, Gerrit actually implements the git protocol itself to do
some magic. For example, you push to the refs/for/foobar head, but
actually, Gerrits creates a new head for you on the fly.

Thirdly, Gerrit stores configuration metadata in each repository
itself, (ab)using the fact that a git repository can contain multiple
heads that have no common ancestor. (IIRC, the refs/config head is
used for this)

It will be easier to actually write a gerrit clone for mercurial,
probably once hg has support for modifying history "built-in". Or, if
you want to use the "one clone for each review" approach, you could
write something like gerrit now, but would probably have to
reimplement the hg protocol and do some magic, like gerrit does.

(Writing a "gerrit for hg" is one of the many things on my "things I
would like to do at some point" list)


More information about the Mercurial-devel mailing list