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

Re: svn commit: rev 2786 - trunk/subversion/clients/cmdline trunk/doc/handbook

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-07-30 12:16:09 CEST

rooneg@tigris.org writes:

> Modified: trunk/subversion/clients/cmdline/ls-cmd.c
> ==============================================================================
> --- trunk/subversion/clients/cmdline/ls-cmd.c (original)
> +++ trunk/subversion/clients/cmdline/ls-cmd.c Mon Jul 29 19:55:32 2002
> @@ -36,7 +36,7 @@
> /*** Code. ***/
>
> static int
> -compare_cstring_as_paths (const svn_item_t *a, const svn_item_t *b)
> +compare_items_as_paths (const svn_item_t *a, const svn_item_t *b)
> {
> return svn_path_compare_paths_nts ((char *)a->key, (char *)b->key);

It's usually wrong to cast away const. Use (const char*)a->key.

> }
> @@ -44,19 +44,19 @@
> static svn_error_t *
> print_dirents (const char *url,
> apr_hash_t *dirents,
> + svn_boolean_t verbose,
> apr_pool_t *pool)
> {
> apr_array_header_t *array;
> int i;
>
> - array = apr_hash_sorted_keys (dirents, compare_cstring_as_paths, pool);
> + array = apr_hash_sorted_keys (dirents, compare_items_as_paths, pool);
>
> printf ("%s:\n", url);

I would not expect the URL to be printed if verbose is not set. I'm
not really sure why the URL gets printed at all. It would make sense
if 'svn ls' accept a working copy path, but

$ svn ls some/wc/dir

fails. This is inconsistent with 'svn log' which, like 'svn ls',
always needs to contact the repository but does accept

$ svn log some/wc/dir

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 30 12:16:41 2002

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.