I am attempting to set a revprop using svnadmin setrevprop /path/to/repos propname propfile -r 0. Each time I set this property a trailing newline gets appended to the value.
My propfile does not contain any newlines at all. (that I am aware of)
This is svn 1.6.11, running the Collabnet Solaris binaries.
If it matters I used vi in Solaris to edit the file . Vi seems to claim that the file has no newlines at all.
When I do a propget I see this:
my prop value
prompt#
I also confirmed this by dumping revision 0 out of the repository.
The newline does make a big difference, as I am trying to set the svn:sync-from-url property to set up a mirror repos. When I try to run synchronize i get this as the output
svnsync: No repository found in 'svn://myserver/myrepos
'
(Note the newline in the output; thank goodness svn includes the quotes or I might never have figured this out!)
It’s a Unix convention that editors put an extra LF at the end of the file. That prevents the shell prompt from appearing on the last line of the file when displaying its contents using
catamong other things.To make sure this is happening run
od -t x1 propfileand you’ll see that the last character is0a.If that’s the case you can use
echo -n text > propfileto write some text in the file without adding that extra LF at the end.You can then pass that file to
svnadmin setrevprop.