Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Help cloning git repo
Help cloning git repo [message #1648305] Tue, 03 March 2015 21:37 Go to next message
Bryan Hunt is currently offline Bryan HuntFriend
Messages: 366
Registered: July 2009
Senior Member
I'm trying to set up my model to clone a Git repo from our Gerrit server, and it's not working. Here my model based on hacking an eclipse setup:

  <setupTask
      xsi:type="setup:VariableTask"
      name="nvidia.gerrit.uri.pattern"
      value="(https|ssh)://([^@/]+@)?(gpuwa-artifactory.nvidia.com:29418/.*)"/>
  <setupTask
      xsi:type="setup:VariableTask"
      name="nvidia.gerrit.remoteURIs"
      label="Nvidia Gerrit Repository">
    <choice
        value="ssh://${nvidia.id}@gpuwa-artifactory.nvidia.com:29418/@{remoteURI}"
        label="SSH (read-write, Gerrit)"/>
    <choice
        value="https://${nvidia.id}@gpuwa-artifactory.nvidia.com/@{remoteURI}"
        label="HTTPS (read-write, Gerrit)"/>
    <description>Choose from the available remote Gerrit URIs</description>
  </setupTask>
  <setupTask
      xsi:type="setup:VariableTask"
      name="nvidia.git.gerrit.remoteURIs"
      label="Nvidia Gerrit Repository">
    <annotation
        source="http://www.eclipse.org/oomph/setup/InheritedChoices">
      <detail
          key="inherit">
        <value>nvidia.gerrit.remoteURIs</value>
      </detail>
    </annotation>
    <description>Choose from the available Gerrit URIs</description>
  </setupTask>


When I run the task, I get:

Performing Git Clone demo  (master)
Cloning Git repo demo to 
java.lang.Exception: org.eclipse.jgit.api.errors.JGitInternalException: Creating directories for /.git failed
  at org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.perform(GitCloneTaskImpl.java:649)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(SetupTaskPerformer.java:2756)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.access$1(SetupTaskPerformer.java:2715)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil$1.run(SetupTaskPerformer.java:3790)
  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.performNeededSetupTasks(SetupTaskPerformer.java:3784)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.access$0(SetupTaskPerformer.java:3782)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performNeededSetupTasks(SetupTaskPerformer.java:2706)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performTriggeredSetupTasks(SetupTaskPerformer.java:2681)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.perform(SetupTaskPerformer.java:2620)
  at org.eclipse.oomph.setup.ui.wizards.ProgressPage$9.run(ProgressPage.java:523)
  at org.eclipse.oomph.setup.ui.wizards.ProgressPage$11$1.run(ProgressPage.java:608)
  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.eclipse.jgit.api.errors.JGitInternalException: Creating directories for /.git failed
  at org.eclipse.jgit.api.InitCommand.call(InitCommand.java:118)
  at org.eclipse.jgit.api.CloneCommand.init(CloneCommand.java:161)
  at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:132)
  at org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.cloneRepository(GitCloneTaskImpl.java:705)
  at org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.perform(GitCloneTaskImpl.java:594)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(SetupTaskPerformer.java:2756)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.access$1(SetupTaskPerformer.java:2715)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil$1.run(SetupTaskPerformer.java:3790)
  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.performNeededSetupTasks(SetupTaskPerformer.java:3784)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.access$0(SetupTaskPerformer.java:3782)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performNeededSetupTasks(SetupTaskPerformer.java:2706)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performTriggeredSetupTasks(SetupTaskPerformer.java:2681)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.perform(SetupTaskPerformer.java:2620)
  at org.eclipse.oomph.setup.ui.wizards.ProgressPage$9.run(ProgressPage.java:523)
  at org.eclipse.oomph.setup.ui.wizards.ProgressPage$11$1.run(ProgressPage.java:608)
  ... 1 more
