Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Eclipse Oomph: Checkout a Tag instead of a Branch?
Eclipse Oomph: Checkout a Tag instead of a Branch? [message #1733717] Tue, 31 May 2016 08:26 Go to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
Is it possible to checkout a tag instead of a Branch with Oomph?

Context:
We would like to have an Oomph Steam that does the checkout of the release commit (where the maven version is fixed to a fix version instead of the SNAPSHOT version we have in our branches). For the moment this commit is only marked with a TAG and not with an explicit branch.

Thank you in advance.
Re: Eclipse Oomph: Checkout a Tag instead of a Branch? [message #1733760 is a reply to message #1733717] Tue, 31 May 2016 13:20 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Jeremie,

No, the code right now wants to create a local branch with the name in
the task.

On 31.05.2016 10:26, Jeremie Bresson wrote:
> Is it possible to checkout a tag instead of a Branch with Oomph?
>
> Context:
> We would like to have an Oomph Steam that does the checkout of the
> release commit (where the maven version is fixed to a fix version
> instead of the SNAPSHOT version we have in our branches). For the
> moment this commit is only marked with a TAG and not with an explicit
> branch.
>
> Thank you in advance.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Eclipse Oomph: Checkout a Tag instead of a Branch? [message #1733772 is a reply to message #1733760] Tue, 31 May 2016 15:35 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 31.05.2016 um 15:20 schrieb Ed Merks:
> Jeremie,
>
> No, the code right now wants to create a local branch with the name in the task.
For future reference, this is the stack trace:

Setting autocrlf = true
Adding push ref spec: refs/notes/*:refs/notes/*
Adding push ref spec: HEAD:refs/for/releases/1.3.0
Creating local branch releases/1.3.0
java.lang.Exception: org.eclipse.jgit.api.errors.RefNotFoundException: Ref refs/remotes/origin/releases/1.3.0 can not be
resolved
at org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.perform(GitCloneTaskImpl.java:821)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(SetupTaskPerformer.java:3037)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.access$1(SetupTaskPerformer.java:2980)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil$1.run(SetupTaskPerformer.java:4176)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2241)
at
org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.performNeededSetupTasks(SetupTaskPerformer.java:4170)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.access$0(SetupTaskPerformer.java:4168)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performNeededSetupTasks(SetupTaskPerformer.java:2971)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performTriggeredSetupTasks(SetupTaskPerformer.java:2946)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.perform(SetupTaskPerformer.java:2857)
at org.eclipse.oomph.setup.ui.wizards.ProgressPage$9.run(ProgressPage.java:555)
at org.eclipse.oomph.setup.ui.wizards.ProgressPage$11$1.run(ProgressPage.java:681)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.eclipse.jgit.api.errors.RefNotFoundException: Ref refs/remotes/origin/releases/1.3.0 can not be resolved
at org.eclipse.jgit.api.CreateBranchCommand.getStartPointObjectId(CreateBranchCommand.java:282)
at org.eclipse.jgit.api.CreateBranchCommand.call(CreateBranchCommand.java:135)
at org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.createBranch(GitCloneTaskImpl.java:1119)
at org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.perform(GitCloneTaskImpl.java:760)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(SetupTaskPerformer.java:3037)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.access$1(SetupTaskPerformer.java:2980)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil$1.run(SetupTaskPerformer.java:4176)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2241)
at
org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.performNeededSetupTasks(SetupTaskPerformer.java:4170)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.access$0(SetupTaskPerformer.java:4168)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performNeededSetupTasks(SetupTaskPerformer.java:2971)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performTriggeredSetupTasks(SetupTaskPerformer.java:2946)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.perform(SetupTaskPerformer.java:2857)
at org.eclipse.oomph.setup.ui.wizards.ProgressPage$9.run(ProgressPage.java:555)
at org.eclipse.oomph.setup.ui.wizards.ProgressPage$11$1.run(ProgressPage.java:681)
... 1 more

Cheers
/Eike

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


Re: Eclipse Oomph: Checkout a Tag instead of a Branch? [message #1737147 is a reply to message #1733760] Wed, 06 July 2016 06:59 Go to previous messageGo to next message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 205
Registered: November 2010
Senior Member
Ed Merks wrote on Tue, 31 May 2016 09:20
No, the code right now wants to create a local branch with the name in the task.


Is there any particular reason why Oomph cannot create a local branch from a remote tag? Or is this just a bug?

Beat
Re: Eclipse Oomph: Checkout a Tag instead of a Branch? [message #1737153 is a reply to message #1737147] Wed, 06 July 2016 07:25 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
It's simply designed to check out a branch for an existing remote branch.

private static void createBranch(SetupTaskContext context, Git git,
String checkoutBranch, String remoteName) throws Exception
{
context.log("Creating local branch " + checkoutBranch);

CreateBranchCommand command = git.branchCreate();
command.setUpstreamMode(SetupUpstreamMode.SET_UPSTREAM);
command.setName(checkoutBranch);
command.setStartPoint("refs/remotes/" + remoteName + "/" +
checkoutBranch);
command.call();

StoredConfig config = git.getRepository().getConfig();
config.setBoolean(ConfigConstants.CONFIG_BRANCH_SECTION,
checkoutBranch, ConfigConstants.CONFIG_KEY_REBASE, true);
config.save();
}

We'd have to write different logic to create a branch for a tag instead
of an exiting "checkoutBranch". So it's working as designed, hence not
a bug.

Of course it's possible in principle to create a local branch for an
existing remote tag, but we've not designed that. You could open a
Bugzilla enhancement request for that (or just create a remote branch
for the tag)...

On 06.07.2016 08:59, Beat Schwarzentrub wrote:
> Ed Merks wrote on Tue, 31 May 2016 09:20
>> No, the code right now wants to create a local branch with the name
>> in the task.
>
>
> Is there any particular reason why Oomph cannot create a local branch
> from a remote tag? Or is this just a bug?
>
> Beat


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Eclipse Oomph: Checkout a Tag instead of a Branch? [message #1738885 is a reply to message #1737153] Mon, 25 July 2016 17:03 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
Ed, thank you for your explanation! We have opened Bug 498448 to track the change request.
Previous Topic:Oomph like window in welcome page
Next Topic:Configure perspective with Oomph
Goto Forum:
  


Current Time: Thu Apr 25 18:10:34 GMT 2024

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

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

Back to the top