Package org.eclipse.jgit.dircache

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


      dc = repo.lockDirCache();
      dc.clear();
      DirCacheBuilder dcb = dc.builder();
      dcb.addTree(new byte[0], 0, repo.newObjectReader(),
          commit.getTree());
      dcb.commit();
    } catch (IOException e) {
      throw e;
    } finally {
      if (dc != null)
        dc.unlock();
View Full Code Here


            }
          }
        }
      }
      inserter.flush();
      builder.commit();
      setCallable(false);
    } catch (IOException e) {
      throw new JGitInternalException(
          JGitText.get().exceptionCaughtDuringExecutionOfAddCommand, e);
    } finally {
View Full Code Here

      dc = repo.lockDirCache();
      dc.clear();
      DirCacheBuilder dcb = dc.builder();
      dcb.addTree(new byte[0], 0, repo.newObjectReader(),
          commit.getTree());
      dcb.commit();
    } catch (IOException e) {
      throw e;
    } finally {
      if (dc != null)
        dc.unlock();
View Full Code Here

        "Change-Id: I7fc3876fee63c766a2063df97fbe04a2dddd8d7c\n",//
        call("a\n"));

    final DirCacheBuilder builder = repository.lockDirCache().builder();
    builder.add(file("A"));
    assertTrue(builder.commit());

    assertEquals("a\n" + //
        "\n" + //
        "Change-Id: If56597ea9759f23b070677ea6f064c60c38da631\n",//
        call("a\n"));
View Full Code Here

          entry.setObjectId(tree.getEntryObjectId());
          builder.add(entry);
        }
      }

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

        }

        builder.add(entry);
      }

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

            }
          }
        }
      }
      inserter.flush();
      builder.commit();
      setCallable(false);
    } catch (IOException e) {
      throw new JGitInternalException(
          JGitText.get().exceptionCaughtDuringExecutionOfAddCommand, e);
    } finally {
View Full Code Here

      dce.setObjectId(inserter.insert(Constants.OBJ_BLOB, len, in));
      in.close();
      builder.add(dce);
      treeItr.next(1);
    }
    builder.commit();
    inserter.flush();
    inserter.release();
  }

  /**
 
View Full Code Here

          // Deleting a blob is simply a matter of removing
          // the file or symlink named by the tree entry.
          delete(path);
        }
      }
      builder.commit();
      setCallable(false);
    } catch (IOException e) {
      throw new JGitInternalException(
          JGitText.get().exceptionCaughtDuringExecutionOfRmCommand, e);
    } finally {
View Full Code Here

      dc = repo.lockDirCache();
      dc.clear();
      DirCacheBuilder dcb = dc.builder();
      dcb.addTree(new byte[0], 0, repo.newObjectReader(),
          commit.getTree());
      dcb.commit();
    } catch (IOException e) {
      throw e;
    } finally {
      if (dc != null)
        dc.unlock();
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.