开发者

create folder structure based on file

开发者 https://www.devze.com 2023-04-06 15:04 出处:网络
Currently, I\'m trying to improve my svn merge process. To achieve this, I started creating a shell script that looks up which folders are changed since the last dropmerge. The output file of that scr

Currently, I'm trying to improve my svn merge process. To achieve this, I started creating a shell script that looks up which folders are changed since the last dropmerge. The output file of that script looks like this:

/components/intmodules/
/components/ext/modules/EmailConn Runtime/
/components/emailconn/
/components/ftpconn/
/components/
/re开发者_JAVA百科dist/

Now I want this folder structure to be created on the file system, using svn updates. All folders should be checked out with --depth files, except for the deepest (non-components), those should be checked out with --depth infinity.

How would I achieve this. How can I iterate over the folders and checkout/update these folders, including those with spaces in the name?


It is not a good idea to merge into a working copy that is not depth infinite, so this might not be a good idea in general.

That said, there is a sample script in the Subversion repository for checking out a mixed depth working copy based on an input file that describes what you want. I would suggest you use this script to do the checkout and adjust your script to produce the file format that the script wants. It is pretty similar to what you show above so should not be too hard.

http://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/svn-viewspec.py

0

精彩评论

暂无评论...
验证码 换一张
取 消