Merge Deadlock

Hello!

We’ve been using Plastic / Unity VCS for about five years. It’s wonderful in comparison to other tools or Git LFS.

There is a bug I keep seeing I’m hoping to get some assistance with. I’ve been able to find references to this in forums as far back as 2011, with no real solutions provided and several fixes implemented to solve it.

Unity VCS Version: 11.0.16.9055
Unity: Unity 2021.3.15f1 LTS

Issue:
When I download the latest commit all is well except for a single, small text file. This text file is in conflict, but will always use the latest source version. This should be a 10 second UI notification and clear button input, then move on.

What actually happens is that when I choose the source version it then it errors, saying I must have switched repos, and says I have pending merge links. I only use one repo and never switched. There is no UI on the left hand side to view the pending files. Right clicking the troubling file has no options. And so I’m stuck where I have pending merge links, yet have the latest files. I can verify that I have the latest files by choosing “Merge from this changeset” and there are zero files here.

UI problems:
The deadlock here is caused by the UI which seems stuck in a strange state.

Since we know I have the files the “Pending Changes” view acknowledges this saying “Pending Merge Links will be committed when you check-in your changes or when you undo your changes”. This seems accurate. But when I try to check in I see:

When you try to undo the changes in the file, it says you can’t as you have to undo the whole merge link, which we have no idea of what files these are. Even if we did, it would likely error.

There was also multiple posts from the Plastic team about how the changes could be shelved, undone, pull, and then reapply changes. This doesn’t work, showing the error above. It was the same ten years ago also.

So I can’t merge, check in, or shelve, so I have to undo.

Ultimately, this 80kb file which will always default to source is costing us many days of rework because the UI won’t allow us to choose what to do with this file and is caught with a pending merge link perpetually. We’re now afraid of pushing and pulling, as it could randomly mean backtracking. It’s morale death.

The only time we were able to get around it was to manually download the file from a commit, add it to the repo, and push, but this doesn’t work consistently. It also makes Unity VCS lose its mind.

Happy to share anything I can to help track this down. Thank you!

To add to this, undoing all changes doesn’t solve the issue. I’m then stuck in the same state where I cannot update.

I have a five minute video of me undoing all changes, trying to download the latest changes, and it repeatedly failing due to a single file. Happy to share this via email.

This message is shown, even though there is no merge UI anywhere on any screen.

The only solution seems to be nuking the entire repository, redownloading 200GB, and reopening (8 hours). It’s a bummer to lose a few work days each time to a single text file.

Can you open a ticket at devops-vcs-support@unity3d.com. I think it will be faster to connect and review the steps you are following to debug the issue in detail. I cannot easily reproduce this.

The first error message normally happens when you are switching your workspace with pending changes. This is not recommended. More info: https://plasticscmsupport.zendesk.com/hc/en-us/articles/360014970894-The-parent-revision-of-the-item-is-inconsistent-with-the-loaded-one-in-changeset-cs-xxx

I also don’t fully understand why you have a merge link. Are you running a merge? If you update via the “Incoming Changes” view, if there is a conflict between your local and new changes, it will ask you to resolve the conflict and finally you shouldn’t be able to checkin the changes. But no merge link should appear. This used to be a problem a long time ago (when we didn’t have the “Incoming Changes” view) and probably you are seeing some of these old threads.

1 Like

Sure thing, @carlosalba1985.

The error is so interesting, because no workspace changes happen. While I do have other workspaces, they were last touched about six months ago. I’m tempted to delete them just to see if this goes away.

Agreed on the merge link confusion.

While the repro steps may not be helpful (it seems random), I do think the video would be. It shows what happens post undoing all changes and may help track down.

Many thanks and I’ll reach out via email today.

Posting here because we worked with support with weeks on this with no solution, eventually stumbling on a fix minutes ago.

In the Incoming Changes area there is an options in the top right. If you change this from the top option (something about merging the source with local) to the option that says “always select source”, close options, then hit update, you will be able to move forward.

Wish I’d taken a screenshot of this view, but I didn’t expect this to work. Hope this helps someone out there stuck with this same issue!