annotate src/org/tmatesoft/hg/core/HgChangesetTreeHandler.java @ 648:690e71d29bf6

Introduced RevisionSet to ease update of phase roots on push
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 25 Jun 2013 20:48:37 +0200
parents 6526d8adbc0f
children
rev   line source
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
1 /*
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
2 * Copyright (c) 2011-2013 TMate Software Ltd
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
3 *
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
4 * This program is free software; you can redistribute it and/or modify
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
5 * it under the terms of the GNU General Public License as published by
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
6 * the Free Software Foundation; version 2 of the License.
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
7 *
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
8 * This program is distributed in the hope that it will be useful,
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
11 * GNU General Public License for more details.
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
12 *
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
13 * For information on how to redistribute this software under
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
14 * the terms of a license other than GNU General Public License
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
15 * contact TMate Software at support@hg4j.com
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
16 */
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
17 package org.tmatesoft.hg.core;
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
18
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
19 import java.util.Collection;
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
20
423
9c9c442b5f2e Major refactoring of exception handling. Low-level API uses RuntimeExceptions, while checked are left for higher level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 403
diff changeset
21 import org.tmatesoft.hg.internal.Callback;
515
e6c8b9b654b2 Provide access to HgDataFile being iterated into HgChangesetTreeHandler.TreeElement to give context for renamed files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 507
diff changeset
22 import org.tmatesoft.hg.repo.HgDataFile;
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
23 import org.tmatesoft.hg.repo.HgRuntimeException;
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
24 import org.tmatesoft.hg.util.Pair;
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
25
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
26 /**
403
2747b0723867 FIXMEs: work on exceptions and javadoc
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 383
diff changeset
27 * Handler to iterate file history (generally, any revlog) with access to parent-child relations between changesets.
2747b0723867 FIXMEs: work on exceptions and javadoc
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 383
diff changeset
28 *
2747b0723867 FIXMEs: work on exceptions and javadoc
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 383
diff changeset
29 * @see HgLogCommand#execute(HgChangesetTreeHandler)
2747b0723867 FIXMEs: work on exceptions and javadoc
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 383
diff changeset
30 *
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
31 * @author Artem Tikhomirov
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
32 * @author TMate Software Ltd.
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
33 */
423
9c9c442b5f2e Major refactoring of exception handling. Low-level API uses RuntimeExceptions, while checked are left for higher level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 403
diff changeset
34 @Callback
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
35 public interface HgChangesetTreeHandler {
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
36 /**
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
37 * @param entry access to various pieces of information about current tree node. Instances might be
370
a2341e761609 Let callback implementations deliver errors (e,g. own exceptions) to client code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 366
diff changeset
38 * reused across calls and shall not be kept by client's code
423
9c9c442b5f2e Major refactoring of exception handling. Low-level API uses RuntimeExceptions, while checked are left for higher level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 403
diff changeset
39 * @throws HgCallbackTargetException wrapper for any exception user code may produce
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
40 * @throws HgRuntimeException propagates library issues. <em>Runtime exception</em>
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
41 */
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
42 public void treeElement(HgChangesetTreeHandler.TreeElement entry) throws HgCallbackTargetException, HgRuntimeException;
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
43
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
44 interface TreeElement {
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
45 /**
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
46 * Revision of the revlog being iterated. For example, when walking file history, return value represents file revisions.
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
47 *
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
48 * @return revision of the revlog being iterated.
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
49 * @throws HgRuntimeException subclass thereof to indicate issues with the library. <em>Runtime exception</em>
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
50 */
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
51 public Nodeid fileRevision() throws HgRuntimeException;
515
e6c8b9b654b2 Provide access to HgDataFile being iterated into HgChangesetTreeHandler.TreeElement to give context for renamed files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 507
diff changeset
52
e6c8b9b654b2 Provide access to HgDataFile being iterated into HgChangesetTreeHandler.TreeElement to give context for renamed files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 507
diff changeset
53 /**
e6c8b9b654b2 Provide access to HgDataFile being iterated into HgChangesetTreeHandler.TreeElement to give context for renamed files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 507
diff changeset
54 * File node, provided revlog being iterated is a {@link HgDataFile}; {@link #fileRevision()}
e6c8b9b654b2 Provide access to HgDataFile being iterated into HgChangesetTreeHandler.TreeElement to give context for renamed files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 507
diff changeset
55 * references revision from the history of this very {@link HgDataFile file}.
e6c8b9b654b2 Provide access to HgDataFile being iterated into HgChangesetTreeHandler.TreeElement to give context for renamed files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 507
diff changeset
56 *
e6c8b9b654b2 Provide access to HgDataFile being iterated into HgChangesetTreeHandler.TreeElement to give context for renamed files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 507
diff changeset
57 * Comes handy when file history with renames is being followed to find out
e6c8b9b654b2 Provide access to HgDataFile being iterated into HgChangesetTreeHandler.TreeElement to give context for renamed files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 507
diff changeset
58 * file name for particular revision in the history.
e6c8b9b654b2 Provide access to HgDataFile being iterated into HgChangesetTreeHandler.TreeElement to give context for renamed files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 507
diff changeset
59 *
e6c8b9b654b2 Provide access to HgDataFile being iterated into HgChangesetTreeHandler.TreeElement to give context for renamed files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 507
diff changeset
60 * @return instance of the file being walked, or <code>null</code> if it's not a file but other revlog.
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
61 * @throws HgRuntimeException subclass thereof to indicate issues with the library. <em>Runtime exception</em>
515
e6c8b9b654b2 Provide access to HgDataFile being iterated into HgChangesetTreeHandler.TreeElement to give context for renamed files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 507
diff changeset
62 */
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
63 public HgDataFile file() throws HgRuntimeException;
366
189dc6dc1c3e Use exceptions to expose errors reading mercurial data
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 328
diff changeset
64
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
65 /**
507
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
66 * @return changeset associated with the current file revision
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
67 * @throws HgRuntimeException subclass thereof to indicate issues with the library. <em>Runtime exception</em>
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
68 */
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
69 public HgChangeset changeset() throws HgRuntimeException;
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
70
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
71 /**
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
72 * Lightweight alternative to {@link #changeset()}, identifies changeset in which current file node has been modified
403
2747b0723867 FIXMEs: work on exceptions and javadoc
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 383
diff changeset
73 * @return changeset {@link Nodeid revision}
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
74 * @throws HgRuntimeException subclass thereof to indicate issues with the library. <em>Runtime exception</em>
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
75 */
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
76 public Nodeid changesetRevision() throws HgRuntimeException;
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
77
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
78 /**
507
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
79 * Identifies parent changes, changesets where file/revlog in question was modified prior to change being visited.
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
80 *
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
81 * Note, these are not necessarily in direct relation to parents of changeset from {@link #changeset()}
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
82 *
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
83 * Imagine next history (grows from bottom to top):
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
84 * <pre>
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
85 * o A o
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
86 * | \ |
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
87 * o B \/
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
88 * | o C
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
89 * | /
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
90 * o /
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
91 * | /
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
92 * o D
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
93 * </pre>
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
94 *
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
95 * When we are at {@link TreeElement} for <code>A</code>, <code>B</code> and <code>C</code> are changeset parents, naturally. However
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
96 * if the file/revlog we've been walking has not been changed in <code>B</code> and <code>C</code>, but e.g. in <code>D</code> only,
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
97 * then this {@link #parents()} call would return pair with single element only, pointing to <code>D</code>
a6435c1a42d0 Test for HgChangesetTreeHandler - make sure nothing is broken prior to adding --follow support
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 427
diff changeset
98 *
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
99 * @return changesets that correspond to parents of the current file node, either pair element may be <code>null</code>.
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
100 * @throws HgRuntimeException subclass thereof to indicate issues with the library. <em>Runtime exception</em>
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
101 */
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
102 public Pair<HgChangeset, HgChangeset> parents() throws HgRuntimeException;
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
103
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
104 /**
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
105 * Lightweight alternative to {@link #parents()}, give {@link Nodeid nodeids} only
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
106 * @return two values, neither is <code>null</code>, use {@link Nodeid#isNull()} to identify parent not set
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
107 * @throws HgRuntimeException subclass thereof to indicate issues with the library. <em>Runtime exception</em>
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
108 */
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
109 public Pair<Nodeid, Nodeid> parentRevisions() throws HgRuntimeException;
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
110
366
189dc6dc1c3e Use exceptions to expose errors reading mercurial data
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 328
diff changeset
111 /**
189dc6dc1c3e Use exceptions to expose errors reading mercurial data
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 328
diff changeset
112 * Changes that originate from the given change and bear it as their parent.
189dc6dc1c3e Use exceptions to expose errors reading mercurial data
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 328
diff changeset
113 * @return collection (possibly empty) of immediate children of the change
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
114 * @throws HgRuntimeException subclass thereof to indicate issues with the library. <em>Runtime exception</em>
366
189dc6dc1c3e Use exceptions to expose errors reading mercurial data
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 328
diff changeset
115 */
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
116 public Collection<HgChangeset> children() throws HgRuntimeException;
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
117
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
118 /**
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
119 * Lightweight alternative to {@link #children()}.
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
120 * @return never <code>null</code>
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
121 * @throws HgRuntimeException subclass thereof to indicate issues with the library. <em>Runtime exception</em>
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
122 */
628
6526d8adbc0f Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 515
diff changeset
123 public Collection<Nodeid> childRevisions() throws HgRuntimeException;
328
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
124 }
a674b8590362 Move file tree history to upper API level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
125 }