Re: dvcs-autosync+git is broken by design
On Mon, Mar 5, 2012 at 12:18 AM, Chanoch (Ken) Bloom kbl...@gmail.com wrote: On Sun, 2012-03-04 at 20:08 +0100, Dieter Plaetinck wrote: On Sun, 4 Mar 2012 17:19:25 + Adam Spiers vcs-h...@adamspiers.org wrote: I have not yet used dvcs-autosync in anger; what do you mean? It's a stretch from a military idiom. To say that a soldier never fired a shot in anger means that he never fired it in actual combat. It did fire it in drills and training, but not in battle. I didn't know that, thanks :) ___ vcs-home mailing list vcs-home@lists.madduck.net http://lists.madduck.net/listinfo/vcs-home
Re: dvcs-autosync+git is broken by design
On Sun, 4 Mar 2012 22:39:22 + Adam Spiers vcs-h...@adamspiers.org wrote: Sure - I don't mind changes to existing files being autosynced, but I want to manually add new files to the repo myself. Then you should change startupcmd = git add -A to git add -u, although that's vulnerable to race conditions: if you're updating files while 'git add -u' is running, it may abort. The wrapper script I showed should probably be expanded with '-u' and '-A' like support. Dieter ___ vcs-home mailing list vcs-home@lists.madduck.net http://lists.madduck.net/listinfo/vcs-home
Re: dvcs-autosync+git is broken by design
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, Rene ___ vcs-home mailing list vcs-home@lists.madduck.net http://lists.madduck.net/listinfo/vcs-home
Re: dvcs-autosync+git is broken by design
On Mon, Mar 5, 2012 at 10:06 AM, Dieter Plaetinck die...@plaetinck.be wrote: On Sun, 4 Mar 2012 22:39:22 + Adam Spiers vcs-h...@adamspiers.org wrote: Sure - I don't mind changes to existing files being autosynced, but I want to manually add new files to the repo myself. Then you should change startupcmd = git add -A to git add -u Consulting my .autosync, it seems I already did that. although that's vulnerable to race conditions: if you're updating files while 'git add -u' is running, it may abort. The wrapper script I showed should probably be expanded with '-u' and '-A' like support. Thanks for the heads-up. I don't think this is likely to be an issue with my anticipated usage patterns. ___ vcs-home mailing list vcs-home@lists.madduck.net http://lists.madduck.net/listinfo/vcs-home
Re: dvcs-autosync+git is broken by design
PS: in retrospect, my mail subject may sound worse than it should, sorry about that. ___ vcs-home mailing list vcs-home@lists.madduck.net http://lists.madduck.net/listinfo/vcs-home
Re: dvcs-autosync+git is broken by design
On Sun, Mar 4, 2012 at 4:35 PM, Dieter Plaetinck die...@plaetinck.be wrote: this seems to work okay so far in my 'notes' repo. Thanks a lot for sharing. I have not yet used dvcs-autosync in anger; however I had already decided during testing that I never wanted it to automatically 'git add' anything: addcmd = echo New untracked file %s Am I right in thinking that in this case, there is no synchronisation issue to worry about? ___ vcs-home mailing list vcs-home@lists.madduck.net http://lists.madduck.net/listinfo/vcs-home
Re: dvcs-autosync+git is broken by design
On Sun, 4 Mar 2012 17:19:25 + Adam Spiers vcs-h...@adamspiers.org wrote: I have not yet used dvcs-autosync in anger; what do you mean? 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? what do you try to do? also, there are other callbacks which can run a 'git add' (such as a move which by default is git rm, git add, AFAIK) Dieter ___ vcs-home mailing list vcs-home@lists.madduck.net http://lists.madduck.net/listinfo/vcs-home