Package org.eclipse.jgit.dircache

Examples of org.eclipse.jgit.dircache.DirCacheEditor.finish()


    }

    public CommitBuilder edit(PathEdit edit) {
      DirCacheEditor e = tree.editor();
      e.add(edit);
      e.finish();
      return this;
    }

    public CommitBuilder rm(String path) {
      DirCacheEditor e = tree.editor();
View Full Code Here


    public CommitBuilder rm(String path) {
      DirCacheEditor e = tree.editor();
      e.add(new DeletePath(path));
      e.add(new DeleteTree(path));
      e.finish();
      return this;
    }

    public CommitBuilder message(String m) {
      message = m;
View Full Code Here

          DirCacheEditor editor = cache.editor();
          for (PathEdit edit : wtEdits)
            editor.add(edit);
          for (String path : wtDeletes)
            editor.add(new DeletePath(path));
          editor.finish();
        }
        builder.setParentId(headCommit);
        builder.addParentId(indexCommit);
        if (untrackedCommit != null)
          builder.addParentId(untrackedCommit);
View Full Code Here

        AddEdit addEdit = new AddEdit(e.getKey(),
            genSha1(e.getValue()), e.getValue().length());
        editor.add(addEdit);
      }
    }
    editor.finish();
    return lockDirCache.writeTree(db.newObjectInserter());
  }

  ObjectId genSha1(String data) {
    ObjectInserter w = db.newObjectInserter();
View Full Code Here

        public void apply(DirCacheEntry ent) {
          ent.setFileMode(FileMode.REGULAR_FILE);
          ent.setObjectId(id);
        }
      });
      e.finish();
      return this;
    }

    public CommitBuilder rm(String path) {
      DirCacheEditor e = tree.editor();
View Full Code Here

    public CommitBuilder rm(String path) {
      DirCacheEditor e = tree.editor();
      e.add(new DeletePath(path));
      e.add(new DeleteTree(path));
      e.finish();
      return this;
    }

    public CommitBuilder message(String m) {
      message = m;
View Full Code Here

          DirCacheEditor editor = cache.editor();
          for (PathEdit edit : wtEdits)
            editor.add(edit);
          for (String path : wtDeletes)
            editor.add(new DeletePath(path));
          editor.finish();
        }
        builder.addParentId(indexCommit);
        builder.setMessage(MessageFormat.format(
            workingDirectoryMessage, branch,
            headCommit.abbreviate(7).name(),
View Full Code Here

          DirCacheEditor editor = cache.editor();
          for (PathEdit edit : wtEdits)
            editor.add(edit);
          for (String path : wtDeletes)
            editor.add(new DeletePath(path));
          editor.finish();
        }
        builder.addParentId(indexCommit);
        builder.setMessage(MessageFormat.format(
            workingDirectoryMessage, branch,
            headCommit.abbreviate(7).name(),
View Full Code Here

          DirCacheEditor editor = cache.editor();
          for (PathEdit edit : wtEdits)
            editor.add(edit);
          for (String path : wtDeletes)
            editor.add(new DeletePath(path));
          editor.finish();
        }
        builder.addParentId(indexCommit);
        builder.setMessage(MessageFormat.format(
            workingDirectoryMessage, branch,
            headCommit.abbreviate(7).name(),
View Full Code Here

                        }
                    } );
                }
            }

            editor.finish();
        } catch ( Exception e ) {
            throw new RuntimeException( e );
        } finally {
            inserter.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.