Mercurial > hg4j
comparison src/org/tmatesoft/hg/repo/HgRemoteRepository.java @ 490:b3c16d1aede0
Refactoring: move HgRepository's implementation aspects to Internals (which is now its imlementation counterpart and primary repository class to be used by other parts of the library)
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Thu, 16 Aug 2012 17:08:34 +0200 |
| parents | 909306e412e2 |
| children | 14dac192aa26 |
comparison
equal
deleted
inserted
replaced
| 489:9c0138cda59a | 490:b3c16d1aede0 |
|---|---|
| 65 * @see http://mercurial.selenic.com/wiki/WireProtocol | 65 * @see http://mercurial.selenic.com/wiki/WireProtocol |
| 66 * | 66 * |
| 67 * @author Artem Tikhomirov | 67 * @author Artem Tikhomirov |
| 68 * @author TMate Software Ltd. | 68 * @author TMate Software Ltd. |
| 69 */ | 69 */ |
| 70 public class HgRemoteRepository { | 70 public class HgRemoteRepository implements SessionContext.Source { |
| 71 | 71 |
| 72 private final URL url; | 72 private final URL url; |
| 73 private final SSLContext sslContext; | 73 private final SSLContext sslContext; |
| 74 private final String authInfo; | 74 private final String authInfo; |
| 75 private final boolean debug; | 75 private final boolean debug; |
| 183 if (url.getPort() != -1) { | 183 if (url.getPort() != -1) { |
| 184 return String.format("%s://%s:%d%s", url.getProtocol(), url.getHost(), url.getPort(), url.getPath()); | 184 return String.format("%s://%s:%d%s", url.getProtocol(), url.getHost(), url.getPort(), url.getPath()); |
| 185 } else { | 185 } else { |
| 186 return String.format("%s://%s%s", url.getProtocol(), url.getHost(), url.getPath()); | 186 return String.format("%s://%s%s", url.getProtocol(), url.getHost(), url.getPath()); |
| 187 } | 187 } |
| 188 } | |
| 189 | |
| 190 public SessionContext getSessionContext() { | |
| 191 return sessionContext; | |
| 188 } | 192 } |
| 189 | 193 |
| 190 public List<Nodeid> heads() throws HgRemoteConnectionException { | 194 public List<Nodeid> heads() throws HgRemoteConnectionException { |
| 191 try { | 195 try { |
| 192 URL u = new URL(url, url.getPath() + "?cmd=heads"); | 196 URL u = new URL(url, url.getPath() + "?cmd=heads"); |
