Package org.eclipse.jgit.revwalk

Examples of org.eclipse.jgit.revwalk.RevWalk.release()


      for (String file : files)
        DirCacheCheckout.checkoutEntry(repo, new File(workTree, file),
            dc.getEntry(file));
    } finally {
      dc.unlock();
      revWalk.release();
    }
    return this;
  }

  private ObjectId getStartPoint() throws AmbiguousObjectException,
View Full Code Here


        throw new JGitInternalException(
            MessageFormat.format(
            JGitText.get().cannotReadCommit, commitId.toString()),
            e);
      } finally {
        rw.release();
      }

      if (!filepaths.isEmpty()) {
        // reset [commit] -- paths
        resetIndexForPaths(commit);
View Full Code Here

  public Result update() throws IOException {
    RevWalk rw = new RevWalk(getRepository());
    try {
      return update(rw);
    } finally {
      rw.release();
    }
  }

  /**
   * Gracefully update the ref to the new value.
View Full Code Here

  public Result delete() throws IOException {
    RevWalk rw = new RevWalk(getRepository());
    try {
      return delete(rw);
    } finally {
      rw.release();
    }
  }

  /**
   * Delete the ref.
View Full Code Here

                  .format(JGitText.get().updatingRefFailed,
                      Constants.HEAD,
                      commitId.toString(), rc));
            }
          } finally {
            revWalk.release();
          }
        } finally {
          odi.release();
        }
      } finally {
View Full Code Here

      return map.getNote(id);
    } catch (IOException e) {
      throw new JGitInternalException(e.getMessage(), e);
    } finally {
      inserter.release();
      walk.release();
    }
  }

  /**
   * Sets the object id of object you want a note on. If the object already
View Full Code Here

      throws AmbiguousObjectException, IOException {
    RevWalk rw = new RevWalk(this);
    try {
      return resolve(rw, revstr);
    } finally {
      rw.release();
    }
  }

  private ObjectId resolve(final RevWalk rw, final String revstr) throws IOException {
    char[] rev = revstr.toCharArray();
View Full Code Here

      } else {
        return new ObjectIdRef.PeeledNonTag(leaf.getStorage(), leaf
            .getName(), leaf.getObjectId());
      }
    } finally {
      rw.release();
    }
  }

  private static Ref recreate(final Ref old, final ObjectIdRef leaf) {
    if (old.isSymbolic()) {
View Full Code Here

    } finally {
      dc.unlock();
    }
    RevWalk rw = new RevWalk(repo);
    RevCommit commit = rw.parseCommit(repo.resolve(Constants.HEAD));
    rw.release();
    return commit;
  }

  /**
   * @return the commit if we had to do a commit, otherwise null
View Full Code Here

      while (i.hasNext())
        notes.add(i.next());
    } catch (IOException e) {
      throw new JGitInternalException(e.getMessage(), e);
    } finally {
      walk.release();
    }

    return notes;
  }
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.