Package org.eclipse.jgit.storage.file

Examples of org.eclipse.jgit.storage.file.WindowCacheConfig.install()


  @Test
  public void testConfigureCache_PackedGitLimit_0() {
    try {
      final WindowCacheConfig cfg = new WindowCacheConfig();
      cfg.setPackedGitLimit(0);
      cfg.install();
      fail("incorrectly permitted PackedGitLimit = 0");
    } catch (IllegalArgumentException e) {
      //
    }
  }
View Full Code Here


  @Test
  public void testConfigureCache_PackedGitWindowSize_0() {
    try {
      final WindowCacheConfig cfg = new WindowCacheConfig();
      cfg.setPackedGitWindowSize(0);
      cfg.install();
      fail("incorrectly permitted PackedGitWindowSize = 0");
    } catch (IllegalArgumentException e) {
      assertEquals("Invalid window size", e.getMessage());
    }
  }
View Full Code Here

  @Test
  public void testConfigureCache_PackedGitWindowSize_512() {
    try {
      final WindowCacheConfig cfg = new WindowCacheConfig();
      cfg.setPackedGitWindowSize(512);
      cfg.install();
      fail("incorrectly permitted PackedGitWindowSize = 512");
    } catch (IllegalArgumentException e) {
      assertEquals("Invalid window size", e.getMessage());
    }
  }
View Full Code Here

  @Test
  public void testConfigureCache_PackedGitWindowSize_4097() {
    try {
      final WindowCacheConfig cfg = new WindowCacheConfig();
      cfg.setPackedGitWindowSize(4097);
      cfg.install();
      fail("incorrectly permitted PackedGitWindowSize = 4097");
    } catch (IllegalArgumentException e) {
      assertEquals("Window size must be power of 2", e.getMessage());
    }
  }
View Full Code Here

  @Test
  public void testConfigureCache_PackedGitOpenFiles_0() {
    try {
      final WindowCacheConfig cfg = new WindowCacheConfig();
      cfg.setPackedGitOpenFiles(0);
      cfg.install();
      fail("incorrectly permitted PackedGitOpenFiles = 0");
    } catch (IllegalArgumentException e) {
      assertEquals("Open files must be >= 1", e.getMessage());
    }
  }
View Full Code Here

  public void testConfigureCache_PackedGitWindowSizeAbovePackedGitLimit() {
    try {
      final WindowCacheConfig cfg = new WindowCacheConfig();
      cfg.setPackedGitLimit(1024);
      cfg.setPackedGitWindowSize(8192);
      cfg.install();
      fail("incorrectly permitted PackedGitWindowSize > PackedGitLimit");
    } catch (IllegalArgumentException e) {
      assertEquals("Window size must be < limit", e.getMessage());
    }
  }
View Full Code Here

    // algorithm actually implemented in WindowCache.
    //
    final WindowCacheConfig cfg = new WindowCacheConfig();
    cfg.setPackedGitLimit(6 * 4096 / 5);
    cfg.setPackedGitWindowSize(4096);
    cfg.install();
  }
}
View Full Code Here

                }

                // FIXME only if windauze
                WindowCacheConfig cfg = new WindowCacheConfig();
                cfg.setPackedGitMMAP( false );
                cfg.install();

                // no git repo seems to exist, let's clone the original repo
                CredentialsProvider credentials = JGitUtils.getCredentials( (GitScmProviderRepository) repo );
                getLogger().info( "cloning [" + branch + "] to " + fileSet.getBasedir() );
                CloneCommand command = Git.cloneRepository().setURI( repository.getFetchUrl() );
View Full Code Here

     */
    @Override
    public void delete() {
        repository.close();
        WindowCacheConfig config = new WindowCacheConfig();
        config.install();
        FileUtil.rm_rf(repository.getDirectory());
    }

    /**
     * Returns changes made through the commit denoted by the given revision.
View Full Code Here

    }

    public boolean move(String srcProjectOwner, String srcProjectName, String desrProjectOwner, String destProjectName) {
        repository.close();
        WindowCacheConfig config = new WindowCacheConfig();
        config.install();

        File srcGitDirectory = new File(getGitDirectory(srcProjectOwner, srcProjectName));
        File destGitDirectory = new File(getGitDirectory(desrProjectOwner, destProjectName));
        File srcGitDirectoryForMerging = new File(getDirectoryForMerging(srcProjectOwner, srcProjectName));
        File destGitDirectoryForMerging = new File(getDirectoryForMerging(desrProjectOwner, destProjectName));
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.