eclipse 如何使用eclipse在SVN中制作标签?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10650689/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 21:03:43  来源:igfitidea点击:

How to make a tag in SVN using eclipse?

eclipsesvntags

提问by choop

I'm using eclipse and Subversion (SVN)is my new version control.

我正在使用 eclipse 并且Subversion (SVN)是我的新版本控制。

Till now I used to use Concurrent Versions System (CVS)as my version control and after deploy operation I used to tag my projects with Tag as Versionin eclipse like this:
Team --> 'Tag as Version..' --> Version-X-Y-Z

到现在为止,我曾经Concurrent Versions System (CVS)用作我的版本控制,在部署操作之后,我曾经Tag as Version在 Eclipse 中像这样标记我的项目:
Team --> 'Tag as Version..' --> Version-XYZ

How can I do it now using SVN?

我现在如何使用SVN

采纳答案by Raghuram

You would need to install an Eclipse Subversion plugin like subclipseor Subversive. This will provide the same facility as that available for CVS.

您需要安装 Eclipse Subversion 插件,如subclipseSubversive。这将提供与 CVS 相同的功能。

For instance, here is the documentationon how to tag using Subversive.

例如,这里是有关如何使用 Subversive 进行标记的文档

回答by Bathiya Priyadarshana

Normally, SVN has three root level directories,

通常,SVN 有三个根级目录,

  1. trunk
  2. tags
  3. branches
  1. 树干
  2. 标签
  3. 分行

In SVN server, for each project, you have the same above directory structure.

在 SVN 服务器中,对于每个项目,您都具有上述相同的目录结构。

'trunk' is where you keep your ever developing code base.

“主干”是您保存不断开发的代码库的地方。

'tags' is used for the same purpose that you've indicated. i.e. for versioning.

'tags' 用于您所指出的相同目的。即用于版本控制。

'branches' is used for things like feature developments/individual development.

“分支”用于诸如功能开发/个人开发之类的事情。

An example, Let's say I am developing a database synchronization application which will go out as Pilot release, Moonshine release, Kilimanjaro release, Great release and onwards..

一个例子,假设我正在开发一个数据库同步应用程序,它将作为 Pilot 版本、Moonshine 版本、Kilimanjaro 版本、Great 版本及以后发布。

I start in 'trunk' and continue my development for let's say 2 months at which time I am ready for Pilot release..

我从 'trunk' 开始并继续我的开发,比如说 2 个月,那时我已经准备好发布 Pilot 了..

Then I create a 'tag' of the 'trunk' which I can name 'Pilot tag' which will be released to customers..

然后我创建一个“树干”的“标签”,我可以将其命名为“飞行员标签”,它将发布给客户。

Now my main feature developments for next release which is 'Moonshine release' will continue in the 'trunk'. If their are any immediate bug fixes or show-stoppers in my 'Pilot release' those will be done in the 'Pilot tag' and released to the customers immediately..

现在我的下一个版本“Moonshine 版本”的主要功能开发将在“主干”中继续。如果他们在我的“试点版本”中有任何直接的错误修复或展示阻止,这些将在“试点标签”中完成并立即发布给客户。

However since the above fixes are not in my 'trunk' code, sometime later (before releasing the Moonshine release) I will 'merge' the modifications done in my 'Pilot tag' back to 'trunk'.

但是,由于上述修复程序不在我的“主干”代码中,因此稍后(在发布 Moonshine 版本之前)我会将“试点标签”中所做的修改“合并”回“主干”。

Here, there can be conflicts since the same code lines could have been modified in both 'Pilot tag' (for bug fixing mentioned earlier) and in 'trunk' (for feature modifications/development of new release). In this situation, you have to carefully review the conflicts, edit any such conflicts and accept the changes.

在这里,可能存在冲突,因为相同的代码行可能在“Pilot tag”(用于前面提到的错误修复)和“trunk”(用于新版本的功能修改/开发)中被修改。在这种情况下,您必须仔细检查冲突,编辑任何此类冲突并接受更改。

