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

Re: [PATCH] Fix for issue 3787

From: Stefan Sperling <stsp_at_elego.de>
Date: Thu, 7 Apr 2011 11:38:43 +0200

On Thu, Apr 07, 2011 at 02:46:45PM +0530, Noorul Islam K M wrote:
> Daniel Shahaf <d.s_at_daniel.shahaf.name> writes:
>
> > Noorul Islam K M wrote on Thu, Apr 07, 2011 at 10:17:49 +0530:
> >
> >> Index: subversion/libsvn_client/info.c
> >> ===================================================================
> >> --- subversion/libsvn_client/info.c (revision 1089373)
> >> +++ subversion/libsvn_client/info.c (working copy)
> >> @@ -408,13 +408,17 @@
> >> {
> >> struct found_entry_baton fe_baton;
> >> svn_error_t *err;
> >> + svn_boolean_t show_exclude = FALSE;
> >>
> >> fe_baton.changelist_hash = changelist_hash;
> >> fe_baton.receiver = receiver;
> >> fe_baton.receiver_baton = receiver_baton;
> >> fe_baton.wc_ctx = ctx->wc_ctx;
> >>
> >> - err = svn_wc__node_walk_children(ctx->wc_ctx, local_abspath, FALSE,
> >> + if (depth == SVN_DEPTH_INFINITY_OR_FILES(TRUE))
> >> + show_exclude = TRUE;
> >> +
> >> + err = svn_wc__node_walk_children(ctx->wc_ctx, local_abspath, show_exclude,
> >> info_found_node_callback, &fe_baton, depth,
> >> ctx->cancel_func, ctx->cancel_baton, pool);
> >>
> >
> > Suppose that A/ and 'iota' are excluded. 'svn info --depth=immediates
> > wc_dir' should also show information about both A/ and 'iota', but with
> > your patch applied it doesn't show information for A/.
> >
> > (I didn't test 'iota' and testing the equivalent --depth=files recipe.)
>
> The requirement is to show info for excludes if '-R' is passed. Doesn't
> that mean you have to use --depth=infinity?

-R implies --depth=infinity.
It means "unlimited recursion". It is the old way of saying "show me
everything beneath this directory". before --depth was introduced.

But with --depth, it's possible to specify how deep the recursion should be,
to a limited extent. Say I want to see status output only for the current
directory and its direct children. I can use --depth=immediates for that.

I think --depth was initially conceived for checkout and update to control
sparse working copies. Then it ended up being used also to replace the -R
and -N switches of other subcommands (-N being --depth=empty).

So, yes, please show exluded status also for other depth values.
E.g. if I ask for the status of an exluded item with --depth=empty,
I'd expect to be told that this item is excluded.

Some examples:

No matter whether ./foo is a file or directory, after this command...

  $ svn up --set-depth=exclude foo

... these commands should produce equal output:
  $ svn st foo
  $ svn st --depth=empty foo
  $ svn st --depth=immediates foo
  $ svn st --depth=infinity foo
  $ svn st --depth=files foo

And these should show the same information for foo (among information
about other items in the current directory):

  $ svn st
  $ svn st --depth=immediates

and this also, but only if foo is a file:

  $ svn st --depth=files foo

While this should show no information about foo:

  $ svn st --depth=empty
Received on 2011-04-07 11:39:27 CEST

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.