Ticket #166 (closed defect: fixed)

Opened 5 months ago

Last modified 3 months ago

Incorrect commit command path handling

Reported by: Ilya.Novoselov@… Owned by: zingo
Priority: blocker Milestone: Release 0.2.x
Component: MercurialEclipse Version: 0.1.x
Keywords: Cc:

Description

When I try commit command, path splitting goes wrong:

ExecuteCommand?: C:\Program Files\TortoiseHg?\hg.exe commit --message (no commit message) --user nullguid d\src\helloworld.py workdir: D:\work\helloworl

Notice path splitting: "D:\work\helloworl d\src\helloworld.py"

Change History

  Changed 5 months ago by anonymous

Hello Strange, I assume you are doing the commit by rigthclick'ing on src selecting "team->commit" if possible could you try to do the commit command directly on helloworld.py and check the out put and also if possible do it on helloworld, (if helloworld is your project and reposetory root.)

I will try to dig into the code to see if I can find something explaining this.

/Zingo

  Changed 5 months ago by zingo

Hello again Do you know if this was introduced by the latest version [144] I did a changes in MercurialUtilities?.java in getWorkingDir(IResource obj) where I changed from:

else if (obj.getType() == IResource.FOLDER)

{

workingDir = (obj.getLocation()).toFile();

}

to:

else if (obj.getType() == IResource.FOLDER)

{

workingDir = (obj.getLocation()).removeLastSegments(1).toFile();

}

Could you test if your problem dissaperas with the plugin from my beta reposetory (I have removed that change in [144] )

Name: MercurialEclipse? development site URL: http://home.zingo.org/eclipse-betaupdate/

I rather not go public with this release as is breaks History view on directories so I need a better fix if this is the problem.

  Changed 5 months ago by Ilya.Novoselov@…

I've tried hg commit on both top-level dir and file itself, still the same problem. With 0.147 revision nothing changes.

  Changed 5 months ago by zingo

Bummer that was a good candidate, thanx for the help with testing.

  Changed 4 months ago by Jerome Negre <jerome+hg@…>

I had a similar problem and fixed it with this very simple diff (see the raw diff)

Maybe that'll work for you too.

  Changed 4 months ago by Jerome Negre <jerome+hg@…>

You'll need this other fix if you want to commit more than a file at a time.

  Changed 3 months ago by s@…

I've got the same problem. The errorlog in eclipse says: Cannot run program "hg" (in directory "E:\Documents and Settings\Søren Vrist\workspace\testi"): CreateProcess? error=267, The directory name is invalid

The real dir name is testit

I've tried with both the offical updatesite plugin and the beta one from home.zingo.org. I havnt tried to build the plugin by my self yet so I havnt tried any of the patched supplied by Jerome Negre.

follow-up: ↓ 9   Changed 3 months ago by zingo

Ill see if I can pull the stuff from Jerome's branch and make a new release. Ill see if I manage to do this in the next couple of days.

in reply to: ↑ 8   Changed 3 months ago by Jerome Negre <jerome+hg@…>

Replying to zingo:

Ill see if I can pull the stuff from Jerome's branch and make a new release. Ill see if I manage to do this in the next couple of days.

Apparently my fixes are not enough, I got another bug yesterday night while committing a whole project: nothing append, no error message, no nothing. I was sleepy, so I did not investigate further and went back to the command line.

  Changed 3 months ago by zingo

Do the current patch make things better?

  Changed 3 months ago by anonymous

It doesnt seem to help, but i need to double check that i really am using the right plugin from you beta site.

  Changed 3 months ago by zingo

Hello I just uploaded version 0.1.174 to the beta site If possible could anyone having this problem test it there is a patch from Sebastian see #179

  Changed 3 months ago by zingo

Ohh and annotation dont work in this patch, thats why it's only on the beta site. see #181 for more info about that problem.

follow-up: ↓ 15   Changed 3 months ago by anonymous

Right now it doesnt seem like i can even clone a repository:

java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at com.vectrace.MercurialEclipse.storage.HgRepositoryLocationManager.start(HgRepositoryLocationManager.java:66)
at com.vectrace.MercurialEclipse.MercurialEclipsePlugin.start(MercurialEclipsePlugin.java:72)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:260)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:408)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:289)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1269)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:160)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:788)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:252)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:248)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardElement.createExecutableExtension(WorkbenchWizardElement.java:117)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardElement.createWizard(WorkbenchWizardElement.java:261)
at org.eclipse.ui.internal.dialogs.NewWizardNewPage$5.createWizard(NewWizardNewPage.java:728)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$2.run(WorkbenchWizardNode.java:151)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode$1.run(WorkbenchWizardNode.java:135)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode.getWizard(WorkbenchWizardNode.java:132)
at org.eclipse.jface.wizard.WizardSelectionPage.getNextPage(WizardSelectionPage.java:104)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardSelectionPage.getNextPage(WorkbenchWizardSelectionPage.java:100)
at org.eclipse.ui.internal.dialogs.NewWizardSelectionPage.advanceToNextPageOrFinish(NewWizardSelectionPage.java:71)
at org.eclipse.ui.internal.dialogs.NewWizardNewPage$1.doubleClick(NewWizardNewPage.java:355)
at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:799)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:199)
at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:797)
at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1387)
at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1173)
at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:237)
at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:234)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:295)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction.java:116)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:546)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)

in reply to: ↑ 14   Changed 3 months ago by s@…

Sorry about the "anonymous" part :)

  Changed 3 months ago by zingo

  • milestone set to Release 0.2.x

  Changed 3 months ago by zingo

  • version set to 0.1.xxx

  Changed 3 months ago by zingo

  • priority changed from critical to blocker

  Changed 3 months ago by zingo

Hello This is one of the bugs that need to be fixed before next public release 0.2.x I have pulled in all patches from Jerome and have created purly fresh release on my beta site 0.1.232 check

Name: MercurialEclipse development site
URL: http://home.zingo.org/eclipse-betaupdate/

If possible could anyone who has to problem retest with that version. It is a great chance that this is fixed.

/Zingo

  Changed 3 months ago by Søren Bjerregaard Vrist <s@…>

Very nice. Seems working to me.

I miss a "hg update" option in the menu though ;)

Cheers for the working code!

  Changed 3 months ago by zingo

Thanx for the test.

I miss a "hg update" option in the menu though ;)

You are not alone, if it wasn't for the need to merge sometimes it would be easy to add.

  Changed 3 months ago by zingo

  • status changed from new to closed
  • resolution set to fixed

Ok lets hope it works now reopen if needed.

Note: See TracTickets for help on using tickets.