On 1/31/07, William Nagel <bill@stagelogic.com> wrote:
> After years of participation in Subversion in a variety of
> capacities, I've decided it's time to actually get involved in
> Subversion development.
Yay!
> So, after taking a look at the various bite-
> sized issues I decided to fix issue 2663 by adding a --non-recursive
> option to svnlook. A patch is attached (with associated test) if
> someone would be so kind as to take a look at it and critique. Thanks!
So, you picked a doozy this time -- because we're right in the middle
of making the -N / --non-recursive flag obsolete, and replacing it with
--depth=DESIRED_DEPTH instead :-). See
http://svn.collab.net/repos/svn/branches/sparse-directories/README.branch
for details.
Now, note that for compatibility, -N will translate to --depth=files (that
is, grab only files, don't get any subdirs). And I'm not actually against
having a -N / --non-recursive flag appear on svnlook, since -N is a lot
easier to type than --depth=files and it *is* the common case, after all.
And the new depth-aware APIs being added on the branch don't
affect your patch, since you're doing everything within svnlook/main.c,
and using the indentation level to tell you whether you're on the zeroth
level of the recursion or not :-).
So, hmm, in retrospect, I guess the sparse-directories branch doesn't
have anything to do with your patch, and I should rewrite this email.
But I'm emotionally invested in it now, so I'll let it stand. Anyway...
A comment on the code: you've made the 'indentation' parameter
to print_tree() have a new meaning. The doc string for that function
should change to reflect this.
A comment on the behavior: I haven't tested it, but looking at the
new body of print_tree(), it seems that your -N doesn't mean "print
only files". Instead, it will actually print subdirectory names too, it
just won't descend into those subdirectories and print *their* entries.
This might be the most sensible behavior for svnlook, but it is
inconsistent with -N's behavior elsewhere in Subversion. I think
it might be good to raise a discussion on dev@ about the proper
behavior of -N in svnlook, and then implement accordingly.
Also, please provide a log message with your patch :-).
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Feb 4 08:16:55 2007