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

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

From: icm <ian.mockford_at_thalesgroup.com>
Date: Thu, 4 Mar 2010 08:49:49 +0000 (UTC)

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.
Received on 2010-03-04 09:50:39 CET

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