I know someone completed this but I''m not sure the hows and whats of it. Can someone put up a doc or email about this?
> I know someone completed this but I''m not sure the hows and whats of it. > Can someone put up a doc or email about this?I just added https://reductivelabs.com/trac/puppet/wiki/SubversionCommitHooks (I''m obviously doing something wrong with the rst markup, so if someone could fix it, I''d appreciate it - I can cheat once it''s fixed ;)). With the way subversion works, each check-in transaction will only give you the changed files. The script gets the list of changed files, and then cats them out of svn to temp files and parse checks those. It will try all files, collect the errors and report back for all of them. It''s not pretty, but it''s a start. --mac
On Mar 29, 2007, at 12:18 AM, Chris McEniry wrote:>> I know someone completed this but I''m not sure the hows and whats >> of it. >> Can someone put up a doc or email about this? > > I just added > > https://reductivelabs.com/trac/puppet/wiki/SubversionCommitHooks > > (I''m obviously doing something wrong with the rst markup, so if > someone > could fix it, I''d appreciate it - I can cheat once it''s fixed ;)). > > With the way subversion works, each check-in transaction will only > give > you the changed files. The script gets the list of changed files, and > then cats them out of svn to temp files and parse checks those. It > will try all files, collect the errors and report back for all of > them. > > It''s not pretty, but it''s a start.I fixed your RST. -- Love is a snowmobile racing across the tundra and then suddenly it flips over, pinning you underneath. At night, the ice weasels come. --Matt Groening --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
When I was writing my variant of the commit hook, I discovered svn has a bug (feature? :) that if stderr is too big, the commit hook will pause indefinitely. So, returning all of the error stuff in one pass rather then stopping at the first file with an error may not be as safe. Kevin On Thu, 2007-03-29 at 15:33 -0500, Luke Kanies wrote:> On Mar 29, 2007, at 12:18 AM, Chris McEniry wrote: > > >> I know someone completed this but I''m not sure the hows and whats > >> of it. > >> Can someone put up a doc or email about this? > > > > I just added > > > > https://reductivelabs.com/trac/puppet/wiki/SubversionCommitHooks > > > > (I''m obviously doing something wrong with the rst markup, so if > > someone > > could fix it, I''d appreciate it - I can cheat once it''s fixed ;)). > > > > With the way subversion works, each check-in transaction will only > > give > > you the changed files. The script gets the list of changed files, and > > then cats them out of svn to temp files and parse checks those. It > > will try all files, collect the errors and report back for all of > > them. > > > > It''s not pretty, but it''s a start. > > I fixed your RST. > > -- > Love is a snowmobile racing across the tundra and then suddenly it > flips over, pinning you underneath. At night, the ice weasels come. > --Matt Groening > --------------------------------------------------------------------- > Luke Kanies | http://reductivelabs.com | http://madstop.com > > > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users
> When I was writing my variant of the commit hook, I discovered svn has a > bug (feature? :) that if stderr is too big, the commit hook will pause > indefinitely. So, returning all of the error stuff in one pass rather > then stopping at the first file with an error may not be as safe.Strange, I think I noticed that when I was working up the commit script, but I didn''t notice it enough to pick up on why. I''m assuming it''s a buffer issue, but eh. Do you happen to immediately know what the limit it? I can look or test, but figured I''d ask first. If I know the limit, I can update the commit hook I posted to truncate if needbe. Thanks, --mac
If I had to venture a guess, I''d say its whatever your OS''s pipe buffer size, but I don''t know for sure. I suspect svn just waits for a return code, and the app is blocking until svn reads from the buffer that never happens. If that''s really the case, I think you can check to see if the write will block and just exit at that point. Kevin On Thu, 2007-03-29 at 15:56 -0700, Chris McEniry wrote:> > When I was writing my variant of the commit hook, I discovered svn has a > > bug (feature? :) that if stderr is too big, the commit hook will pause > > indefinitely. So, returning all of the error stuff in one pass rather > > then stopping at the first file with an error may not be as safe. > > Strange, I think I noticed that when I was working up the commit script, > but I didn''t notice it enough to pick up on why. I''m assuming it''s a > buffer issue, but eh. > > Do you happen to immediately know what the limit it? I can look or > test, but figured I''d ask first. If I know the limit, I can update > the commit hook I posted to truncate if needbe. > > Thanks, > --mac > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users