You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@lyra.org> on 2001/06/05 18:17:32 UTC
Re: CVS update: MODIFIED: client ...
On Tue, Jun 05, 2001 at 02:19:34PM -0000, cmpilato@tigris.org wrote:
Ooh! Recursive stuff. About time :-)
[ you may note that fetch.c::svn_ra_dav__do_checkout already handles a
"recurse" flag :-) ]
>...
> --- main.c 2001/06/01 23:18:19 1.84
> +++ main.c 2001/06/05 14:19:34 1.85
> @@ -158,6 +158,7 @@
> {"force", svn_cl__force_opt, 0},
> {"help", 'h', 0},
> {"message", 'm', 1},
> + {"recursive", svn_cl__recursive_opt, 0},
> {"revision", 'r', 1},
> {"version", 'v', 0},
> {"filedata", 'F', 1},
> @@ -220,6 +221,9 @@
> break;
> case svn_cl__force_opt:
> opt_state.force = TRUE;
> + break;
> + case svn_cl__recursive_opt:
> + opt_state.recursive = TRUE;
> break;
Actually, isn't our default *to* recurse? And we want an option to disable
the recursion?
>...
> --- util.c 2001/04/03 02:16:06 1.5
> +++ util.c 2001/06/05 14:19:34 1.6
> @@ -146,6 +146,17 @@
>
> for (; os->ind < os->argc; os->ind++)
> {
> + svn_string_t *target = svn_string_create (os->argv[os->ind], pool);
> + svn_string_t *basename = svn_path_last_component (target,
> + svn_path_local_style,
> + pool);
> + /* If this target is not a Subversion administrative directory,
> + don't add it to the target list. TODO: Perhaps this check
> + should not call the target a SVN admin dir unless
> + svn_wc_check_wc passes on the target, too? */
> + if (! svn_string_compare
> + (basename,
> + svn_string_create (SVN_WC_ADM_DIR_NAME, pool)))
> array_push_svn_string (targets, os->argv[os->ind], pool);
Whoops. Double negative in the comment gotcha. If it isn't an SVN dir, then
you *do* add it to the target list.
And the svn_string_create(SVN_WC_ADM_DIR_NAME) is bogus. Replace the
svn_string_compare with:
if (! strcmp(basename->data, SVN_WC_ADM_DIR_NAME) )
Please get out of the mentality of always needing an svn_string_t. :-)
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: CVS update: MODIFIED: client ...
Posted by cm...@collab.net.
Greg Stein <gs...@lyra.org> writes:
> Actually, isn't our default *to* recurse? And we want an option to disable
> the recursion?
Yes and no. I mean, 'svn del dirname' recursively deletes, but 'svn
add dirname' does not recursively add. Likewise, 'svn undelete
dirname' does not automatically recurse. So for different operations,
different defaults apply. I could just have easily had a "don't
recurse" option and reversed the cases of everything.
> Whoops. Double negative in the comment gotcha. If it isn't an SVN dir, then
> you *do* add it to the target list.
Doh! Absolutely right.
> And the svn_string_create(SVN_WC_ADM_DIR_NAME) is bogus. Replace the
> svn_string_compare with:
>
> if (! strcmp(basename->data, SVN_WC_ADM_DIR_NAME) )
>
> Please get out of the mentality of always needing an svn_string_t. :-)
Grr...and I told myself I'd do better this time. :-(
Thanks, g.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: CVS update: MODIFIED: client ...
Posted by Karl Fogel <kf...@collab.net>.
Greg Stein <gs...@lyra.org> writes:
> Actually, isn't our default *to* recurse? And we want an option to disable
> the recursion?
The situation is more complex than that. Most commands recurse by
default, but some don't: `add', for example. That one doesn't recurse
in CVS either, so we're keeping with both tradition and good sense by
not making it recursive. In SVN, `undel' is probably another
non-recursive command. There are likely others I'm just not thinking
of right now.
But even if *all* commands recursed by default, there would still be a
need for a recursion flag, for the same reason most CVS commands have
one: to counteract a non-recursion flag in a .cvsrc / .svnrc file (or
whatever other defaults mechanism is used).
In CVS, these two flags are:
-l Local directory only, no recursion.
-R Process directories recursively.
and the docs justify -R as the way to counteract a -l inherited from
.cvsrc. I think we want the same ability in SVN, only perhaps we
should stick to capital letters for both, as these are somewhat rare
flags to use
-L Local directory only, no recursion.
-R Process directories recursively.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org