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

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

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-02-20 04:06:54 CET

On Sun, 19 Feb 2006, nathan bullock wrote:

> If I have a directory structure such as /foo/foo (a file foo inside a
> directory foo) and I do:
>
> svn ls /foo
> I get output of:
> 875 nathan 56 Nov 01 19:48 foo
>
> If I do 'svn ls /foo/foo'
> I get output of:
> 875 nathan 56 Nov 01 19:48 foo
>
> So does this mean that the path '/foo/foo' is a subdirectory that
> contains a file 'foo' which is 56 bytes in size. Or that it is a file
> 'foo' which is 56 bytes in size. I think the output needs to be a
> little clearer.

This definitely differs from the output of 'ls':

  $ mkdir foo && touch foo/foo
  $ ls foo && ls foo/foo
  foo
  foo/foo
  $ ls -l foo && ls -l foo/foo
  total 0
  -rw-rw-r-- 1 dlr dlr 0 Feb 20 08:21 foo
  -rw-rw-r-- 1 dlr dlr 0 Feb 20 08:21 foo/foo

I'm dubious that Subversion should bother emulating this "path
listing" behavior of 'ls'. The output of 'svn ls' does not show the
requested parent path -- it always shows the contents of the requested
resource. Directories and files and differentiated between by the
presence of a trailing slash:

  $ svn ls versioned-dir/
  foo/
  bar/
  index.html

When invoked with the verbose option, file size is another
differentiator:

  $ svn ls --verbose src/versioncontrol/
     2390 madan Feb 17 19:47 foo/
     1485 cmpilato Jul 11 2005 bar/
     1790 madan 7173 Oct 05 15:53 index.html

Nathan, when a user explicitly requests a path, why should Subversion
repeat that path in its output?

> (I am using a little old of a client so this may have already been fixed.)

What version of Subversion are you using? 'svn --version' will tell
you.

Thanks, Dan

  • application/pgp-signature attachment: stored
Received on Mon Feb 20 03:37:23 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.