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

Re: The way to implement deselection inteface of sparse directory

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Wed, 28 May 2008 11:56:54 -0400

"Rui, Guo" <timmyguo_at_mail.ustc.edu.cn> writes:
> I'm working to provide a deselection (or cropping) interface to sparse
> directory. I decided to accomplish it in a straightforward way when
> preparing my proposal: make the existing --set-depth interface in 'svn
> up' work for the deselection purpose. So, the first question is that,
> in which stage of the updating procedure should the cropping take
> place?
>
> Once I believed that the modification would mostly lie in the editor,
> update editor or the wrapper. Now I realize how far from truth I was:
> the editor is driven by the server side while the cropping is a
> self-contained local operation in wc. Even the
> svn_wc_crawl_revision3() is more suitable for the cropping code.

Good explanation. I think we'd all agree with your assessment :-).

> Further consideration makes the crawler less optimal for the cropping
> code either. The cropping may only happens at the target of
> update/switch. The logic is simple and clear: crop the sub-tree
> whenever the requested depth is shallower than the actual depth. It is
> indeed possible to incorporate the cropping logic into the crawler, in
> a way that provide a svn_wc_crop_to_empty() and call it at proper
> positions of the crawler routines. However, the question is, does it
> worth the complexity? The crawler is not designed for driving the
> reporter, rather than cropping. [...]

Did you mean the "not" in the last sentence quoted above?

> In summery, I consider the cropping procedure be rather independent to
> update. And I would like to provide a full featured
> svn_wc_crop_subtree() interface and call it before the crawler. This
> solution make it easier to provide a separate cropping interface. I
> think this is reasonable, since the user may ask: why do I have to
> access the network/repository merely to fold the subtree for disk
> space?

Let me make sure I understand correctly: are you proposing an 'svn crop'
subcommand?

> ps: Do I have to log the deletion of entry before actually remove it
> just as the do_entry_deletion() in update-editor does, or just call
> svn_wc_remove_from_revision_control() directly? I'm not sure of this
> yet.

I think as long as you call svn_wc_remove_from_revision_control *after*
setting the depth of the parent directory to the appropriate new depth,
if any, it's fine. (You'll be passing the 'destroy_wf' flag, right?)

-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-05-28 17:57:05 CEST

This is an archived mail posted to the Subversion Dev mailing list.