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

Re: svn ls -r BASE contacts server

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-02-05 23:58:45 CET

On Feb 5, 2005, at 4:20 PM, Brock Janiczak wrote:

> Mark Phippard wrote:
> I think that svn ls always contacts the server. If you provide a WC
> to the
> command, it only uses the WC to obtain the URL and revision.
>
> http://svnbook.red-bean.com/en/1.1/re14.html
>
> hmm, that is a real shame.  I don't relly understand why some
> commands contact the server while others don't.  This one could easily
> use the WC to get the list.

Not at all, that would be completely incorrect.

The purpose of 'svn ls' is to *browse the repository*, just as Mark
said. It's not for listing the contents of a WC. 'ls' already does
that. 'svn ls' *always* shows a repository listing. It's like the
TortoiseSVN 'repos browser' feature.

We could have have made 'svn ls WC' throw an error... perhaps that
would clear the confusion. But instead we went for consistency. Just
like every svn subcommand which requires a URL (like 'svn log', for
example), if you run the 'ls' command on a WC, it will use the WC's URL
and revision.

Finally, keep in mind that 'svn ls -r REV-of-WC URL-of-WC' (which is
what the command is doing) is *not* the same as just listing the
contents of the working copy! Working copies are often mixed
revisions, and have extra entries or are missing entries.

If you're trying to get a listing of the working copy, use 'ls' or
equivalent. If you want to get a 'versioned' listing of the working
copy, use 'svn status [-v]'.
Received on Sun Feb 6 09:58:45 2005

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

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