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

Re: depth of the operation vs. depth of the WC

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Thu, 03 Apr 2008 22:25:18 -0400

"Rui, Guo" <timmyguo_at_mail.ustc.edu.cn> writes:
> Thanks for your update. It explains the "ambient depth" now, which I was
> just wondering about. It looks much better now. However, I still have some
> questions.
>
> The first is about "depth-exclude", a definition you can find in svn_types.h
> while not explicitly documented. The comments say that it's reserved for
> future use and does not have any client side support yet. Shouldn't this be
> documented too if it is a deliberated design? (PS: I can't imagine how could
> it be usefully personally. I'm already happy enough with depth-empty)

It seems someone has documented it now :-). Are you looking at recent
code?

> A formal description of "depth-unknown" may also be beneficial. This may
> looks like this:
> Depth-unknown ---------> Depth not explicitly specified. Svn client should
> map
> it to appropriate default depth in each
> sub-commands.
> However, the server side treats it as depth-infinity
> conservatively.

Done in r30251.

> The second is the --changelist, which seems to honor the depth option in the
> implementation of "svn update". I'd not had time to read the document about
> it yet. So, does it interfere with the logic of sparse-directories?

Er, actually I don't know. Do you see any interfering behaviors?

> The third is about the examples in the document. I suggest all the
> not-implemented examples be retained now that we have a special section for
> them. In addition, those examples should use --set-depth instead of --depth.
> Just fix it :-)

Sure. Could you supply a patch for this? :-)

(See http://subversion.tigris.org/hacking.html#patches.)

> According to the code, the --set-depth is not allowed to use together with
> --depth. Should we have a note for it in the document?

Done in r30251.

> The "affected commands" section should be removed, since all commands that
> take -N or -R are affected which is a large majority. The -N option is not
> always mapped as --depth=files. This makes the description in "API changes"
> section not that accurate. (Minor fault ^_^)

Good point. Also done in r30251.

> Finally, I'm still wondering about the depth of operation (--depth option)
> works. There is a paragraph in "API changes" section as quoted below:
> <===========QUOTE=============>
> On the server side, most of the significant changes are in
> libsvn_repos/reporter.c. The code that receives update reports now
> receives notice of paths that have different depths from their
> parent, and of course the overall update operation has a global
> depth, which applies whenever not shadowed by some local depth for
> a given path.
> <=========ENE OF QUOTE========>
> What does the word "shadowed" mean? Does it mean that, if a directory in WC
> is covered by the depth of operation, the depth of that local path will take
> control in the operation of the subtree? This implies that if there is a
> sub-directory A of infinity depth in current directory, a 'svn up
> --depth=immediates' will cover the whole subtree beneath A, which is not
> proper behavior form my perspective.

It means that if the WC depth is shallower than the requested depth, the
WC depth of course governs. I changed the text, see how it is now.

> And the document also says this:
> <===========QUOTE=============>
> Inside such a working copy, running 'svn up' by itself will update
> only what is already present, but running 'svn up OMITTED_SUBDIR'
> will cause OMITTED_SUBDIR to be brought in at depth-infinity, while
> the rest of the parent working copy remains at its previous depth.
> <=========ENE OF QUOTE========>
> Does this behavior apply to omitted-FILE? If id does, how could the test
> "depth_immediates_bring_in_file" in depth_tests.py pass?

It should apply to OMMITTED_FILE, yes.

In that test, I believe it is the top level that is depth=immediates, so
A/ is depth=empty, and we can bring in A/mu by naming it explicitly.

> Ps: I chose Timothy (Timmy) as my English name in English class and kept
> using it till now. You can call me Timothy or Rui, which is my Chinese name.
> Both are ok. Guo is my family name and I put it at last to follow western
> convention. However, I'm called "Guo Rui" rather than "Rui Guo" in Chinese.
> ^_^

Okay, thanks :-).

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-04-04 07:55:08 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.