Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » Git Auto-Fetch not working
Git Auto-Fetch not working [message #698129] Mon, 18 July 2011 20:29 Go to next message
Mike Haney is currently offline Mike HaneyFriend
Messages: 25
Registered: June 2011
Junior Member
We are using the Git reader to pull projects into developer workspaces, and we have noticed that setting the git.auto.fetch property to "true" does not seem to work. When another developer runs my query, it works fine on a new clean workspace, but once the repository has been cloned, removing the projects from the workspace and running the query again does not get any updates from the remote repository.

I wanted to check and see if there might be something I am doing wrong before I file a bug report. We are using the latest Buckminster build with Indigo.

Here is a copy of our RMAP for reference:

<?xml version="1.0" encoding="UTF-8"?>
<rm:rmap xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0" xmlns:rm="http://www.eclipse.org/buckminster/RMap-1.0">
  <rm:locator pattern="^teamwork(\..+)?" searchPathRef="teamwork"/>
  <rm:searchPath name="teamwork">
    <rm:provider componentTypes="osgi.bundle,eclipse.feature" readerType="git">
      <rm:property key="git.remote.name" value="origin"/>
      <rm:property key="git.auto.fetch" value="true"/>
      <rm:propertyElement key="git.remote.uri">
        <bc:format format="ssh://git@capforge/teamwork/{0}">
          <bc:format format="{1}">
            <bc:split pattern="\." style="unquoted">
              <bc:propertyRef key="buckminster.component"/>
            </bc:split>
          </bc:format>
        </bc:format>
      </rm:propertyElement>
      <rm:uri format="{0}/{1},{2}">
        <bc:propertyRef key="workspace.root"/>
        <bc:format format="{1}">
          <bc:split pattern="\." style="unquoted">
            <bc:propertyRef key="buckminster.component"/>
          </bc:split>
        </bc:format>
        <bc:propertyRef key="buckminster.component"/>
      </rm:uri>
    </rm:provider>
  </rm:searchPath>
</rm:rmap>


Any advice would be greatly appreciated! Thanks.
Re: Git Auto-Fetch not working [message #698130 is a reply to message #698129] Mon, 18 July 2011 20:30 Go to previous messageGo to next message
Mike Haney is currently offline Mike HaneyFriend
Messages: 25
Registered: June 2011
Junior Member
No Message Body
Re: Git Auto-Fetch not working [message #698245 is a reply to message #698129] Tue, 19 July 2011 04:49 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
On 2011-07-18 22:29, Mike Haney wrote:
> We are using the Git reader to pull projects into developer workspaces, and we have noticed that setting the
> git.auto.fetch property to "true" does not seem to work. When another developer runs my query, it works fine on a new
> clean workspace, but once the repository has been cloned, removing the projects from the workspace and running the query
> again does not get any updates from the remote repository.
>
Removing the projects does not generally mean that you remove the git repository. There are two options when you remove
a project:

1. Remove without removing the associated files, then the git repository is intact.
2. Remove the associated files, then the git repository has changes pending (the remove that you just made). The git
repository is still there and the files you removed will show up as an uncommitted change. Well, there's the exceptional
case where the git repository lives within the project in which case it will be completely wiped but I assume that that
isn't the case here since you mention updates of an existing repository.

In case of #2, that means that an auto-fetch would cause a merge (your removed files + any changes performed in the
remote repository). Your remove action will not be overridden. To do so would be incorrect.

The auto.fetch (bad name really, we must change this to auto.pull) is intended to update and existing repository and all
projects. The normal resolution should then re-add any projects removed in case you do #1.

- thomas
Re: Git Auto-Fetch not working [message #698567 is a reply to message #698245] Tue, 19 July 2011 17:49 Go to previous message
Mike Haney is currently offline Mike HaneyFriend
Messages: 25
Registered: June 2011
Junior Member
Thomas Hallgren wrote on Tue, 19 July 2011 00:49
On 2011-07-18 22:29, Removing the projects does not generally mean that you remove the git repository. There are two options when you remove
a project:

1. Remove without removing the associated files, then the git repository is intact.
2. Remove the associated files, then the git repository has changes pending (the remove that you just made). The git
repository is still there and the files you removed will show up as an uncommitted change. Well, there's the exceptional
case where the git repository lives within the project in which case it will be completely wiped but I assume that that
isn't the case here since you mention updates of an existing repository.

In case of #2, that means that an auto-fetch would cause a merge (your removed files + any changes performed in the
remote repository). Your remove action will not be overridden. To do so would be incorrect.

The auto.fetch (bad name really, we must change this to auto.pull) is intended to update and existing repository and all
projects. The normal resolution should then re-add any projects removed in case you do #1.

- thomas


I think we are talking about the same thing, i.e. scenario #1. The auto.fetch (I agree, should be auto.pull - that was confusing) just plain doesn't work for us.

Specific example: we have a top-level feature which I created a query for that initially had just 2 plugins - the app plugin and the app feature (which is the target of the query). Yesterday I added several new features and added them as included features of the main app feature. Rather than have to go through and add all the new projects manually in another developer's workspace, we re-ran the query and nothing changed.

Thinking that Buckminster was simply resolving the feature to the one already in the workspace, we then deleted the 2 local projects (app plugin and app feature) WITHOUT removing the underlying files, restarted Eclipse just to be sure, and re-ran the query. It still only picked up those 2 projects. We also observed that /refs/master did not match /origin/refs/master in our local clone, confirming that a pull had not been performed.

Then we removed the projects once again, shut down Eclipse, deleted the local repository which was created in the workspace (when we originally ran the query), and ran the query again. This time it worked correctly, as the new cloned repository had all the latest changes in it, and all of the new projects and features were picked up correctly.

Is there something wrong with my workflow here, or is this indeed a bug?

[Updated on: Tue, 19 July 2011 17:53]

Report message to a moderator

Previous Topic:Problems installing Buckminster on Indigo
Next Topic:Information about CircularExpansionException
Goto Forum:
  


Current Time: Tue Apr 23 08:38:21 GMT 2024

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

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

Back to the top