如何使用eclipse git'比较版本与Ancestor'

时间:2014-03-21 04:46:32

标签: eclipse

我在ubuntu 12.04上使用eclipse 4.3.2和egit 3.3。 我尝试了eclipse 4.3.2 with egit 3.2,eclipse 4.3.1 with egit 3.2。带有egit 3.3的Eclipse 4.4 M6,都给了我同样的错误。

我设置了一个本地git存储库。当我显示历史记录然后单击1提交并单击“比较版本与祖先”时,我收到此错误,说“打开编辑器失败”

你知道我该如何解决这个问题吗?

谢谢。

以下是我在.log中看到的内容:

!ENTRY org.eclipse.egit.ui 4 0 2014-03-20 12:53:26.436
!MESSAGE Opening Editor Failed
!STACK 0
java.lang.NullPointerException
    at org.eclipse.egit.ui.internal.CompareUtils.compare(CompareUtils.java:590)
    at org.eclipse.egit.ui.internal.history.CommitFileDiffViewer.showTwoWayFileDiff(CommitFileD
iffViewer.java:534)
    at org.eclipse.egit.ui.internal.history.CommitFileDiffViewer$7.run(CommitFileDiffViewer.jav
a:249)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContribution
Item.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501
)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.jav
a:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1392)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3742)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3363)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.j
ava:1113)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.jav
a:997)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLa
uncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.ja
va:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

1 个答案:

答案 0 :(得分:0)

如果文件不在Eclipse中导入的项目中,则似乎会发生这种情况。如果您正在查看的存储库无论如何都包含Eclipse项目,那么导入它们应该会有所帮助。否则,您可以将存储库内容作为“常规项目”导入Eclipse。

有一个EGit bug report描述了您遇到的同样问题。您可能想投票支持此错误。将项目作为项目导入Eclipse感觉更像是解决问题而不是解决方案。