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

Question about 'svn propedit --revprop'

From: John Peacock <jpeacock_at_rowman.com>
Date: 2005-01-16 19:49:02 CET

I just converted a couple of my Perl modules from CVSNT to Subversion via
cvs2svn and ran into a little difficulty. The first revision that was imported
came in without the svn:author set (not normally a problem), which caused
gnuify-changelog.pl to gripe about the missing field.

When I went to add an author to that first rev, I came up against an annoying fact:

1) vim, by default, includes an EOL character on the end of a normal file, even
if you don't put one there yourself.

2) The subversion client happily pastes that value (including the \n) into the
repository, thus including a newline in svn:author.

3) 'svn propedit --revprop' doesn't support -F (so I cannot hardcode a file
without a newline).

4) for future reference, ':set binary' and ':set noendofline' will correctly
force vim to not add that \n when saving the file.

Is there any reason not to strip the newline when setting a revprop like
svn:author? We don't permit newlines in the author field any other time, so why
shouldn't we chop that off if the client hands us a non-compliant field. Should
propedit in general chomp off the trailing newline for any value being set like


John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Jan 16 19:50:42 2005

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.