comparison src/org/tmatesoft/hg/repo/HgLookup.java @ 456:909306e412e2

Refactor LogFacility and SessionContext, better API for both
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Mon, 18 Jun 2012 16:54:00 +0200
parents 12f668401613
children e31e85cf4d4c
comparison
equal deleted inserted replaced
454:36fd1fd06492 456:909306e412e2
1 /* 1 /*
2 * Copyright (c) 2010-2011 TMate Software Ltd 2 * Copyright (c) 2010-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 *
13 * For information on how to redistribute this software under 13 * For information on how to redistribute this software under
14 * the terms of a license other than GNU General Public License 14 * the terms of a license other than GNU General Public License
15 * contact TMate Software at support@hg4j.com 15 * contact TMate Software at support@hg4j.com
16 */ 16 */
17 package org.tmatesoft.hg.repo; 17 package org.tmatesoft.hg.repo;
18
19 import static org.tmatesoft.hg.util.LogFacility.Severity.Warn;
18 20
19 import java.io.File; 21 import java.io.File;
20 import java.io.IOException; 22 import java.io.IOException;
21 import java.net.MalformedURLException; 23 import java.net.MalformedURLException;
22 import java.net.URL; 24 import java.net.URL;
133 globalCfg = new ConfigFile(); 135 globalCfg = new ConfigFile();
134 try { 136 try {
135 globalCfg.addLocation(new File(System.getProperty("user.home"), ".hgrc")); 137 globalCfg.addLocation(new File(System.getProperty("user.home"), ".hgrc"));
136 } catch (IOException ex) { 138 } catch (IOException ex) {
137 // XXX perhaps, makes sense to let caller/client know that we've failed to read global config? 139 // XXX perhaps, makes sense to let caller/client know that we've failed to read global config?
138 getContext().getLog().warn(getClass(), ex, null); 140 getContext().getLog().dump(getClass(), Warn, ex, null);
139 } 141 }
140 } 142 }
141 return globalCfg; 143 return globalCfg;
142 } 144 }
143 145