UEPlasticPlugin icon indicating copy to clipboard operation
UEPlasticPlugin copied to clipboard

Plugin detects asset modified in other branch, even though all changes of the branch are merged into the working branch

Open Acren opened this issue 2 years ago • 3 comments

Hey there,

We're running into a recurring issue in 1.7.0 (not sure if it's happened in previous versions as well) where it seems the plugin is detecting "Modified in /some-other-branch as CS:123 by username" even though the full branch, including the exact changeset that it mentions, is already merged into the working branch.

We take these warnings very seriously and block checkout in this case in order to prevent data loss. In most cases this works well but it seems like there are false positives like this which ends up really slowing things down.

Do you think this is a bug? Or is there anything else I can do to find the cause of the issue?

Much thanks!

Acren avatar Jan 17 '23 03:01 Acren

Hello,

I am sorry to hear that you hit some problems.

I can think of one known issue reported by another user;

  1. if you change an asset on one branch (creating a new revision)
  2. and then do a proper revert (substractive merge) to the previous revision
  3. you end up merging nothing to the /main branch.

Internally Plastic SCM tracks the merge status of the branch, but doesn't track it per asset, and as such the underlying CLI commands that the plugin uses are not taking this into account. Basically, on the main branch, you are indeed one revision behind the revision that was made on the branch!

Does this match your experience?

  1. If yes, it means we should raise the priority of this bug, but believe me it's not an easy fix IMO
  2. If no, it's more worrying, in this case, I could use the logs from Unreal, with Verbose logs enabled from the Source Control login window

Can I also ask what version of Unreal you are using?

Thanks!

SRombauts avatar Jan 17 '23 10:01 SRombauts

Hey @SRombauts, We're using UE 5.0.3 currently.

So, we have definitely run into the issue you described with subtractive merge multiple times. It is annoying but we can usually go back and find the CS, see it was a subtracted, and make the call to ignore the warning, which then fixes the issue once another version is saved. I'd +1 this!

However I think this is something else. Investigating the file more, I found that a fork was created in the file version on the task branch that is mentioned in the warning. I am not sure exactly how since I thought exclusive checkouts combined with this modified warning should prevent that.

Now, it looks like when the task branch with the fork was merged back into the main branch, it did not merge the file that was forked. Whether this was by choice of the person merging or not I am unsure. So now the two branches have independent conflicting versions of the file, even though they were merged. Any subsequent merges now do nothing because they are already merged, but they still contain different versions of the file, even after merging both ways. We also tried cherry-pick with ignore merge history. I'm not sure if this is a bug on the SCM side of things because it seems a bit strange.

Now after all that, the plugin in Unreal seems to always show this warning on the file, seemingly because it sees a revision on another branch that isn't a parent in the current one, correct me if I'm wrong here.

So the way to fix the warning was to explicitly reset the file to a specific version on all of the related branches individually, as separate changes, to manually force them in sync again. After that it went away.

Do you think this actually be a problem with Plastic itself? It seems strange to me that the different branches can still contain their own versions of the file after merging them so I'm not sure here.

Thanks again.

Acren avatar Jan 18 '23 02:01 Acren

Thanks for the detailed answer!

It's more or less a limitation of how the plugin use the command line to track file status, while Plastic SCM use the branch graph to track merge on the changeset level (not per file). We have a bug report in our backlog with a description on how to use the merge command (on the branch level) to be able to discard this sort of false positive warning on the file level.

Cheers!

SRombautsU avatar Jan 18 '23 09:01 SRombautsU