conflicts.rst 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. =========
  2. Conflicts
  3. =========
  4. .. index:: conflicts
  5. Overview
  6. --------
  7. The Nextcloud desktop client uploads local changes and downloads remote changes.
  8. When a file has changed on the local side and on the remote between synchronization
  9. runs the client will be unable to resolve the situation on its own. It will
  10. create a conflict file with the local version, download the remote version and
  11. notify the user that a conflict occurred which needs attention.
  12. Example
  13. -------
  14. Imagine there is a file called ``mydata.txt`` your synchronized folder. It has
  15. not changed for a while and contains the text "contents" locally and remotely.
  16. Now, nearly at the same time you update it locally to say "local contents" while
  17. the file on the server gets updated to contain "remote contents" by someone else.
  18. When attempting to upload your local changes the desktop client will notice that
  19. the server version has also changed. It creates a conflict and you will now have
  20. two files on your local machine:
  21. - ``mydata.txt`` containing "remote contents"
  22. - ``mydata (conflicted copy 2018-04-10 093612).txt`` containing "local contents"
  23. In this situation the file ``mydata.txt`` has the remote changes (and will continue
  24. to be updated with further remote changes when they happen), but your local
  25. adjustments have not been sent to the server (unless the server enables conflict
  26. uploading, see below).
  27. The desktop client notifies you of this situation via system notifications, the
  28. system tray icon and a yellow "unresolved conflicts" badge in the account settings
  29. window. Clicking this badge shows a list that includes the unresolved conflicts
  30. and clicking one of them opens an explorer window pointing at the relevant file.
  31. To resolve this conflict, open both files, compare the differences and copy your
  32. local changes from the "conflicted copy" file into the base file where applicable.
  33. In this example you might change ``mydata.txt`` to say "local and remote contents"
  34. and delete the file with "conflicted copy" in its name. With that, the conflict
  35. is resolved.
  36. Uploading conflicts (experimental)
  37. ----------------------------------
  38. By default the conflict file (the file with "conflicted copy" in its name that
  39. contains your local conflicting changes) is not uploaded to the server. The idea
  40. is that you, the author of the changes, are the best person for resolving the
  41. conflict and showing the conflict to other users might create confusion.
  42. However, in some scenarios it makes a lot of sense to upload these conflicting
  43. changes such that local work can become visible even if the conflict won't be
  44. resolved immediately.
  45. In the future there might be a server-wide switch for this behavior. For now it
  46. can already be tested by setting the environment variable
  47. ``OWNCLOUD_UPLOAD_CONFLICT_FILES=1``.