Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.StoredConfig.save()


      config.setString(MILESTONE, milestone.name, COLOR, milestone.color);
      if (milestone.due != null) {
        config.setString(MILESTONE, milestone.name, DUE,
            new SimpleDateFormat(DUE_DATE_PATTERN).format(milestone.due));
      }
      config.save();

      milestonesCache.remove(repository.name);
      return true;
    } catch (IOException e) {
      log.error("failed to update milestone " + milestone + " in " + repository, e);
View Full Code Here


      config.setString(MILESTONE, newName, COLOR, tm.color);
      if (tm.due != null) {
        config.setString(MILESTONE, newName, DUE,
            new SimpleDateFormat(DUE_DATE_PATTERN).format(tm.due));
      }
      config.save();

      milestonesCache.remove(repository.name);

      TicketNotifier notifier = createNotifier();
      for (QueryResult qr : tm.tickets) {
View Full Code Here

        return false;
      }
      db = repositoryManager.getRepository(repository.name);
      StoredConfig config = db.getConfig();
      config.unsetSection(MILESTONE, milestone);
      config.save();

      milestonesCache.remove(repository.name);

      TicketNotifier notifier = createNotifier();
      for (QueryResult qr : tm.tickets) {
View Full Code Here

      config.setString("ui", null, "size",
          MessageFormat.format("{0,number,0}x{1,number,0}", sz.width, sz.height));
      Point pos = GitblitManager.this.getLocationOnScreen();
      config.setString("ui", null, "position",
          MessageFormat.format("{0,number,0},{1,number,0}", pos.x, pos.y));
      config.save();
    } catch (Throwable t) {
      Utils.showException(GitblitManager.this, t);
    }
  }
View Full Code Here

        definitions.add(feed.toString());
      }
      if (definitions.size() > 0) {
        config.setStringList(SERVER, reg.name, FEED, definitions);
      }
      config.save();
      return true;
    } catch (Throwable t) {
      Utils.showException(GitblitManager.this, t);
    }
    return false;
View Full Code Here

      StoredConfig config = getConfig();
      for (GitblitRegistration reg : list) {
        config.unsetSection(SERVER, reg.name);
        registrations.remove(reg.name);
      }
      config.save();
      success = true;
    } catch (Throwable t) {
      Utils.showException(GitblitManager.this, t);
    }
    return success;
View Full Code Here

    config.unsetSection(Constants.CONFIG_GITBLIT, Constants.CONFIG_CUSTOM_FIELDS);
    config.setString(Constants.CONFIG_GITBLIT, Constants.CONFIG_CUSTOM_FIELDS, "commitMessageRegEx", "\\d");
    config.setString(Constants.CONFIG_GITBLIT, Constants.CONFIG_CUSTOM_FIELDS, "anotherProperty", "Hello");

    config.save();
  }

  @After
  public void teardownConfiguration() throws Exception {
    Repository r = GitBlitSuite.getHelloworldRepository();
View Full Code Here

  public void teardownConfiguration() throws Exception {
    Repository r = GitBlitSuite.getHelloworldRepository();
    StoredConfig config = r.getConfig();

    config.unsetSection(Constants.CONFIG_GITBLIT, Constants.CONFIG_CUSTOM_FIELDS);
    config.save();
  }

  @Test
  public void testGetCustomProperty() throws Exception {
    RepositoryModel model = repositories().getRepositoryModel(
View Full Code Here

  public void testCheckoutMixedNewlines() throws Exception {
    // "git config core.autocrlf true"
    StoredConfig config = git.getRepository().getConfig();
    config.setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null,
        ConfigConstants.CONFIG_KEY_AUTOCRLF, true);
    config.save();
    // edit <FILE1>
    File written = writeTrashFile(FILE1, "4\r\n4");
    assertEquals("4\r\n4", read(written));
    // "git add <FILE1>"
    git.add().addFilepattern(FILE1).call();
View Full Code Here

    StoredConfig config = target.getRepository().getConfig();
    config.setString("branch", "basedOnMaster", "remote", ".");
    config.setString("branch", "basedOnMaster", "merge",
        "refs/heads/master");
    config.setBoolean("branch", "basedOnMaster", "rebase", true);
    config.save();
    target.getRepository().updateRef(Constants.HEAD).link(
        "refs/heads/basedOnMaster");
    PullResult res = target.pull().call();
    // nothing to update since we don't have different data yet
    assertNull(res.getFetchResult());
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.