Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial repository as wrapper for SVN

For development we use Mercurial repository as wrapper for SVN repo for code-review in the project. Everything is working fine: developers are getting changes and commit own changes into Mercurial repository and project's team-lead sometimes is pushing changes from mercurial server repository to SVN server repository.

But we met with a problem. One day two devs pushed two changesets. For pushing it to server they merged all changes and pushed to server. Everything is good but after this we can't push changes from Mercurial repository to SVN. We are getting error:

abort: Sorry, can't find svn parent of a merge revision.

Merged changeset has two parents that was merged and looks like that it is correct but i can't to push into svn after and don't understand why SVN can't find parent.

Any help would be very helpful, Thanks

like image 406
breez Avatar asked Dec 03 '10 15:12

breez


People also ask

How do I create a Mercurial repository?

Create a local Mercurial repository Open the project you want to store in a repository. From the main menu, choose Hg | Create Mercurial Repository. Specify the location of the new repository.


1 Answers

Mercurial specially hgsubversion can be a very good client to Subversion. How ever, said that there are limitations that must be observed.

The good thing is that, you can

1) Make multiple commits to your mercurial repo and push all those changes as single revision to Subversion repository

The bad thing is that, you still do not have the freedom of exchange between various mercurial repository

1) You can not exchange changes without using subversion as a intermediary.

Mostly, I use hgsubversion when we have a pre-existing subversion repository and we want to move over to Mercurial without losing all that history contained in the subbersion repo.

If you want to continue to use, you have to observe certain constraints. See the reference 2. Below.

References:

  1. How to handle merges with hgsubversion?
  2. Mercurial to Mercurial to Subversion Workflow Problem
like image 86
pyfunc Avatar answered Sep 24 '22 23:09

pyfunc