Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » when checking out a branch when checking out a branch [message #574628] Tue, 13 October 2009 14:24
Eclipse UserFriend
Originally posted by:


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();
repo.writeSymref(Constants.HEAD, refName);

.... I sometimes get a FileNotFoundException with a stack trace like the
D:\Stanley\SHK\AMOR\runtime-EclipseApplication\voldemort\src \java\voldemort\serialization\
(Zugriff verweigert) --> Access denied
at Method)
at<init>(Unknown Source)
at<init>(Unknown Source)
at org.eclipse.jgit.lib.GitIndex.checkoutEntry( 5)
at org.eclipse.jgit.lib.IndexTreeWalker.visitEntry(IndexTreeWal
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.checkout(WorkDirCheckou
at de.modelrepository.test.git.GitFileHistory.<init>(
at de.modelrepository.test.git.GitFileHistory.main(GitFileHisto

This error occurs often but by chance. Everytime the affected file is
another and I can't figure out what the reason may be.
Previous Topic:JGit question
Next Topic:How create Git repository from Eclipse project?
Goto Forum:

Current Time: Tue Aug 16 07:27:20 GMT 2022

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

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

Back to the top