You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by John Peacock <jp...@rowman.com> on 2005/01/16 18:49:02 UTC

Question about 'svn propedit --revprop'

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 
that?

John

-- 
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

Re: Question about 'svn propedit --revprop'

Posted by John Peacock <jp...@rowman.com>.
Philip Martin wrote:
> 
> How would -F work with propedit?  Perhaps you wanted propset?

Doh!  ENOTENOUGHSLEEP

Doesn't change the basic question of whether stripping terminal newlines would 
be a Good Thing(TM), but at least I know a better way around the limitation...

John

-- 
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

Re: Question about 'svn propedit --revprop'

Posted by Philip Martin <ph...@codematters.co.uk>.
John Peacock <jp...@rowman.com> writes:

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

How would -F work with propedit?  Perhaps you wanted propset?

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org