Git branches [message #1081082] |
Tue, 06 August 2013 19:39  |
Eclipse User |
|
|
|
I'd like to check out a certain branch of a git repository that is used as part of a buckminster build. From googling this seems to be done using an advisorNode with a branchTagPath property set to the branch. However, buckminster keeps rejecting any branch name I give it:
org.spoofax.interpreter.externaldeps:osgi.bundle: Branch buckminster-build rejected: not in path 'remotes/origin/buckminster-build'
org.spoofax.interpreter.externaldeps:osgi.bundle: Rejecting provider git({0}/mb-exec-deps,{1}[/Users/gohla/buckminster/workspace/mb-exec-deps,org.spoofax.interpreter.externaldeps]): No component match was found
org.spoofax.interpreter.externaldeps:osgi.bundle: No provider was found that could resolve the request
ERROR [0002] : No suitable provider for component org.spoofax.interpreter.externaldeps:osgi.bundle was found in resourceMap file:/Users/gohla/buckminster/spoofax.rmap
ERROR [0002] : No suitable provider for component org.spoofax.interpreter.externaldeps:osgi.bundle was found in searchPath mb-exec-deps
ERROR [0002] : Rejecting provider git({0}/mb-exec-deps,{1}[/Users/gohla/buckminster/workspace/mb-exec-deps,org.spoofax.interpreter.externaldeps]): No component match was found
INFO: TAG-ID 0002 = Query for org.metaborg.runtime.task:osgi.bundle, path: org.metaborg.runtime.task:osgi.bundle$1.0.0.qualifier
I've tried to use /buckminster-build /origin/buckminster-build origin/buckminster-build, etc. as branchTagPaths but they all do not work for me.
This is my cquery:
<?xml version="1.0" encoding="UTF-8"?><cq:componentQuery xmlns:cq="http://www.eclipse.org/buckminster/CQuery-1.0" resourceMap="spoofax.rmap">
<cq:rootRequest name="org.metaborg.runtime.task" componentType="osgi.bundle"/>
<cq:advisorNode namePattern="^org\.spoofax\.interpreter\.externaldeps$" branchTagPath="remotes/origin/buckminster-build"/>
</cq:componentQuery>
And the relevant rmap part:
<searchPath name="mb-exec-deps">
<provider
readerType="git"
componentTypes="eclipse.feature,osgi.bundle"
source="true">
<uri format="{0}/mb-exec-deps,{1}">
<bc:propertyRef key="workspace.root" />
<bc:propertyRef key="buckminster.component" />
</uri>
<property
key="git.remote.uri"
value="github.com/metaborg/mb-exec-deps.git" />
<property
key="git.remote.name"
value="mb-exec-deps" />
<property
key="git.auto.fetch"
value="true" />
</provider>
</searchPath>
<locator
searchPathRef="mb-exec-deps"
pattern="org.spoofax.interpreter.externaldeps" />
What should I use as branchTagPath if I want to check out github.com/metaborg/mb-exec-deps/tree/buckminster-build?
Cheers,
Gabriel
PS: had to remove non-eclipse.org links since "You can only use links to eclipse.org sites while you have fewer than 5 messages.".
|
|
|
Re: Git branches [message #1081497 is a reply to message #1081082] |
Wed, 07 August 2013 09:47   |
Eclipse User |
|
|
|
I just use the plain branch name, no leading "/", no "origin" etc.
If you still have problems, use the command line to look at the repository that Buckminster checked out. Was the remote repository cloned successfully? What branches does command-line git think are there?
|
|
|
Re: Git branches [message #1088359 is a reply to message #1081082] |
Sat, 17 August 2013 00:32   |
Eclipse User |
|
|
|
Git tells me the branch exists:
$ git branch --remote
origin/buckminster-build
origin/master
I tried with just the plain branch name 'buckminster-build' but the error still occurs:
INFO: Cloning remote repository https:// github.com/metaborg/mb-exec-deps.git into /Users/gohla/buckminster/spoofax-libs/workspace/mb-exec-deps
INFO: Added Git repository at /Users/gohla/buckminster/spoofax-libs/workspace/mb-exec-deps/.git to the set of known repositories
ERROR [0003] : No suitable provider for component org.spoofax.interpreter.externaldeps:osgi.bundle was found in resourceMap file:/Users/gohla/buckminster/spoofax.rmap
ERROR [0003] : No suitable provider for component org.spoofax.interpreter.externaldeps:osgi.bundle was found in searchPath mb-exec-deps
ERROR [0003] : Rejecting provider git({0}/mb-exec-deps,{1}[/Users/gohla/buckminster/spoofax-libs/workspace/mb-exec-deps,org.spoofax.interpreter.externaldeps]): No component match was found
If I remove the advisorNode it correctly finds the component but has the wrong branch of course.
|
|
|
Re: Git branches [message #1089854 is a reply to message #1088359] |
Mon, 19 August 2013 10:36  |
Eclipse User |
|
|
|
Quote:$ git branch --remote
Not enough info! Try -a (for all). Also, is the clone actually valid? If you look in the directory, is the project actually there in the working directory?
Remember to delete the clone before to try again, Buckminster will not try and switch branches.
Matthew
|
|
|
Powered by
FUDForum. Page generated in 0.04281 seconds