Drahakar
Drahakar

Reputation: 6078

Using svn as a mirror repository for the Mercurial main branche

I would like to set up a SVN repository that would act like a mirror for my main Mercurial repository, is there a way to do this automaticaly.

Can it be possible to make it work both way?

So basicaly, if someone push something to the main development branch on mercurial, it would be committed to the SVN trunk, and if someone commit something to the SVN trunk, it would be pushed to the mercurial main branch. Can it be done?

EDIT : I would like to avoid having all my mercurial branches commited to the trunk and only have commit to the my main hg branche commited to SVN. This way we could still have all the nice branching features of mercurial and have a mirror repository on SVN (and having the other way around, trunk commit to the main branche, would be great)

Upvotes: 0

Views: 79

Answers (1)

Martin Geisler
Martin Geisler

Reputation: 73778

The hgsubversion extension lets you do some of this. It lets you work with Mercurial against a Subversion repository by turning hg into a Subversion client. However, it treats the Subversion repository as the authoritative source and makes Mercurial align itself to that. This means that you'll work with a linear history in Mercurial, so no branches. I wrote a hgsubversion guide that you might find useful.

It sounds like you want to use Subversion with an existing Mercurial repository. If the Mercurial history is without branches, then you can use hgsubversion. If not, then there are no public tools for that, as far as I know.

Upvotes: 2

Related Questions