[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: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2002-07-30 13:35:41 CEST

On Tue, Jul 30, 2002 at 11:16:09AM +0100, Philip Martin wrote:
> 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.

good point.

> > }
> > @@ -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

i'm not really sure why it prints out a url... ben put it into the
original version he wrote, and i left it there.

ben? any thoughts on this?

-garrett

-- 
garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 30 13:36:19 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.