Sometimes it seem content are changed on both sides. I'm not sure it's actually the case because my IDE settings was definitely not changed on the server side.
Anyway in those case it would be great to be able to resolve the conflict by forcing on side or the other.
That's the errors I get with docker-sync sync
Looking for changes
Waiting for changes from server
Reconciling changes
Synchronization complete at 10:22:50 (0 item transferred, 6 skipped, 0 failed)
skipped: .idea/workspace.xml (contents changed on both sides)
skipped: README.md (contents changed on both sides)
skipped: web/sites/default/settings.php (contents changed on both sides)
skipped: web/sites/development.services.yml (contents changed on both sides)
skipped: web/themes/ehnv/templates/system/page.html.twig (contents changed on both sides)
i suppose conflict mode to be "host wins", not container wins. Also, when we resolve a conflict, we should growl a notifications ( no matter they are on or of for sync ) so the person is aware of.
unison has conflict handling implemented.
You can use the sync_args option to pass additional options to unison.
See the unison documentation for a full list of options, you may be interested by:
-copyonconflict keep copies of conflicting files
-prefer xxx choose this replica's version for conflicting changes
Unison has also the -force option, but regarding the implementation of unison dualside, I don't know how it could work...
Currently with unison unox, I use it with -prefer newer -copyonconflict.
Edit: Forgot to say that Unison, can also call external merging tools but that's surely out of your needs
@mickaelperrin i added this to our sprint towards unox, since it makes a lot of sense. AFAICs you already included it, right? If yes, just close this one
There is no default conflict resolution in unox strategy but the parameter sync_args is indeed here.
-prefer newer seem a good option but server time need to be the same than the host? Right now it's not.
Also should the -times be set?
Time drift is a MacOS VM issue https://github.com/docker/for-mac/issues/17
Most helpful comment
unison has conflict handling implemented.
You can use the
sync_argsoption to pass additional options to unison.See the unison documentation for a full list of options, you may be interested by:
Unison has also the
-forceoption, but regarding the implementation of unison dualside, I don't know how it could work...Currently with unison
unox, I use it with-prefer newer -copyonconflict.Edit: Forgot to say that Unison, can also call external merging tools but that's surely out of your needs