Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » EGit Documetation(Information about the EGit Plugin)
EGit Documetation [message #493170] Fri, 23 October 2009 13:20 Go to next message
Stefan Reiterer is currently offline Stefan ReitererFriend
Messages: 10
Registered: October 2009
Junior Member
Hi!

I'm developing an eclipse plugin and in the course of this I want to make use of the egit plugin. On the project website of egit it is described that there is no documentation available for egit.

Does somebody know, how to get information about the use of the egit plugin (e.g. how to get the nature-id of the plugin, how to push files to the git repository, ...)?

lg.
Stefan
Re: EGit Documetation [message #493222 is a reply to message #493170] Fri, 23 October 2009 17:31 Go to previous messageGo to next message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Stefan Reiterer wrote:
> Hi!
>
> I'm developing an eclipse plugin and in the course of this I want to
> make use of the egit plugin. On the project website of egit it is
> described that there is no documentation available for egit.
> Does somebody know, how to get information about the use of the egit
> plugin (e.g. how to get the nature-id of the plugin, how to push files
> to the git repository, ...)?

The project is still being "bootstrapped"

There is a user guide here:
http://wiki.eclipse.org/EGit/User_Guide

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: EGit Documetation [message #493234 is a reply to message #493170] Fri, 23 October 2009 17:57 Go to previous messageGo to next message
Mykola Nikishov is currently offline Mykola NikishovFriend
Messages: 58
Registered: July 2009
Member
Stefan Reiterer <st@master-studios.net> writes:

> Does somebody know, how to get information about the use of the egit
> plugin (e.g. how to get the nature-id of the plugin, how to push files
> to the git repository, ...)?

In order to push files to the git repository from your code you don't
need the EGit, but the JGit only. The JGit part provides an API for
working with Git repositories. The EGit plugin is a team provider for
Eclipse on top of JGit.

--
MAN-UANIC
Re: EGit Documetation [message #493297 is a reply to message #493234] Sat, 24 October 2009 12:51 Go to previous messageGo to next message
Stefan Reiterer is currently offline Stefan ReitererFriend
Messages: 10
Registered: October 2009
Junior Member
Hi!

Thank you for your reply. I think JGit is all I need to do my work. Is there any documentation, or other material that describes how JGit can be used. The following link is the only useful material I found.
http://code.google.com/docreader/#p=egit&s=egit&t=JG itTutorialTreeWalk

The problem with this tutorial is, that it is not complete.

--
Stefan
Re: EGit Documetation [message #493397 is a reply to message #493297] Sun, 25 October 2009 20:34 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
Yes, we know the JGit tutorial is incomplete. Currently closing functional gaps, improving the implementation
and writing a first user guide are higher on the list. But if you ask concrete well defined questions we may be
able to answer them before JGit documentation is ready.

--
Matthias
Re: EGit Documetation [message #494241 is a reply to message #493397] Thu, 29 October 2009 17:04 Go to previous messageGo to next message
Stefan Reiterer is currently offline Stefan ReitererFriend
Messages: 10
Registered: October 2009
Junior Member
Hi!

Now I have a concret question about jgit. How is it possible to commt single files?

Lets imagine, that there is a directory that contains several modified files. I want to commit only one of this files. I tried to do this with the following code:

GitProvider provider = (GitProvider)RepositoryProvider.getProvider(files[0].getProj ect());
Repository repo = provider.getData().getRepositoryMapping(files[0]).getReposit ory();

ObjectId[] id = new ObjectId[]{repo.mapCommit("HEAD").getCommitId()};
Tree tree = repo.mapTree(id[0]);

Commit commit = new Commit(repo, id);
commit.setMessage("message");
commit.setAuthor(new PersonIdent("user", "local@capslock"));
commit.setCommitter(new PersonIdent("user", "local@capslock"));
commit.setTree(tree);

commit.commit();

RefUpdate ru = repo.updateRef(Constants.HEAD);
ru.setRefLogMessage("commit", true);
ru.setNewObjectId(commit.getCommitId());
ru.setExpectedOldObjectId(id[0]);
System.out.println("ID: " + commit.getCommitId());

ru.update();


The problem is, that I do not know how to set the tree to commit a single file.

lg.
Stefan
Re: EGit Documetation [message #495038 is a reply to message #494241] Tue, 03 November 2009 15:34 Go to previous messageGo to next message
Stefan Reiterer is currently offline Stefan ReitererFriend
Messages: 10
Registered: October 2009
Junior Member
Ok, I have solved the problem. You can forget the problem desctiption in the post above.

In the course of my project I want to use EGIT nevertheless. To commit a couple of files I want to make use of the CommitAction class. This class is located in the following package:

org.eclipse.egit.ui.internal.actions

My problem is, that the CommitAction class was not exported (in the Manifest file) and so it is not possible to instantiate it (access restrictions).
Other team providers such as subclipse, or subversive also provide a CommitAction class. They exported the class and so I can use it in my project.

Is it possible to export the action classes in further versions of egit, or is there a possibility to bypass the access restrictions?

Yours truly
Stefan Reiterer
Re: EGit Documetation [message #575444 is a reply to message #493234] Sat, 24 October 2009 12:51 Go to previous messageGo to next message
Stefan Reiterer is currently offline Stefan ReitererFriend
Messages: 10
Registered: October 2009
Junior Member
Hi!

Thank you for your reply. I think JGit is all I need to do my work. Is there any documentation, or other material that describes how JGit can be used. The following link is the only useful material I found.
http://code.google.com/docreader/#p=egit&s=egit&t=JG itTutorialTreeWalk

The problem with this tutorial is, that it is not complete.

--
Stefan
Re: EGit Documetation [message #575470 is a reply to message #493297] Sun, 25 October 2009 20:35 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
Yes, we know the JGit tutorial is incomplete. Currently closing functional gaps, improving the implementation
and writing a first user guide are higher on the list. But if you ask concrete well defined questions we may be
able to answer them before JGit documentation is ready.

--
Matthias
Re: EGit Documetation [message #575571 is a reply to message #575470] Thu, 29 October 2009 17:04 Go to previous messageGo to next message
Stefan Reiterer is currently offline Stefan ReitererFriend
Messages: 10
Registered: October 2009
Junior Member
Hi!

Now I have a concret question about jgit. How is it possible to commt single files?

Lets imagine, that there is a directory that contains several modified files. I want to commit only one of this files. I tried to do this with the following code:

GitProvider provider = (GitProvider)RepositoryProvider.getProvider(files[0].getProj ect());
Repository repo = provider.getData().getRepositoryMapping(files[0]).getReposit ory();

ObjectId[] id = new ObjectId[]{repo.mapCommit("HEAD").getCommitId()};
Tree tree = repo.mapTree(id[0]);

Commit commit = new Commit(repo, id);
commit.setMessage("message");
commit.setAuthor(new PersonIdent("user", "mailto:local@capslock"));
commit.setCommitter(new PersonIdent("user", "mailto:local@capslock"));
commit.setTree(tree);

commit.commit();

RefUpdate ru = repo.updateRef(Constants.HEAD);
ru.setRefLogMessage("commit", true);
ru.setNewObjectId(commit.getCommitId());
ru.setExpectedOldObjectId(id[0]);
System.out.println("ID: " + commit.getCommitId());

ru.update();

The problem is, that I do not know how to set the tree to commit a single file.

lg.
Stefan
Re: EGit Documetation [message #575583 is a reply to message #494241] Tue, 03 November 2009 15:34 Go to previous message
Stefan Reiterer is currently offline Stefan ReitererFriend
Messages: 10
Registered: October 2009
Junior Member
Ok, I have solved the problem. You can forget the problem desctiption in the post above.

In the course of my project I want to use EGIT nevertheless. To commit a couple of files I want to make use of the CommitAction class. This class is located in the following package:

org.eclipse.egit.ui.internal.actions

My problem is, that the CommitAction class was not exported (in the Manifest file) and so it is not possible to instantiate it (access restrictions).
Other team providers such as subclipse, or subversive also provide a CommitAction class. They exported the class and so I can use it in my project.

Is it possible to export the action classes in further versions of egit, or is there a possibility to bypass the access restrictions?

Yours truly
Stefan Reiterer
Previous Topic:EGit with HTTP authentication
Next Topic:CommitAction class - access restrictions
Goto Forum:
  


Current Time: Thu Mar 28 12:38:12 GMT 2024

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

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

Back to the top