Package org.eclipse.jgit.lib

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


        // unset a user and maven user but set default mail domain
        git = Git.open( getWorkingCopy() );
        config = git.getRepository().getConfig();
        unsetConfig( config );
        config.setString( JGitCheckInCommand.GIT_MAVEN_SECTION, null, JGitCheckInCommand.GIT_MAILDOMAIN, "comp.com" );
        config.save();

        // make a change with an user on the commandline
        createAndCommitFile( fooJava, "dude" );

        // check new commit is done with new maven user in config
View Full Code Here


        config = git.getRepository().getConfig();
        unsetConfig( config );
        config.setString( "user", null, "name", "dbartholdi" );
        config.setBoolean( JGitCheckInCommand.GIT_MAVEN_SECTION, null, JGitCheckInCommand.GIT_FORCE, true );
        config.setString( JGitCheckInCommand.GIT_MAVEN_SECTION, null, JGitCheckInCommand.GIT_MAILDOMAIN, "anycomp.com" );
        config.save();

        // make a change with an user on the commandline
        createAndCommitFile( fooJava, "dude" );

        // check new commit is done with new maven user in config
View Full Code Here

        // unset a user and maven user but set default mail domain
        git = Git.open( getWorkingCopy() );
        config = git.getRepository().getConfig();
        unsetConfig( config );
        config.setString( JGitCheckInCommand.GIT_MAVEN_SECTION, null, JGitCheckInCommand.GIT_MAILDOMAIN, "anycomp.com" );
        config.save();

        // make a change with no username given
        createAndCommitFile( fooJava, null );

        // check new commit does not contain the configured email domain
View Full Code Here

    Repository db = null;
    try {
      db = repositoryManager.getRepository(repository.name);
      StoredConfig config = db.getConfig();
      config.setString(LABEL, label, COLOR, lb.color);
      config.save();
    } catch (IOException e) {
      log.error("failed to create label " + label + " in " + repository, e);
    } finally {
      if (db != null) {
        db.close();
View Full Code Here

    Repository db = null;
    try {
      db = repositoryManager.getRepository(repository.name);
      StoredConfig config = db.getConfig();
      config.setString(LABEL, label.name, COLOR, label.color);
      config.save();

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

      db = repositoryManager.getRepository(repository.name);
      TicketLabel label = getLabel(repository, oldName);
      StoredConfig config = db.getConfig();
      config.unsetSection(LABEL, oldName);
      config.setString(LABEL, newName, COLOR, label.color);
      config.save();

      for (QueryResult qr : label.tickets) {
        Change change = new Change(createdBy);
        change.unlabel(oldName);
        change.label(newName);
View Full Code Here

    Repository db = null;
    try {
      db = repositoryManager.getRepository(repository.name);
      StoredConfig config = db.getConfig();
      config.unsetSection(LABEL, label);
      config.save();

      return true;
    } catch (IOException e) {
      log.error("failed to delete label " + label + " in " + repository, e);
    } finally {
View Full Code Here

    try {
      db = repositoryManager.getRepository(repository.name);
      StoredConfig config = db.getConfig();
      config.setString(MILESTONE, milestone, STATUS, ms.status.name());
      config.setString(MILESTONE, milestone, COLOR, ms.color);
      config.save();

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

      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, 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);

      TicketNotifier notifier = createNotifier();
      for (QueryResult qr : milestone.tickets) {
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.