Quote: What I don't understand is how are the relations between these 3 differences shown as conflicts created? The conflict is between left variables add and right components delete Right: components delete, "uncontrol" of component.So it seems like the UI and input are somehow not in sync? Last but not least, even after accepting the selected difference, the UI shows the reject 'x' sign on all differences, see the picture below: Moreover, even though the UI shows that accepting the currently selected difference will accept the 2 others as well, what happens in the background is that both the Addition and the ResourceAttachmentChange are rejected. Why is that and where could that relation come from? In the background, the difference selected in the picture above only has the ResourceAttachmentChange in the implies list but its acceptance also seems to influence the addition difference. What I don't understand is how are the relations between these 3 differences shown as conflicts created? (in our ecore model, Variables are contained in a Component) Locally, a Variable has been added to the same Component which was deleted remotely. On the remote, a Component has been deleted Ģ. What basically happened, in this case, is the following:ġ. In the picture below you can see the conflicts I'm looking at: To do that, simply call M-x spacemacs/smerge-transient-state/body, which is per default assigned to SPC-g-r.Įditing your file should then be intuitive:ĮDIT: Solution for those without Spacemacs, adapted from John Kitchin's scimax, which I take is based off of the spacemacs solution and Iqbal's accepted answer above.I am using EMF Compare to handle model merging in my own EMF-based application and I have encountered a problem in the UI when merging conflicts. If you happen to use Spacemacs, I'd recommend activating "smerge-transient-state", which brings up a hydra menu with all possible smerge commands. Note that I am using buffer-list-update-hook and not find-file-hook since most of the times I get conflicts in a buffer which is already open in emacs in which case find-file-hook is of no help.Īlso check other methods mentioned in this answer. (add-hook 'buffer-list-update-hook #'my-enable-smerge-maybe) (when (and buffer-file-name (vc-backend buffer-file-name)) UPDATE: The following is relevant only on Emacs versions before 25.1, the following can cause problems on later versions, see Īdditionally you might be interested in automatically enabling smerge-mode when visiting a file/buffer with conflict markers you can use something like the following to achieve this (defun my-enable-smerge-maybe () This is same as vc-resolve-conflicts (thanks and for pointing this out). smerge-ediff bound to smerge-command-prefix E to start an ediff session to merge the conflicts.smerge-keep-other bound to smerge-command-prefix o to keep other changes.smerge-keep-mine bound to smerge-command-prefix m to keep your changes.smerge-keep-current bound to smerge-command-prefix RET to keep the version the cursor is on.smerge-previous bound to smerge-command-prefix p to move to previous conflict.smerge-next bound to smerge-command-prefix n to move to next conflict.I find the default prefix for smerge-mode C-c ^ cumbersome so I have changed it to C-c v (setq smerge-command-prefix "\C-cv") It also adds keybindings to easily resolve the conflicts, consult its documenation C-h f smerge-mode RET to know them. It will highlight all the conflicted regions. You might want to try out smerge-mode just open the conflicted file and do M-x smerge-mode RET.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |