2012-09-24

git <-> hg <-> svn

An interesting idea just came to my mind. How awesome would it be if someone came around and somehow mirrored a GitHub repo to a Bitbucket hg repo and a Google Code svn repo? Any changeset would be pulled from each repo and all the repos would be in sync with each other effortlessly. But this wouldn't be very feasible.

Problems with pulling from everywhere

Three-way mirroring

Two-way mirroring is easy enough. But we're dealing with not two, but three(!) repos here. It would involve pulling from three different repos, merging possibly three (or even more) changesets together and hoping that it all goes smoothly. But where would all this work happen? What if we get a merge conflict? Which brings me to this next point...

Mid-air collisions

What would happen if the same line in the same file was changed by two different people using different VCSes? How would this be handled? Indeed, it can't be handled at all without human intervention.

Let's push, not pull

Indeed, our problems could be fixed by getting the servers to push to each other instead of pulling. But this alone isn't feasible. Remember, we're talking about repos hosted on different servers. So now what?

Conclusion

This idea simply won't work very well at all. You'd have to have someone pushing every change manually.