Re: Github mirror: how does it work?

On Jun 19, 2013, at 9:18 AM, Dimitri Glazkov wrote:

> Hello Stylish People!
> 
> I just realized you guys have a beautiful github mirror of the dvcs
> repo: https://github.com/w3c
> 
> How do you use it? What is the dark magic behind the bridge between Hg
> and Git? I am asking this question because I am sort of wondering if
> we WebApps peeps could do something similar. Github's reviewing and
> multiple-contributor management facilities are pretty much tops.
> 
> :DG<
> 

Hi Dimitri,

if your Hg repo is on dvcs.w3.org then the best bet is to ask the sysadmins at w3.org to setup the mirror for you. We also mirror our Hg repos from hg.csswg.org which I set up myself. In either case, the Hg to Git bridge is done with HgGit ( http://hg-git.github.io/ ). 

Note that with the current technology available to us, the bridge is not bidirectional. One of your repositories will be canonical, the other will be a read-only mirror. For the CSSWG, our Hg repos are canonical and the GitHub mirrors are read-only. When we merge pull requests the merger has to use HgGit to pull the PR into a local Hg repository, then push from there to the canonical Hg repo. Other groups have decided to make their GitHub repos canonical which allows them to merge PRs directly on GitHub, they just can't push to the Hg repo anymore.

I've been exploring what it would take to make the bridge bi-directional, allowing pushing to either repository. There have been some attempts which work for simple cases, but there are gotchas dealing with branches...

Peter

Received on Tuesday, 25 June 2013 18:20:41 UTC