Issues with source control merging

Hello there,

I’ve been working on a project for with several members of our team and we’ve been using PlayCanvas’ source control. We have had several issues with merging branches that have at some point been restored to a previous checkpoint into our develop / master branches.

The issue that happens is that once a branch has been restored and then do some work and attempt to merge into our develop / master branch we sometimes come across an issue where the source control states that no changes have been made between the two branches, this has been a little frustrating as we can sometimes lose hours of work.

If we view diff and compare the two branches we get a list of the changes but when it comes to merging the merge states nothing has changed and none of the work done on the branch is merged over.

Is this a known issue or is there a fix that we’re missing?

I cant share our main project due to it being for a client and we are under NDA’s but I have managed to recreate the issue in a new project

If you switch to the develop branch and now attempt to merge feature-2 no changes will be found, however there are distinct changes in each branch which can be seen if you view diff between the two checkpoints

Invoking @will, he should be able to take a look at this.

1 Like

Appreciate it!

1 Like

I suspect this info may help: while diff compares two states, merge takes into account the common ancestor checkpoint as well. A merge creates a common ancestor. This may make certain changes after a revert appear as intentionally discarded. Reverting does not change the ancestor graph and the only way to “redo” a merge is to create a new branch from a checkpoint of the destination branch preceding the merge, and merge into that new branch. When reverting to a checkpoint before a merge, it may help to create a new branch from that checkpoint and continue working there.