On Thu, 19 Nov 2009, Stefan Sperling wrote:
On Thu, Nov 19, 2009 at 05:35:42PM +0100, Martin Furter wrote:
But I thought I'd take the easy route like I did in the python script:
Do a checkout first, then do all the updates needed (it could
ofcourse be integrated into the protocols but that's a lot more
work).
I guess people would expect svn not to pull down anything from the
server that isn't in the view. If we could get that to work somehow
I think we should try.
Right, it doesn't.
I changed my script to just output the checkout and update commands and it
does the following:
./svnviews.py -F views.conf --view srv-side \
http://svn.apache.org/repos/asf/subversion/trunk srvside
svn info http://svn.apache.org/repos/asf/subversion/trunk
svn co -r 882383 --depth empty http://svn.apache.org/repos/asf/subversion/trunk
srvside
svn up -r 882383 --set-depth empty srvside/contrib
svn up -r 882383 --set-depth infinity srvside/contrib/server-side
svn up -r 882383 --set-depth empty srvside/tools
svn up -r 882383 --set-depth infinity srvside/tools/server-side
If you run these 5 commands you download only what the view requested
(contrib/server-side and tools/server-side plus empty parents), nothing
more.
Also, AFAIK it's currently not possible to update to a more
shallow depth, but that's a problem with the depth feature rather than
with views. But we need to specify how "svn update" should behave when
svn:view properties (or config files) are modified, and how this interacts
with the --set-depth option.
First I thought update is too complicated and should not be supported.
But now I think 'svn update --view X' should just pull in what's
missing, but never remove things. That way I could 'checkout --view
project2' and then 'update --view project5' and get everything I
need to work on those two projects.
So multiple views can be active at the same time within the same WC?
Would this not complicate things a bit too much?
No, they are not 'active in a working' copy, they're not registered there.
The view just describes what directories and files to download, and this
translates directly to a bunch of 'svn update --set-depth' calls.
But I guess I see what you you meant with 'active'. The root directory of
the WC knows about the view[s] and running plain 'svn update' will pull in
additional subdirs added to the view, right?
Since it's easy to merge views (just add all subdirs of the requested
views and for duplicates let the greater depth win) we could add support
for multiple views in one WC.
That approach also leads to a few more questions:
Does wc-ng still support WC properties to be able to store the view names?
What happens if I run update in a subdir? Just ignore views?
What if the views came from a local file?
I'd be happy with either of those approaches.
Why not just get the project2 view into one WC and the project5
view into another WC?
A reason may be to be able to commit to both projects at the same time.
Thanks,
Martin