java.io.FileNotFoundException when checking out a branch [message #491174] |
Tue, 13 October 2009 14: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 #491182 is a reply to message #491175] |
Tue, 13 October 2009 14: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 #491409 is a reply to message #491262] |
Wed, 14 October 2009 13: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 #574699 is a reply to message #491175] |
Tue, 13 October 2009 14: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 #574777 is a reply to message #491262] |
Wed, 14 October 2009 13: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?
|
|
|
|
Powered by
FUDForum. Page generated in 0.04892 seconds