Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Workflow when using HG Subversion to push to SVN

This question is very similar to the one posed in this question, but I'm having some issues following the workaround.

The Problem:

Basically I have a subversion server and a mercurial local client. The extension hg-subversion allows mercurial to act as a subversion client. This is ideal for me because I can make unlimited feature branches off my subversion development branch and merge them in as I choose fit.

Due to a limitation of subversion, I cannot commit a branch merge to a subversion repository. In fact, I don't need to commit every branch merge, I just want the "default" branch head to be committed to SVN.

The Proposed Solution:

A workaround user Harvey recommended was to modify my workflow to include an hg-only clone of a hgsubversion clone for development.

To quote Harvey:

The trick is to learn the modified hg<->hgsubversion<->svn workflow. Once you "get" how it works, you won't have any trouble. You'll just type a few more commands. I've actually started writing scripts to make the process (which is repetitive) easier. Typical flow: [in "hg" repo] commit a bunch of changes; push them to "hgsubversion"; [switch to "hgsubversion"] hg update (hgsubversion needs this); hg push to "svn" (which automatically re-pulls after you push and removes your changesets locally); [switch back to "hg"] hg pull from "hgsubversion"; hg strip the older duplicates b/c "hg" isn't an hgsubversion clone and doesn't know to automatically strip the old changesets.

The Issue I'm Running Into:

I'm getting stuck at the point where I run hg push from hgsubversion to the svn repository. I'm still getting the error message, "abort: Sorry, can't find svn parent of a merge revision."

Admittedly I'm not 100% on how hgsubversion pushes revisions to svn. Honestly I'd like to see the state my local copy is in pushed to the svn server.

Halp?

like image 855
Joe Avatar asked Jan 31 '11 16:01

Joe


1 Answers

I have decided to answer my own question for archival purposes (and for those having the same issue).

I found another similar question where the answer was simply stated, you can't do it. Please refer to the above link and up-vote Eric-Karl's answer if this was helpful to you. He does offer a work-around to recover.

like image 164
Joe Avatar answered Sep 29 '22 08:09

Joe