I would like to share my idea on implementing my gsoc project. Please leave me
your comments.
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.
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. And the logic
of the crawler is already not trivial.
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?
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.
Thanks
Rui, Guo
---------------------------------------------------------------------
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 14:06:53 CEST