Re: dvcs-autosync+git is broken by design

2012-03-05 Thread Adam Spiers
On Mon, Mar 5, 2012 at 10:06 AM, Dieter Plaetinck wrote: > On Sun, 4 Mar 2012 22:39:22 + > Adam Spiers 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" t

Re: dvcs-autosync+git is broken by design

2012-03-05 Thread René Mayrhofer
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 files

Re: dvcs-autosync+git is broken by design

2012-03-05 Thread Dieter Plaetinck
On Sun, 4 Mar 2012 22:39:22 + Adam Spiers 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 y

Re: dvcs-autosync+git is broken by design

2012-03-05 Thread Adam Spiers
On Mon, Mar 5, 2012 at 12:18 AM, Chanoch (Ken) Bloom wrote: > On Sun, 2012-03-04 at 20:08 +0100, Dieter Plaetinck wrote: >> On Sun, 4 Mar 2012 17:19:25 + >> Adam Spiers wrote: >>  I have not yet used dvcs-autosync in anger; >> what do you mean? > > It's a stretch from a military idiom. To say

Re: dvcs-autosync+git is broken by design

2012-03-04 Thread Chanoch (Ken) Bloom
On Sun, 2012-03-04 at 20:08 +0100, Dieter Plaetinck wrote: > On Sun, 4 Mar 2012 17:19:25 + > Adam Spiers 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 f

Re: dvcs-autosync+git is broken by design

2012-03-04 Thread Adam Spiers
On Sun, Mar 4, 2012 at 7:08 PM, Dieter Plaetinck wrote: > On Sun, 4 Mar 2012 17:19:25 + > Adam Spiers wrote: > >  I have not yet used dvcs-autosync in anger; > what do you mean? It's just an expression :) I mean I haven't used it seriously yet - only tested it. >>   addcmd = echo "New untr

Re: dvcs-autosync+git is broken by design

2012-03-04 Thread Dieter Plaetinck
On Sun, 4 Mar 2012 17:19:25 + Adam Spiers 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 me

Re: dvcs-autosync+git is broken by design

2012-03-04 Thread Adam Spiers
On Sun, Mar 4, 2012 at 4:35 PM, Dieter Plaetinck 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 =

Re: dvcs-autosync+git is broken by design

2012-03-04 Thread Dieter Plaetinck
some updates: 1) there was a typo in the original script, i also made various improvements. such as the ability to safely ignore missing files 2) git rm --cached also needs -f flag. you want to make sure the file is removed from the index once you get a delete inotify event. without this flag y

Re: dvcs-autosync+git is broken by design

2012-03-04 Thread Dieter Plaetinck
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

dvcs-autosync+git is broken by design

2012-03-04 Thread Dieter Plaetinck
I use dvcs-autosync+git on a daily basis, and contributed to the project. In my previous email (http://www.mail-archive.com/vcs-home@lists.madduck.net/msg00579.html) I found some issues wrt race conditions and handling FS events correctly with dvcs-autosync. Basically realizing dvcs-autosync b