comparison src/org/tmatesoft/hg/repo/HgInternals.java @ 148:1a7a9a20e1f9

Exceptions, javadoc. Initial cancel and progress support
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 23 Feb 2011 22:36:28 +0100
parents 37a34044e6bd
children 1ec6b327a6ac
comparison
equal deleted inserted replaced
147:a05145db4d0c 148:1a7a9a20e1f9
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.repo.HgRepository.*;
18 20
19 import java.io.File; 21 import java.io.File;
20 import java.net.InetAddress; 22 import java.net.InetAddress;
21 import java.net.UnknownHostException; 23 import java.net.UnknownHostException;
22 24
82 return username + '@' + hostname; 84 return username + '@' + hostname;
83 } catch (UnknownHostException ex) { 85 } catch (UnknownHostException ex) {
84 return username; 86 return username;
85 } 87 }
86 } 88 }
89
90 // Convenient check of local revision number for validity (not all negative values are wrong as long as we use negative constants)
91 public static boolean wrongLocalRevision(int rev) {
92 return rev < 0 && rev != TIP && rev != WORKING_COPY && rev != BAD_REVISION;
93 }
87 } 94 }