Package org.eclipse.jgit.storage.file

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


            FileBasedConfig config = new FileBasedConfig(new File(dotGit, "config"), FS.DETECTED);
            config.load();
            if (gitPushUrl != null) {
                config.setString(ConfigConstants.CONFIG_REMOTE_SECTION, "origin", "pushurl", gitPushUrl);
            }
            config.save();
        }

        FileRepositoryBuilder builder = new FileRepositoryBuilder();
        repository = builder.setGitDir(dotGit).readEnvironment().findGitDir().build();
        localRepos.put(dotGit, repository);
View Full Code Here


    modulesConfig.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path,
        ConfigConstants.CONFIG_KEY_PATH, path);
    modulesConfig.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path,
        ConfigConstants.CONFIG_KEY_URL, uri);
    try {
      modulesConfig.save();
    } catch (IOException e) {
      throw new JGitInternalException(e.getMessage(), e);
    }

    AddCommand add = new AddCommand(repo);
View Full Code Here

         File gitdir = new File(projectDir, Constants.DOT_GIT);
         db = new FileRepository(gitdir);
         db.create();
         final FileBasedConfig dstcfg = db.getConfig();
         dstcfg.setBoolean("core", null, "bare", false);
         dstcfg.save();

         saveRemote(uri);
         final FetchResult r = runFetch();
         final Ref branch = guessHEAD(r);
         doCheckout(branch);
View Full Code Here

      rc.addURI(uri);
      rc.addFetchRefSpec(new RefSpec().setForceUpdate(true)
               .setSourceDestination(Constants.R_HEADS + "*",
                        Constants.R_REMOTES + remoteName + "/*"));
      rc.update(dstcfg);
      dstcfg.save();
   }

   private FetchResult runFetch() throws NotSupportedException,
            URISyntaxException, TransportException
   {
View Full Code Here

      throw new OrmException("Cannot update " + allProjects, err);
    }

    if (cfgDirty) {
      try {
        cfg.save();
      } catch (IOException err) {
        throw new OrmException("Cannot update " + site.gerrit_config, err);
      }
    }
View Full Code Here

      if (!ArrayUtils.isEmpty(model.postReceiveScripts)) {
        config.setStringList(TEAM, model.name, POSTRECEIVE, model.postReceiveScripts);
      }
    }

    config.save();
    // manually set the forceReload flag because not all JVMs support real
    // millisecond resolution of lastModified. (issue-55)
    forceReload = true;

    // If the write is successful, delete the current file and rename
View Full Code Here

          }
          // add serial to revoked list
          ucm.revoke(cert.getSerialNumber(), reason);
          ucm.update(config);
          try {
            config.save();
          } catch (Exception e) {
            Utils.showException(GitblitAuthority.this, e);
          }

          // refresh user
View Full Code Here

        if (result == JOptionPane.OK_OPTION) {
          try {
            oids.update(metadata);
            certificateConfig.duration = Integer.parseInt(validityTF.getText());
            certificateConfig.store(config, metadata);
            config.save();

            Map<String, String> updates = new HashMap<String, String>();
            updates.put(Keys.web.siteName, siteNameTF.getText());
            gitblitSettings.saveSettings(updates);
          } catch (Exception e1) {
View Full Code Here

        Utils.showException(GitblitAuthority.this, e);
      }
    }
    ucm.update(config);
    try {
      config.save();
    } catch (Exception e) {
      Utils.showException(GitblitAuthority.this, e);
    }
  }
}
View Full Code Here

      if (!ArrayUtils.isEmpty(model.postReceiveScripts)) {
        config.setStringList(TEAM, model.name, POSTRECEIVE, model.postReceiveScripts);
      }
    }

    config.save();
    // manually set the forceReload flag because not all JVMs support real
    // millisecond resolution of lastModified. (issue-55)
    forceReload = true;

    // If the write is successful, delete the current file and rename
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.