Examples of lockDirCache()


Examples of org.eclipse.jgit.lib.Repository.lockDirCache()

    final Repository db = rm.getRepository();

    DirCacheEditor e = edits.get(db);
    if (e == null) {
      try {
        e = db.lockDirCache().editor();
      } catch (IOException err) {
        throw new CoreException(Activator.error(CoreText.UntrackOperation_failed, err));
      }
      edits.put(db, e);
      mappings.put(rm, rm);
View Full Code Here

Examples of org.eclipse.jgit.lib.Repository.lockDirCache()

    assertTrue(refs >= 4);
    // and a known file in the working dir
    assertTrue(new File(destinationRepo, SampleTestRepository.A_txt_name)
        .exists());
    DirCacheEntry fileEntry = null;
    DirCache dc = repository.lockDirCache();
    fileEntry = dc.getEntry(SampleTestRepository.A_txt_name);
    dc.unlock();
    // check that we have the file in the index
    assertNotNull(fileEntry);
    // No project has been imported
View Full Code Here

Examples of org.eclipse.jgit.lib.Repository.lockDirCache()

    TestProject project = initRepoInsideProjectInsideWorkspace();
    String filePath = "file.txt";
    IFile file = testUtils.addFileToProject(project.getProject(), filePath, "some text");

    Repository repo = testRepository.getRepository();
    DirCache index = repo.lockDirCache();
    DirCacheBuilder builder = index.builder();
    addUnmergedEntry(filePath, builder);
    builder.commit();

    try {
View Full Code Here

Examples of org.eclipse.jgit.lib.Repository.lockDirCache()

    TestProject project = initRepoInsideProjectInsideWorkspace();
    String filePath = "folder/file.txt";
    IFile file = testUtils.addFileToProject(project.getProject(), filePath, "some text");

    Repository repo = testRepository.getRepository();
    DirCache index = repo.lockDirCache();
    DirCacheBuilder builder = index.builder();
    addUnmergedEntry(filePath, builder);
    builder.commit();

    try {
View Full Code Here

Examples of org.eclipse.jgit.lib.Repository.lockDirCache()

            rebase.call();
          } else {
            // Checkout commit referenced in parent repository's
            // index as a detached HEAD
            DirCacheCheckout co = new DirCacheCheckout(
                submoduleRepo, submoduleRepo.lockDirCache(),
                commit.getTree());
            co.setFailOnConflict(true);
            co.checkout();
            RefUpdate refUpdate = submoduleRepo.updateRef(
                Constants.HEAD, true);
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.