0

I have a problem when trying to convert.

There is "master" branch and also another branch named "testing"

When I use standard method hg convert gitbranch hgconvertedbranch I get two heads and need merge. - It merge somehow both branches and I get sources and changes different from original "master" branch which only I need to convert.

Do you have any solution for that? Any option for "hg convert" command to make convert really only master branch and not all togerther? Thank you.

2 Answers 2

1

Just make a local clone of your git repository with only one branch, and convert to hg from that.

Sign up to request clarification or add additional context in comments.

6 Comments

I tried that of course. Maybe problem with address: There is address github.com/XXX/XXX/tree/testing but in master is just: github.com/XXX/XXX and it made all? Because I clone this and it makes heads so?
Try git branch to see all your branches, and then delete all of them except master. Like, git branch -d testing
Still problem ... seems it is problem in revision when it says commit message: Merge branch 'master' of github.com:XXX/XXXX into testing - so only one branch is there but this revision is making new heads not all branch as I first thought ...
When i use "git branch" it says "master" only so how can be there commit "merge master into testing"???
"git branch" lists the branches currently in the repository; there's only one branch now. The message in the commit-- "Merge branch ... into testing" is just whatever the committer typed in. However, if that commit is a merge (commit with multiple direct ancestors), maybe "hg convert" can't handle it? (I can help with git, but not hg.)
|
0

After you've done the convert to Mercurial you can use clone -r ONEHEAD converted new to get a repo having only revision ONEHEAD and all its ancestors.

1 Comment

If you meant " hg clone -r <revisionwithonehead> convertedrepo newrepo" - it totally messed up repository/branch and needs to merge anyway so This answer is wrong.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.