Hello,
On 2025/06/16 18:06, 管理员 wrote:
> If the file name ends with a space, it cannot be save to a file then use the
> --targets options:
>
> For example:
>
> Files:
>
> /Users/abc/trunk/aaa
> /Users/abc/trunk/aa // ends with a space.
>
> create a file: /Users/abc/trunk/1.txt, contents:
>
> /Users/abc/trunk/aaa
> /Users/abc/trunk/aa // ends with a space.
>
> execute svn command:
>
> svn add --targets /Users/abc/trunk/1.txt
>
> svn: warning: W155010: '/Users/abc/trunk/aa' not found
> svn: E200009: Could not add all targets because some targets don't exist
> svn: E200009: Illegal target for the requested operation
> Subversion client version: 1.14.5
> Subversion server version: 1.14.5
> OS: macOS 15.5
I could confirm the issue. With --targets option, the content
of the target file is splited by new line, and each lines are
trimed trailing white space(s).
The behaviour can be changed with following patch, but I have no
confidence that the current behaviour is intended or not.
[[[
Index: subversion/svn/svn.c
===================================================================
--- subversion/svn/svn.c (revision 1926152)
+++ subversion/svn/svn.c (working copy)
@@ -2409,7 +2409,7 @@
SVN_ERR(svn_stringbuf_from_file2(&buffer, utf8_opt_arg, pool));
SVN_ERR(svn_utf_stringbuf_to_utf8(&buffer_utf8, buffer, pool));
opt_state.targets = svn_cstring_split(buffer_utf8->data, "\n\r",
- TRUE, pool);
+ FALSE, pool);
}
break;
case opt_force:
]]]
Note: Of course, file names endts with spaces can be add
by passing exact the file name to svn add, e.g. with most
shells on Unix like OS,
$ svn add '/Users/abc/trunk/aa '
or
$ svn add /Users/abc/trunk/aa\
~ one space here.
Cheers,
--
Yasuhito FUTATSUKI <futat...@yf.bsdclub.org>