java.io.FileNotFoundException when checking out a branch [message #491174] |
Tue, 13 October 2009 10:24  |
Eclipse User |
|
|
|
Originally posted by: hillner.informatik.uni-leipzig.de
Hello,
when I try to checkout a branch using the following code ...
private void loadBranch(String refName) throws IOException {
Commit commit = repo.mapCommit(refName);
Tree tree = commit.getTree();
GitIndex index = repo.getIndex();
new WorkDirCheckout(repo, repo.getWorkDir(), index, tree).checkout();
index.write();
repo.writeSymref(Constants.HEAD, refName);
}
.... I sometimes get a FileNotFoundException with a stack trace like the
following:
java.io.FileNotFoundException:
D:\Stanley\SHK\AMOR\runtime-EclipseApplication\voldemort\src \java\voldemort\serialization\VoldemortOperation.java
(Zugriff verweigert) --> Access denied
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.eclipse.jgit.lib.GitIndex.checkoutEntry(GitIndex.java:84 5)
at
org.eclipse.jgit.lib.WorkDirCheckout$1.visitEntry(WorkDirChe ckout.java:176)
at org.eclipse.jgit.lib.IndexTreeWalker.visitEntry(IndexTreeWal ker.java:160)
at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.ja va:127)
at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.ja va:107)
at
org.eclipse.jgit.lib.WorkDirCheckout.checkoutOutIndexNoHead( WorkDirCheckout.java:179)
at org.eclipse.jgit.lib.WorkDirCheckout.checkout(WorkDirCheckou t.java:136)
at
de.modelrepository.test.git.GitFileHistory.loadBranch(GitFil eHistory.java:139)
at de.modelrepository.test.git.GitFileHistory.<init>(GitFileHistory.java:42)
at de.modelrepository.test.git.GitFileHistory.main(GitFileHisto ry.java:167)
This error occurs often but by chance. Everytime the affected file is
another and I can't figure out what the reason may be.
|
|
|
|
|
|
|
Re: java.io.FileNotFoundException when checking out a branch [message #491432 is a reply to message #491409] |
Wed, 14 October 2009 10:41  |
Eclipse User |
|
|
|
Stanley Hillner wrote:
> Is there any further documentation of JGit/EGit except the small
> tutorial and the javadoc in the source?
No. We want to move the tutorial from code.google.com to the Eclipse
Wiki under the EGit directory, and we'd certainly appreciate help from
folks who understand a bit of JGit to help us document it further.
Jonas did a nice job with the bit he did write, but docs are far down on
everyone's priority list. :-\
> And Is there an update site where I can get the org.eclipse.jgit
> plugins (not the spearce-packages -> beacause of the dependencies)?
Not yet. Actually there is a Maven depot at code.google.com/p/egit/
which now also has an org.eclipse.jgit namespace. But I wouldn't
encourage using it just yet...
We're hoping to release a JGit/EGit 0.6.0-M1 near the end of the month,
and have the build artifacts available through the Eclipse download site
and mirrors. Those would be built against the JARs from Eclipse Orbit.
|
|
|
Re: java.io.FileNotFoundException when checking out a branch [message #574663 is a reply to message #491174] |
Tue, 13 October 2009 10:38  |
Eclipse User |
|
|
|
Stanley Hillner wrote:
> when I try to checkout a branch using the following code ...
>
> private void loadBranch(String refName) throws IOException {
> Commit commit = repo.mapCommit(refName);
> Tree tree = commit.getTree();
> GitIndex index = repo.getIndex();
> new WorkDirCheckout(repo, repo.getWorkDir(), index, tree).checkout();
> index.write();
> repo.writeSymref(Constants.HEAD, refName);
> }
>
> ... I sometimes get a FileNotFoundException with a stack trace like the
> following:
>
> java.io.FileNotFoundException:
> D:\Stanley\SHK\AMOR\runtime-EclipseApplication\voldemort\src \java\voldemort\serialization\VoldemortOperation.java
> (Zugriff verweigert) --> Access denied
Missing parent directory? Maybe WorkDirCheckout isn't always creating
the leading path like it should?
I don't know, I'm not very familiar with WorkDirCheckout... I haven't
looked at or called that code in years.
|
|
|
Re: java.io.FileNotFoundException when checking out a branch [message #574699 is a reply to message #491175] |
Tue, 13 October 2009 10:54  |
Eclipse User |
|
|
|
Originally posted by: hillner.informatik.uni-leipzig.de
No, the parent directory (repo.getWorkDir()) is created everytime similar.
Or do you think about another parent?
"Shawn Pearce" <spearce@spearce.org> schrieb im Newsbeitrag
news:hb23dh$vp8$1@build.eclipse.org...
> Stanley Hillner wrote:
>> when I try to checkout a branch using the following code ...
>>
>> private void loadBranch(String refName) throws IOException {
>> Commit commit = repo.mapCommit(refName);
>> Tree tree = commit.getTree();
>> GitIndex index = repo.getIndex();
>> new WorkDirCheckout(repo, repo.getWorkDir(), index, tree).checkout();
>> index.write();
>> repo.writeSymref(Constants.HEAD, refName);
>> }
>>
>> ... I sometimes get a FileNotFoundException with a stack trace like the
>> following:
>>
>> java.io.FileNotFoundException:
>> D:\Stanley\SHK\AMOR\runtime-EclipseApplication\voldemort\src \java\voldemort\serialization\VoldemortOperation.java
>> (Zugriff verweigert) --> Access denied
>
> Missing parent directory? Maybe WorkDirCheckout isn't always creating the
> leading path like it should?
>
> I don't know, I'm not very familiar with WorkDirCheckout... I haven't
> looked at or called that code in years.
|
|
|
Re: java.io.FileNotFoundException when checking out a branch [message #574715 is a reply to message #491182] |
Tue, 13 October 2009 16:35  |
Eclipse User |
|
|
|
Stanley Hillner wrote:
> No, the parent directory (repo.getWorkDir()) is created everytime similar.
> Or do you think about another parent?
I was thinking about the parent directory of the file...
>>> java.io.FileNotFoundException:
>>> D:\Stanley\SHK\AMOR\runtime-EclipseApplication\voldemort\src \java\voldemort\serialization\VoldemortOperation.java
>>> (Zugriff verweigert) --> Access denied
So does
D:\Stanley\SHK\AMOR\runtime-EclipseApplication\voldemort\src \java\voldemort\serialization\
exist when this fails like this? Is the directory maybe not writable?
|
|
|
Re: java.io.FileNotFoundException when checking out a branch [message #574777 is a reply to message #491262] |
Wed, 14 October 2009 09:04  |
Eclipse User |
|
|
|
Originally posted by: hillner.informatik.uni-leipzig.de
OK, for any reason today everthing works like it should.
Maybe this is because I restarted eclipse or my system.
I didn't change anything at all. strange...Windows ^^
Nevertheless thank you for your replies, nice to have a bit support :)
Another question:
Is there any further documentation of JGit/EGit except the small
tutorial and the javadoc in the source?
And Is there an update site where I can get the org.eclipse.jgit plugins
(not the spearce-packages -> beacause of the dependencies)?
"Shawn Pearce" <spearce@spearce.org> schrieb im Newsbeitrag
news:hb2oa3$mg1$1@build.eclipse.org...
> Stanley Hillner wrote:
>> No, the parent directory (repo.getWorkDir()) is created everytime
>> similar.
>> Or do you think about another parent?
>
> I was thinking about the parent directory of the file...
>
>>>> java.io.FileNotFoundException:
>>>> D:\Stanley\SHK\AMOR\runtime-EclipseApplication\voldemort\src \java\voldemort\serialization\VoldemortOperation.java
>>>> (Zugriff verweigert) --> Access denied
>
> So does
>
> D:\Stanley\SHK\AMOR\runtime-EclipseApplication\voldemort\src \java\voldemort\serialization\
>
> exist when this fails like this? Is the directory maybe not writable?
|
|
|
Re: java.io.FileNotFoundException when checking out a branch [message #574801 is a reply to message #491409] |
Wed, 14 October 2009 10:41  |
Eclipse User |
|
|
|
Stanley Hillner wrote:
> Is there any further documentation of JGit/EGit except the small
> tutorial and the javadoc in the source?
No. We want to move the tutorial from code.google.com to the Eclipse
Wiki under the EGit directory, and we'd certainly appreciate help from
folks who understand a bit of JGit to help us document it further.
Jonas did a nice job with the bit he did write, but docs are far down on
everyone's priority list. :-\
> And Is there an update site where I can get the org.eclipse.jgit
> plugins (not the spearce-packages -> beacause of the dependencies)?
Not yet. Actually there is a Maven depot at code.google.com/p/egit/
which now also has an org.eclipse.jgit namespace. But I wouldn't
encourage using it just yet...
We're hoping to release a JGit/EGit 0.6.0-M1 near the end of the month,
and have the build artifacts available through the Eclipse download site
and mirrors. Those would be built against the JARs from Eclipse Orbit.
|
|
|
Powered by
FUDForum. Page generated in 0.05348 seconds