not able to generate a merge conflict in Theia v0.11.0January 30, 2020 at 2:46pm (Edited 3 years ago)
We have a VS Code extension that does basic file operations and trying to maintain consistency with a remove server. The way we do it is we download the needed file locally, user can edit, and upon save (CTRL+S) we try to upload the file back to the remote server using ETag to check for file consistency. If the Etag doesn't match:
- we store the content of the local file (from the active editor pane)
- we download the new version of the file (with new Etag)
- we write back the old content in the active editor, then call
save()on the opened document. In VS Code, this triggers the merge conflict, because the content of the file is newer on the filesystem, but I am not able to replicate this behavior in Theia (using v0.11.0).
The behavior that I notice is that in Theia, whenever I write back the old content in the active editor, I don't get a dirty file that I am able to save, but it seems that the content is written directly on the filesystem, thus skipping the merge conflict situation that I want to create.
Any hints on what I might be overlooking?
January 30, 2020 at 8:28pm
Hi . It's possible that the issue is one related to file watchers. Can you try to open a random file in your Theia application and modify and save the file from outside Theia, for example using VIM. If everything works as it should, you'll get a pop-up dialog telling you that the content on disk changed, and asking which version you want to keep.
January 31, 2020 at 3:06am
January 31, 2020 at 12:00pm
Thanks for your replies. I couldn't generate the
Compareso I went ahead and opened a git issue for this: https://github.com/eclipse-theia/theia/issues/7036 I hope I provided enough details to go forward.
And do you run VS Code the same?
February 12, 2020 at 2:29pm