复制时忽略外部 [英] ignoring externals when copying
问题描述
当我从源复制到目标时,我想忽略外部.我试过
I want to ignore externals when I copy from source to destination. I tried
svn cp --ignore-externals sourcepath destpath
但外部仍然存在.知道我怎样才能做到这一点吗?
but the externals still exist. Any idea how I can make this work?
我的源码结构如下:
trunk
dir1 with sub dir ( need all of this)
dir2 with sub dir ( each sub dir has a file with svn external prop set)
dir3 with sub dir ( need all of this)
我应该能够通过一个 cp 命令获得除分支中的外部对象之外的所有我想要的东西.
I should be able to get all that I want except externals in my branch with one cp command.
谢谢.
推荐答案
你不能.
svn:externals
是文件或目录本身 上的属性.它与文件中的任何实际文本一样是文件的一部分.想要复制一个没有属性的目录就像想要复制一个没有该文件中所有文本的文件.就是做不到.
The svn:externals
is a property on the file or directory itself. It's as much a part of the file as any actual text in the file. Wanting to copy a directory without the property is like wanting to copy a file without all of the text in that file. It just can't be done.
此外,--ignore-externals
标志不会删除 svn:externals
属性,它只是阻止 Subversion 在您执行 svn co
或 svn update
.
Also, the --ignore-externals
flag doesn't remove the svn:externals
property, it merely prevents Subversion from acting upon that property when you do an svn co
or an svn update
.
如果有任何安慰,您可以使用 -R
标志递归删除属性:
If it's any consolation, you can recursively delete properties by using the -R
flag:
$ svn propdel -R svn:externals destdir
顺便说一下,您是在工作副本目录上还是在 URL 上执行此操作?
By the way, are you doing this on your working copy directory, or on the URL?
这篇关于复制时忽略外部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!