sparse svn update of deep directory structure
Is there a way to have a sparse checkout of an SVN repo with deep nested directory structure.
I'm doing this using a listing of all the files in the repo and filtering for just *.xml:
svn list --recursive "http://myRepo.com/trunk" > allFiles.txt
I'm trying to do the following:
svn checkout "http://myRepo.com/trunk" --depth empty "myRepo"
svn update --set-depth empty project1/dirs/moreDirs/evenMore/file.xml
I tried this but got an error saying it was skipping updating that file.
If I manually do the following I can get the file in my checkout (I want a --set-depth empty that gets the parent directories for a nested SVN path).
svn update --set-depth empty project1
svn update --set-depth empty project1/dirs/moreDirs
svn update --set-depth empty project1/dirs/moreDirs/evenMore
svn update --set-depth empty project1/dirs/moreDirs/evenMore/file.xml
svn status -v project1/dirs/moreDirs/evenMore/file.xml
# prints svn file information
EDIT
I have 2 workarounds right now neither ideal
1. piece-meal svn update --set-depth empty
I wrote a bash function that takes the file path that I'm looking for a executes svn update --set-depth empty on it. For example for project1/dirs/moreDirs/evenMore/file.xml
it would call:
svn update --set-depth empty updateproject1 updateproject1/dirs updateproject1/dirs/moreDirs updateproject1/dirs/moreDirs/evenMore updateproject1/dirs/moreDirs/evenMore/file.xml
It works but seems like it's pretty slow (maybe I can batch the calls for multiple files into one svn update call). I can't make multiple svn update calls for separate files in parallel because svn locks the repo.
Here's the full script:
function getContentFile()
true
done
svn update --set-depth empty $SVN_UPDATE_ARG
fi
# export function to use in xargs
export -f getContentFile
cat "$SVN_FILE_LISTING_CACHE" | egrep '.xml$' | xargs -P 1 -n 1 -I bash -e -c 'getContentFile "$@"' _
2. svn cat to get files
I can also just create the path for the folder structure and svn cat the file and I can do it on multiple files at the same time, but this suffers from not being connected to svn (e.g. I can't commit it back easily or update the file from svn without walking and matching the path), it's not a real svn checkout.
function getAllContentFiles()
egrep $FILE_REGEX
function getContentFile()
CONTENT_FILE="$1"
SVN_FILE="$SVN_REMOTE$CONTENT_FILE"
LOCAL_CONTENT_FILE="$SVN_CHECKOUT/$CONTENT_FILE"
LOCAL_CONTENT_FILE_DIR=$(dirname $LOCAL_CONTENT_FILE)
SVN_UPDATE_ARG="$CONTENT_FILE"
PARENT_DIR="$(dirname $CONTENT_FILE)"
mkdir -p "$PARENT_DIR"
if [ ! -e "$LOCAL_CONTENT_FILE" ]; then
pushd "$SVN_CHECKOUT"
svn cat "$SVN_FILE" > "$LOCAL_CONTENT_FILE"
fi
svn version-control sparse-checkout
add a comment |
Is there a way to have a sparse checkout of an SVN repo with deep nested directory structure.
I'm doing this using a listing of all the files in the repo and filtering for just *.xml:
svn list --recursive "http://myRepo.com/trunk" > allFiles.txt
I'm trying to do the following:
svn checkout "http://myRepo.com/trunk" --depth empty "myRepo"
svn update --set-depth empty project1/dirs/moreDirs/evenMore/file.xml
I tried this but got an error saying it was skipping updating that file.
If I manually do the following I can get the file in my checkout (I want a --set-depth empty that gets the parent directories for a nested SVN path).
svn update --set-depth empty project1
svn update --set-depth empty project1/dirs/moreDirs
svn update --set-depth empty project1/dirs/moreDirs/evenMore
svn update --set-depth empty project1/dirs/moreDirs/evenMore/file.xml
svn status -v project1/dirs/moreDirs/evenMore/file.xml
# prints svn file information
EDIT
I have 2 workarounds right now neither ideal
1. piece-meal svn update --set-depth empty
I wrote a bash function that takes the file path that I'm looking for a executes svn update --set-depth empty on it. For example for project1/dirs/moreDirs/evenMore/file.xml
it would call:
svn update --set-depth empty updateproject1 updateproject1/dirs updateproject1/dirs/moreDirs updateproject1/dirs/moreDirs/evenMore updateproject1/dirs/moreDirs/evenMore/file.xml
It works but seems like it's pretty slow (maybe I can batch the calls for multiple files into one svn update call). I can't make multiple svn update calls for separate files in parallel because svn locks the repo.
Here's the full script:
function getContentFile()
true
done
svn update --set-depth empty $SVN_UPDATE_ARG
fi
# export function to use in xargs
export -f getContentFile
cat "$SVN_FILE_LISTING_CACHE" | egrep '.xml$' | xargs -P 1 -n 1 -I bash -e -c 'getContentFile "$@"' _
2. svn cat to get files
I can also just create the path for the folder structure and svn cat the file and I can do it on multiple files at the same time, but this suffers from not being connected to svn (e.g. I can't commit it back easily or update the file from svn without walking and matching the path), it's not a real svn checkout.
function getAllContentFiles()
egrep $FILE_REGEX
function getContentFile()
CONTENT_FILE="$1"
SVN_FILE="$SVN_REMOTE$CONTENT_FILE"
LOCAL_CONTENT_FILE="$SVN_CHECKOUT/$CONTENT_FILE"
LOCAL_CONTENT_FILE_DIR=$(dirname $LOCAL_CONTENT_FILE)
SVN_UPDATE_ARG="$CONTENT_FILE"
PARENT_DIR="$(dirname $CONTENT_FILE)"
mkdir -p "$PARENT_DIR"
if [ ! -e "$LOCAL_CONTENT_FILE" ]; then
pushd "$SVN_CHECKOUT"
svn cat "$SVN_FILE" > "$LOCAL_CONTENT_FILE"
fi
svn version-control sparse-checkout
And if you get individual files usingsvn cat
? For examplesvn cat "http://myRepo.com/trunk/path/to/file.xml" > "path/to/file.xml"
– janos
Nov 20 '13 at 21:49
I could get individual files and use mkdir -p $(dirname $FILE_PATH) but if I use the svn update --set-depth I can edit and track it in SVN (e.g. I could commit back to those files or update to the latest).
– Dougnukem
Nov 21 '13 at 1:46
add a comment |
Is there a way to have a sparse checkout of an SVN repo with deep nested directory structure.
I'm doing this using a listing of all the files in the repo and filtering for just *.xml:
svn list --recursive "http://myRepo.com/trunk" > allFiles.txt
I'm trying to do the following:
svn checkout "http://myRepo.com/trunk" --depth empty "myRepo"
svn update --set-depth empty project1/dirs/moreDirs/evenMore/file.xml
I tried this but got an error saying it was skipping updating that file.
If I manually do the following I can get the file in my checkout (I want a --set-depth empty that gets the parent directories for a nested SVN path).
svn update --set-depth empty project1
svn update --set-depth empty project1/dirs/moreDirs
svn update --set-depth empty project1/dirs/moreDirs/evenMore
svn update --set-depth empty project1/dirs/moreDirs/evenMore/file.xml
svn status -v project1/dirs/moreDirs/evenMore/file.xml
# prints svn file information
EDIT
I have 2 workarounds right now neither ideal
1. piece-meal svn update --set-depth empty
I wrote a bash function that takes the file path that I'm looking for a executes svn update --set-depth empty on it. For example for project1/dirs/moreDirs/evenMore/file.xml
it would call:
svn update --set-depth empty updateproject1 updateproject1/dirs updateproject1/dirs/moreDirs updateproject1/dirs/moreDirs/evenMore updateproject1/dirs/moreDirs/evenMore/file.xml
It works but seems like it's pretty slow (maybe I can batch the calls for multiple files into one svn update call). I can't make multiple svn update calls for separate files in parallel because svn locks the repo.
Here's the full script:
function getContentFile()
true
done
svn update --set-depth empty $SVN_UPDATE_ARG
fi
# export function to use in xargs
export -f getContentFile
cat "$SVN_FILE_LISTING_CACHE" | egrep '.xml$' | xargs -P 1 -n 1 -I bash -e -c 'getContentFile "$@"' _
2. svn cat to get files
I can also just create the path for the folder structure and svn cat the file and I can do it on multiple files at the same time, but this suffers from not being connected to svn (e.g. I can't commit it back easily or update the file from svn without walking and matching the path), it's not a real svn checkout.
function getAllContentFiles()
egrep $FILE_REGEX
function getContentFile()
CONTENT_FILE="$1"
SVN_FILE="$SVN_REMOTE$CONTENT_FILE"
LOCAL_CONTENT_FILE="$SVN_CHECKOUT/$CONTENT_FILE"
LOCAL_CONTENT_FILE_DIR=$(dirname $LOCAL_CONTENT_FILE)
SVN_UPDATE_ARG="$CONTENT_FILE"
PARENT_DIR="$(dirname $CONTENT_FILE)"
mkdir -p "$PARENT_DIR"
if [ ! -e "$LOCAL_CONTENT_FILE" ]; then
pushd "$SVN_CHECKOUT"
svn cat "$SVN_FILE" > "$LOCAL_CONTENT_FILE"
fi
svn version-control sparse-checkout
Is there a way to have a sparse checkout of an SVN repo with deep nested directory structure.
I'm doing this using a listing of all the files in the repo and filtering for just *.xml:
svn list --recursive "http://myRepo.com/trunk" > allFiles.txt
I'm trying to do the following:
svn checkout "http://myRepo.com/trunk" --depth empty "myRepo"
svn update --set-depth empty project1/dirs/moreDirs/evenMore/file.xml
I tried this but got an error saying it was skipping updating that file.
If I manually do the following I can get the file in my checkout (I want a --set-depth empty that gets the parent directories for a nested SVN path).
svn update --set-depth empty project1
svn update --set-depth empty project1/dirs/moreDirs
svn update --set-depth empty project1/dirs/moreDirs/evenMore
svn update --set-depth empty project1/dirs/moreDirs/evenMore/file.xml
svn status -v project1/dirs/moreDirs/evenMore/file.xml
# prints svn file information
EDIT
I have 2 workarounds right now neither ideal
1. piece-meal svn update --set-depth empty
I wrote a bash function that takes the file path that I'm looking for a executes svn update --set-depth empty on it. For example for project1/dirs/moreDirs/evenMore/file.xml
it would call:
svn update --set-depth empty updateproject1 updateproject1/dirs updateproject1/dirs/moreDirs updateproject1/dirs/moreDirs/evenMore updateproject1/dirs/moreDirs/evenMore/file.xml
It works but seems like it's pretty slow (maybe I can batch the calls for multiple files into one svn update call). I can't make multiple svn update calls for separate files in parallel because svn locks the repo.
Here's the full script:
function getContentFile()
true
done
svn update --set-depth empty $SVN_UPDATE_ARG
fi
# export function to use in xargs
export -f getContentFile
cat "$SVN_FILE_LISTING_CACHE" | egrep '.xml$' | xargs -P 1 -n 1 -I bash -e -c 'getContentFile "$@"' _
2. svn cat to get files
I can also just create the path for the folder structure and svn cat the file and I can do it on multiple files at the same time, but this suffers from not being connected to svn (e.g. I can't commit it back easily or update the file from svn without walking and matching the path), it's not a real svn checkout.
function getAllContentFiles()
egrep $FILE_REGEX
function getContentFile()
CONTENT_FILE="$1"
SVN_FILE="$SVN_REMOTE$CONTENT_FILE"
LOCAL_CONTENT_FILE="$SVN_CHECKOUT/$CONTENT_FILE"
LOCAL_CONTENT_FILE_DIR=$(dirname $LOCAL_CONTENT_FILE)
SVN_UPDATE_ARG="$CONTENT_FILE"
PARENT_DIR="$(dirname $CONTENT_FILE)"
mkdir -p "$PARENT_DIR"
if [ ! -e "$LOCAL_CONTENT_FILE" ]; then
pushd "$SVN_CHECKOUT"
svn cat "$SVN_FILE" > "$LOCAL_CONTENT_FILE"
fi
svn version-control sparse-checkout
svn version-control sparse-checkout
edited Nov 21 '13 at 19:02
Dougnukem
asked Nov 20 '13 at 19:38
DougnukemDougnukem
8,2112079128
8,2112079128
And if you get individual files usingsvn cat
? For examplesvn cat "http://myRepo.com/trunk/path/to/file.xml" > "path/to/file.xml"
– janos
Nov 20 '13 at 21:49
I could get individual files and use mkdir -p $(dirname $FILE_PATH) but if I use the svn update --set-depth I can edit and track it in SVN (e.g. I could commit back to those files or update to the latest).
– Dougnukem
Nov 21 '13 at 1:46
add a comment |
And if you get individual files usingsvn cat
? For examplesvn cat "http://myRepo.com/trunk/path/to/file.xml" > "path/to/file.xml"
– janos
Nov 20 '13 at 21:49
I could get individual files and use mkdir -p $(dirname $FILE_PATH) but if I use the svn update --set-depth I can edit and track it in SVN (e.g. I could commit back to those files or update to the latest).
– Dougnukem
Nov 21 '13 at 1:46
And if you get individual files using
svn cat
? For example svn cat "http://myRepo.com/trunk/path/to/file.xml" > "path/to/file.xml"
– janos
Nov 20 '13 at 21:49
And if you get individual files using
svn cat
? For example svn cat "http://myRepo.com/trunk/path/to/file.xml" > "path/to/file.xml"
– janos
Nov 20 '13 at 21:49
I could get individual files and use mkdir -p $(dirname $FILE_PATH) but if I use the svn update --set-depth I can edit and track it in SVN (e.g. I could commit back to those files or update to the latest).
– Dougnukem
Nov 21 '13 at 1:46
I could get individual files and use mkdir -p $(dirname $FILE_PATH) but if I use the svn update --set-depth I can edit and track it in SVN (e.g. I could commit back to those files or update to the latest).
– Dougnukem
Nov 21 '13 at 1:46
add a comment |
1 Answer
1
active
oldest
votes
Since Subversion 1.7.0 update
has accepted a --parents
option that does what you want.
So you can do the following for example:
$ svn co --depth empty https://svn.apache.org/repos/asf/subversion svn-sparse
U svn-sparse
Checked out revision 1544721.
$ svn up --parents trunk/subversion/libsvn_ra_svn/protocol
A trunk
A trunk/subversion
A trunk/subversion/libsvn_ra_svn
Updating 'trunk/subversion/libsvn_ra_svn/protocol':
A trunk/subversion/libsvn_ra_svn/protocol
Updated to revision 1544721.
That works, it's still super slow to checkout (guessing each path in the svn update is making remote calls). Running thesvn cat
version with xargs -P 50 it's able to open a lot of parallel network connections.
– Dougnukem
Nov 23 '13 at 6:47
Yes it's walking the tree so it's really no different than what you were doing by hand. Sadly, not only is it make multiple requests, it's doing so in separate sessions. Which means it has to open a fresh TCP connection, negotiate SSL (if used), handle authentication (if required), do the OPTIONS request(s), and then finally do the REPORT. We ought to be filling in the REPORT with an entry along the entire path. The same way we do if you run an update after creating a situation like this.
– Ben Reser
Nov 23 '13 at 7:29
@Dougnukem I did some work tonight toward improving this. If you'd like to give it a spin (via a source build on Subversion trunk, I'd be very interested in how much it helps). I can probably improve it more but that's a more intrusive change and this halved the time ansvn update --parents
took for me over DAV.
– Ben Reser
Feb 8 '14 at 5:22
It seems like this should be the accepted answer @Dougnukem
– solvingJ
Aug 9 '18 at 17:53
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f20105349%2fsparse-svn-update-of-deep-directory-structure%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Since Subversion 1.7.0 update
has accepted a --parents
option that does what you want.
So you can do the following for example:
$ svn co --depth empty https://svn.apache.org/repos/asf/subversion svn-sparse
U svn-sparse
Checked out revision 1544721.
$ svn up --parents trunk/subversion/libsvn_ra_svn/protocol
A trunk
A trunk/subversion
A trunk/subversion/libsvn_ra_svn
Updating 'trunk/subversion/libsvn_ra_svn/protocol':
A trunk/subversion/libsvn_ra_svn/protocol
Updated to revision 1544721.
That works, it's still super slow to checkout (guessing each path in the svn update is making remote calls). Running thesvn cat
version with xargs -P 50 it's able to open a lot of parallel network connections.
– Dougnukem
Nov 23 '13 at 6:47
Yes it's walking the tree so it's really no different than what you were doing by hand. Sadly, not only is it make multiple requests, it's doing so in separate sessions. Which means it has to open a fresh TCP connection, negotiate SSL (if used), handle authentication (if required), do the OPTIONS request(s), and then finally do the REPORT. We ought to be filling in the REPORT with an entry along the entire path. The same way we do if you run an update after creating a situation like this.
– Ben Reser
Nov 23 '13 at 7:29
@Dougnukem I did some work tonight toward improving this. If you'd like to give it a spin (via a source build on Subversion trunk, I'd be very interested in how much it helps). I can probably improve it more but that's a more intrusive change and this halved the time ansvn update --parents
took for me over DAV.
– Ben Reser
Feb 8 '14 at 5:22
It seems like this should be the accepted answer @Dougnukem
– solvingJ
Aug 9 '18 at 17:53
add a comment |
Since Subversion 1.7.0 update
has accepted a --parents
option that does what you want.
So you can do the following for example:
$ svn co --depth empty https://svn.apache.org/repos/asf/subversion svn-sparse
U svn-sparse
Checked out revision 1544721.
$ svn up --parents trunk/subversion/libsvn_ra_svn/protocol
A trunk
A trunk/subversion
A trunk/subversion/libsvn_ra_svn
Updating 'trunk/subversion/libsvn_ra_svn/protocol':
A trunk/subversion/libsvn_ra_svn/protocol
Updated to revision 1544721.
That works, it's still super slow to checkout (guessing each path in the svn update is making remote calls). Running thesvn cat
version with xargs -P 50 it's able to open a lot of parallel network connections.
– Dougnukem
Nov 23 '13 at 6:47
Yes it's walking the tree so it's really no different than what you were doing by hand. Sadly, not only is it make multiple requests, it's doing so in separate sessions. Which means it has to open a fresh TCP connection, negotiate SSL (if used), handle authentication (if required), do the OPTIONS request(s), and then finally do the REPORT. We ought to be filling in the REPORT with an entry along the entire path. The same way we do if you run an update after creating a situation like this.
– Ben Reser
Nov 23 '13 at 7:29
@Dougnukem I did some work tonight toward improving this. If you'd like to give it a spin (via a source build on Subversion trunk, I'd be very interested in how much it helps). I can probably improve it more but that's a more intrusive change and this halved the time ansvn update --parents
took for me over DAV.
– Ben Reser
Feb 8 '14 at 5:22
It seems like this should be the accepted answer @Dougnukem
– solvingJ
Aug 9 '18 at 17:53
add a comment |
Since Subversion 1.7.0 update
has accepted a --parents
option that does what you want.
So you can do the following for example:
$ svn co --depth empty https://svn.apache.org/repos/asf/subversion svn-sparse
U svn-sparse
Checked out revision 1544721.
$ svn up --parents trunk/subversion/libsvn_ra_svn/protocol
A trunk
A trunk/subversion
A trunk/subversion/libsvn_ra_svn
Updating 'trunk/subversion/libsvn_ra_svn/protocol':
A trunk/subversion/libsvn_ra_svn/protocol
Updated to revision 1544721.
Since Subversion 1.7.0 update
has accepted a --parents
option that does what you want.
So you can do the following for example:
$ svn co --depth empty https://svn.apache.org/repos/asf/subversion svn-sparse
U svn-sparse
Checked out revision 1544721.
$ svn up --parents trunk/subversion/libsvn_ra_svn/protocol
A trunk
A trunk/subversion
A trunk/subversion/libsvn_ra_svn
Updating 'trunk/subversion/libsvn_ra_svn/protocol':
A trunk/subversion/libsvn_ra_svn/protocol
Updated to revision 1544721.
answered Nov 23 '13 at 0:47
Ben ReserBen Reser
5,07211628
5,07211628
That works, it's still super slow to checkout (guessing each path in the svn update is making remote calls). Running thesvn cat
version with xargs -P 50 it's able to open a lot of parallel network connections.
– Dougnukem
Nov 23 '13 at 6:47
Yes it's walking the tree so it's really no different than what you were doing by hand. Sadly, not only is it make multiple requests, it's doing so in separate sessions. Which means it has to open a fresh TCP connection, negotiate SSL (if used), handle authentication (if required), do the OPTIONS request(s), and then finally do the REPORT. We ought to be filling in the REPORT with an entry along the entire path. The same way we do if you run an update after creating a situation like this.
– Ben Reser
Nov 23 '13 at 7:29
@Dougnukem I did some work tonight toward improving this. If you'd like to give it a spin (via a source build on Subversion trunk, I'd be very interested in how much it helps). I can probably improve it more but that's a more intrusive change and this halved the time ansvn update --parents
took for me over DAV.
– Ben Reser
Feb 8 '14 at 5:22
It seems like this should be the accepted answer @Dougnukem
– solvingJ
Aug 9 '18 at 17:53
add a comment |
That works, it's still super slow to checkout (guessing each path in the svn update is making remote calls). Running thesvn cat
version with xargs -P 50 it's able to open a lot of parallel network connections.
– Dougnukem
Nov 23 '13 at 6:47
Yes it's walking the tree so it's really no different than what you were doing by hand. Sadly, not only is it make multiple requests, it's doing so in separate sessions. Which means it has to open a fresh TCP connection, negotiate SSL (if used), handle authentication (if required), do the OPTIONS request(s), and then finally do the REPORT. We ought to be filling in the REPORT with an entry along the entire path. The same way we do if you run an update after creating a situation like this.
– Ben Reser
Nov 23 '13 at 7:29
@Dougnukem I did some work tonight toward improving this. If you'd like to give it a spin (via a source build on Subversion trunk, I'd be very interested in how much it helps). I can probably improve it more but that's a more intrusive change and this halved the time ansvn update --parents
took for me over DAV.
– Ben Reser
Feb 8 '14 at 5:22
It seems like this should be the accepted answer @Dougnukem
– solvingJ
Aug 9 '18 at 17:53
That works, it's still super slow to checkout (guessing each path in the svn update is making remote calls). Running the
svn cat
version with xargs -P 50 it's able to open a lot of parallel network connections.– Dougnukem
Nov 23 '13 at 6:47
That works, it's still super slow to checkout (guessing each path in the svn update is making remote calls). Running the
svn cat
version with xargs -P 50 it's able to open a lot of parallel network connections.– Dougnukem
Nov 23 '13 at 6:47
Yes it's walking the tree so it's really no different than what you were doing by hand. Sadly, not only is it make multiple requests, it's doing so in separate sessions. Which means it has to open a fresh TCP connection, negotiate SSL (if used), handle authentication (if required), do the OPTIONS request(s), and then finally do the REPORT. We ought to be filling in the REPORT with an entry along the entire path. The same way we do if you run an update after creating a situation like this.
– Ben Reser
Nov 23 '13 at 7:29
Yes it's walking the tree so it's really no different than what you were doing by hand. Sadly, not only is it make multiple requests, it's doing so in separate sessions. Which means it has to open a fresh TCP connection, negotiate SSL (if used), handle authentication (if required), do the OPTIONS request(s), and then finally do the REPORT. We ought to be filling in the REPORT with an entry along the entire path. The same way we do if you run an update after creating a situation like this.
– Ben Reser
Nov 23 '13 at 7:29
@Dougnukem I did some work tonight toward improving this. If you'd like to give it a spin (via a source build on Subversion trunk, I'd be very interested in how much it helps). I can probably improve it more but that's a more intrusive change and this halved the time an
svn update --parents
took for me over DAV.– Ben Reser
Feb 8 '14 at 5:22
@Dougnukem I did some work tonight toward improving this. If you'd like to give it a spin (via a source build on Subversion trunk, I'd be very interested in how much it helps). I can probably improve it more but that's a more intrusive change and this halved the time an
svn update --parents
took for me over DAV.– Ben Reser
Feb 8 '14 at 5:22
It seems like this should be the accepted answer @Dougnukem
– solvingJ
Aug 9 '18 at 17:53
It seems like this should be the accepted answer @Dougnukem
– solvingJ
Aug 9 '18 at 17:53
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f20105349%2fsparse-svn-update-of-deep-directory-structure%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
And if you get individual files using
svn cat
? For examplesvn cat "http://myRepo.com/trunk/path/to/file.xml" > "path/to/file.xml"
– janos
Nov 20 '13 at 21:49
I could get individual files and use mkdir -p $(dirname $FILE_PATH) but if I use the svn update --set-depth I can edit and track it in SVN (e.g. I could commit back to those files or update to the latest).
– Dougnukem
Nov 21 '13 at 1:46