Package org.eclipse.jgit.lib

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


          config.setString(ConfigConstants.CONFIG_BRANCH_SECTION,
              name, ConfigConstants.CONFIG_KEY_REMOTE, ".");
          config.setString(ConfigConstants.CONFIG_BRANCH_SECTION,
              name, ConfigConstants.CONFIG_KEY_MERGE, baseBranch);
        }
        config.save();
      }
      return result;
    } catch (IOException ioe) {
      throw new JGitInternalException(ioe.getMessage(), ioe);
    } finally {
View Full Code Here


          }
          repoConfig
              .unsetSection(
                  ConfigConstants.CONFIG_BRANCH_SECTION,
                  shortOldName);
          repoConfig.save();
        }

      } else
        throw new JGitInternalException(MessageFormat.format(JGitText
            .get().renameBranchUnexpectedResult, renameResult
View Full Code Here

    // Save submodule URL to parent repository's config
    StoredConfig config = repo.getConfig();
    config.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path,
        ConfigConstants.CONFIG_KEY_URL, resolvedUri);
    try {
      config.save();
    } catch (IOException e) {
      throw new JGitInternalException(e.getMessage(), e);
    }

    // Save path and URL to parent repository's .gitmodules file
View Full Code Here

        if (url != null || update != null)
          initialized.add(path);
      }
      // Save repository config if any values were updated
      if (!initialized.isEmpty())
        config.save();
      return initialized;
    } catch (IOException e) {
      throw new JGitInternalException(e.getMessage(), e);
    } catch (ConfigInvalidException e) {
      throw new JGitInternalException(e.getMessage(), e);
View Full Code Here

        if (remote == null)
          remote = Constants.DEFAULT_REMOTE_NAME;

        subConfig.setString(ConfigConstants.CONFIG_REMOTE_SECTION,
            remote, ConfigConstants.CONFIG_KEY_URL, remoteUrl);
        subConfig.save();
      }
      if (!synced.isEmpty())
        config.save();
      return synced;
    } catch (IOException e) {
View Full Code Here

    private void updateWithBundleTimestamp(Repository repo, Bundle bundle) throws IOException
    {
        StoredConfig config = repo.getConfig();
        config.setLong("speakeasy", null, BUNDLELASTMODIFIED, bundle.getLastModified());
        config.save();
    }

    private Set<File> findFiles(File workTree)
    {
        Set<File> paths = newHashSet();
View Full Code Here

                //setup tracking
                StoredConfig config = git.getRepository().getConfig();
                config.setString(ConfigConstants.CONFIG_BRANCH_SECTION, prefixedReleaseName, ConfigConstants.CONFIG_KEY_REMOTE, "origin");
                config.setString(ConfigConstants.CONFIG_BRANCH_SECTION, prefixedReleaseName, ConfigConstants.CONFIG_KEY_MERGE, Constants.R_HEADS + prefixedReleaseName);
                config.save();
            }
           
            return newBranch;

        }
View Full Code Here

    public void setMaster(String branchName) throws IOException
    {
        StoredConfig config = git.getRepository().getConfig();
        config.setString(JGitFlowConstants.SECTION, ConfigConstants.CONFIG_BRANCH_SECTION, Constants.MASTER, branchName);
        config.save();
    }

    public void setDevelop(String branchName) throws IOException
    {
        StoredConfig config = git.getRepository().getConfig();
View Full Code Here

    public void setDevelop(String branchName) throws IOException
    {
        StoredConfig config = git.getRepository().getConfig();
        config.setString(JGitFlowConstants.SECTION, ConfigConstants.CONFIG_BRANCH_SECTION, JGitFlowConstants.DEVELOP_KEY, branchName);
        config.save();
    }

    public boolean gitFlowIsInitialized() throws GitAPIException
    {
        return (hasMasterConfigured() && hasDevelopConfigured() && !getMaster().equals(getDevelop()) && hasPrefixesConfigured());
View Full Code Here

    {
        StoredConfig config = git.getRepository().getConfig();
        if(getPrefixNames().contains(prefixName))
        {
            config.setString(JGitFlowConstants.SECTION, JGitFlowConstants.PREFIX_SUB, prefixName, prefixValue);
            config.save();
        }
       
    }
}
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.