I'm trying to push a changesets on a branch on a local repository to one on the Plastic SCM cloud. As far as I can tell in the Branch Explorer, there is only one head on the branch. But when I try to push, I get the error "The source branch can't have multiple heads." How can I solve this error? Where can I find this second head that Plastic is talking about?
Asked
Active
Viewed 967 times
2
-
Filter your branch explorer just by this branch. Then show only relevant changests. Then it should be easy to spot this second head :-) – pablo Sep 29 '17 at 08:03
1 Answers
1
Sometimes is hard to find the changesets that are not merged and causing the double head scenario.
I've created this small tool -> MultipleHeaderFinder that is able to ignore already merged changesets, this is how you can use it (assuming you are replicating the main branch of the quake@localhost:8087 repository):
- cm find merge where srcbranch='br:/main' and dstbranch='br:/main' --format={srcchangeset} --nototal > merges.txt
- cm find changesets where branch='/main' --format={changesetid}@{parent} --nototal > csets.txt
- MultipleHeaderFinder.exe csets.txt merges.txt quake@localhost:8087
It will return something like:
mount:56e62dd7-241f-41e9-8c6b-dd4ca4513e62#quake@localhost:8087 merged from: Merge 476
The last number is the changeset causing the issue, you can find it in the branch explorer and merge it. You might have more than one, in that case repeat the merge for each changeset found.
Hope it helps!

MrCatacroquer
- 2,038
- 3
- 16
- 21