开发者

Anyway to get MercurialEclipse to behave like the NetBeans Mercurial support?

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.

Anyway to get MercurialEclipse to behave like the NetBeans Mercurial support?

  • 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 change开发者_如何学Pythons 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.


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.


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.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