Frage

Ive tried to use --branchmap option from this docs, but it does not helped. I think that it is fundamentally possible to convert Git branches to Mercurials named branches - because we always can say what is the difference between Git repo with a branch and same repo but without that branch.

War es hilfreich?

Lösung

The problem here is that Git branches are just pointers to a commit. All commits that are ancestors of this commit are considered to be "on the branch", then. However, this later notion is broken if you see a commit only belonging to one branch, because simply having a second branch will create ambiguity in this regards: at least the root node is now in both branches.

Mercurial's named branches - for better or for worse - are effectively node-colorings. I.e. you color your nodes (commits) with one color (the named branch), and with one only. So fundamentally, it is not possible to convert Git branches to Mercurial named-branches and keep the meaning of "X is on branch Y" the same.

If you want a similar concept to Git branches in Mercurial, take a look at bookmarks.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top