在SVN中,如何只复制目录的子目录到另一个目录? [英] In SVN, how do I copy just the subdirectories of a directory to another directory?
问题描述
通过命令行,我通常这样做:
cp -rRp / path / to / a\_folder /。 / path / to / another \_folder
这只会复制 a_folder 至 another_folder 。在SVN我需要做同样的事情,但不能弄清楚。我总是最终得到这个:
/ path / to / another\_folder / a\_folder
即使我尝试这种方式,SVN也会抛出:
svn copy file:/// path / to / a\_folder / * file:/// path / to / another\_folder
pre>
它说它不存在。
EDIT: >
这可能会有帮助。我的项目的目录结构如下所示:
my_project
/ branches
/ tags
/ trunk
/ vendor
/1.1
我需要获取内容
解决方案您是否考虑过使用svn merge?
给出如下的仓库:
trunk / a_folder / foo
trunk / a_folder / bar
trunk / new_folder / baz
使用这些命令合并foo和bar目录:
cd trunk / new_folder
svn merge -r1:HEAD http:// svn / repo / trunk / a_folder。
Via command line, I usually do this:
cp -rRp /path/to/a\_folder/. /path/to/another\_folder
This copies just the contents underneath a_folder to another_folder. In SVN I need to do the same thing, but can't figure it out. I always end up with this:
/path/to/another\_folder/a\_folder
SVN throws up even when I try this:
svn copy file:///path/to/a\_folder/* file:///path/to/another\_folder
It says it does not exist.
EDIT:
This would probably help. The directory structure for my project looks like this:
my_project /branches /tags /trunk /vendor /1.1
I need to get the contents of 1.1 under vendor into the trunk without it actually copying the 1.1 folder.
解决方案Have you considered using svn merge?
Given a repo like this:
trunk/a_folder/foo trunk/a_folder/bar trunk/new_folder/baz
use these commands to merge the foo and bar directories:
cd trunk/new_folder svn merge -r1:HEAD http://svn/repo/trunk/a_folder .
这篇关于在SVN中,如何只复制目录的子目录到另一个目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!