comparison cmdline/org/tmatesoft/hg/console/Remote.java @ 483:e31e85cf4d4c

Handle include and unset directives in config files
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 07 Aug 2012 19:14:53 +0200
parents 981f9f50bb6c
children
comparison
equal deleted inserted replaced
482:6c67debed07e 483:e31e85cf4d4c
1 /* 1 /*
2 * Copyright (c) 2011 TMate Software Ltd 2 * Copyright (c) 2011-2012 TMate Software Ltd
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License. 6 * the Free Software Foundation; version 2 of the License.
7 * 7 *
33 import javax.net.ssl.HttpsURLConnection; 33 import javax.net.ssl.HttpsURLConnection;
34 import javax.net.ssl.SSLContext; 34 import javax.net.ssl.SSLContext;
35 import javax.net.ssl.TrustManager; 35 import javax.net.ssl.TrustManager;
36 import javax.net.ssl.X509TrustManager; 36 import javax.net.ssl.X509TrustManager;
37 37
38 import org.tmatesoft.hg.internal.BasicSessionContext;
38 import org.tmatesoft.hg.internal.ConfigFile; 39 import org.tmatesoft.hg.internal.ConfigFile;
39 40
40 /** 41 /**
41 * WORK IN PROGRESS, DO NOT USE 42 * WORK IN PROGRESS, DO NOT USE
42 * 43 *
88 Between two subsequent revisions (i.e. direct child in remote of a local root) 89 Between two subsequent revisions (i.e. direct child in remote of a local root)
89 cmd=between&pairs=71ddbf8603e8e09d54ac9c5fe4bb5ae824589f1d-8c8e3f372fa1fbfcf92b004b6f2ada2dbaf60028 90 cmd=between&pairs=71ddbf8603e8e09d54ac9c5fe4bb5ae824589f1d-8c8e3f372fa1fbfcf92b004b6f2ada2dbaf60028
90 empty result 91 empty result
91 */ 92 */
92 public static void main(String[] args) throws Exception { 93 public static void main(String[] args) throws Exception {
93 ConfigFile cfg = new ConfigFile(); 94 ConfigFile cfg = new ConfigFile(new BasicSessionContext(null));
94 cfg.addLocation(new File(System.getProperty("user.home"), ".hgrc")); 95 cfg.addLocation(new File(System.getProperty("user.home"), ".hgrc"));
95 String svnkitServer = cfg.getSection("paths").get("svnkit"); 96 String svnkitServer = cfg.getSection("paths").get("svnkit");
96 // URL url = new URL(svnkitServer + "?cmd=branches&nodes=30bd389788464287cee22ccff54c330a4b715de5"); 97 // URL url = new URL(svnkitServer + "?cmd=branches&nodes=30bd389788464287cee22ccff54c330a4b715de5");
97 // URL url = new URL(svnkitServer + "?cmd=between"); 98 // URL url = new URL(svnkitServer + "?cmd=between");
98 URL url = new URL(svnkitServer + "?cmd=changegroup&roots=71ddbf8603e8e09d54ac9c5fe4bb5ae824589f1d"); 99 URL url = new URL(svnkitServer + "?cmd=changegroup&roots=71ddbf8603e8e09d54ac9c5fe4bb5ae824589f1d");