Package org.eclipse.jgit.dircache

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


        ent.setFileMode(FileMode.SYMLINK);
        ent.setObjectId(linkid);
        ent.setLength(UNNORMALIZED_BYTES.length);
      }
    });
    assertTrue(dce.commit());
    new Git(db).commit().setMessage("Adding link").call();
    new Git(db).reset().setMode(ResetType.HARD).call();
    DirCacheIterator dci = new DirCacheIterator(db.readDirCache());
    FileTreeIterator fti = new FileTreeIterator(db);
View Full Code Here


        ent.setFileMode(FileMode.SYMLINK);
        ent.setObjectId(linkid);
        ent.setLength(NORMALIZED_BYTES.length);
      }
    });
    assertTrue(dce.commit());
    new Git(db).commit().setMessage("Adding link").call();
    new Git(db).reset().setMode(ResetType.HARD).call();
    DirCacheIterator dci = new DirCacheIterator(db.readDirCache());
    FileTreeIterator fti = new FileTreeIterator(db);
View Full Code Here

    // there must be at least one change
    if (emptyCommit)
      throw new JGitInternalException(JGitText.get().emptyCommit);

    // update index
    dcEditor.commit();
    // finish temporary in-core index used for this commit
    dcBuilder.finish();
    return inCoreIndex;
  }
View Full Code Here

    // there must be at least one change
    if (emptyCommit)
      throw new JGitInternalException(JGitText.get().emptyCommit);

    // update index
    dcEditor.commit();
    // finish temporary in-core index used for this commit
    dcBuilder.finish();
    return inCoreIndex;
  }
View Full Code Here

        treeWalk.addTree(stashIndexIter);
        treeWalk.addTree(stashWorkingIter);

        applyChanges(treeWalk, cache, editor);
      } finally {
        editor.commit();
        cache.unlock();
      }
    } catch (JGitInternalException e) {
      throw e;
    } catch (IOException e) {
View Full Code Here

            }
          });
        }
      }

      edit.commit();
    } catch (IOException e) {
      throw new RuntimeException(e);
    } finally {
      if (dc != null)
        dc.unlock();
View Full Code Here

            ent.copyMetaData(entry);
          }
        });
      }

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

                        ent.getPathString()), e);
              }
            }
          });
        }
        editor.commit();
      } finally {
        startWalk.release();
        r.release();
      }
    } finally {
View Full Code Here

        editor.add(new DirCacheEntryEditor(gitPath, repository,
            content, length));
      }
      try {
        editor.commit();
      } catch (RuntimeException e) {
        if (e.getCause() instanceof IOException)
          throw (IOException) e.getCause();
        else
          throw e;
View Full Code Here

          public void apply(final DirCacheEntry dEnt) {
            dEnt.copyMetaData(sEnt);
          }
        });
      }
      if (!sEdit.commit())
        tree.failed(new Status(IStatus.ERROR, Activator.getPluginId(),
            0, CoreText.MoveDeleteHook_operationError, null));

      tree.standardMoveFile(srcf, dstf, updateFlags, monitor);
    } catch (IOException e) {
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.