Examples of unsetSection()


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

          repoConfig.setStringList(
              ConfigConstants.CONFIG_BRANCH_SECTION, newName,
              name, Arrays.asList(values));
        }
        repoConfig.unsetSection(ConfigConstants.CONFIG_BRANCH_SECTION,
            shortOldName);
        repoConfig.save();
      }

      Ref resultRef = repo.getRef(newName);
View Full Code Here

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

      File gitDir = GitUtils.getGitDir(p.removeFirstSegments(1));
      Repository db = null;
      try {
        db = FileRepositoryBuilder.create(gitDir);
        StoredConfig config = db.getConfig();
        config.unsetSection(ConfigConstants.CONFIG_REMOTE_SECTION, remoteName);
        config.save();
        // TODO: handle result
        return true;
      } finally {
        if (db != null) {
View Full Code Here

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

          repoConfig.setStringList(
              ConfigConstants.CONFIG_BRANCH_SECTION, newName,
              name, Arrays.asList(values));
        }
        repoConfig.unsetSection(ConfigConstants.CONFIG_BRANCH_SECTION,
            shortOldName);
        repoConfig.save();
      }

      Ref resultRef = repo.getRef(newName);
View Full Code Here

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

          if (fullName.startsWith(Constants.R_HEADS)) {
            String shortenedName = fullName
                .substring(Constants.R_HEADS.length());
            // remove upstream configuration if any
            final StoredConfig cfg = repo.getConfig();
            cfg.unsetSection(
                ConfigConstants.CONFIG_BRANCH_SECTION,
                shortenedName);
            cfg.save();
          }
        } else
View Full Code Here

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

  private void removeRemotesConfig(File file) throws Exception {
    Repository repo = lookupRepository(file);
    StoredConfig config = repo.getConfig();
    for (String remote : config.getSubsections("remote"))
      config.unsetSection("remote", remote);
    config.save();
    waitInUI();
  }
}
View Full Code Here

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

        UIText.RepositoriesView_ConfirmDeleteRemoteHeader, NLS.bind(
            UIText.RepositoriesView_ConfirmDeleteRemoteMessage,
            configName));
    if (ok) {
      StoredConfig config = node.getRepository().getConfig();
      config.unsetSection(RepositoriesView.REMOTE, configName);
      try {
        config.save();
      } catch (IOException e1) {
        Activator.handleError(UIText.RepositoriesView_ErrorHeader, e1,
            true);
View Full Code Here

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

  private void removeExistingRemotes() throws IOException {
    StoredConfig config = repository.getConfig();
    Set<String> remotes = config
        .getSubsections(ConfigConstants.CONFIG_REMOTE_SECTION);
    for (String remoteName : remotes)
      config.unsetSection(ConfigConstants.CONFIG_REMOTE_SECTION,
          remoteName);
    config.save();
  }

  private void checkoutNewLocalBranch(String branchName)
View Full Code Here

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

    }
   
    public void clearOrigin(Git git) throws IOException
    {
        StoredConfig config = git.getRepository().getConfig();
        config.unsetSection("remote","origin");
        config.save();
    }

    public class Gits
    {
View Full Code Here

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

        set(cfg, S_CQ, id, K_COMMENTS, cq.getComments());
      }

      for (CQ cq : cqs) {
        if (!current.contains(cq))
          cfg.unsetSection(S_CQ, Long.toString(cq.getID()));
      }

      lf.write(Constants.encode(cfg.toText()));
      if (!lf.commit())
        throw new IOException(MessageFormat.format(IpLogText.get().cannotWrite, file));
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.