Caused by: java.io.IOException: Creating directories for /.git failed
  at org.eclipse.jgit.util.FileUtils.mkdirs(FileUtils.java:316)
  at org.eclipse.jgit.internal.storage.file.FileRepository.create(FileRepository.java:271)
  at org.eclipse.jgit.api.InitCommand.call(InitCommand.java:115)
  at org.eclipse.jgit.api.CloneCommand.init(CloneCommand.java:161)
  at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:132)
  at org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.cloneRepository(GitCloneTaskImpl.java:705)
  at org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.perform(GitCloneTaskImpl.java:594)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(SetupTaskPerformer.java:2756)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.access$1(SetupTaskPerformer.java:2715)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil$1.run(SetupTaskPerformer.java:3790)
  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.performNeededSetupTasks(SetupTaskPerformer.java:3784)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.access$0(SetupTaskPerformer.java:3782)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performNeededSetupTasks(SetupTaskPerformer.java:2706)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performTriggeredSetupTasks(SetupTaskPerformer.java:2681)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.perform(SetupTaskPerformer.java:2620)
  at org.eclipse.oomph.setup.ui.wizards.ProgressPage$9.run(ProgressPage.java:523)
  ... 2 more

Re: Help cloning git repo [message #1649314 is a reply to message #1648305] Wed, 04 March 2015 09:03 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Bryan,

What does the clone task itself look like? Can you paste it here? Note
that in the confirmation page you can examine the model to see how all
the variables have been expanded to produce the final concrete values
for the clone task.


On 03/03/2015 10:38 PM, Bryan Hunt wrote:
> I'm trying to set up my model to clone a Git repo from our Gerrit
> server, and it's not working. Here my model based on hacking an
> eclipse setup:
>
>
> <setupTask
> xsi:type="setup:VariableTask"
> name="nvidia.gerrit.uri.pattern"
> value="(https|ssh)://([^@/]+@)?(gpuwa-artifactory.nvidia.com:29418/.*)"/>
> <setupTask
> xsi:type="setup:VariableTask"
> name="nvidia.gerrit.remoteURIs"
> label="Nvidia Gerrit Repository">
> <choice
> value="ssh://${nvidia.id}@gpuwa-artifactory.nvidia.com:29418/@{remoteURI}"
> label="SSH (read-write, Gerrit)"/>
> <choice
> value="https://${nvidia.id}@gpuwa-artifactory.nvidia.com/@{remoteURI}"
> label="HTTPS (read-write, Gerrit)"/>
> <description>Choose from the available remote Gerrit
> URIs</description>
> </setupTask>
> <setupTask
> xsi:type="setup:VariableTask"
> name="nvidia.git.gerrit.remoteURIs"
> label="Nvidia Gerrit Repository">
> <annotation
> source="http://www.eclipse.org/oomph/setup/InheritedChoices">
> <detail
> key="inherit">
> <value>nvidia.gerrit.remoteURIs</value>
> </detail>
> </annotation>
> <description>Choose from the available Gerrit URIs</description>
> </setupTask>
>
>
> When I run the task, I get:
>
>
> Performing Git Clone demo (master)
> Cloning Git repo demo to java.lang.Exception:
> org.eclipse.jgit.api.errors.JGitInternalException: Creating
> directories for /.git failed
> at
> org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.perform(GitCloneTaskImpl.java:649)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(SetupTaskPerformer.java:2756)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.access$1(SetupTaskPerformer.java:2715)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil$1.run(SetupTaskPerformer.java:3790)
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.performNeededSetupTasks(SetupTaskPerformer.java:3784)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.access$0(SetupTaskPerformer.java:3782)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performNeededSetupTasks(SetupTaskPerformer.java:2706)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performTriggeredSetupTasks(SetupTaskPerformer.java:2681)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.perform(SetupTaskPerformer.java:2620)
> at
> org.eclipse.oomph.setup.ui.wizards.ProgressPage$9.run(ProgressPage.java:523)
> at
> org.eclipse.oomph.setup.ui.wizards.ProgressPage$11$1.run(ProgressPage.java:608)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> Caused by: org.eclipse.jgit.api.errors.JGitInternalException: Creating
> directories for /.git failed
> at org.eclipse.jgit.api.InitCommand.call(InitCommand.java:118)
> at org.eclipse.jgit.api.CloneCommand.init(CloneCommand.java:161)
> at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:132)
> at
> org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.cloneRepository(GitCloneTaskImpl.java:705)
> at
> org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.perform(GitCloneTaskImpl.java:594)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(SetupTaskPerformer.java:2756)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.access$1(SetupTaskPerformer.java:2715)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil$1.run(SetupTaskPerformer.java:3790)
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.performNeededSetupTasks(SetupTaskPerformer.java:3784)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.access$0(SetupTaskPerformer.java:3782)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performNeededSetupTasks(SetupTaskPerformer.java:2706)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performTriggeredSetupTasks(SetupTaskPerformer.java:2681)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.perform(SetupTaskPerformer.java:2620)
> at
> org.eclipse.oomph.setup.ui.wizards.ProgressPage$9.run(ProgressPage.java:523)
> at
> org.eclipse.oomph.setup.ui.wizards.ProgressPage$11$1.run(ProgressPage.java:608)
> ... 1 more
> Caused by: java.io.IOException: Creating directories for /.git failed
> at org.eclipse.jgit.util.FileUtils.mkdirs(FileUtils.java:316)
> at
> org.eclipse.jgit.internal.storage.file.FileRepository.create(FileRepository.java:271)
> at org.eclipse.jgit.api.InitCommand.call(InitCommand.java:115)
> at org.eclipse.jgit.api.CloneCommand.init(CloneCommand.java:161)
> at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:132)
> at
> org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.cloneRepository(GitCloneTaskImpl.java:705)
> at
> org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.perform(GitCloneTaskImpl.java:594)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(SetupTaskPerformer.java:2756)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.access$1(SetupTaskPerformer.java:2715)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil$1.run(SetupTaskPerformer.java:3790)
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.performNeededSetupTasks(SetupTaskPerformer.java:3784)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.access$0(SetupTaskPerformer.java:3782)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performNeededSetupTasks(SetupTaskPerformer.java:2706)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performTriggeredSetupTasks(SetupTaskPerformer.java:2681)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.perform(SetupTaskPerformer.java:2620)
> at
> org.eclipse.oomph.setup.ui.wizards.ProgressPage$9.run(ProgressPage.java:523)
> ... 2 more
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Help cloning git repo [message #1649995 is a reply to message #1649314] Wed, 04 March 2015 16:09 Go to previous messageGo to next message
Bryan Hunt is currently offline Bryan HuntFriend
Messages: 366
Registered: July 2009
Senior Member
Hi Ed,

Here is the clone task

      <setupTask
          xsi:type="git:GitCloneTask"
          id=""
          remoteURI="demo"
          pushURI=""
          checkoutBranch="master">
        <annotation
            source="http://www.eclipse.org/oomph/setup/InducedChoices">
          <detail
              key="inherit">
            <value>nvidia.git.gerrit.remoteURIs</value>
          </detail>
          <detail
              key="label">
            <value>Demo Gerrit Repository</value>
          </detail>
          <detail
              key="target">
            <value>remoteURI</value>
          </detail>
        </annotation>
      </setupTask>

Re: Help cloning git repo [message #1650936 is a reply to message #1649995] Thu, 05 March 2015 03:30 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Bryan,

The one for Oomph looks like this:

<setupTask
xsi:type="git:GitCloneTask"
id="git.clone.oomph"
remoteURI="oomph/org.eclipse.oomph"
checkoutBranch="master"
userID="">
<annotation
source="http://www.eclipse.org/oomph/setup/InducedChoices">
<detail
key="inherit">
<value>eclipse.git.gerrit.remoteURIs</value>
</detail>
<detail
key="label">
<value>Oomph Git or Gerrit Repository</value>
</detail>
<detail
key="target">
<value>remoteURI</value>
</detail>
</annotation>
<description>Oomph</description>
</setupTask>

Be sure to set proper id on the task, not the empty string; no doubt you
need this anyway so that other tasks can refer to the location, e.g.,
${git.clone.oomph.location} for the case of Oomph's clone location.
Also, the empty string for the pushURI is probably a bad idea as well.

And again, be sure to inspect this in the confirmation page, in
particular look at how all these values are expanded, especially the
location value (which I don't think will be expanded unless the task has
an ID) to which the clone location rule can be applied.


On 04/03/2015 5:09 PM, Bryan Hunt wrote:
> Hi Ed,
>
> Here is the clone task
>
>
> <setupTask
> xsi:type="git:GitCloneTask"
> id=""
> remoteURI="demo"
> pushURI=""
> checkoutBranch="master">
> <annotation
> source="http://www.eclipse.org/oomph/setup/InducedChoices">
> <detail
> key="inherit">
> <value>nvidia.git.gerrit.remoteURIs</value>
> </detail>
> <detail
> key="label">
> <value>Demo Gerrit Repository</value>
> </detail>
> <detail
> key="target">
> <value>remoteURI</value>
> </detail>
> </annotation>
> </setupTask>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Help cloning git repo [message #1651815 is a reply to message #1650936] Thu, 05 March 2015 14:28 Go to previous messageGo to next message
Bryan Hunt is currently offline Bryan HuntFriend
Messages: 366
Registered: July 2009
Senior Member
Thanks Ed. I have made it a step further. Now I'm getting the following exception:

java.lang.Exception: org.eclipse.jgit.errors.RepositoryNotFoundException: repository not found: /Users/bhunt/Documents/Work/git
	at org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.isNeeded(GitCloneTaskImpl.java:565)
	at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.initNeededSetupTasks(SetupTaskPerformer.java:1485)
	at org.eclipse.oomph.setup.ui.wizards.ConfirmationPage.initNeededSetupTasks(ConfirmationPage.java:322)
	at org.eclipse.oomph.setup.ui.wizards.ConfirmationPage.enterPage(ConfirmationPage.java:228)
	at org.eclipse.oomph.setup.ui.wizards.SetupWizard.pageChanged(SetupWizard.java:355)
	at org.eclipse.jface.wizard.WizardDialog$9.run(WizardDialog.java:1505)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
	at org.eclipse.jface.wizard.WizardDialog.firePageChanged(WizardDialog.java:1502)
	at org.eclipse.jface.wizard.WizardDialog.update(WizardDialog.java:1308)
	at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1234)
	at org.eclipse.jface.wizard.WizardDialog.access$4(WizardDialog.java:1208)
	at org.eclipse.jface.wizard.WizardDialog$8.run(WizardDialog.java:1197)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1194)
	at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:885)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:425)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
	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:4200)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1467)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1490)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1475)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4042)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3669)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
	at org.eclipse.jface.window.Window.open(Window.java:803)
	at org.eclipse.oomph.setup.ui.wizards.SetupWizard.openDialog(SetupWizard.java:422)
	at org.eclipse.oomph.setup.presentation.handlers.PerformHandler.run(PerformHandler.java:32)
	at org.eclipse.oomph.setup.presentation.handlers.AbstractDropdownItemHandler.execute(AbstractDropdownItemHandler.java:50)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
	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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:802)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:678)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$6(HandledContributionItem.java:662)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:595)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4200)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1467)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1490)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1475)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4042)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3669)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.dropdownEvent(HandledContributionItem.java:721)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:664)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$6(HandledContributionItem.java:662)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:595)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4200)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1467)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1490)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1475)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4042)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3669)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:648)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:592)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
	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:648)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: org.eclipse.jgit.errors.RepositoryNotFoundException: repository not found: /Users/bhunt/Documents/Work/git
	at org.eclipse.jgit.lib.BaseRepositoryBuilder.build(BaseRepositoryBuilder.java:579)
	at org.eclipse.jgit.api.Git.open(Git.java:113)
	at org.eclipse.jgit.api.Git.open(Git.java:97)
	at org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.isNeeded(GitCloneTaskImpl.java:526)
	... 91 more
