Ivan Vučica
Ivan Vučica

Reputation: 9669

Mercurial and Subversion: changing, committing, pulling from SVN, pushing, "Sorry, can't find svn parent of a merge revision."

I've pulled the Subversion repository into a local Hg repository while at work. At home, I fixed some stuff, committed into my local Hg repository, and upon coming to work I did a pull and an update.

$ hg pull
$ hg update

I needed to merge, so I did that.

$ hg merge

However, when I tried pushing:

$ hg push
abort: Sorry, can't find svn parent of a merge revision."

What mistake did I make in the workflow? What can I do to avoid the issue in the future?

Upvotes: 2

Views: 1055

Answers (1)

pyfunc
pyfunc

Reputation: 66709

If I remember correctly, the sequence is

hg pull 
hg up # update the repo to the head 
hg rebase --svn # rebase your_head onto svn
hg push

When you want to push the changes directly into svn, you first pull the latest changes from svn, then rebase your changes to the svn HEAD and push them back.

[Edit : These commands are not available as a part of standard hg command]

You will need to install hgsubversion Extension.

Upvotes: 5

Related Questions