return new SequenceInputStream(prefix, cg);
} catch (MalformedURLException ex) {
// although there's little user can do about this issue (URLs are constructed by our code)
// it's still better to throw it as checked exception than RT because url is likely malformed due to parameters
// and this may help user to understand the cause (and e.g. change them)
throw new HgRemoteConnectionException("Bad URL", ex).setRemoteCommand("changegroup").setServerInfo(getServerLocation());
} catch (IOException ex) {
throw new HgRemoteConnectionException("Communication failure", ex).setRemoteCommand("changegroup").setServerInfo(getServerLocation());
}
}