Package org.eclipse.jgit.treewalk

Examples of org.eclipse.jgit.treewalk.TreeWalk.release()


          parents, TreeFilter.ALL);
    } catch (IOException e) {
      diffsResult = new FileDiff[0];
    } finally {
      revWalk.release();
      treewalk.release();
    }
    return diffsResult;
  }

  private void loadParents() throws IOException {
View Full Code Here


        if (monitor.isCanceled())
          throw new InterruptedException();
      }
      return result;
    } finally {
      tw.release();
    }
  }

  @Override
  public int hashCode() {
View Full Code Here

        change.remoteObjectId = AbbreviatedObjectId.fromObjectId(idBuf);
        calculateAndSetChangeKind(RIGHT, change);

        result.put(tw.getPathString(), change);
      }
      tw.release();

      return result;
    } catch (IOException e) {
      Activator.error(e.getMessage(), e);
      return new HashMap<String, GitCommitsModelCache.Change>(0);
View Full Code Here

      return tw != null;
    } finally {
      rw.release();
      rw.dispose();
      if (tw != null)
        tw.release();
    }
  }

  public boolean inIndex(String absolutePath) throws IOException {
    return getDirCacheEntry(absolutePath) != null;
View Full Code Here

        dci = new DirCacheIterator(DirCache.read(repo));
        tw.addTree(dci);
        fti.setDirCacheIterator(tw, 3);
      }
      List<ThreeWayDiffEntry> diffEntrys = ThreeWayDiffEntry.scan(tw);
      tw.release();

      for (ThreeWayDiffEntry diffEntry : diffEntrys)
        repoCache.addMember(diffEntry);
    } catch (Exception e) {
      Activator.logError(e.getMessage(), e);
View Full Code Here

        calculateAndSetChangeKind(RIGHT, change);

        result.put(tw.getPathString(), change);
      }
      tw.release();

      return result;
    } catch (IOException e) {
      Activator.error(e.getMessage(), e);
      return new HashMap<String, Change>(0);
View Full Code Here

      calculateAndSetChangeKind(direction, change);

      result.put(tw.getPathString(), change);
    }
    tw.release();

    return result.size() > 0 ? result : null;
  }

  private static int addTree(TreeWalk tw, RevCommit commit)
View Full Code Here

            walk.enterSubtree();
          else
            paths.add(walk.getPathString());
        }
      } finally {
        walk.release();
      }

      if (!paths.isEmpty())
        refreshFiles(paths);
View Full Code Here

      editor.commit();
    } finally {
      dc.unlock();
      if (walk != null)
        walk.release();
    }
  }

  private void checkoutIndex(RevCommit commit) throws IOException,
      GitAPIException {
View Full Code Here

          entry.setLength(fIter.getEntryLength());
          entry.setLastModified(fIter.getEntryLastModified());
        }
      }
    } finally {
      walk.release();
    }
  }
}
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.