SVN Copy:如果目标路径不存在则创建它
当我将 SVN 服务器中的目录复制到同一服务器中的另一个目录时,是否可以使用某些选项来创建目录,以防该目录不存在?例如:
svn copy file:///home/svn/folder/app/trunk file:///home/svn/folder/app/branches/release
...当没有 /branches 时/ 文件夹?我知道如果我只想创建一个单级目录,我可以做到这一点(如果命令停止在“/branches”,但我想将其进一步复制到“release”中,它会起作用)。但是,如果我尝试该命令,它会抱怨缺少 /branches/ 文件夹来创建 /release 文件夹。
对此有任何明显或有创意的解决方案吗?我只是想要创建我指定的路径结构(如果它发现它不存在)的东西。
Is there some option I can use to create a directory in case it doesn't exist when I'm copying a directory within a SVN server to another directory within the same server? For example:
svn copy file:///home/svn/folder/app/trunk file:///home/svn/folder/app/branches/release
...when there's no /branches/ folder? I know I can do it if I just wanted to create a single level directory (it would work if the command stopped at "/branches" however I want to copy it further into "release"). However if I try that command it will complain about the lack of a /branches/ folder to create the /release folder in.
Any solution either obvious or creative to this? I'd just like something that creates the path structure I specify if it finds it doesn't exist.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将
--parents
选项添加到svn copy
命令(输入svn help copy
了解更多详细信息以及可以使用复制执行的其他操作)。Add the
--parents
option to thesvn copy
command (typesvn help copy
for more details and other things you can do with copy).