Improved file/directory selection

I'm finding the current method of specifying a list of files/dirs to include/exclude to be difficult to configure how I would like. For example, I have a large directory hierarchy and I want to exclude all directories that are called 'log' except for two of them. What I've ended up doing is creating one profile that excludes 'log' and another two to specifically sync each of the additional 'log' directories. Maybe there is a better way but I haven't been able to figure it out. I tried putting "/dir1/log /dir2/log" in "include" and "log" in exclude but that deletes everything else. I've read the description here https://acrosync.com/vanilla/index.php?p=/discussion/10/a-quick-guide-to-acrosync-for-windows but it still leaves a couple of questions:
  • What happens if I have entries in both "include" and "exclude"? The UI allows it but it's not obvious what the behaviour will be,
  • What happens if two profiles overlap, does that cause a race condition?
I'm wondering if it would be possible to have a GUI to select what directories (and files?) to include/exclude, instead of having to type them in as is required currently. That would really help with user friendliness and ease of configuration though I imagine it's quite a bit of work to implement properly.


Comments

  • In the current implementation, exclude patterns take precedence over include patterns (if a path matches an exclude pattern it will be excluded even if it also matches an include pattern), so I can't think of a better workaround than what you did.

    The reason include/exclude patterns were designed this way was that I intended to create a simple implementation compatible with rsync while allowing easy configurations for most frequent use cases (for example no need to enter - and +), but obviously it fails at more complicated ones like yours.  I think the solution is to support in a future version another way of specifying include/exclude patterns closer to what rsync does.

    As for your other question, no, there won't be a race condition because profiles are executed sequentially -- there is only one running profile at any time.
  • Forgot to tell you that the per-profile key for suppressing auto sync notifications in version 0.94 is "SuppressAutoSyncNotification".  Adding this key with a value of '1' will disable notifications caused by auto-saves.
  • edited September 2014
    Thanks for the clarification and I'm pleased to hear there's no race to worry about. I guess the ideal goal would be to eventually have two approaches: One that presented a user-friendly GUI (a directory tree similar to the existing "Remote Directory" selection) where users could choose to include and exclude particular directories, and another "advanced" mode where full rsync syntax was supported via a text field. Together that should cater for almost everyone. I realise it's a lot of work though and now that I understand the existing behaviour better I'm happy enough as is. The only real downside to multiple profiles is that if the server connection goes down, each profile complains and needs to be restarted individually. I can live with that.


    Thanks also for the tip on the registry key, I'd meant to ask about that! I've just tried it and it works a treat. (For others wanting to use this on Windows, add a REG_SZ (String) value called SuppressAutoSyncNotification in HKEY_CURRENT_USER/Software/Acrosync/Profile_<n> using regedit.exe. You'll have to exit and restart Acrosync before the changes take effect).
Sign In or Register to comment.