Jump to content

Merging after Subtractive Merge deletes files, instead of ignoring addition


Kike

Recommended Posts

In our project, one user merged by mistake a task branch (br1) into an unrelated one (br2). When they noticed the mistake, they performed a subtractive merge from the undesired merge changeset (br1 -> br2), which resulted in a changeset (!br1 -> br2) full of br1 files deletions and additions.

They kept working as usual, until recently we noticed a lot of files for a specific level are missing on main. After investigating the history, we've seen the following sequence:

br1 -> main: files added in br1 are now in main

br2 -> main: many of the files added from br1 are deleted from main, some files that were deleted in br1 reappear in main

It looks like the br2 -> main merge took the changes from the subtractive changeset and applied them. This is not the desired nor expected behaviour we want from a subtractive merge. The fact that a link is created lead us to believe that it meant "all operations should ignore the changeset this is coming from". But it is, however, a complete changeset in itself, leading to our issue.

Is there any way to prevent this from happening? What's the alternative to subtractive merges, given that deleting non-head changesets is cumbersome and we cannot select several files from a changeset and say "revert to this/previous version" in bulk?

Are there plans to fix this behaviour of subtractive merge?

We'll try to figure out a way to recover the files deleted and remove the ones added unintentionally. And, from now on and until subtractive changesets behaviour changes, we'll forbid anyone from using them.

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...