List of usage examples for org.eclipse.jgit.errors NotSupportedException NotSupportedException
public NotSupportedException(String s)
From source file:it.com.atlassian.labs.speakeasy.util.jgit.FixedTransportHttp.java
License:Eclipse Distribution License
@Override public PushConnection openPush() throws NotSupportedException, TransportException { final String service = SVC_RECEIVE_PACK; try {/* ww w.ja va 2 s .co m*/ final HttpURLConnection c = connect(service); final InputStream in = openInputStream(c); try { if (isSmartHttp(c, service)) { readSmartHeaders(in, service); return new SmartHttpPushConnection(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); } } finally { in.close(); } } catch (NotSupportedException err) { throw err; } catch (TransportException err) { throw err; } catch (IOException err) { throw new TransportException(uri, JGitText.get().errorReadingInfoRefs, err); } }
From source file:jetbrains.buildServer.buildTriggers.vcs.git.GitServerUtil.java
License:Apache License
@NotNull public static NotSupportedException friendlyNotSupportedException(@NotNull GitVcsRoot root, @NotNull NotSupportedException nse) { URIish fetchURI = root.getRepositoryFetchURL(); if (isRedundantColon(fetchURI)) { //url with username looks like ssh://username/hostname:/path/to/repo - it will //confuse user even further, so show url without user name return new NotSupportedException( MessageFormat.format(JGitText.get().URINotSupported, root.getProperty(Constants.FETCH_URL)) + ". Make sure you don't have a colon after the host name."); } else {/*w w w . j a v a 2 s .c om*/ return nse; } }