无论如何,要让 MercurialEclipse 表现得像 NetBeans Mercurial 支持一样?

发布于 2024-12-05 12:34:24 字数 865 浏览 1 评论 0原文

我已经安装了 MercurialEclipse 插件。我发现它很难使用。

我在 NetBeans 中使用 Mercurial 支持已经有一段时间了,如果可能的话,我希望能够在 Eclipse 中执行很多操作:

  • 在 NetBeans 中,对源代码的任何更改都会在行中突出显示 号码区。新代码为绿色,修改后的代码为蓝色,已删除 代码是红色的。

  • 项目资源管理器中的文件显示为蓝色或绿色以进行修改 和新建文件。

在此处输入图像描述

  • 在 NetBeans 中,我可以右键单击项目资源管理器中的任何目录 并转到 Mercurial->diff 获取所有文件的视觉差异(在 我单击的目录)自上次提交以来已更改。

    当我右键单击 Eclipse 中的目录时,我会得到一个比较,但是 只有 1 个选项(彼此)被禁用。

    更糟糕的是,当我 右键单击我知道已更改的实际文件并与我进行比较 给定 3 个选项(本地历史记录、父变更集、不同的 变更集)。如果我点击父变更集,它不会给我一个差异。我认为这是因为这是自 3 次提交以来文件第一次发生更改。但这是行不通的,我只是想看看我做了什么改变,以便在提交之前对其进行审查。我希望它能显示自上次提交以来我所做的更改,即我将要提交的更改。

请注意,我并不是想抨击 Eclipse,也不是想赞扬 NetBeans。我只是想知道是否有一种方法可以像我在 NetBeans 中习惯的那样在 Eclipse 中设置工作流程。

I have installed the MercurialEclipse plugin. I am finding it very hard to use.

I have been using the Mercurial support in NetBeans for a while now, there are many things I would like to be able to do in Eclipse if possible:

  • In NetBeans any changes to source code are highlighted in the line
    number area. New code is green, modified code is blue, and removed
    code is red.

  • Files in the project explorer appear as blue or green for modified
    and new respectively.

enter image description here

  • In NetBeans I can right click any directory in the project explorer
    and go to Mercurial->diff to get a visual diff for all files (in the
    directory I clicked
    ) that have changed since the last commit.

    When I right click a directory in Eclipse I am given a compare with but
    with only 1 option (each other) that is disabled.

    Even worse, when I
    right click an actual file I know has changed and go to compare with I am
    given 3 options (local history, parent changeset, different
    changeset
    ). If I click parent changeset it does not give me a diff. I assume this is beacause its the first time the file has changed since 3 commits ago. Which doesn't make since, I just want to see what I have changed to review it before commiting. I would like this to show me the changes I have made since my last commit i.e. the changes I will be committing.

Please note I am not trying to bash on Eclipse and I am not trying to Praise NetBeans. I am just wanting to know if there is a way to setup a workflow in Eclipse like I am used to in NetBeans.

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

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

发布评论

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

评论(2

丘比特射中我 2024-12-12 12:34:24

您请求的某些内容并不特定于您正在使用的 VCS,它们是 Eclipse Team 支持的一部分,因此它们可以与任何 VCS 系统配合使用。

1) 显示代码更改:最接近的 Eclipse 是Team ->显示注释,但我认为这不会显示当前版本中添加/更改/删除的行。我将向 Eclipse 提交关于此的增强请求。

2) Eclipse 对于添加和更改的文件显示不同的图标。您应该看到蓝色 + 表示已添加的文件,棕色 * 表示已更改的文件。

3) 要轻松区分已提交的内容,您可以执行团队 ->同步。这将打开同步视图。另一种方法是你可以建立一个团队 ->在任何级别提交,然后在文件列表中双击该文件,这将显示文件之间的比较(一次显示一个文件)。您可以做的另一件事是选择“比较”->“另一个修订版...并在对话框中选择所需的修订版(这将在单个比较编辑器中显示所有随附的文件)。最后,比较 ->特定文件上的父级变更集确实为我显示了提交的父级的更改,即使它在最近的修订中没有更改。您可能在 Mercurial Eclipse 中遇到了错误。

确保您使用的是最新版本的 Eclispe 和 Mercurial Eclipse。 Mercurial Eclipse 非常活跃,他们一直在添加和修复东西。我在 Eclipse 3.7.1 和 Mercurial Ecipse 1.9.1 上对此进行了测试。

Some of the things you are requesting are not specific to the VCS you are using, they are part of the Eclipse Team support, so they will work with any VCS system.

1) Showing the code changes: The closest Eclipse has to that is Team -> Show Annotations, but I don't think this will show the added/changed/deleted lines from the current version. I would file an enhancement request to Eclipse about this.

2) Eclipse shows different icons for added and changed files. You should see a blue + for an added file and a brown * for a changed file.

3) To easily get a diff from what's committed, you can do Team -> Synchronize. This brings up the Synchronize View. Another way is you can do a Team -> Commit at any level and then in the listing of the files, double-click the file which will bring up the comparison between the files (that will show one file at a time). Another thing you can do is select Compare -> Another Revision... and select the desired revision in the dialog (this will show all enclosed files in a single compare editor). Finally, the Compare -> Parent Changeset on a specific file does shows the changes from the committed parent for me, even if it was not changed in the most recent revision. It's possible you have encountered a bug in Mercurial Eclipse.

Be sure you are using the latest version of Eclispe and also Mercurial Eclipse. Mercurial Eclipse is pretty active and they are adding and fixing things all the time. I tested this on Eclipse 3.7.1 with Mercurial Ecipse 1.9.1.

风流物 2024-12-12 12:34:24

这是一个较旧的问题,但我遇到了同样的问题,并发现此信息很有用。

我正在从 netbeans 过渡到 eclipse。我不是专家,但是:

  1. 对于文本突出显示,您可以使用“快速差异”
    一个。窗口 ->偏好->一般->编辑->快速差异
    b.使用 Mercurial Quickdiff 启用快速 diff 似乎主要模仿 netbeans。
  2. 用于文件变更集的差异。我认为您需要使用前面提到的团队同步视角。一旦你习惯了,它实际上非常光滑。

This is an older question, but i had the same problem, and found this info useful.

I'm transitioning from netbeans to eclipse. I'm no expert but:

  1. For text highligting you can use the "quick diff"
    a. Windows -> preferences -> General -> editors -> quickdiff
    b. enabling quick diff with mercurial quickdiff seems to mimic netbeans mostly.
  2. For diff's of a changeset of files. I think you need to use the Team Syncroniztion perspective as is mentioned before. Its actually pretty slick once you get used to it.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文