TortoiseSVN is the primary client tool for using SVN. It embeds features directly to your Windows right click menu for all above mentioned functionalities like commit, update, merge, branch (i.e. tag or branch) etc.

TortoiseSVN 是使用 SVN 的主要客户端工具。它将功能直接嵌入到您的 Windows 右键单击​​菜单中,用于所有上述功能,如提交、更新、合并、分支(即标记或分支)等。

And for conflict resolution I personally prefer 'Beyond Compare' which is a third party application which you have to buy. You can setup TortoiseSVN to invoke Beyond Compare as the application for conflict resolution and it is far better and user-friendly than the built in conflict editor in TortoiseSVN tool.

对于冲突解决,我个人更喜欢“Beyond Compare”,这是您必须购买的第三方应用程序。您可以设置 TortoiseSVN 来调用 Beyond Compare 作为解决冲突的应用程序,它比 TortoiseSVN 工具中的内置冲突编辑器要好得多且用户友好。

回答by Craig Solinski

To TAG, using Eclipsewith SubClipse:

标记,使用Eclipsewith SubClipse

  • select Team, Branch/Tag, then click the 'select' button and drill into the appropriate project, then click 'tags' directory, and drill down to your last tag name or any similar name you plan on creating.

  • The full URL is copied into bar, then you can edit it changing the rightmost tag name portion to any new tag name.

  • Click next, select from HEAD (HEAD is referring to the repo path you have established already on previous page so in fact may be the Head of a Branch).

  • Enter a comment like 'tagging <appName> Release <for reason> version x.y.z'

  • 选择 Team、Branch/Tag,然后单击“选择”按钮并深入到适当的项目,然后单击“标签”目录,并深入到您的最后一个标签名称或您计划创建的任何类似名称。

  • 完整的 URL 被复制到 bar 中,然后您可以编辑它,将最右边的标签名称部分更改为任何新的标签名称。

  • 单击下一步,从 HEAD 中选择(HEAD 指的是您在上一页中已经建立的 repo 路径,因此实际上可能是分支的负责人)。

  • 输入评论如 'tagging <appName> Release <for reason> version x.y.z'

Finish -

结束 -

You can prior to this point or after, open the Eclipse 'SVN Console' from dropdown on right bottom of page, and see most recent SVN commands generated and there results.

您可以在此之前或之后,SVN Console从页面右下角的下拉列表中打开 Eclipse ' ',并查看最近生成的 SVN 命令和结果。

回答by Ravi

Every checkin in SVN creates an new revision number. SVN revision number should be equivalent of your tag. Remember the SVN revision number for the production build.

SVN 中的每次签入都会创建一个新的修订号。SVN 修订号应该等同于您的标签。记住生产版本的 SVN 修订号。

回答by rdguam

Tagging and branching in Subversion works differently from CVS. In Subversion, "to create a tag" means to copya revision (typically HEAD, but it can be some other revision) to a new directory within the "tags" directory. That is why, when you go to Team->Branch/Tag..., Eclipse is asking you for a URL to copy to.

Subversion 中的标记和分支与 CVS 的工作方式不同。在 Subversion 中,“创建标签”意味着修订版(通常是 HEAD,但也可以是其他修订版)复制到“标签”目录中的新目录。这就是为什么当您转到 时Team->Branch/Tag...,Eclipse 会要求您提供要复制到的 URL。

Check out this pagefor a more detailed explanation of tagging in Subversion.

查看此页面以获取有关 Subversion 中标记的更详细说明。

To help you understand how things are done "the SVN way," I'd recommend practicing Subversion usage from the command line, before trying it on Eclipse. Or, if not, at least open an SVN console in Eclipse to see the commands that it runs--you'll see that the tagging operation is indeed an svn copy.

为了帮助您了解事情是如何“以 SVN 方式”完成的,我建议在 Eclipse 上尝试之前,从命令行练习 Subversion 的使用。或者,如果没有,至少在 Eclipse 中打开一个 SVN 控制台以查看它运行的命令——您将看到标记操作确实是一个svn copy.