我正在Subversion中创建我的第一个项目。到目前为止
branches
tags
trunk
我认为我需要马上把分支变成单数,然后重新开始。更新分支是常态。
我一直在trunk中工作,并将内容移动到tag,如下所示。
mkdir tags/1.0
cp -rf trunk/* tags/1.0
svn add tags/1.0
svn commit -m " create a first tagged version"
我的直觉告诉我这是完全错误的,我应该使用svn copy维护文件之间的某种关系。我以这种方式创建的文件之间将没有任何关系,而且我确信我将错过Subversion特性。我说的对吗?
我是否应该使用svn copy单独的文件?
mkdir tags/1.0
svn add tags/1.0
svn copy trunk/file1 tags/1.0
svn copy trunk/file2 tags/1.0
svn copy trunk/file3 tags/1.0
svn commit -m " create a first tagged version"
我是否应该在整个目录上使用svn copy ?
svn copy cp -rf trunk tags/1.0
svn commit -m " create a first tagged version"
As noted by @victor hugo, the "proper" way is to use svn copy.
There is one caveat though. The "tag" created that way will not be a true tag,
it will be an exact copy of the specified revision, but it will be a different
revision itself. So if your build system makes use of svn revision somehow
(e.g. incorporates the number obtained with 'svn info' into the version of
the product you build), then you won't be able to build exactly the same product
from a tag (the result will have the revision of the tag instead of that of the
original code).
从设计上看,在svn中没有办法创建真正合适的元标记。
As noted by @victor hugo, the "proper" way is to use svn copy.
There is one caveat though. The "tag" created that way will not be a true tag,
it will be an exact copy of the specified revision, but it will be a different
revision itself. So if your build system makes use of svn revision somehow
(e.g. incorporates the number obtained with 'svn info' into the version of
the product you build), then you won't be able to build exactly the same product
from a tag (the result will have the revision of the tag instead of that of the
original code).
从设计上看,在svn中没有办法创建真正合适的元标记。