Package org.eclipse.jgit.storage.file

Examples of org.eclipse.jgit.storage.file.WindowCacheConfig


        protected void configure(OpenSshConfig.Host hc, Session session) {
          // Default configuration is batch mode.
        }
      });

      final WindowCacheConfig c = new WindowCacheConfig();
      c.fromConfig(cfg);
      WindowCache.reconfigure(c);
    }
View Full Code Here


    author = new PersonIdent(author, now, tz);

    committer = new PersonIdent("J. Committer", "jcommitter@example.com");
    committer = new PersonIdent(committer, now, tz);

    final WindowCacheConfig c = new WindowCacheConfig();
    c.setPackedGitLimit(128 * WindowCacheConfig.KB);
    c.setPackedGitWindowSize(8 * WindowCacheConfig.KB);
    c.setPackedGitMMAP(useMMAP);
    c.setDeltaBaseCacheLimit(8 * WindowCacheConfig.KB);
    c.install();
  }
 
View Full Code Here

                    // git refuses to clone otherwise
                    fileSet.getBasedir().delete();
                }

                // 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() );
                git = Git.cloneRepository().setURI( repository.getFetchUrl() ).setCredentialsProvider( credentials ).setBranch( branch ).setDirectory( fileSet.getBasedir() ).setProgressMonitor( monitor ).call();
View Full Code Here

    }
  }

  protected void configureJGit() {
    // Configure JGit
    WindowCacheConfig cfg = new WindowCacheConfig();

    cfg.setPackedGitWindowSize(settings.getFilesize(Keys.git.packedGitWindowSize, cfg.getPackedGitWindowSize()));
    cfg.setPackedGitLimit(settings.getFilesize(Keys.git.packedGitLimit, cfg.getPackedGitLimit()));
    cfg.setDeltaBaseCacheLimit(settings.getFilesize(Keys.git.deltaBaseCacheLimit, cfg.getDeltaBaseCacheLimit()));
    cfg.setPackedGitOpenFiles(settings.getFilesize(Keys.git.packedGitOpenFiles, cfg.getPackedGitOpenFiles()));
    cfg.setStreamFileThreshold(settings.getFilesize(Keys.git.streamFileThreshold, cfg.getStreamFileThreshold()));
    cfg.setPackedGitMMAP(settings.getBoolean(Keys.git.packedGitMmap, cfg.isPackedGitMMAP()));

    try {
      cfg.install();
      logger.debug(MessageFormat.format("{0} = {1,number,0}", Keys.git.packedGitWindowSize, cfg.getPackedGitWindowSize()));
      logger.debug(MessageFormat.format("{0} = {1,number,0}", Keys.git.packedGitLimit, cfg.getPackedGitLimit()));
      logger.debug(MessageFormat.format("{0} = {1,number,0}", Keys.git.deltaBaseCacheLimit, cfg.getDeltaBaseCacheLimit()));
      logger.debug(MessageFormat.format("{0} = {1,number,0}", Keys.git.packedGitOpenFiles, cfg.getPackedGitOpenFiles()));
      logger.debug(MessageFormat.format("{0} = {1,number,0}", Keys.git.streamFileThreshold, cfg.getStreamFileThreshold()));
      logger.debug(MessageFormat.format("{0} = {1}", Keys.git.packedGitMmap, cfg.isPackedGitMMAP()));
    } catch (IllegalArgumentException e) {
      logger.error("Failed to configure JGit parameters!", e);
    }
  }
View Full Code Here

    }
  }

  protected void configureJGit() {
    // Configure JGit
    WindowCacheConfig cfg = new WindowCacheConfig();

    cfg.setPackedGitWindowSize(settings.getFilesize(Keys.git.packedGitWindowSize, cfg.getPackedGitWindowSize()));
    cfg.setPackedGitLimit(settings.getFilesize(Keys.git.packedGitLimit, cfg.getPackedGitLimit()));
    cfg.setDeltaBaseCacheLimit(settings.getFilesize(Keys.git.deltaBaseCacheLimit, cfg.getDeltaBaseCacheLimit()));
    cfg.setPackedGitOpenFiles(settings.getFilesize(Keys.git.packedGitOpenFiles, cfg.getPackedGitOpenFiles()));
    cfg.setPackedGitMMAP(settings.getBoolean(Keys.git.packedGitMmap, cfg.isPackedGitMMAP()));

    try {
      cfg.install();
      logger.debug(MessageFormat.format("{0} = {1,number,0}", Keys.git.packedGitWindowSize, cfg.getPackedGitWindowSize()));
      logger.debug(MessageFormat.format("{0} = {1,number,0}", Keys.git.packedGitLimit, cfg.getPackedGitLimit()));
      logger.debug(MessageFormat.format("{0} = {1,number,0}", Keys.git.deltaBaseCacheLimit, cfg.getDeltaBaseCacheLimit()));
      logger.debug(MessageFormat.format("{0} = {1,number,0}", Keys.git.packedGitOpenFiles, cfg.getPackedGitOpenFiles()));
      logger.debug(MessageFormat.format("{0} = {1}", Keys.git.packedGitMmap, cfg.isPackedGitMMAP()));
    } catch (IllegalArgumentException e) {
      logger.error("Failed to configure JGit parameters!", e);
    }

    try {
View Full Code Here

            configFile.getAbsolutePath()));
      }

      FileBasedConfig cfg = new FileBasedConfig(configFile, FS.DETECTED);
      cfg.load();
      new WindowCacheConfig().fromConfig(cfg).install();
      packConfig.fromConfig(cfg);
    }

    int threads = packConfig.getThreads();
    if (threads <= 0)
View Full Code Here

  @Before
  public void setUp() throws Exception {
    super.setUp();

    WindowCacheConfig cfg = new WindowCacheConfig();
    cfg.setStreamFileThreshold(streamThreshold);
    cfg.install();

    repo = createBareRepository();
    wc = (WindowCursor) repo.newObjectReader();
  }
View Full Code Here

  @After
  public void tearDown() throws Exception {
    if (wc != null)
      wc.release();
    new WindowCacheConfig().install();
    super.tearDown();
  }
View Full Code Here

import org.junit.Test;

public class ConcurrentRepackTest extends RepositoryTestCase {
  @Before
  public void setUp() throws Exception {
    WindowCacheConfig windowCacheConfig = new WindowCacheConfig();
    windowCacheConfig.setPackedGitOpenFiles(1);
    WindowCache.reconfigure(windowCacheConfig);
    super.setUp();
  }
View Full Code Here

  }

  @After
  public void tearDown() throws Exception {
    super.tearDown();
    WindowCacheConfig windowCacheConfig = new WindowCacheConfig();
    WindowCache.reconfigure(windowCacheConfig);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.storage.file.WindowCacheConfig

Copyright © 2018 www.massapicom. 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.