Re: Help cloning git repo [message #1651853 is a reply to message #1651815] Thu, 05 March 2015 14:54 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Bryan,

What do the expanded location and remoteURI attributes look like in the
task you are executing? Is it possible that there is a corrupt clone at
that location?


On 05/03/2015 3:28 PM, Bryan Hunt wrote:
> Thanks Ed. I have made it a step further. Now I'm getting the
> following exception:
>
>
> java.lang.Exception:
> org.eclipse.jgit.errors.RepositoryNotFoundException: repository not
> found: /Users/bhunt/Documents/Work/git
> at
> org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.isNeeded(GitCloneTaskImpl.java:565)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.initNeededSetupTasks(SetupTaskPerformer.java:1485)
> at
> org.eclipse.oomph.setup.ui.wizards.ConfirmationPage.initNeededSetupTasks(ConfirmationPage.java:322)
> at
> org.eclipse.oomph.setup.ui.wizards.ConfirmationPage.enterPage(ConfirmationPage.java:228)
> at
> org.eclipse.oomph.setup.ui.wizards.SetupWizard.pageChanged(SetupWizard.java:355)
> at
> org.eclipse.jface.wizard.WizardDialog$9.run(WizardDialog.java:1505)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
> at
> org.eclipse.jface.wizard.WizardDialog.firePageChanged(WizardDialog.java:1502)
> at
> org.eclipse.jface.wizard.WizardDialog.update(WizardDialog.java:1308)
> at
> org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1234)
> at
> org.eclipse.jface.wizard.WizardDialog.access$4(WizardDialog.java:1208)
> at
> org.eclipse.jface.wizard.WizardDialog$8.run(WizardDialog.java:1197)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
> at
> org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1194)
> at
> org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:885)
> at
> org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:425)
> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
> 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:4200)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1467)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1490)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1475)
> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4042)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3669)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
> at org.eclipse.jface.window.Window.open(Window.java:803)
> at
> org.eclipse.oomph.setup.ui.wizards.SetupWizard.openDialog(SetupWizard.java:422)
> at
> org.eclipse.oomph.setup.presentation.handlers.PerformHandler.run(PerformHandler.java:32)
> at
> org.eclipse.oomph.setup.presentation.handlers.AbstractDropdownItemHandler.execute(AbstractDropdownItemHandler.java:50)
> at
> org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295)
> at
> org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
> 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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
> at
> org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
> at
> org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)
> at
> org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
> at
> org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
> at
> org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:802)
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:678)
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$6(HandledContributionItem.java:662)
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:595)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4200)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1467)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1490)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1475)
> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4042)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3669)
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.dropdownEvent(HandledContributionItem.java:721)
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:664)
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$6(HandledContributionItem.java:662)
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:595)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4200)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1467)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1490)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1475)
> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4042)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3669)
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
> at
> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:648)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:592)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
> 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:648)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
> Caused by: org.eclipse.jgit.errors.RepositoryNotFoundException:
> repository not found: /Users/bhunt/Documents/Work/git
> at
> org.eclipse.jgit.lib.BaseRepositoryBuilder.build(BaseRepositoryBuilder.java:579)
> at org.eclipse.jgit.api.Git.open(Git.java:113)
> at org.eclipse.jgit.api.Git.open(Git.java:97)
> at
> org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.isNeeded(GitCloneTaskImpl.java:526)
> ... 91 more
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Help cloning git repo [message #1652069 is a reply to message #1651853] Thu, 05 March 2015 17:29 Go to previous messageGo to next message
Bryan Hunt is currently offline Bryan HuntFriend
Messages: 366
Registered: July 2009
Senior Member
Hi Ed,

The Confirmation page does not display the git clone task. I think this is because of the exception thrown. I'm setting the location to the place I want the repository to be cloned. It seems that the code is checking for an existing repository at that location which does not exist. Which is why I'm doing the clone in the first place. Maybe I'm not understanding the purpose of the location. Attached is a screenshot of what I see on the variables page.

index.php/fa/21081/0/
Re: Help cloning git repo [message #1653103 is a reply to message #1652069] Fri, 06 March 2015 04:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Bryan,

That's the variables page. The next page is the confirmation page.



Are you saying you can't get to the page because of the exception? Note
that the confirmation page has a check box at the bottom to show all
tasks, including ones that are grayed out because they aren't needed.
Can you see the state of the task that way?

The code is trying to do this:

public boolean isNeeded(final SetupTaskContext context) throws Exception
{
String location = getLocation();

workDir = new File(location);
if (!workDir.isDirectory())
{
return true;
}

workDirExisted = true;

if (workDir.list().length > 1)
{
return false;
}

context.log("Opening Git clone " + workDir);

try
{
Git git = Git.open(workDir);

And from the stack trace we know it got as far as the trying to open the
workDir. But of course it not existing yet must be the normal case
that we test often... So I'm kind of doubtful that the location really
doesn't exist...

We really need to understand the state of the clone task, but at this
point it doesn't look like the URI of the remote is relevant yet.


On 05/03/2015 6:29 PM, Bryan Hunt wrote:
> Hi Ed,
>
> The Confirmation page does not display the git clone task. I think this is because of the exception thrown. I'm setting the location to the place I want the repository to be cloned. It seems that the code is checking for an existing repository at that location which does not exist. Which is why I'm doing the clone in the first place. Maybe I'm not understanding the purpose of the location. Attached is a screenshot of what I see on the variables page.
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Help cloning git repo [message #1654241 is a reply to message #1653103] Fri, 06 March 2015 15:53 Go to previous messageGo to next message
Bryan Hunt is currently offline Bryan HuntFriend
Messages: 366
Registered: July 2009
Senior Member
Hi Ed,

Here is what I'm seeing...

index.php/fa/21089/0/
Re: Help cloning git repo [message #1654352 is a reply to message #1654241] Fri, 06 March 2015 16:57 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6693
Registered: July 2009
Senior Member
Am 06.03.2015 um 16:53 schrieb Bryan Hunt:
> Hi Ed,
Ed is already on his way to the EclipseCon and I'm packing...

> Here is what I'm seeing...
The PushURI doesn't look like a URI but I would expect this to become a problem only at push time. Haven't tried, though.

Your location path looks a little bit more like a container folder for clones, not a a typical path name for a clone
itself. The location should point to a folder that either doesn't exist, or is empty, or contains a valid clone of the
right repo.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: Help cloning git repo [message #1661422 is a reply to message #1654352] Mon, 09 March 2015 16:21 Go to previous messageGo to next message
Bryan Hunt is currently offline Bryan HuntFriend
Messages: 366
Registered: July 2009
Senior Member
Ok, I got it to work. For the location, I had selected a directory that already existed which was a natural thing to do with the file dialog. To get it to work, I had to append a subdirectory that did not exist after using the file dialog. I would submit that this is not intuitive.
Re: Help cloning git repo [message #1661543 is a reply to message #1661422] Mon, 09 March 2015 17:30 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Bryan,

Normally the location is assigned by rules, i.e., so the user only
specifies a root/home folder where all the git clones are located and
then the name of the subfolder within this folder is derived from the
remoteURI. In other words, you could author the model in a way that
would make it more intuitive for the user...


On 09/03/2015 5:21 PM, Bryan Hunt wrote:
> Ok, I got it to work. For the location, I had selected a directory
> that already existed which was a natural thing to do with the file
> dialog. To get it to work, I had to append a subdirectory that did
> not exist after using the file dialog. I would submit that this is
> not intuitive.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Help cloning git repo [message #1661613 is a reply to message #1661543] Mon, 09 March 2015 18:13 Go to previous message
Bryan Hunt is currently offline Bryan HuntFriend
Messages: 366
Registered: July 2009
Senior Member
Lightbulb! Thanks Ed. I wish I were at EclipseCon to buy you a beer Very Happy
Previous Topic:Re: Oomph setup --&gt; lots of compiler issues
Next Topic:[Solved] How to disable an annotation
Goto Forum:
  


Current Time: Fri Dec 27 02:56:02 GMT 2024

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

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

Back to the top