Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster » Git branches
Git branches [message #1081082] Tue, 06 August 2013 15:39 Go to next message
Gabriël Konat is currently offline Gabriël Konat
Messages: 2
Registered: August 2013
Junior Member
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 05:47 Go to previous messageGo to next message
Matthew Webber is currently offline Matthew Webber
Messages: 198
Registered: December 2010
Senior Member
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] Fri, 16 August 2013 20:32 Go to previous messageGo to next message
Gabriël Konat is currently offline Gabriël Konat
Messages: 2
Registered: August 2013
Junior Member
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 06:36 Go to previous message
Matthew Webber is currently offline Matthew Webber
Messages: 198
Registered: December 2010
Senior Member
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
Previous Topic:Error when switching to Kepler
Next Topic:Problem with platform specific fragments and source features
Goto Forum:
  


Current Time: Fri Apr 18 11:52:47 EDT 2014

Powered by FUDForum. Page generated in 0.11853 seconds