Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Acren opened this issue Jan 17, 2023 · 3 comments
Assignees
Labels

Comments

@Acren
Copy link

Acren commented Jan 17, 2023

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!

@SRombauts SRombauts self-assigned this Jan 17, 2023
@SRombauts SRombauts added the bug label Jan 17, 2023
@SRombauts
Copy link
Owner

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!

@Acren
Copy link
Author

Acren commented Jan 18, 2023

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.

@SRombautsU
Copy link
Collaborator

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!

SRombauts pushed a commit that referenced this issue May 31, 2024
Fix FPlasticSourceControlProvider::UsesFileRevisions() for UE5.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants