Reputation: 1503
I need to execute several SVN update processes in background under same folder structure as I have many subfolders and want to speed up whole thing.
I have folder structure like this:
/folder/subfolder1/
/folder/subfolder2/
/folder/subfolder3/
...
/folder/subfolder1000/
I'm trying to do something like this in bash script:
svn up /folder/subfolder1 &
svn up /folder/subfolder2 &
svn up /folder/subfolder3 &
Problem is in that SVN complains that '/folder' is locked and only first task finish correct, other two don't and got error message like this:
svn: Working copy '/folder' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
Is there a way to accomplish task on this way with several parallel SVN process because doing one by one folder (selected by some other process) takes a lot time to finish?
P.S: I'm doing all this in higher programing language (PHP-CLI) but for simplicity of question I write it as bash script (got same problem).
Upvotes: 2
Views: 959
Reputation: 124656
In older versions of Subversion every subdirectory had its own .svn
file. If your svn
is old enough, and you run the commands in the subdirectories, then I think that won't lock the parent directory and the commands can succeed in parallel. Like this:
(cd /folder/subfolder1; svn up)&
(cd /folder/subfolder2; svn up)&
(cd /folder/subfolder3; svn up)&
Although, to be honest, I thought your original command should work too, I don't see why the parent directory gets locked.
Upvotes: 2