diff src/org/tmatesoft/hg/core/HgChangesetTreeHandler.java @ 366:189dc6dc1c3e

Use exceptions to expose errors reading mercurial data
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 16 Dec 2011 04:43:18 +0100
parents a674b8590362
children a2341e761609
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgChangesetTreeHandler.java	Sun Dec 11 00:39:07 2011 +0100
+++ b/src/org/tmatesoft/hg/core/HgChangesetTreeHandler.java	Fri Dec 16 04:43:18 2011 +0100
@@ -40,10 +40,12 @@
 		 * @return revision of the revlog being iterated.
 		 */
 		public Nodeid fileRevision();
+
 		/**
 		 * @return changeset associated with the current revision
+		 * @throws HgException indicates failure dealing with Mercurial data
 		 */
-		public HgChangeset changeset();
+		public HgChangeset changeset() throws HgException;
 
 		/**
 		 * Lightweight alternative to {@link #changeset()}, identifies changeset in which current file node has been modified 
@@ -54,8 +56,9 @@
 		/**
 		 * Node, these are not necessarily in direct relation to parents of changeset from {@link #changeset()} 
 		 * @return changesets that correspond to parents of the current file node, either pair element may be <code>null</code>.
+		 * @throws HgException indicates failure dealing with Mercurial data
 		 */
-		public Pair<HgChangeset, HgChangeset> parents();
+		public Pair<HgChangeset, HgChangeset> parents() throws HgException;
 		
 		/**
 		 * Lightweight alternative to {@link #parents()}, give {@link Nodeid nodeids} only
@@ -63,7 +66,12 @@
 		 */
 		public Pair<Nodeid, Nodeid> parentRevisions();
 
-		public Collection<HgChangeset> children();
+		/**
+		 * Changes that originate from the given change and bear it as their parent. 
+		 * @return collection (possibly empty) of immediate children of the change
+		 * @throws HgException indicates failure dealing with Mercurial data
+		 */
+		public Collection<HgChangeset> children() throws HgException;
 
 		/**
 		 * Lightweight alternative to {@link #children()}.