/** {@inheritDoc} */ @Override public Map<String, SubmoduleStatus> call() throws GitAPIException { checkCallable(); try (SubmoduleWalk generator = SubmoduleWalk.forIndex(repo)) { if (!paths.isEmpty()) generator.setFilter(PathFilterGroup.createFromStrings(paths)); Map<String, SubmoduleStatus> statuses = new HashMap<>(); while (generator.next()) { SubmoduleStatus status = getStatus(generator); statuses.put(status.getPath(), status); } return statuses; } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); } catch (ConfigInvalidException e) { throw new JGitInternalException(e.getMessage(), e); } }
/** * Parse and load the repository specific configuration. * <p> * The default implementation reads {@code gitDir/config}, or returns an * empty configuration if gitDir was not set. * * @return the repository's configuration. * @throws java.io.IOException * the configuration is not available. */ protected Config loadConfig() throws IOException { if (getGitDir() != null) { // We only want the repository's configuration file, and not // the user file, as these parameters must be unique to this // repository and not inherited from other files. // File path = safeFS().resolve(getGitDir(), Constants.CONFIG); FileBasedConfig cfg = new FileBasedConfig(path, safeFS()); try { cfg.load(); } catch (ConfigInvalidException err) { throw new IllegalArgumentException(MessageFormat.format( JGitText.get().repositoryConfigFileInvalid, path .getAbsolutePath(), err.getMessage())); } return cfg; } else { return new Config(); } }
throw new JGitInternalException(e.getMessage(), e); } catch (ConfigInvalidException e) { throw new JGitInternalException(e.getMessage(), e);
throw new JGitInternalException(e.getMessage(), e); } catch (ConfigInvalidException e) { throw new JGitInternalException(e.getMessage(), e);
throw new JGitInternalException(e.getMessage(), e); } catch (ConfigInvalidException e) { throw new JGitInternalException(e.getMessage(), e);
throw new JGitInternalException(e.getMessage(), e); } catch (ConfigInvalidException e) { throw new InvalidConfigurationException(e.getMessage(), e);
void setConfig(FileBasedConfig config) throws IOException { editableConfig = config; try { editableConfig.clear(); editableConfig.load(); } catch (ConfigInvalidException e) { throw new IOException(e.getMessage()); } initControlsFromConfig(); }
throw new JGitInternalException(e.getMessage(), e); } catch (ConfigInvalidException e) { throw new InvalidConfigurationException(e.getMessage(), e);
private static StoredConfig loadRepoScopedConfig(Repository repo) { StoredConfig c = repo.getConfig(); try { c.load(); } catch (IOException e) { Activator.handleError(e.getMessage(), e, true); } catch (ConfigInvalidException e) { Activator.handleError(e.getMessage(), e, true); } return c; }
private static StoredConfig loadUserScopedConfig() { StoredConfig c = SystemReader.getInstance().openUserConfig(null, FS.DETECTED); try { c.load(); } catch (IOException e) { Activator.handleError(e.getMessage(), e, true); } catch (ConfigInvalidException e) { Activator.handleError(e.getMessage(), e, true); } return c; }
throw new ProvisionException(e.getMessage(), e); } catch (ConfigInvalidException e) { throw new ProvisionException(e.getMessage(), e); throw new ProvisionException(e.getMessage(), e); } catch (ConfigInvalidException e) { throw new ProvisionException(e.getMessage(), e);
throw new ProvisionException(e.getMessage(), e); } catch (ConfigInvalidException e) { throw new ProvisionException(e.getMessage(), e); throw new ProvisionException(e.getMessage(), e); } catch (ConfigInvalidException e) { throw new ProvisionException(e.getMessage(), e);
private void initControlsFromConfig() { try { editableConfig.load(); tv.setInput(new GitConfig(editableConfig)); editable = true; if (editableConfig instanceof FileBasedConfig) { FileBasedConfig fileConfig = (FileBasedConfig) editableConfig; File configFile = fileConfig.getFile(); if (configFile != null) if (isWriteable(configFile)) location.setText(configFile.getPath()); else { location.setText(NLS .bind(UIText.ConfigurationEditorComponent_ReadOnlyLocationFormat, configFile.getPath())); editable = false; } else { location.setText(UIText.ConfigurationEditorComponent_NoConfigLocationKnown); editable = false; } } } catch (IOException e) { Activator.handleError(e.getMessage(), e, true); } catch (ConfigInvalidException e) { Activator.handleError(e.getMessage(), e, true); } tv.expandAll(); updateEnablement(); }
public Map<String, SubmoduleStatus> call() throws GitAPIException { checkCallable(); try { SubmoduleWalk generator = SubmoduleWalk.forIndex(repo); if (!paths.isEmpty()) generator.setFilter(PathFilterGroup.createFromStrings(paths)); Map<String, SubmoduleStatus> statuses = new HashMap<String, SubmoduleStatus>(); while (generator.next()) { SubmoduleStatus status = getStatus(generator); statuses.put(status.getPath(), status); } return statuses; } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); } catch (ConfigInvalidException e) { throw new JGitInternalException(e.getMessage(), e); } }
/** {@inheritDoc} */ @Override public Map<String, SubmoduleStatus> call() throws GitAPIException { checkCallable(); try (SubmoduleWalk generator = SubmoduleWalk.forIndex(repo)) { if (!paths.isEmpty()) generator.setFilter(PathFilterGroup.createFromStrings(paths)); Map<String, SubmoduleStatus> statuses = new HashMap<>(); while (generator.next()) { SubmoduleStatus status = getStatus(generator); statuses.put(status.getPath(), status); } return statuses; } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); } catch (ConfigInvalidException e) { throw new JGitInternalException(e.getMessage(), e); } }
/** * Parse and load the repository specific configuration. * <p> * The default implementation reads {@code gitDir/config}, or returns an * empty configuration if gitDir was not set. * * @return the repository's configuration. * @throws IOException * the configuration is not available. */ protected Config loadConfig() throws IOException { if (getGitDir() != null) { // We only want the repository's configuration file, and not // the user file, as these parameters must be unique to this // repository and not inherited from other files. // File path = safeFS().resolve(getGitDir(), Constants.CONFIG); FileBasedConfig cfg = new FileBasedConfig(path, safeFS()); try { cfg.load(); } catch (ConfigInvalidException err) { throw new IllegalArgumentException(MessageFormat.format( JGitText.get().repositoryConfigFileInvalid, path .getAbsolutePath(), err.getMessage())); } return cfg; } else { return new Config(); } }
/** * Parse and load the repository specific configuration. * <p> * The default implementation reads {@code gitDir/config}, or returns an * empty configuration if gitDir was not set. * * @return the repository's configuration. * @throws java.io.IOException * the configuration is not available. */ protected Config loadConfig() throws IOException { if (getGitDir() != null) { // We only want the repository's configuration file, and not // the user file, as these parameters must be unique to this // repository and not inherited from other files. // File path = safeFS().resolve(getGitDir(), Constants.CONFIG); FileBasedConfig cfg = new FileBasedConfig(path, safeFS()); try { cfg.load(); } catch (ConfigInvalidException err) { throw new IllegalArgumentException(MessageFormat.format( JGitText.get().repositoryConfigFileInvalid, path .getAbsolutePath(), err.getMessage())); } return cfg; } else { return new Config(); } }
throw new JGitInternalException(e.getMessage(), e); } catch (ConfigInvalidException e) { throw new JGitInternalException(e.getMessage(), e);
throw new JGitInternalException(e.getMessage(), e); } catch (ConfigInvalidException e) { throw new JGitInternalException(e.getMessage(), e);
editableConfig.load(); } catch (ConfigInvalidException e) { throw new IOException(e.getMessage());