[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Output of 'svn ls' does not explicitly indicate directory path

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2006-02-23 01:57:22 CET

Barry Scott wrote:
> On Feb 22, 2006, at 17:11, Julian Foad wrote:
>
>> 1. Prefix the requested path to each file name. The output would
>> then look like the relevant portion of "svn ls -R". This is also
>> equivalent to the way "svn status" and "svn proplist" behave. (If
>> this is done just for disambiguating the multi-target case, any
>> common prefix could be removed, but I think it would be better to
>> keep it.)
[...]
>> I propose we fix the multiple-targets ambiguity, and do so in manner
>> (1).
>>
>> With that done, we'd be in a stronger position to argue for the same
>> behaviour to apply to the former case of listing a single item, but
>> we may not want to do that, or at least not by default.
>
> It would be great to get a fix to this problem.

The multi-target ambiguity or the single-file-in-same-named-dir ambiguity or
both? It would be interesting and useful to know which of these you find
bothersome.

> Please fix in svn_client_ls not just workaround in svn client.

Er, well, no, I don't think so. The current version of those functions is
called svn_client_list() and it reports the information that is required.
(Note that svn_client_ls{,2,3} are all deprecated and won't change, but I think
they also report enough information.) I don't see that it is broken so I don't
see that it needs fixing. Did you want some particular new behaviour from it?
  You suggested a flag to "turn on the unambiguous path name behavior" but
didn't say what this behaviour would be.

It reports the absolute path within the repository corresponding to the path it
was asked to list, and, if that is a directory, the relative names of the
children (and grandchildren if recursive). Thus it doesn't directly report the
path that you want to print, but the caller knows how the targets were
specified on the command line, and the caller can and should choose how to
display the results that are reported, generally by trimming off a certain
portion from the beginning of the path.

Note that the biggest and first problem to solve is the multi-target issue, and
this is necessarily an issue for the caller to solve, since this API only takes
a single path.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Feb 23 01:57:43 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.