Jump to content

Can't merge branch with two heads


Jawah

Recommended Posts

Hello,

I'm having following issue:

I can't push my branch because it has two HEADs. So far so good. But I also can't merge/unify them because the merge destination already has all source changes. The reason being that I already merged the changes from one HEAD to my main branch and then back into the other HEAD. The screenshot shows it pretty well.

image.png.872d1c48e3ba082c83790ce114494322.png

Now I don't know how to tackle that. Anyone got an idea? Appreciate all answers!

Link to comment
Share on other sites

Hi,

Let's try the following. If you tried to merge these changesets and actually there is nothing to be merged:

I have a workaround to unify the heads. Hack the client to send a merge link meta information in order to set the changeset as "merged" and allow you the replication.
You will need:

1) Switch your workspace to the destination branch.
2) Create a file called "plastic.merges" at your "wkspaces<Your_workspace>.plastic" hidden path.
3) Get the changeset multiple head list.
4) Add the following content.

mount:56e62dd7-241f-41e9-8c6b-dd4ca4513e62#/#<Repo_Name>@<Server_IP_Or_Name>:8087 merged from: Merge <CSET_ID>
mount:56e62dd7-241f-41e9-8c6b-dd4ca4513e62#/#<Repo_Name>@<Server_IP_Or_Name>:8087 merged from: Merge <CSET_ID>
......


And replace the "<XXX>" fields by its actual value for you:

<Repo_Name>: Repository name.
<Server_IP_Or_Name>: The server IP Address o the server name
<CSET_ID>: The changeset numbers you have determined as the multiple heads candidates.

After creating the file and saving it you'll see the pending changes view with a few new pending merge links, you'll be able to check it in and workaround the issue.
Tell me how it goes!

Regards,

Carlos.

Link to comment
Share on other sites

Hi Carlos,

thanks for your reply!

I can't seem to get it right. No matter what I add as <Repo_Name>@<Server_IP_Or_Name> I get the same error.
The repo name should be correct. I tried my local repositories server name with @local, with and without the port :8087.
I also tried the cloud repositories server name. Could it be a different port and if, where can I find it?

image.png.a77c30ca163bdc786692c3992bb6301f.png

The only way I get a different error is removing the second hash before the <Repo_Name>.

image.png.8e58b1a1d125225e2c908643763bc816.png

After that the client crashes. Here is the last exert:

mount:56e62dd7-241f-41e9-8c6b-dd4ca4513e62#/airogames_lifeofdelta@local merged from: Merge 1134
mount:56e62dd7-241f-41e9-8c6b-dd4ca4513e62#/airogames_lifeofdelta@local merged from: Merge 1122
......

I also tried setting the guid of the commits instead of the changeset id.

Link to comment
Share on other sites

Hi,

What is the changeset id of the second head you need to merge?

mount:56e62dd7-241f-41e9-8c6b-dd4ca4513e62#/airogames_lifeofdelta@local merged from: Merge 1134
mount:56e62dd7-241f-41e9-8c6b-dd4ca4513e62#/airogames_lifeofdelta@local merged from: Merge 1122

This format looks good, but there should be just one entry for the changeset id you want to merge.

Regards,

Carlos.

 

Link to comment
Share on other sites

Edit4: [FIXED]

The format was wrong again. This one has done it. Leaving out the forward slash '/'

mount:56e62dd7-241f-41e9-8c6b-dd4ca4513e62#<Repo_Name>@<Server_IP_Or_Name>:8087 merged from: Merge <CSET_ID>

-----------------------------

 

Ah okay, so I just need to add the source head I want to merge. That's changeset 1122.
Tried it but still not working.

Here are the new errors I encountered:

mount:56e62dd7-241f-41e9-8c6b-dd4ca4513e62#/airogames_lifeofdelta@local merged from: Merge 1122

image.png.9083a192f00154a75b888c34b1a6892b.png

After that I tried changing to my cloud server and got this error:
 

mount:56e62dd7-241f-41e9-8c6b-dd4ca4513e62#/airogames_lifeofdelta@Airo_Games@cloud:8087 merged from: Merge 1122


image.png.e3c9a49a391e0dded8b87a0195b59210.png

Currently I'm look into finding the client.conf file.

Appreciate the help!

 

Edit: Found the file, adjusted to 30000ms, same error.

Edit2: Changing the port to 8787 fixes the timeout but throws the first error again about the repository not being found.

Edit3: Tried `cm lrep localhost:8084` to see if the repo exists and it does.

airogames_lifeofdelta@localhost:8084

Tried to replace airogames_lifeofdelta@local by this, didn't work either.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...