[CentOS] unable to check in code to svn when files contain spaces or characters

Mon Jan 24 12:55:13 UTC 2011
Nico Kadel-Garcia <nkadel at gmail.com>

On Mon, Jan 24, 2011 at 6:57 AM, Agnello George
<agnello.dsouza at gmail.com> wrote:
> i got a file like this and i need add it into my svn
>
> admin/upload_data/FINAL  leg  list  19_01_2010 to  agar  (Merged data in
> one).xls

First: don't do this, seriously. You're begging for pain in your
scripting to handle such files from now on.


> i as able to add other files with space using the following command :
>
>  svn st |grep ? |cut -c8- |sed 's/ /\\ /g' |xargs svn add

Second, stop playing with xargs in command line handling. It is not your friend.

You should be able to do "svn add "admin/upload_data/FINAL leg list

    svn add "admin/upload_data/FINAL  leg  list  19_01_2010 to  agar
(Merged data in one).xls"

> however there are some special characters like ( ) +#@  that svn cannot
> understand as the full path of  the file .

Well, *YES*. You're going to have difficulty getting characters that
mean things to the subversion somponent numbering scheme or the
Subversion URL scheme, such as '@', '/', and '#' into the actual
filenames. Even if you can leverage your way past this by stuffing in
enough backslashes, you're effectively destabilizing your Subversion
repository and scripting to handle it, especially post-commit scripts.

> can some one help me in this in perl or in shell .
>
> --
> Regards
> Agnello D'souza

Can you first explain why you want, or need,  to do this?