comparison src/org/tmatesoft/hg/repo/HgChangelog.java @ 317:09628675bcee

Rework file history build approach to match rest of the API
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 29 Sep 2011 03:20:28 +0200
parents f9f3e9b67ccc
children a674b8590362
comparison
equal deleted inserted replaced
316:ee6b467c1a5f 317:09628675bcee
19 import java.io.IOException; 19 import java.io.IOException;
20 import java.io.UnsupportedEncodingException; 20 import java.io.UnsupportedEncodingException;
21 import java.util.ArrayList; 21 import java.util.ArrayList;
22 import java.util.Arrays; 22 import java.util.Arrays;
23 import java.util.Calendar; 23 import java.util.Calendar;
24 import java.util.Collection;
24 import java.util.Collections; 25 import java.util.Collections;
25 import java.util.Date; 26 import java.util.Date;
26 import java.util.Formatter; 27 import java.util.Formatter;
27 import java.util.HashMap; 28 import java.util.HashMap;
28 import java.util.List; 29 import java.util.List;
36 import org.tmatesoft.hg.internal.IterateControlMediator; 37 import org.tmatesoft.hg.internal.IterateControlMediator;
37 import org.tmatesoft.hg.internal.Lifecycle; 38 import org.tmatesoft.hg.internal.Lifecycle;
38 import org.tmatesoft.hg.internal.Pool; 39 import org.tmatesoft.hg.internal.Pool;
39 import org.tmatesoft.hg.internal.RevlogStream; 40 import org.tmatesoft.hg.internal.RevlogStream;
40 import org.tmatesoft.hg.util.CancelSupport; 41 import org.tmatesoft.hg.util.CancelSupport;
42 import org.tmatesoft.hg.util.Pair;
41 import org.tmatesoft.hg.util.ProgressSupport; 43 import org.tmatesoft.hg.util.ProgressSupport;
42 44
43 /** 45 /**
44 * Representation of the Mercurial changelog file (list of ChangeSets) 46 * Representation of the Mercurial changelog file (list of ChangeSets)
45 * 47 *
100 102
101 public interface Inspector { 103 public interface Inspector {
102 // TODO describe whether cset is new instance each time 104 // TODO describe whether cset is new instance each time
103 // describe what revisionNumber is when Inspector is used with HgBundle (BAD_REVISION or bundle's local order?) 105 // describe what revisionNumber is when Inspector is used with HgBundle (BAD_REVISION or bundle's local order?)
104 void next(int revisionNumber, Nodeid nodeid, RawChangeset cset); 106 void next(int revisionNumber, Nodeid nodeid, RawChangeset cset);
107 }
108
109 /**
110 * Unlike regular {@link Inspector}, this one supplies changeset revision along with its parents and children according
111 * to parent information of the revlog this inspector visits.
112 * @see HgDataFile#history(TreeInspector)
113 */
114 public interface TreeInspector {
115 // the reason TreeInsector is in HgChangelog, not in Revlog, because despite the fact it can
116 // be applied to any revlog, it's not meant to provide revisions of any revlog it's beeing applied to,
117 // but changeset revisions always.
118 // TODO HgChangelog.walk(TreeInspector)
119 void next(Nodeid changesetRevision, Pair<Nodeid, Nodeid> parentChangesets, Collection<Nodeid> childChangesets);
105 } 120 }
106 121
107 /** 122 /**
108 * Entry in the Changelog 123 * Entry in the Changelog
109 */ 124 */