You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Barry Scott <ba...@barrys-emacs.org> on 2003/11/14 18:03:41 UTC
Poor support for \ on windows from the C API?
I just found that if a pass paths with \ in them to the C API
some of the svn functions fail. For example
svn_error_t *error
= svn_wc_adm_probe_open (&adm_access, NULL, path, FALSE,
FALSE, pool);
will fail if pass l:\subversion\current\rapidsvn\src\svncpp\client.cpp
as the path. Inside it tries to split the path into its dir part and
fails as it looks for a '/'.
I also see paths returned out of svn C API with '/' in them that are
also problematic. Not all Win32 API allow the use of '/' in a path
sadly.
What is your plan for supporting OS path separators fully?
How do you advise this issue is handled before subversion API
accepts '/' on windows?
It seems that apr has few functions to help with this problem.
Barry
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Poor support for \ on windows from the C API?
Posted by "D.J. Heap" <dj...@shadyvale.net>.
C. Michael Pilato wrote:
> Barry Scott <ba...@barrys-emacs.org> writes:
>
>
>>What is your plan for supporting OS path separators fully?
>>How do you advise this issue is handled before subversion API
>>accepts '/' on windows?
>
>
> I thought we required (though we don't check this) all API functions
> to be called with UTF8-encoded, normalized-style (that's
> '/'-delimited) paths.
>
Yes, I believe so, and also canonized for case on case-insensitive
platforms. The commandline client uses a helper function
(subversion\libsvn_subr\opt.c:svn_opt_args_to_target_array) that uses
apr_filepath_merge, svn_path_cstring_to_utf8 and svn_path_canonicalize
to convert target paths for library calls. Urls are treated slightly
differently.
DJ
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Poor support for \ on windows from the C API?
Posted by Barry Scott <ba...@barrys-emacs.org>.
Do you mean to patch the problem on the inside of the C API or
as a function that the poor user as to call? I think the former
is the better way to go.
Barry
At 14-11-2003 20:23, you wrote:
>kfogel@collab.net wrote:
>>I thought the main thing here was that we always use the APR path
>>separator, which is '/', and that callers of our libraries need to
>>ensure they pass that. (And don't we have some helper funcs to take
>>care of it?) The command line client is such a caller, for example.
>>-K
>
>On Windows, at least, if you don't also get case canonized correctly for
>existing files, then a number of operations can fail.
>
>It would be nice if we had a function to do all the stuff that the command
>line client's target conversion does...would a patch to that effect be
>acceptable? I would think it would be a new function in
>libsvn_subr\path.c that just does what that chunk of
>svn_opt_args_to_target_array already does.
>
>Of course, it's not that hard for C client programs to make a helper
>function to do it also...but it might be more difficult for clients of the
>bindings...I'm not sure.
>
>DJ
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Poor support for \ on windows from the C API?
Posted by "C. Michael Pilato" <cm...@collab.net>.
"Arild Fines" <ar...@broadpark.no> writes:
> I never really understood why this isn't handled in
> libsvn_client. Is there any scenario in which you *don't* want to
> perform this conversion/canonization? If every client of the API
> basically needs to create it's own infrastructure to do this
> conversion anyway, wouldn't it be better to prevent this redundancy
> by having libsvn_client handling it?
Because libsvn_client isn't the only API that people write to, and
we're not interested in all our public APIs doing this work.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Poor support for \ on windows from the C API?
Posted by Branko Čibej <br...@xbc.nu>.
Arild Fines wrote:
>I never really understood why this isn't handled in libsvn_client. Is there
>any scenario in which you *don't* want to perform this
>conversion/canonization? If every client of the API basically needs to
>create it's own infrastructure to do this conversion anyway, wouldn't it be
>better to prevent this redundancy by having libsvn_client handling it?
>
>
We've been through this discussion before. The short answer is "no". To
get the long answer, think about how many different ways there are for
clients to represent paths. Which would we support?
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Poor support for \ on windows from the C API?
Posted by "D.J. Heap" <dj...@shadyvale.net>.
Arild Fines wrote:
[snip]
>
> I never really understood why this isn't handled in libsvn_client. Is there
> any scenario in which you *don't* want to perform this
> conversion/canonization? If every client of the API basically needs to
> create it's own infrastructure to do this conversion anyway, wouldn't it be
> better to prevent this redundancy by having libsvn_client handling it?
>
> --
> Arild
I'm not entirely sure, either...but I think it may be because libraries
want to call each other and so doing the utf8 conversion every time a
public function is called would not be good. Perhaps a core developer
can correct me or explain more fully?
DJ
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Re: Poor support for \ on windows from the C API?
Posted by solo turn <so...@yahoo.com>.
for post-1.0 i would really appreciate, if there could be a mechanism useful for commandline:
choose output style "/", or "\".
usage:
you do "svn up" and get:
U com\emacs\barry.java
and then you copy and paste this to something like:
svn log http://www.barryemacs.org/svn/rep/com\emacs\barry.java
which does not work.
or, in general, we use output paths for composing urls sent to the server.
-solo.
--- Barry Scott <ba...@barrys-emacs.org> wrote:
> The answer to my problem with \ is to use these pair of functions
> extern'ed in svn_path.h
>
> /** Convert @a path from the local style to the canonical internal style. */
> const char *svn_path_internal_style (const char *path, apr_pool_t *pool);
>
> /** Convert @a path from the canonical internal style to the local style. */
> const char *svn_path_local_style (const char *path, apr_pool_t *pool);
>
> Then all the assert will go away?
>
> Barry
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Re: Poor support for \ on windows from the C API?
Posted by "D.J. Heap" <dj...@shadyvale.net>.
Barry Scott wrote:
> The answer to my problem with \ is to use these pair of functions
> extern'ed in svn_path.h
>
> /** Convert @a path from the local style to the canonical internal
> style. */
> const char *svn_path_internal_style (const char *path, apr_pool_t *pool);
>
> /** Convert @a path from the canonical internal style to the local
> style. */
> const char *svn_path_local_style (const char *path, apr_pool_t *pool);
>
> Then all the assert will go away?
>
> Barry
>
Yes -- just make sure the path's case is correct and know that these
functions expect UTF8.
DJ
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Re: Poor support for \ on windows from the C API?
Posted by Barry Scott <ba...@barrys-emacs.org>.
The answer to my problem with \ is to use these pair of functions
extern'ed in svn_path.h
/** Convert @a path from the local style to the canonical internal style. */
const char *svn_path_internal_style (const char *path, apr_pool_t *pool);
/** Convert @a path from the canonical internal style to the local style. */
const char *svn_path_local_style (const char *path, apr_pool_t *pool);
Then all the assert will go away?
Barry
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Re: Poor support for \ on windows from the C API?
Posted by "D.J. Heap" <dj...@shadyvale.net>.
Branko Čibej wrote:
[snip]
>
> Obviously, doing the conversion in our libraries is not a particularly
> good idea.
>
Ok. If we drop utf8 encoding then I see little point in adding a
client-helper function -- all it can really do above what we already
have (svn_path_internal_style) is case canonicalization (is that a
word?) which only matters to case-insensitive platforms and is available
with APR.
Which is probably what you were getting at a while ago...sorry for the
wasted bandwidth. :)
DJ
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Re: Poor support for \ on windows from the C API?
Posted by Branko Čibej <br...@xbc.nu>.
D.J. Heap wrote:
> Branko Čibej wrote:
> [snip]
>
>> What of clients (especially Windows clients!) that use UCS-2 encoded
>> filenames?
>
>
> Hmm, good point, what do you suggest? Another function or take out
> the utf8 conversion and make sure clients know they still need to do
> that themselves? Or something else?
Obviously, doing the conversion in our libraries is not a particularly
good idea.
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Re: Poor support for \ on windows from the C API?
Posted by "D.J. Heap" <dj...@shadyvale.net>.
Branko Čibej wrote:
[snip]
> What of clients (especially Windows clients!) that use UCS-2 encoded
> filenames?
Hmm, good point, what do you suggest? Another function or take out the
utf8 conversion and make sure clients know they still need to do that
themselves? Or something else?
DJ
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Re: Poor support for \ on windows from the C API?
Posted by Branko Čibej <br...@xbc.nu>.
D.J. Heap wrote:
> Garrett Rooney wrote:
> [snip]
>
>>
>> If we're going to go down this path we really need to document
>> precisely what this function is converting FROM. As it stands it
>> seems like some magical function that converts from whatever the hell
>> encoding you pass it into what Subversion expects internally, and
>> that just can't work in all cases.
>>
>> -garrett
>
>
> Good point, it needs to be documented more clearly -- specifically
> that it expects the locale-specific
What of clients (especially Windows clients!) that use UCS-2 encoded
filenames?
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Re: Poor support for \ on windows from the C API?
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Nov 16, 2003, at 12:51 PM, D.J. Heap wrote:
> Garrett Rooney wrote:
> [snip]
>> If we're going to go down this path we really need to document
>> precisely what this function is converting FROM. As it stands it
>> seems like some magical function that converts from whatever the hell
>> encoding you pass it into what Subversion expects internally, and
>> that just can't work in all cases.
>> -garrett
>
> Good point, it needs to be documented more clearly -- specifically
> that it expects the locale-specific encoding and that urls be
> uri-encoded. It will convert to utf8 and normalize on '/' for
> filesystem path separators, and use the correct case for existing
> files on case-insensitive platforms.
>
> Do you (or anyone) feel it is not really a worthwhile addition? It
> seems so to me, but I don't have strong feelings about it -- clients
> can get the job done, it's just a bit of a hassle.
I have no problem with us providing this kind of function (and one to
perform the reverse translation), as long as we make it clear exactly
what it is doing. Assuming we do that, it seems like it will make life
considerably easier for client writers.
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Re: Poor support for \ on windows from the C API?
Posted by "D.J. Heap" <dj...@shadyvale.net>.
Garrett Rooney wrote:
[snip]
>
> If we're going to go down this path we really need to document precisely
> what this function is converting FROM. As it stands it seems like some
> magical function that converts from whatever the hell encoding you pass
> it into what Subversion expects internally, and that just can't work in
> all cases.
>
> -garrett
Good point, it needs to be documented more clearly -- specifically that
it expects the locale-specific encoding and that urls be uri-encoded.
It will convert to utf8 and normalize on '/' for filesystem path
separators, and use the correct case for existing files on
case-insensitive platforms.
Do you (or anyone) feel it is not really a worthwhile addition? It
seems so to me, but I don't have strong feelings about it -- clients can
get the job done, it's just a bit of a hassle.
DJ
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Re: Poor support for \ on windows from the C API?
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Nov 16, 2003, at 11:01 AM, D.J. Heap wrote:
> Barry Scott wrote:
>> DJ,
>> There is a need for two functions. One to use when supplying input,
>> the
>> other to take output from svn and convert into native form.
>> Maybe the output path version is simply a function that replaces each
>> '/' with '\'? I believe I always know by context if its a URL or path
>> and can avoid calling on a URL trivially.
>> Barry
>
> We already have those...svn_path_internal_style and
> svn_path_local_style -- but they don't do case canonization or utf8
> conversion or handle urls. They seem to be for internal use mostly.
> Perhaps we should make them more functional, though?
>
> Here's a patch for converting input paths for the libraries. I agree
> that we probably need one for the other direction, but I would like to
> see what people think about this one.
>
> Any objections or thoughts? If it looks like the direction is ok,
> then I'll make a function for the other direction and clean them up a
> bit (to use subpools for temp stuff mostly) and submit a real one.
>
> DJ
> Index: subversion/include/svn_path.h
> ===================================================================
> --- subversion/include/svn_path.h (revision 7765)
> +++ subversion/include/svn_path.h (working copy)
> @@ -172,6 +172,14 @@
> const char *svn_path_canonicalize (const char *path, apr_pool_t
> *pool);
>
>
> +/** Convert @a raw_target path or url to the library required form
> and return
> + * the results in @a *target, allocated in @a pool.
> + */
> +svn_error_t *
> +svn_path_convert_target (const char** target, const char *raw_target,
> + apr_pool_t *pool);
>
If we're going to go down this path we really need to document
precisely what this function is converting FROM. As it stands it seems
like some magical function that converts from whatever the hell
encoding you pass it into what Subversion expects internally, and that
just can't work in all cases.
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
[PATCH] Re: Poor support for \ on windows from the C API?
Posted by "D.J. Heap" <dj...@shadyvale.net>.
Barry Scott wrote:
> DJ,
>
> There is a need for two functions. One to use when supplying input, the
> other to take output from svn and convert into native form.
>
> Maybe the output path version is simply a function that replaces each
> '/' with '\'? I believe I always know by context if its a URL or path
> and can avoid calling on a URL trivially.
>
> Barry
>
We already have those...svn_path_internal_style and svn_path_local_style
-- but they don't do case canonization or utf8 conversion or handle
urls. They seem to be for internal use mostly. Perhaps we should make
them more functional, though?
Here's a patch for converting input paths for the libraries. I agree
that we probably need one for the other direction, but I would like to
see what people think about this one.
Any objections or thoughts? If it looks like the direction is ok, then
I'll make a function for the other direction and clean them up a bit (to
use subpools for temp stuff mostly) and submit a real one.
DJ
Re: Poor support for \ on windows from the C API?
Posted by Barry Scott <ba...@barrys-emacs.org>.
DJ,
There is a need for two functions. One to use when supplying input, the
other to take output from svn and convert into native form.
Maybe the output path version is simply a function that replaces each
'/' with '\'? I believe I always know by context if its a URL or path
and can avoid calling on a URL trivially.
Barry
At 15-11-2003 01:26, D.J. Heap wrote:
>Barry Scott wrote:
>>Greg, I think you are right a simpler client API is required. Which
>>is why rapidsvn and pysvn are based on the svncpp interface.
>>I fail to see why you think supporting unix and windows paths is
>>so hard. Python has solved the problem, My Emacs has solved the
>>problem and lots of other portable apps. I hope this some thing
>>that gets fixes after 1.0 is out.
>>Sigh and I just found another assert for input error. Seems I
>>must not have a trailing / on a path.
>>Barry
>
>I believe it's the utf8 conversion that is problematic, not the path style
>differences -- if libraries call each other they can't keep utf8
>converting the path and so would have to deconvert it first, as Greg mentioned.
>
>The function I pointed out earlier handles all the cases you've had
>trouble with so far. I'll put together a patch that makes that code a
>public function tomorrow and see if it's acceptable -- it should be a
>rather small change and would make clients lives easier.
>
>DJ
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Poor support for \ on windows from the C API?
Posted by "D.J. Heap" <dj...@shadyvale.net>.
Barry Scott wrote:
> Greg, I think you are right a simpler client API is required. Which
> is why rapidsvn and pysvn are based on the svncpp interface.
>
> I fail to see why you think supporting unix and windows paths is
> so hard. Python has solved the problem, My Emacs has solved the
> problem and lots of other portable apps. I hope this some thing
> that gets fixes after 1.0 is out.
>
> Sigh and I just found another assert for input error. Seems I
> must not have a trailing / on a path.
>
> Barry
I believe it's the utf8 conversion that is problematic, not the path
style differences -- if libraries call each other they can't keep utf8
converting the path and so would have to deconvert it first, as Greg
mentioned.
The function I pointed out earlier handles all the cases you've had
trouble with so far. I'll put together a patch that makes that code a
public function tomorrow and see if it's acceptable -- it should be a
rather small change and would make clients lives easier.
DJ
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: Poor support for \ on windows from the C API?
Posted by Barry Scott <ba...@barrys-emacs.org>.
Greg, I think you are right a simpler client API is required. Which
is why rapidsvn and pysvn are based on the svncpp interface.
I fail to see why you think supporting unix and windows paths is
so hard. Python has solved the problem, My Emacs has solved the
problem and lots of other portable apps. I hope this some thing
that gets fixes after 1.0 is out.
Sigh and I just found another assert for input error. Seems I
must not have a trailing / on a path.
Barry
At 14-11-2003 22:05, Greg Hudson wrote:
>On Fri, 2003-11-14 at 16:52, Arild Fines wrote:
> > I never really understood why this isn't handled in libsvn_client. Is there
> > any scenario in which you *don't* want to perform this
> > conversion/canonization? If every client of the API basically needs to
> > create it's own infrastructure to do this conversion anyway, wouldn't it be
> > better to prevent this redundancy by having libsvn_client handling it?
>
>Mainly because we haven't wanted libsvn_client to be radically different
>from other libraries. (And we can't do that kind of conversion in
>libsvn_wc or libsvn_ra interfaces, because then libsvn_client would have
>to de-convert before calling those libraries, and that would hurt a
>lot.)
>
>I'm not sure I agree; I often think that libsvn_client functions
>*should* be radically simplified: no pool parameters, native path style
>and charset, and so on. I'm particularly concerned that the authors of
>some language bindings are using a simplified interface to libsvn_client
>functions, such that we offer slightly different functionaliy for
>different languages. But I think I'm in the minority on this point.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: Poor support for \ on windows from the C API?
Posted by Greg Hudson <gh...@MIT.EDU>.
On Fri, 2003-11-14 at 16:52, Arild Fines wrote:
> I never really understood why this isn't handled in libsvn_client. Is there
> any scenario in which you *don't* want to perform this
> conversion/canonization? If every client of the API basically needs to
> create it's own infrastructure to do this conversion anyway, wouldn't it be
> better to prevent this redundancy by having libsvn_client handling it?
Mainly because we haven't wanted libsvn_client to be radically different
from other libraries. (And we can't do that kind of conversion in
libsvn_wc or libsvn_ra interfaces, because then libsvn_client would have
to de-convert before calling those libraries, and that would hurt a
lot.)
I'm not sure I agree; I often think that libsvn_client functions
*should* be radically simplified: no pool parameters, native path style
and charset, and so on. I'm particularly concerned that the authors of
some language bindings are using a simplified interface to libsvn_client
functions, such that we offer slightly different functionaliy for
different languages. But I think I'm in the minority on this point.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: Poor support for \ on windows from the C API?
Posted by Arild Fines <ar...@broadpark.no>.
D.J. Heap wrote:
> kfogel@collab.net wrote:
>> I thought the main thing here was that we always use the APR path
>> separator, which is '/', and that callers of our libraries need to
>> ensure they pass that. (And don't we have some helper funcs to take
>> care of it?) The command line client is such a caller, for example.
>>
> On Windows, at least, if you don't also get case canonized correctly for
> existing files, then a number of operations can fail.
>
> It would be nice if we had a function to do all the stuff that the
> command line client's target conversion does...would a patch to that
> effect be acceptable? I would think it would be a new function in
> libsvn_subr\path.c that just does what that chunk of
> svn_opt_args_to_target_array already does.
>
> Of course, it's not that hard for C client programs to make a helper
> function to do it also...but it might be more difficult for clients of
> the bindings...I'm not sure.
I never really understood why this isn't handled in libsvn_client. Is there
any scenario in which you *don't* want to perform this
conversion/canonization? If every client of the API basically needs to
create it's own infrastructure to do this conversion anyway, wouldn't it be
better to prevent this redundancy by having libsvn_client handling it?
--
Arild
AnkhSVN: http://ankhsvn.tigris.org
Blog: http://ankhsvn.com/blog
RSS: http://ankhsvn.com/blog/Rss.aspx
King Crimson lives in different bodies at different times and the
particular form which the group takes changes. When music appears,
which only King Crimson can play then, sooner or later, King Crimson
appears to play the music
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Poor support for \ on windows from the C API?
Posted by "D.J. Heap" <dj...@shadyvale.net>.
kfogel@collab.net wrote:
> I thought the main thing here was that we always use the APR path
> separator, which is '/', and that callers of our libraries need to
> ensure they pass that. (And don't we have some helper funcs to take
> care of it?) The command line client is such a caller, for example.
>
> -K
On Windows, at least, if you don't also get case canonized correctly for
existing files, then a number of operations can fail.
It would be nice if we had a function to do all the stuff that the
command line client's target conversion does...would a patch to that
effect be acceptable? I would think it would be a new function in
libsvn_subr\path.c that just does what that chunk of
svn_opt_args_to_target_array already does.
Of course, it's not that hard for C client programs to make a helper
function to do it also...but it might be more difficult for clients of
the bindings...I'm not sure.
DJ
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Poor support for \ on windows from the C API?
Posted by Barry Scott <ba...@barrys-emacs.org>.
O.K. I understand and will work around the problem on input and output.
Do you plan to fix your file handling post 1.0 to use native path rules?
The other path related problem I have to defend against is the fact that
if a path of "." if passed into svn you get you an assert.
> pysvn info .
Assertion failed: is_canonical (base, blen), file
l:\subversion\subversion-0.32.1\subversion\libsvn_subr\path.c, line 156
Barry
At 14-11-2003 19:04, kfogel@collab.net wrote:
>I thought the main thing here was that we always use the APR path
>separator, which is '/', and that callers of our libraries need to
>ensure they pass that. (And don't we have some helper funcs to take
>care of it?) The command line client is such a caller, for example.
>
>-K
>
>
>Barry Scott <ba...@barrys-emacs.org> writes:
> > Do you have a apr or svn function to do the normalising
> > both ways? Or this a burden on all used of the C API to
> > write?
> >
> > BArry
> >
> > At 14-11-2003 18:16, C. Michael Pilato wrote:
> > >Barry Scott <ba...@barrys-emacs.org> writes:
> > >
> > > > What is your plan for supporting OS path separators fully?
> > > > How do you advise this issue is handled before subversion API
> > > > accepts '/' on windows?
> > >
> > >I thought we required (though we don't check this) all API functions
> > >to be called with UTF8-encoded, normalized-style (that's
> > >'/'-delimited) paths.
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> > >For additional commands, e-mail: dev-help@subversion.tigris.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> > For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Poor support for \ on windows from the C API?
Posted by kf...@collab.net.
I thought the main thing here was that we always use the APR path
separator, which is '/', and that callers of our libraries need to
ensure they pass that. (And don't we have some helper funcs to take
care of it?) The command line client is such a caller, for example.
-K
Barry Scott <ba...@barrys-emacs.org> writes:
> Do you have a apr or svn function to do the normalising
> both ways? Or this a burden on all used of the C API to
> write?
>
> BArry
>
> At 14-11-2003 18:16, C. Michael Pilato wrote:
> >Barry Scott <ba...@barrys-emacs.org> writes:
> >
> > > What is your plan for supporting OS path separators fully?
> > > How do you advise this issue is handled before subversion API
> > > accepts '/' on windows?
> >
> >I thought we required (though we don't check this) all API functions
> >to be called with UTF8-encoded, normalized-style (that's
> >'/'-delimited) paths.
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> >For additional commands, e-mail: dev-help@subversion.tigris.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Poor support for \ on windows from the C API?
Posted by Barry Scott <ba...@barrys-emacs.org>.
Do you have a apr or svn function to do the normalising
both ways? Or this a burden on all used of the C API to
write?
BArry
At 14-11-2003 18:16, C. Michael Pilato wrote:
>Barry Scott <ba...@barrys-emacs.org> writes:
>
> > What is your plan for supporting OS path separators fully?
> > How do you advise this issue is handled before subversion API
> > accepts '/' on windows?
>
>I thought we required (though we don't check this) all API functions
>to be called with UTF8-encoded, normalized-style (that's
>'/'-delimited) paths.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Poor support for \ on windows from the C API?
Posted by "C. Michael Pilato" <cm...@collab.net>.
Barry Scott <ba...@barrys-emacs.org> writes:
> What is your plan for supporting OS path separators fully?
> How do you advise this issue is handled before subversion API
> accepts '/' on windows?
I thought we required (though we don't check this) all API functions
to be called with UTF8-encoded, normalized-style (that's
'/'-delimited) paths.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org