As I have started using the desktop in my house, as well as my laptop, I have also started using Syncthing to keep some of my various projects, org-files and Emacs setup [see below] the same across my devices. As such, Syncthing conflicts have become the bane of my existence, so I had to work out someway to deal with them.
After much browsing, I found a handy Python script on GitHub by sercxanto for identifying all conflict files. Useful, but all it did was identify them. So I dusted off my keyboard, and made a quick Bash script to take the output from this, but also give the option to delete all located files. It’s quick and dirty, but it does the job great for me, and I’m sure others could find use for it. The only minimal “feature” it has is automatically downloading the syncthing_findconflicts.py if it is not already present on the users system.
You can see RemoveSyncthingConflicts.sh on my Notabug page, feel free to do whatever you want with it, as per the licence.
I’ve had a few ideas to extend it – namely picking which folders have their conflicts removed, or stepping through each found conflict 1 by 1 asking for deletion confirmation. I haven’t implemented these yet, because I am learning a bit of Python so I may just fork the original work by sercxanto and put them in there.
Either way, it does what I need for now, and I have a project to tinker with when I have some time. It might also work for you, so check it out if you use Syncthing on Linux!
[Note] – I’m new to Emacs, and that really deserves a post all of it’s own, if I ever stop tweaking my config for long enough to take the time! Org-mode alone makes it worth learning, but if you do anything with creating text – be it creative writing or coding – you owe it to yourself to use Emacs if you are of the technically minded set.
The image for this post was based on “File:Generic Fighting Video Game (with outline).svg” by Ftiercel is licensed under CC BY 3.0