On 03/04/2012 11:39 PM, Adam Spiers wrote:
   addcmd = echo "New untracked file %s"

Am I right in thinking that in this case, there is no synchronisation
issue to worry about?
synchronisation issue? what do you mean?
Synchronisation as in, race conditions between manual operations
on the filesystem vs. automated actions by dvcs-autosync.
Sorry, I seem to be choosing very confusing words for this discussion :-/

also, there are other callbacks which can run a 'git add' (such as a move which 
by default is git rm, git add, AFAIK)
Sure - I don't mind changes to existing files being autosynced,
but I want to manually add new files to the repo myself.

Unfortunately, the addcmd might get called when the inotify event handler can't properly figure out a move operation (I am still trying to catch that corner case as soon as I have 2-3 hours of uninterrupted hacking time on my hands, which is extremely seldom these days.....). However, your question got me thinking - it might be worth splitting that command into

modcmd = git add %s
addcmd = echo "Completely new file %s"

and distinguishing these two cases in code. Would that work for you?

PS: I still have about 5 emails on dvcs-autosync left in my inbox to properly address. I really hope to work on the coalescing code during the next 1-2 weeks and clean up a few of the remaining corner cases. At the moment, I trust dvcs-autosync with my big all-my-documents repo, but I am not completely happy with some of the cases triggered by temporary editor files or file move operations. Any specific bug reports - or even better, patches - are highly welcome at this time.

best regards,

vcs-home mailing list

Reply via email to