Hi!
I have the need to maintain sparse checkouts using TortoiseProc.
There are suitable options and suitable documentation to do that - with the
exception of the inability to specify a (new) depth of the checkout on update.
The inability to specify depth on checkout is OK for me, i can do this in
cammand line too. But for update i prefer the GUI so developers can easily see
what has changed and what is conflicted.
Documentation:
tsvn-automation.html#tsvn-automation-basics:
"The /stickydepth indicates that the specified depth should be sticky"
However there is no way to specify the depth.
When you you read src/TortoiseProc/Commands/UpdateCommand.cpp you can see this.
I expected to somehow be able to specify a depth;
/rev:HEAD /depth:infinity would be ok for me to have checkoutDepths defined for
all paths if it does not disply the first dialog; This mimics the need to go to
"update to revision" in GUI to modify sparse checkouts.
The change could be as little as adding around the handling of the obsolete -N
--nonrecursive in src/TortoiseProc/Commands/UpdateCommand.cpp line 82/83 (depth
= svn_depth_empty)
a handling for the newer depth parameter of svn update:
if ((parser.HasKey(L"depth"))&&(parser.HasVal(L"depth")))
for me it is not clear how to do the mapping string to depth nicely after this
line, otherwise i would produce a patch for this file and documentation.
I am also not sure if line 105 "progDlg.SetDepth(depth);" does this correctly
this if passed anthing but svn_depth_empty or svn_depth_unknown.
In src/TortoiseProc/Commands/UpdateCommand.cpp there are just 3 paths for the
depth:
1) either specify /rev without a value and use the value from the dialog (if
line 51, then assigment line 59)
2) or run into line 83 and get depth empty when parameter nonrecursive is set.
3) or leave the initial assignment in line 31 (unknown)
However my need is to set it to infinity on all given paths (these come from a
config file generated as needed) to add new required subprojects.
This works if the path is not present in the checkout already (as the default
in svn is infinity in this case, so the value produced in path 3) is ok)
However if any subtree is present altrady the depth empty from the checkout is
used and there is no way to change that without gui or using commandline
(--set-depth infinity <path(s) where to change depth>)
Maybe it is time to migrate TortoiseProc update options from obsolete -N
--nonrecursive to --depth in the parameter list? Or --set-depth?
The best solution for me would be the ability to describe the depth per path,
but i cannot do this in commandline anyway.
So there is still need for me to set depths of all new required modules in the
sparse checkout to infinity by update and then update the whole checkout
without setting depth to avoid mixed revision copies.
testcase:
# make a repos containing a folder and 2 files in it.
svn checkout <repos> testcheckout
mkdir testcheckout/dir
echo file1>testcheckout/dir/file1
echo file2>testcheckout/dir/file2
svn add testcheckout/dir
svn commit -m "mini-testrepos" testcheckout
#
# create a sparse checkout with just one of the files
svn checkout --depth empty <repos> sparsecheckout
svn update --set-depth infinity sparsecheckout/dir/file1
# this could also be done by
# TortoiseProc /command:update /path:sparsecheckout/dir/file1 /stickydepth
#
# and now try to use TortoiseProc to do the equivalent of
# svn update --set-depth infinity sparsecheckout/dir
# which should add the second file
#
# you can do with GUI manually selecting depth; force gui by specifying /rev:
# TortoiseProc.exe /command:update /path:sparsecheckout/dir /rev /stickydepth
# but this gets complicated if you have multiple paths.
Greetings
Michael
--
You received this message because you are subscribed to the Google Groups
"TortoiseSVN" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tortoisesvn/c8795bac-d69c-4eef-9195-acbb40b26cc8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.