Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.Config$CaseFoldingSet


      protected void configure() {
        bind(new TypeLiteral<SchemaFactory<ReviewDb>>() {}).toInstance(db);
        bind(SitePaths.class).toInstance(paths);
        install(new SchemaVersion.Module());

        Config cfg = new Config();
        cfg.setString("gerrit", null, "basePath", "git");
        cfg.setString("user", null, "name", "Gerrit Code Review");
        cfg.setString("user", null, "email", "gerrit@localhost");

        bind(Config.class) //
            .annotatedWith(GerritServerConfig.class) //
            .toInstance(cfg);
View Full Code Here


    init();
  }

  private void init() {
    final Config cfg = new Config();
    try {
      cfg.fromText(read(RESOURCE_FILE));
    } catch (IOException e) {
      throw new RuntimeException(e.getMessage(), e);
    } catch (ConfigInvalidException e) {
      throw new RuntimeException(e.getMessage(), e);
    }
View Full Code Here

  private AccountCache accountCache;

  @Override
  protected void setUp() throws Exception {
    super.setUp();
    config = new Config();
    ident = new PersonIdent("NAME", "e@email", 0, 0);
    accountCache = createStrictMock(AccountCache.class);
  }
View Full Code Here

    Injector injector = Guice.createInjector(new FactoryModule() {
      @Override
      protected void configure() {
        bind(Config.class)
            .annotatedWith(GerritServerConfig.class)
            .toInstance(new Config());

        factory(CapabilityControl.Factory.class);
        bind(ProjectCache.class).toInstance(projectCache);
      }
    });
View Full Code Here

    assertTrue("Exists " + o, o.isFile());
    assertTrue("Read-only " + o, !o.canWrite());
  }

  public void test005_ReadSimpleConfig() {
    final Config c = db.getConfig();
    assertNotNull(c);
    assertEquals("0", c.getString("core", null, "repositoryformatversion"));
    assertEquals("0", c.getString("CoRe", null, "REPOSITORYFoRmAtVeRsIoN"));
    assertEquals("true", c.getString("core", null, "filemode"));
    assertEquals("true", c.getString("cOrE", null, "fIlEModE"));
    assertNull(c.getString("notavalue", null, "reallyNotAValue"));
  }
View Full Code Here

public class RemoteConfigTest extends TestCase {
  private Config config;

  protected void setUp() throws Exception {
    super.setUp();
    config = new Config();
  }
View Full Code Here

    super.setUp();
    config = new Config();
  }

  private void readConfig(final String dat) throws ConfigInvalidException {
    config = new Config();
    config.fromText(dat);
  }
View Full Code Here

  private RemoteConfig remoteConfig;

  @Override
  public void setUp() throws Exception {
    super.setUp();
    final Config config = db.getConfig();
    remoteConfig = new RemoteConfig(config, "test");
    remoteConfig.addURI(new URIish("http://everyones.loves.git/u/2"));
    transport = null;
  }
View Full Code Here

              modulesConfig = new BlobBasedConfig(null, repository,
                  configWalk.getObjectId(0));
              return this;
            }
          }
          modulesConfig = new Config();
        } finally {
          if (idx > 0)
            rootTree.next(idx);
        }
      } finally {
View Full Code Here

          JGitText.get().cannotPullOnARepoWithState, repo
              .getRepositoryState().name()));

    // get the configured remote for the currently checked out branch
    // stored in configuration key branch.<branch name>.remote
    Config repoConfig = repo.getConfig();
    String remote = repoConfig.getString(
        ConfigConstants.CONFIG_BRANCH_SECTION, branchName,
        ConfigConstants.CONFIG_KEY_REMOTE);
    if (remote == null)
      // fall back to default remote
      remote = Constants.DEFAULT_REMOTE_NAME;

    // get the name of the branch in the remote repository
    // stored in configuration key branch.<branch name>.merge
    String remoteBranchName = repoConfig.getString(
        ConfigConstants.CONFIG_BRANCH_SECTION, branchName,
        ConfigConstants.CONFIG_KEY_MERGE);
    // check if the branch is configured for pull-rebase
    boolean doRebase = repoConfig.getBoolean(
        ConfigConstants.CONFIG_BRANCH_SECTION, branchName,
        ConfigConstants.CONFIG_KEY_REBASE, false);

    if (remoteBranchName == null) {
      String missingKey = ConfigConstants.CONFIG_BRANCH_SECTION + DOT
          + branchName + DOT + ConfigConstants.CONFIG_KEY_MERGE;
      throw new InvalidConfigurationException(MessageFormat.format(
          JGitText.get().missingConfigurationForKey, missingKey));
    }

    final boolean isRemote = !remote.equals(".");
    String remoteUri;
    FetchResult fetchRes;
    if (isRemote) {
      remoteUri = repoConfig.getString(
          ConfigConstants.CONFIG_REMOTE_SECTION, remote,
          ConfigConstants.CONFIG_KEY_URL);
      if (remoteUri == null) {
        String missingKey = ConfigConstants.CONFIG_REMOTE_SECTION + DOT
            + remote + DOT + ConfigConstants.CONFIG_KEY_URL;
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.lib.Config$CaseFoldingSet

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.