/** {@inheritDoc} */ @Override public PushConnection openPush() throws NotSupportedException { throw new NotSupportedException( JGitText.get().pushIsNotSupportedForBundleTransport); }
/** * Construct a NotSupportedException for some issue JGit cannot yet handle. * * @param s * message describing the issue * @param why * a lower level implementation specific issue. */ public NotSupportedException(String s, Throwable why) { super(s); initCause(why); } }
} catch (NotSupportedException e) { throw new CoreException(Activator.createErrorStatus( e.getMessage(), e)); } catch (IOException e) { throw new CoreException(Activator.createErrorStatus(
/** {@inheritDoc} */ @Override public PushConnection openPush() throws NotSupportedException { throw new NotSupportedException( JGitText.get().pushIsNotSupportedForBundleTransport); }
/** * Construct a NotSupportedException for some issue JGit cannot yet handle. * * @param s * message describing the issue * @param why * a lower level implementation specific issue. */ public NotSupportedException(final String s, final Throwable why) { super(s); initCause(why); } }
/** * Open a new transport instance to the remote repository. Use default * configuration instead of reading from configuration files. * * @param uri * a {@link org.eclipse.jgit.transport.URIish} object. * @return new Transport * @throws org.eclipse.jgit.errors.NotSupportedException * @throws org.eclipse.jgit.errors.TransportException */ public Transport open(URIish uri) throws NotSupportedException, TransportException { throw new NotSupportedException(JGitText .get().transportNeedsRepository); } }
/** * Construct a NotSupportedException for some issue JGit cannot yet handle. * * @param s * message describing the issue * @param why * a lower level implementation specific issue. */ public NotSupportedException(String s, Throwable why) { super(s); initCause(why); } }
/** {@inheritDoc} */ @Override public Transport open(URIish uri, Repository local, String remoteName) throws NotSupportedException, TransportException { Handle h = handles.get(uri); if (h == null) { throw new NotSupportedException(MessageFormat.format( JGitText.get().URINotSupported, uri)); } return new TransportInternal(local, uri, h); }
private URL getServiceURL(String service) throws NotSupportedException { try { final StringBuilder b = new StringBuilder(); b.append(baseUrl); if (b.charAt(b.length() - 1) != '/') { b.append('/'); } b.append(Constants.INFO_REFS); if (useSmartHttp) { b.append(b.indexOf("?") < 0 ? '?' : '&'); //$NON-NLS-1$ b.append("service="); //$NON-NLS-1$ b.append(service); } return new URL(b.toString()); } catch (MalformedURLException e) { throw new NotSupportedException(MessageFormat.format(JGitText.get().invalidURL, uri), e); } }
private static Properties loadPropertiesFile(File propsFile) throws NotSupportedException { try { return AmazonS3.properties(propsFile); } catch (IOException e) { throw new NotSupportedException(MessageFormat.format( JGitText.get().cannotReadFile, propsFile), e); } }
/** * Set uri a {@link org.eclipse.jgit.transport.URIish} object. * * @param uri * a {@link org.eclipse.jgit.transport.URIish} object. * @throws org.eclipse.jgit.errors.NotSupportedException * @since 4.9 */ protected void setURI(URIish uri) throws NotSupportedException { try { currentUri = uri; baseUrl = toURL(uri); objectsUrl = new URL(baseUrl, "objects/"); //$NON-NLS-1$ } catch (MalformedURLException e) { throw new NotSupportedException(MessageFormat.format(JGitText.get().invalidURL, uri), e); } }
/** * Open a new transport with no local repository. * <p> * Note that the resulting transport instance can not be used for fetching * or pushing, but only for reading remote refs. * * @param uri a {@link org.eclipse.jgit.transport.URIish} object. * @return new Transport instance * @throws org.eclipse.jgit.errors.NotSupportedException * @throws org.eclipse.jgit.errors.TransportException */ public static Transport open(URIish uri) throws NotSupportedException, TransportException { for (WeakReference<TransportProtocol> ref : protocols) { TransportProtocol proto = ref.get(); if (proto == null) { protocols.remove(ref); continue; } if (proto.canHandle(uri, null, null)) return proto.open(uri); } throw new NotSupportedException(MessageFormat.format(JGitText.get().URINotSupported, uri)); }
private Properties loadProperties() throws NotSupportedException { if (local.getDirectory() != null) { File propsFile = new File(local.getDirectory(), uri.getUser()); if (propsFile.isFile()) return loadPropertiesFile(propsFile); } File propsFile = new File(local.getFS().userHome(), uri.getUser()); if (propsFile.isFile()) return loadPropertiesFile(propsFile); Properties props = new Properties(); String user = uri.getUser(); String pass = uri.getPass(); if (user != null && pass != null) { props.setProperty("accesskey", user); //$NON-NLS-1$ props.setProperty("secretkey", pass); //$NON-NLS-1$ } else throw new NotSupportedException(MessageFormat.format( JGitText.get().cannotReadFile, propsFile)); return props; }
/** {@inheritDoc} */ @Override public PushConnection openPush() throws NotSupportedException, TransportException { final String service = SVC_RECEIVE_PACK; try { final HttpConnection c = connect(service); try (InputStream in = openInputStream(c)) { if (isSmartHttp(c, service)) { return smartPush(service, c, in); } else if (!useSmartHttp) { final String msg = JGitText.get().smartHTTPPushDisabled; throw new NotSupportedException(msg); } else { final String msg = JGitText.get().remoteDoesNotSupportSmartHTTPPush; throw new NotSupportedException(msg); } } } catch (NotSupportedException err) { throw err; } catch (TransportException err) { throw err; } catch (IOException err) { throw new TransportException(uri, JGitText.get().errorReadingInfoRefs, err); } }
throw new NotSupportedException(MessageFormat.format(JGitText.get().URINotSupported, uri));
/** {@inheritDoc} */ @Override public PushConnection openPush() throws NotSupportedException { throw new NotSupportedException( JGitText.get().pushIsNotSupportedForBundleTransport); }
/** {@inheritDoc} */ @Override public PushConnection openPush() throws NotSupportedException { throw new NotSupportedException( JGitText.get().pushIsNotSupportedForBundleTransport); }
@Override public PushConnection openPush() throws NotSupportedException { throw new NotSupportedException( JGitText.get().pushIsNotSupportedForBundleTransport); }
@Override public PushConnection openPush() throws NotSupportedException { throw new NotSupportedException( JGitText.get().pushIsNotSupportedForBundleTransport); }
@Override protected void run() throws Exception { if (list) list(); else throw new NotSupportedException( "only --list option is currently supported"); }