Mercurial > jhg
diff src/org/tmatesoft/hg/core/HgChangesetTreeHandler.java @ 403:2747b0723867
FIXMEs: work on exceptions and javadoc
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Mon, 05 Mar 2012 14:50:51 +0100 |
parents | 994b5813a925 |
children | 9c9c442b5f2e |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgChangesetTreeHandler.java Mon Feb 27 19:38:44 2012 +0100 +++ b/src/org/tmatesoft/hg/core/HgChangesetTreeHandler.java Mon Mar 05 14:50:51 2012 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 TMate Software Ltd + * Copyright (c) 2011-2012 TMate Software Ltd * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,7 +22,10 @@ import org.tmatesoft.hg.util.Pair; /** - * + * Handler to iterate file history (generally, any revlog) with access to parent-child relations between changesets. + * + * @see HgLogCommand#execute(HgChangesetTreeHandler) + * * @author Artem Tikhomirov * @author TMate Software Ltd. */ @@ -30,55 +33,60 @@ /** * @param entry access to various pieces of information about current tree node. Instances might be * reused across calls and shall not be kept by client's code + * @throws HgException allows implementers propagate errors from {@link TreeElement} or other parts of the library. * @throws HgCallbackTargetException.Wrap wrapper object for any exception user code may produce. Wrapped exception would get re-thrown with {@link HgCallbackTargetException} * @throws CancelledException if execution of the operation was cancelled */ - public void next(HgChangesetTreeHandler.TreeElement entry) throws HgCallbackTargetException.Wrap, CancelledException; + public void next(HgChangesetTreeHandler.TreeElement entry) throws HgException, HgCallbackTargetException.Wrap, CancelledException; interface TreeElement { /** * Revision of the revlog being iterated. For example, when walking file history, return value represents file revisions. * * @return revision of the revlog being iterated. + * @throws HgException to indicate failure dealing with Mercurial data */ - public Nodeid fileRevision(); + public Nodeid fileRevision() throws HgException; /** * @return changeset associated with the current revision - * @throws HgException indicates failure dealing with Mercurial data + * @throws HgException to indicate failure dealing with Mercurial data */ public HgChangeset changeset() throws HgException; /** * Lightweight alternative to {@link #changeset()}, identifies changeset in which current file node has been modified - * @return changeset {@link Nodeid} + * @return changeset {@link Nodeid revision} + * @throws HgException to indicate failure dealing with Mercurial data */ - public Nodeid changesetRevision(); + public Nodeid changesetRevision() throws HgException; /** * 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 + * @throws HgException to indicate failure dealing with Mercurial data */ public Pair<HgChangeset, HgChangeset> parents() throws HgException; /** * Lightweight alternative to {@link #parents()}, give {@link Nodeid nodeids} only * @return two values, neither is <code>null</code>, use {@link Nodeid#isNull()} to identify parent not set + * @throws HgException to indicate failure dealing with Mercurial data */ - public Pair<Nodeid, Nodeid> parentRevisions(); + public Pair<Nodeid, Nodeid> parentRevisions() throws HgException; /** * 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 + * @throws HgException to indicate failure dealing with Mercurial data */ public Collection<HgChangeset> children() throws HgException; /** * Lightweight alternative to {@link #children()}. * @return never <code>null</code> + * @throws HgException to indicate failure dealing with Mercurial data */ - public Collection<Nodeid> childRevisions(); + public Collection<Nodeid> childRevisions() throws HgException; } } \ No newline at end of file