Package org.eclipse.jgit.storage.file

Examples of org.eclipse.jgit.storage.file.FileBasedConfig.save()


    modulesConfig.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path,
        ConfigConstants.CONFIG_KEY_PATH, path);
    String url = "../sub.git";
    modulesConfig.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path,
        ConfigConstants.CONFIG_KEY_URL, url);
    modulesConfig.save();

    try {
      new SubmoduleInitCommand(db).call();
      fail("Exception not thrown");
    } catch (JGitInternalException e) {
View Full Code Here


    FileBasedConfig modulesConfig = new FileBasedConfig(new File(
        db.getWorkTree(), Constants.DOT_GIT_MODULES), db.getFS());
    modulesConfig.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path,
        ConfigConstants.CONFIG_KEY_PATH, path);
    modulesConfig.save();

    SubmoduleUpdateCommand command = new SubmoduleUpdateCommand(db);
    Collection<String> updated = command.call();
    assertNotNull(updated);
    assertEquals(1, updated.size());
View Full Code Here

    modulesConfig.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path,
        ConfigConstants.CONFIG_KEY_URL, url);
    String update = "rebase";
    modulesConfig.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path,
        ConfigConstants.CONFIG_KEY_UPDATE, update);
    modulesConfig.save();

    SubmoduleUpdateCommand command = new SubmoduleUpdateCommand(db);
    Collection<String> updated = command.call();
    assertNotNull(updated);
    assertTrue(updated.isEmpty());
View Full Code Here

    // set a value to some arbitrary key
    config.setString("test", "section", "event", "value");
    // no changes until we save
    assertNull(events[0]);
    config.save();
    assertNotNull(events[0]);
    // correct repository?
    assertEquals(events[0].getRepository(), db);

    // reset for the next test
View Full Code Here

    // unset the value we have just set above
    config.unset("test", "section", "event");
    // no changes until we save
    assertNull(events[0]);
    config.save();
    assertNotNull(events[0]);
    // correct repository?
    assertEquals(events[0].getRepository(), db);
  }
}
View Full Code Here

    old.setString("ldap", null, "username", "ldap.user");
    old.setString("ldap", null, "password", "ldap.s3kr3t");

    old.setString("sendemail", null, "smtpUser", "email.user");
    old.setString("sendemail", null, "smtpPass", "email.s3kr3t");
    old.save();

    final InitFlags flags = new InitFlags(site);
    final ConsoleUI ui = createStrictMock(ConsoleUI.class);
    Section.Factory sections = new Section.Factory() {
      @Override
View Full Code Here

    remoteRepository = src.getRepository();
    remoteURI = toURIish(app, srcName);

    FileBasedConfig cfg = remoteRepository.getConfig();
    cfg.setBoolean("http", null, "receivepack", true);
    cfg.save();
  }

  public void testPush_CreateBranch() throws Exception {
    final TestRepository src = createTestRepository();
    final RevBlob Q_txt = src.blob("new text");
View Full Code Here

  }

  private void enableReceivePack() throws IOException {
    final FileBasedConfig cfg = remoteRepository.getConfig();
    cfg.setBoolean("http", null, "receivepack", true);
    cfg.save();
  }
}
View Full Code Here

    remoteRepository = src.getRepository();
    remoteURI = toURIish(app, srcName);

    FileBasedConfig cfg = remoteRepository.getConfig();
    cfg.setBoolean("http", null, "receivepack", true);
    cfg.save();
  }

  public void testPush_CreateBranch() throws Exception {
    final TestRepository src = createTestRepository();
    final RevBlob Q_txt = src.blob("new text");
View Full Code Here

        Constants.DOT_GIT_MODULES);
    FileBasedConfig config = new FileBasedConfig(modulesFile, repo.getFS());
    config.load();
    config.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path,
        ConfigConstants.CONFIG_KEY_URL, newUri);
    config.save();

    assertEquals(
        uri,
        repo.getConfig().getString(
            ConfigConstants.CONFIG_SUBMODULE_SECTION, path,
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.