Question

I'm trying to convert a Mercurial repository to move all the files into a subdirectory in preparation for merging two repositories into one. The problem that I am having is that some of my branches are being lost in the conversion process.

This is what I am doing:

hg convert --filemap filemap.txt SourceRepo DestRepo

My filemap.txt is as follows:

rename . subdir

When this command completes, DestRepo is missing all branches of SourceRepo that were created but which had no changes made to them.

The reason why I have branches that are exactly the same as the parent is because the original repository was an SVN repository so we used branches to tag versions.

Is there any way that I can complete this conversion without losing the branches?

EDIT: Answering Ry4n's question.

The source repo is a Mercurial repository which was created from an SVN repository using the hgsubversion extension.

Here is a log of the branch:

> hg log -b V3.02.55

changeset:   84:cf19dfac555c
branch:      V3.02.55
parent:      71:aec56bf6ad9a
user:        steve.kaye@868e8ea5-81c6-0a4c-a81c-ce52fb006997
date:        Wed Aug 24 15:31:01 2011 +0000
summary:     Branching V3.02.55
Was it helpful?

Solution

In Mercurial there is no such thing as a named branch with no changes on them. If your source repo is a Mercurial repository it either doesn't have those named branches or they have at least one change on them.

Is your source Mercurial?

If so, Can you provide the hg log -b NAME output for one of the branches you think exists but has no changes?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top