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

Re: Filenames with trailing newlines wreak havoc

From: Ben Reser <ben_at_reser.org>
Date: Tue, 26 Mar 2013 12:03:43 -0700

On Tue, Mar 26, 2013 at 9:29 AM, Daniel Shahaf <d.s_at_daniel.shahaf.name> wrote:
> Fair enough. Infra would be interested in a pre-commit hook script that
> checks for control characters in filenames and aborts the transaction.

Use validate-files.py in the trunk tools/hook-scripts with a conf file like so:

* = newlines

# Running any rule against a file with a newline in it will fail
because we break the svnlook output by newlines.
# So the filename will appear as non-existent. Hook will fail with an
error about the file not existing in the transaction and the commit
will fail.
# It's not pretty but it stops the problem.
pattern = *
command = 'exit 0'
Received on 2013-03-26 20:04:17 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.