Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » Bogus syntax complaint
Bogus syntax complaint [message #906747] Sun, 02 September 2012 12:18 Go to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
JGit/EGit seems to be under the impression that '@' is illegal in a branch or reference name. In fact it's perfectly legitimate in Git. Here's what happens when I create a branch called "foo@barr" in EGit with the default option of checking out the newly created branch:

First I get a RevisionSyntaxException with the message "Branch Could Not Be Created", though in fact the the branch is created. From this point on I will get more RevisionSyntaxExceptions at every use of this new branch, for example if I run Compare With -> Branch, Tag or Reference, and select "foo@barr".

In both cases the complaining method is org.eclipse.jgit.lib.Repository.resolve.

eclipse.buildId=I20120608-1400
java.version=1.6.0_32
java.vendor=Apple Inc.
EGit 2.1.0.201209010925

Here's a stack trace from the branch creation. Note that the complaint is not about the creation itself, which worked fine (as it should). It's about the checkout of the newly made branch.

Error
Sun Sep 02 07:40:59 EDT 2012
Branch could not be created

org.eclipse.jgit.errors.RevisionSyntaxException:refs/heads/foo@barr
at org.eclipse.jgit.lib.Repository.resolve(Repository.java:649)
at org.eclipse.jgit.lib.Repository.resolve(Repository.java:383)
at org.eclipse.jgit.api.CheckoutCommand.call(CheckoutCommand.java:157)
at org.eclipse.egit.core.op.BranchOperation$1.run(BranchOperation.java:133)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2326)
at org.eclipse.egit.core.op.BranchOperation.execute(BranchOperation.java:156)
at org.eclipse.egit.ui.internal.branch.BranchOperationUI.run(BranchOperationUI.java:258)
at org.eclipse.egit.ui.internal.repository.CreateBranchPage.createBranch(CreateBranchPage.java:464)
at org.eclipse.egit.ui.internal.repository.CreateBranchWizard$1.run(CreateBranchWizard.java:93)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1028)
at org.eclipse.egit.ui.internal.repository.CreateBranchWizard.performFinish(CreateBranchWizard.java:87)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4134)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1271)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3980)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3619)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.egit.ui.internal.dialogs.CheckoutDialog$2.widgetSelected(CheckoutDialog.java:183)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4134)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1271)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3980)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3619)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.egit.ui.internal.branch.BranchOperationUI.getTargetWithDialog(BranchOperationUI.java:288)
at org.eclipse.egit.ui.internal.branch.BranchOperationUI.start(BranchOperationUI.java:152)
at org.eclipse.egit.ui.internal.actions.BranchActionHandler.execute(BranchActionHandler.java:29)
at org.eclipse.egit.ui.internal.actions.RepositoryAction.run(RepositoryAction.java:78)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4134)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1271)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3980)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3619)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
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(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)



Re: Bogus syntax complaint [message #907361 is a reply to message #906747] Mon, 03 September 2012 21:06 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 612
Registered: July 2009
Senior Member
Robin pushed https://git.eclipse.org/r/#/c/7569/ for review to fix this
Re: Bogus syntax complaint [message #922872 is a reply to message #907361] Tue, 25 September 2012 12:19 Go to previous messageGo to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
Appears as if this is fixed in the nightly builds as of 2.2.0.201209241923.
Re: Bogus syntax complaint [message #929714 is a reply to message #922872] Mon, 01 October 2012 17:42 Go to previous message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
Fixed in 2.2 nightlies, as noted previously (usual thanks to the development team) but for those of you who prefer a stable release, this fix seems not to have made it into 2.1.

Previous Topic:branch deletion broken in Juno?
Next Topic:Unstaging changes during a merge
Goto Forum:
  


Current Time: Fri Dec 19 08:54:34 GMT 2014

Powered by FUDForum. Page generated in 0.03738 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software