Extending the "rename" detection
Nathan Thern <[email protected]>
| Newsgroups | gmane.network.unison.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello - Longtime unison user. I have known for some time that renaming a file on one replica will result in a simple "copy-and-delete" operation at the target mirror replica when the two replicas are sync'd. Recently, I encountered a situation where several directories which contained large files were renamed on a replica. It happens to be a kind of "dropbox" folder for my family to put media content for me to download while I am traveling. I unison sync the folder rather than rsync it because I delete the content on my end as I consume it. My wife recently "helpfully" re-organized some of the directories in that folder and I found my unison process re-downloading big content that I actually already had because the directories had been "renamed". As unison saw it, some directories had been deleted and others added. So, I thought, "This could be a good addition to unison. Add a capability to compare newly deleted files to newly added files and detect that they are actually renames or moves across directories." I figured it would probably best be added as a new command-line option. I downloaded the source and started looking at it. I do not know ocaml, but was immediately impressed with the expressive power I could see. Unfortunately, I soon got lost in the code. Any hints on where to get started in the source to implement this? I'm currently working on learning ocaml, but I also want to get rolling on this project as soon as I can. regards, NT