[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svnlook diff or contrib hooks enforcer problems with empty files (was Re: contrib hook enforcer throws on empty renamed file)

From: Stefan Sperling <stsp_at_elego.de>
Date: Thu, 4 Mar 2010 11:19:00 +0100

On Thu, Mar 04, 2010 at 08:49:49AM +0000, icm wrote:
> Ian Mockford writes:
>
> > [...]
> > > The problem seems to be that enforcer always expects a "diff" output
> > > following the file rename, but if the file is empty, svnlook diff
> > > shows no diff output bars.
> > >
> > > (enforcer using svnlook version 1.6.9 (r901367), on Windows XP)
> > >
> > > Can anyone confirm this is a bug?
> > > Or a possible change to svnlook output format?
>
> My summary of the situation, for the record:
>
> contrib\hooks\enforcer seems to struggle with empty files when using svnlook
> v1.6.9.
>
> I can't find if/how/where or rather, by whom, the contribs are maintained.
>
> v1.6.5 includes this change:
> "make 'svnlook diff' show empty added or deleted files (r38458)"
> - so that might be where the change happened. But r38458 description
> includes the following:
>
> "If we don't print any output for empty added or deleted files,
> hook scripts relying on 'svnlook diff' to gather information about
> files affected by a revision can get confused.
> E.g. contrib/hook-scripts/enforcer is known to be affected,
> it cannot enforce rules on added empty files."
>
> I can't find any record of "E.g. contrib/hook-scripts/enforcer is known to be
> affected".
>
> Hopefully one day someone who knows more about it will be able to confirm this
> as a problem in either svnlook or the enforcer script and possibly and fix one
> of them. If I could be sure that it was enforcer rather than svnlook that was
> wrong I could have a go at fixing it myself.
>

I made this fix to svnlook in 1.6.5.

I think the user who reported this problem reported it on IRC,
so you'd have to search the log of the #svn IRC channel to find
a record of the statement that "enforcer is known to be affected".

I had the user test the patch and has said it fixed his particular problem.

From what you describe it sounds like enforcer is still broken in
some way and needs some kind of fix. I'd encourage you to try to fix
this yourself and submit a patch if you can.

Thanks,
Stefan
Received on 2010-03-04 11:19:41 CET

This is an archived mail posted to the Subversion Dev mailing list.