diff src/org/tmatesoft/hg/core/HgException.java @ 396:0ae53c32ecef

Straighten out exceptions thrown when file access failed - three is too much
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 23 Feb 2012 01:06:24 +0100
parents f52ca9530774
children 2747b0723867
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgException.java	Wed Feb 22 16:54:34 2012 +0100
+++ b/src/org/tmatesoft/hg/core/HgException.java	Thu Feb 23 01:06:24 2012 +0100
@@ -61,12 +61,15 @@
 		return getRevisionIndex();
 	}
 	
-
 	public HgException setRevisionIndex(int rev) {
 		revNumber = rev;
 		return this;
 	}
 	
+	public boolean isRevisionIndexSet() {
+		return revNumber != BAD_REVISION;
+	}
+
 	/**
 	 * @deprecated use {@link #setRevisionIndex(int)}
 	 */
@@ -86,6 +89,10 @@
 		revision = r;
 		return this;
 	}
+	
+	public boolean isRevisionSet() {
+		return revision != null;
+	}
 
 	/**
 	 * @return non-null only if file name was set at construction time