从 Eclipse 历史记录视图中打开工作副本文件

发布于 2024-08-23 18:47:50 字数 276 浏览 5 评论 0原文

Eclipse 的历史视图向您显示在某个版本中更改的文件列表。当您打开其中之一的上下文菜单时,您可以选择“打开”选项,该选项将打开该版本中该文件的视图。

如何直接从历史视图打开所选文件(即工作副本版本中的文件)的编辑器?

背景是我想使用历史视图来查找最近更改过的文件以进行代码审查。人们通过 subversion 提交,我使用 subclipse 将 eclipse 连接到 subversion 服务器。

今天,我必须使用“打开资源”/“打开类型”功能并键入可以从历史视图中读取的文件名。

The history view of eclipse shows you a list of files changed in a certain revision. When you open the context menu on one of these you have the option 'Open' which opens a view of that file in that revision.

How can I open the editor for the selected file, i.e. the file in the version of the working copy, right from the history view?

Background is that I want to use the history view to find files that have been changed recently to do code reviewing. People commit via subversion and I use subclipse to connect eclipse to the subversion server.

Today, I must use the 'Open resource'/'Open type' function and type the name of the file that I can read from the history view.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

荆棘i 2024-08-30 18:47:50

正如您所注意到的,当查看修订版 X 的文件时,您无法直接打开工作副本中的同一文件...

但是,在对更改进行代码审查时,我通常发现不仅查看当前版本很有用,但要查看以下之间的修改:

  • 我正在历史记录中查看的修订版中的文件
  • 和当前文件。

这可以使用“比较”编辑器来完成。

要打开它:

  • 当您在历史视图中时,右键单击您感兴趣的修订版
  • 行在菜单中,您可以选择:
    • “将当前版本与 X 进行比较”:这将打开当前工作副本与右键单击的修订版之间的比较
    • “与先前状态比较”:这将打开您右键单击的版本与先前版本之间的比较
  • 如果有多个文件受到该版本的影响,您将看到一个屏幕,允许您选择要使用哪个文件进行比较

优点:

  • 您可以看到您正在查看的版本所带来的修改
  • 或者您可以看到给定修订后完成的所有修改

缺点:

  • 比较视图需要大屏幕,才能同时打开文件的两个版本...

As you noticed, when looking at a file at revision X, you cannot directly open the same file that's in the working copy...

But, when doing code reviews of changes, I generally find useful to not only look at the current version, but to look at the modifications between :

  • The file in the revision I'm looking at in the history
  • And the current file.

This can be done with the "Compare" editor.

To open it :

  • When you are in the History View, right click on the line of the revision that interests you
  • In the menu, you can choose either :
    • "Compare current with X" : This will open a comparison between your current working copy, and the revision you right-clicked on
    • "Compare with previous state" : This will open a comparison between the revision you right-clicked on, and the previous revision
  • If several files were impacted by that revision, you'll have a screen that allows you to choose which file you want to work with for the comparison

Advantages :

  • You can see the modifications brought by the revision you're reviewing
  • Or you can see all modifications done after a given revision

Drawbacks :

  • The Compare View requires a large screen, to open two versions of the file at the same time...
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文