Eclipse 中的 SVN 责备

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/223657/
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 18:29:51  来源:igfitidea点击:

SVN blame in Eclipse

eclipsesvn

提问by David Santamaria

Yesterday, I discovered the Subversion (SVN) blamefeature, and I was wondering, is this feature available from Eclipse?

昨天,我发现了 Subversion (SVN) 的blame功能,我想知道,Eclipse 是否提供此功能?

回答by rjray

As was pointed out, you would currently have to first install a plug-in to enable Subversion support. I recommend Subversive, myself, and a search here on Stack Overflow for the tags "eclipse" and "subversion" together will show several previous threads regarding "gotchas" to watch out for when installing the connectors (Subversive is separated into two parts-- the core support and "connectors" that provide the SVN glue).

正如所指出的,您目前必须首先安装插件才能启用 Subversion 支持。我推荐Subversive和我自己,在 Stack Overflow 上搜索标签“eclipse”和“subversion”一起将显示之前的几个关于安装连接器时要注意的“问题”的线程(Subversive 分为两部分——提供 SVN 胶水的核心支撑和“连接器”)。

Once you have that installed, you can configure repositories, create new projects by directly entering a new repository address and checking it out, or associate an existing project that was already attached to SVN with the repository by have Subversion look it over.

安装完成后,您可以配置存储库,通过直接输入新的存储库地址并签出来创建新项目,或者通过让 Subversion 查看来将已经附加到 SVN 的现有项目与存储库相关联。

Once you've done that, this is how you access the "svn blame" command, also known as "annotate" or "praise":

一旦你这样做,这就是你如何访问“svnblame”命令,也称为“注释”或“赞美”:

For a resource, right click on the resource name in the file-explorer pane to pop-up the context menu (you can also get this menu by right-clicking anywhere in the editor itself). Under the "Team" heading (which is also where you access all the SVN commands, as Eclipse generalizes source control under the heading of "Team Sharing"), select "Show Annotation". On my Mac PowerBook, the keyboard shortcut for this is Ctrl+ Option+ A, I'm not near my Linux or Windows XP platforms to see what the shortcut us on either of them (Mac OS X ports tend to tweak keyboard shortcuts to adhere to the "greater good" view of what a Mac application should do).

对于资源,在文件浏览器窗格中右键单击资源名称以弹出上下文菜单(您也可以通过右键单击编辑器本身的任意位置来获取此菜单)。在“团队”标题下(这也是您访问所有 SVN 命令的地方,因为 Eclipse 在“团队共享”标题下概括了源代码控制),选择“显示注释”。在我的Mac的PowerBook,该键盘快捷键为Ctrl+ Option+ A,我不靠近我的Linux或Windows XP平台上,看看有什么快捷我们其中一方(Mac OS X的港口倾向于调整键盘快捷键来坚持“更好”的 Mac 应用程序应该做什么的观点)。

After a bit of time conversing with the Subversion repository, the left-gutter of the editor window will show a series of colored bars. If you have line-numbers enabled for your editor, these will overlay the numbers. Otherwise, they'll just be bars. Each alternation of color represents a break where responsibility changes from one user to another. If you hover the pointer over a bar, a tooltip will appear identifying the responsible user, the revision/commit that the lines are from, date and the check-in comment. The color of the bars will vary from committer to committer, and revision to revision. They'll be varying shades of the same base color, but Eclipse will try to make them visually distinct (as much as possible). When you're hovering over a snippet, it highlights slightly, and all other bars that are tied to the same revision will also highlight.

在与 Subversion 存储库交谈一段时间后,编辑器窗口的左侧装订线将显示一系列彩色条。如果您为编辑器启用了行号,这些将覆盖数字。否则,他们将只是酒吧。颜色的每一次交替都代表着一个中断,责任从一个用户变为另一个用户。如果您将指针悬停在栏上,则会出现一个工具提示,标识负责用户、行的修订/提交、日期和签入注释。条形的颜色会因提交者和修订版本而异。它们将是相同基色的不同深浅度,但 Eclipse 会尝试使它们在视觉上不同(尽可能)。当您将鼠标悬停在片段上时,它会略微突出显示,

(Now, don't ask me how to turn it off. Thus far, my only solution has been to close the buffer and re-open it!)

(现在,不要问我怎么把它关闭。迄今为止,我唯一的解决办法是关闭缓冲区,并重新打开它!)