Examples of PathEdit


Examples of org.eclipse.jgit.dircache.DirCacheEditor.PathEdit

              }
            }
          }

          // update index
          dcEditor.add(new PathEdit(path) {
            @Override
            public void apply(DirCacheEntry ent) {
              ent.copyMetaData(dcEntry);
            }
          });
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCacheEditor.PathEdit

      final ObjectReader r = repo.getObjectDatabase().newReader();
      try {
        while (startWalk.next()) {
          final ObjectId blobId = startWalk.getObjectId(0);
          final FileMode mode = startWalk.getFileMode(0);
          editor.add(new PathEdit(startWalk.getPathString()) {
            public void apply(DirCacheEntry ent) {
              ent.setObjectId(blobId);
              ent.setFileMode(mode);
              try {
                DirCacheCheckout.checkoutEntry(repo, new File(
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCacheEditor.PathEdit

              inputStream.close();
            }
          }

          // update index
          dcEditor.add(new PathEdit(path) {
            @Override
            public void apply(DirCacheEntry ent) {
              ent.copyMetaData(dcEntry);
            }
          });
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCacheEditor.PathEdit

        startWalk.setFilter(treeWalk.getFilter());
        startWalk.addTree(revWalk.parseCommit(getStartPoint())
            .getTree());
        while (startWalk.next()) {
          final ObjectId blobId = startWalk.getObjectId(0);
          editor.add(new PathEdit(startWalk.getPathString()) {

            public void apply(DirCacheEntry ent) {
              ent.setObjectId(blobId);
            }
          });
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCacheEditor.PathEdit

          pdb.getRef(subscriber.get()).getObjectId();

      DirCache dc = readTree(pdb, pdb.getRef(subscriber.get()));
      DirCacheEditor ed = dc.editor();
      for (final Map.Entry<Branch.NameKey, ObjectId> me : modules.entrySet()) {
        ed.add(new PathEdit(paths.get(me.getKey())) {
          public void apply(DirCacheEntry ent) {
            ent.setFileMode(FileMode.GITLINK);
            ent.setObjectId(me.getValue().copy());
          }
        });
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCacheEditor.PathEdit

  protected void saveFile(String fileName, byte[] raw) throws IOException {
    DirCacheEditor editor = newTree.editor();
    if (raw != null && 0 < raw.length) {
      final ObjectId blobId = inserter.insert(Constants.OBJ_BLOB, raw);
      editor.add(new PathEdit(fileName) {
        @Override
        public void apply(DirCacheEntry ent) {
          ent.setFileMode(FileMode.REGULAR_FILE);
          ent.setObjectId(blobId);
        }
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCacheEditor.PathEdit

    while (treeWalk.next()) {
      DirCacheEntry entry = dci.getDirCacheEntry();
      // Only add one edit per path
      if (entry != null && entry.getStage() > DirCacheEntry.STAGE_1)
        continue;
      editor.add(new PathEdit(treeWalk.getPathString()) {
        public void apply(DirCacheEntry ent) {
          int stage = ent.getStage();
          if (stage > DirCacheEntry.STAGE_0) {
            if (checkoutStage != null) {
              if (stage == checkoutStage.number)
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCacheEditor.PathEdit

    final ObjectReader r = treeWalk.getObjectReader();
    DirCacheEditor editor = dc.editor();
    while (treeWalk.next()) {
      final ObjectId blobId = treeWalk.getObjectId(0);
      final FileMode mode = treeWalk.getFileMode(0);
      editor.add(new PathEdit(treeWalk.getPathString()) {
        public void apply(DirCacheEntry ent) {
          ent.setObjectId(blobId);
          ent.setFileMode(mode);
          checkoutPath(ent, r);
        }
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCacheEditor.PathEdit

      return add(path, blob(content));
    }

    public CommitBuilder add(String path, final RevBlob id)
        throws Exception {
      return edit(new PathEdit(path) {
        @Override
        public void apply(DirCacheEntry ent) {
          ent.setFileMode(FileMode.REGULAR_FILE);
          ent.setObjectId(id);
        }
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCacheEditor.PathEdit

            }

            if (indexIter == null && headIter == null)
              untracked.add(entry);
            else
              wtEdits.add(new PathEdit(entry) {
                public void apply(DirCacheEntry ent) {
                  ent.copyMetaData(entry);
                }
              });
          }
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.