[英]svn checkout a single file but with full folder structure
Currently I am checking out a single file from a SVN repository like this: 目前,我正在从SVN存储库中签出单个文件,如下所示:
SVN complete URL : SVN完整网址:
"https://svn_test_url/trunk/Documents/filename.txt"
Using the below command : 使用以下命令:
svn co --depth=empty "https://svn_test_url/trunk/Documents/" "local_folder_name" & cd "local_folder_name" & svn up "filename.txt"
And finally I get: 最后我得到:
-local_folder_name
-.svn
-filename.txt
Question : I would like to checkout the complete folder structure till file. 问题:我想签出完整的文件夹结构,直到文件。
So according to my example I expect the folder structure be like: 因此,根据我的示例,我希望文件夹结构如下:
-local_folder_name
-.svn
-trunk
-Documents
-filename.txt
Any help will be really helpful and appreciated. 任何帮助都会非常有帮助和赞赏。 Thank you in advance 先感谢您
Since you already have to know the folder path to check out the file, just call mkdir
first: 由于您已经知道要检出文件的文件夹路径,因此只需先调用mkdir
:
mkdir "local_folder_name\trunk\Documents" &
svn co --depth=empty "https://svn_test_url/trunk/Documents/" "local_folder_name" &
cd "local_folder_name" &
svn up "filename.txt"
Or if you really want SVN to handle it, use the --parents
switch on svn up
and change your checkout root: 或者,如果您真的希望SVN处理它,请使用--parents
开关打开svn up
并更改您的结帐根目录:
svn co --depth=empty "https://svn_test_url" "local_folder_name" &
cd "local_folder_name" &
svn up --parents "trunk/Documents/filename.txt"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.