Real undo of merges
I've read your posting about undoing merges:
http://blog.plasticscm.com/2014/07/how-to-undo-merge.html
The problem of the solution provided there is that the removal of the integration does not remove the merge link. Furthermore the subtractive merge is not tracked. That is, the changes introduced into the branch "Release500" (CS 180) is like if a developer has manually removed the bugfix.
Suppose the finalization of issue32 has not made it into Release500. Instead, it has been integrated directly into /main after the release. At the moment you integrate Feature500 into /main you remove the fix again, maybe without noticing.
What we need is the ability to undo a merge in a way that effectively removes the merge link. That is, after undoing the merge, a new merge from issue32 into Feature500 will show up with all changes as if issue32 has never bin integrated into Feature_500.
-
Jan commented
Hi,
although this one doesn't have that much votes yet (maybe because others don't realize the benefit :)) I'd like to know whether you plan to implement this feature in the nearer future. In my eyes this would be a big step in merge tracking capabilities.
Best regards
Jan -
Hi Jan and all,
We just published the following in Facebook so we can continue the conversation about this topic adding images and so on :-)
-
Jan commented
Hi!
This is correct.
Best regards
Jan -
Hi Jan,
So, to summarize: the merge link will just stay for information purposes so developers can see it, but wouldn't be used by merge-tracking, correct?
-
Jan commented
* Like "right click" on the merge link and say "delete"? That wouldn't undo the merge.
Right, that doesn't sound like the appropriate solution. You shouldn't simply delete merge links, this renders merge tracking useless.
* Maybe a combination of subtractive + delete the original merge link? (this would "corrupt" history since it would be hard to understand why the originally merged cset was created.
I agree with that the history would be corrupted in that case. You won't be able to reconstruct what was initially happening (the merge).
* Maybe mark the "merge link" as "obsolete" somehow?? - this would do it.
This sounds like the optimal solution. You could mark the merge link to have become obsolete for example with green-red dashes. The merge tracking system would consider those links as not existent. Everyone would see: "Alright, this one has been merged into branch xyz, but within that branch the resulting changeset has been undone by a subtractive merge."
This way you would be able to distinguish between the old way (mergelink not becoming obsolete) and the new implementation (merge link rendered obsolete by subtractive merge).
You might consider to add an option to the subtractive merge "with or without removing merge link"; this preserves the old functionality. However, I don't know who would want to stick with the old way. -
Hi Jan,
There is a way to achieve this and it is by deleting the destination changeset. You can delete it, then the merge link will disappear. Of course, only the last changeset on a branch can be removed, so if you want to "undo" a merge that happened a few csets back, you are not good to go.
How would you like it to be handled?
* Like "right click" on the merge link and say "delete"? That wouldn't undo the merge.
* Maybe a combination of subtractive + delete the original merge link? (this would "corrupt" history since it would be hard to understand why the originally merged cset was created.
* Maybe mark the "merge link" as "obsolete" somehow?? - this would do it.