Subversion 中的标签是如何制作的? [英] How are tags made in Subversion?

查看:21
本文介绍了Subversion 中的标签是如何制作的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何在 subversion 中使用标签.每次到达发布里程碑时,我都会创建一个标签.

I know how to use tags in subversion. I create a tag every time I get to a release milestone.

我不太明白它们是如何工作的.

What I don't quite understand is how they work.

标签只是根据我指定的修订版制作的副本吗?或者是一个更像是参考的标签,其中内部颠覆只是说GO TO/trunk/project/Revision 5 或其他什么.

Is a tag just a copy, made from what ever revision I specify? Or is a tag more like a reference, where internally subversion just says GO TO /trunk/project/ Revision 5 or whatever.

创建标签的命令 (svn copy) 似乎暗示它是一个副本,但我看到其他人写道 subversion 并没有真正复制任何东西.

The command to create a tag (svn copy) seems to imply that it's a copy, but I've seen other people write that subversion doesn't really copy anything.

假设我只转储存储库的 HEAD 修订版.除了标签,我不关心任何历史.这些标签是否与 Head 修订版的其余部分一起转储?

Say I dump just the HEAD revision of a repository. I don't care about any history except the tags. Are those tags dumped along with the rest of the Head revision?

最后,这一切只是我真的不想知道的编程魔法吗.

Finally, is all this just programming magic that I don't really want to know.

推荐答案

是的,一个 svn 副本(无论你把它看作一个标签、一个分支,还是在主干中复制一个文件)都是一样的.SVN 将在内部创建一个指向该修订版源位置的指针.如果您随后对副本进行更改(如果它是分支或主干中复制的文件,您可能会这样做,但不应该对标签进行更改),SVN 将只存储更改的内容,而不是创建一个全新的复制.

Yes, a svn copy (whether you are thinking of it as a tag, a branch, or copying a file in trunk) is all the same. SVN will internally create a pointer to the source location at that revision. If you then make changes to the copy (which you are likely to do if it is a branch or a copied file in trunk, but shouldn't do for tags), SVN will only store what was changed, rather than creating a whole new copy.

这篇关于Subversion 中的标签是如何制作的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