Package org.eclipse.jgit.dircache

Examples of org.eclipse.jgit.dircache.DirCache.unlock()


        }
      } finally {
        treeWalk.release();
      }
    } finally {
      dc.unlock();
      revWalk.release();
    }
    return this;
  }
View Full Code Here


            FileUtils.delete(fileToDelete, FileUtils.RECURSIVE
                | FileUtils.RETRY);
        }
      }
    } finally {
      dc.unlock();
    }
    RevWalk rw = new RevWalk(repo);
    RevCommit commit = rw.parseCommit(repo.resolve(Constants.HEAD));
    rw.release();
    return commit;
View Full Code Here

    DirCache cache = db.lockDirCache();
    cache.getEntry("executable").setFileMode(FileMode.EXECUTABLE_FILE);
    cache.getEntry("symlink").setFileMode(FileMode.SYMLINK);
    cache.write();
    cache.commit();
    cache.unlock();

    git.commit().setMessage("three files with different modes").call();

    final byte[] zipData = CLIGitCommand.rawExecute( //
        "git archive --format=zip master", db);
View Full Code Here

    DirCache cache = db.lockDirCache();
    cache.getEntry("executable").setFileMode(FileMode.EXECUTABLE_FILE);
    cache.getEntry("symlink").setFileMode(FileMode.SYMLINK);
    cache.write();
    cache.commit();
    cache.unlock();

    git.commit().setMessage("three files with different modes").call();

    final byte[] archive = CLIGitCommand.rawExecute( //
        "git archive --format=tar master", db);
View Full Code Here

        builder.add(entry);
      }

      builder.commit();
    } finally {
      dc.unlock();
      if (walk != null)
        walk.release();
    }
  }
View Full Code Here

          }
        } finally {
          odi.release();
        }
      } finally {
        index.unlock();
      }
    } catch (UnmergedPathException e) {
      // since UnmergedPathException is a subclass of IOException
      // which should not be wrapped by a JGitInternalException we
      // have to catch and re-throw it here
View Full Code Here

    } catch (IOException e) {
      throw new JGitInternalException(
          JGitText.get().exceptionCaughtDuringExecutionOfAddCommand, e);
    } finally {
      if (dc != null)
        dc.unlock();
    }

    return dc;
  }
View Full Code Here

          status = new CheckoutResult(Status.CONFLICTS,
              dco.getConflicts());
          throw new CheckoutConflictException(dco.getConflicts(), e);
        }
      } finally {
        dc.unlock();
      }
      Ref ref = repo.getRef(name);
      if (ref != null && !ref.getName().startsWith(Constants.R_HEADS))
        ref = null;
      String toName = Repository.shortenRefName(name);
View Full Code Here

            FileUtils.delete(fileToDelete, FileUtils.RECURSIVE
                | FileUtils.RETRY);
        }
      }
    } finally {
      dc.unlock();
    }
    RevWalk rw = new RevWalk(repo);
    RevCommit commit = rw.parseCommit(repo.resolve(Constants.HEAD));
    rw.release();
    return commit;
View Full Code Here

          }
        } finally {
          odi.release();
        }
      } finally {
        index.unlock();
      }
    } catch (UnmergedPathException e) {
      throw new UnmergedPathsException(e);
    } catch (IOException e) {
      throw new JGitInternalException(
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.