Mercurial > jhg
comparison src/org/tmatesoft/hg/core/HgLogCommand.java @ 368:8107b95f4280
Update Javadoc with 'revision index'
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 16 Dec 2011 16:00:57 +0100 |
parents | 2fadf8695f8a |
children | a2341e761609 |
comparison
equal
deleted
inserted
replaced
367:2fadf8695f8a | 368:8107b95f4280 |
---|---|
130 } | 130 } |
131 | 131 |
132 /** | 132 /** |
133 * Limit to specified subset of Changelog, [min(rev1,rev2), max(rev1,rev2)], inclusive. | 133 * Limit to specified subset of Changelog, [min(rev1,rev2), max(rev1,rev2)], inclusive. |
134 * Revision may be specified with {@link HgRepository#TIP} | 134 * Revision may be specified with {@link HgRepository#TIP} |
135 * @param rev1 - local revision index | 135 * @param rev1 - revision local index |
136 * @param rev2 - local revision index | 136 * @param rev2 - revision local index |
137 * @return <code>this</code> instance for convenience | 137 * @return <code>this</code> instance for convenience |
138 */ | 138 */ |
139 public HgLogCommand range(int rev1, int rev2) { | 139 public HgLogCommand range(int rev1, int rev2) { |
140 if (rev1 != TIP && rev2 != TIP) { | 140 if (rev1 != TIP && rev2 != TIP) { |
141 startRev = rev2 < rev1 ? rev2 : rev1; | 141 startRev = rev2 < rev1 ? rev2 : rev1; |
158 * @throws HgInvalidRevisionException if supplied nodeid doesn't identify any revision from this revlog | 158 * @throws HgInvalidRevisionException if supplied nodeid doesn't identify any revision from this revlog |
159 * @throws HgInvalidControlFileException if access to revlog index/data entry failed | 159 * @throws HgInvalidControlFileException if access to revlog index/data entry failed |
160 */ | 160 */ |
161 public HgLogCommand changeset(Nodeid nid) throws HgInvalidControlFileException, HgInvalidRevisionException { | 161 public HgLogCommand changeset(Nodeid nid) throws HgInvalidControlFileException, HgInvalidRevisionException { |
162 // XXX perhaps, shall support multiple (...) arguments and extend #execute to handle not only range, but also set of revisions. | 162 // XXX perhaps, shall support multiple (...) arguments and extend #execute to handle not only range, but also set of revisions. |
163 final int csetLocal = repo.getChangelog().getRevisionIndex(nid); | 163 final int csetRevIndex = repo.getChangelog().getRevisionIndex(nid); |
164 return range(csetLocal, csetLocal); | 164 return range(csetRevIndex, csetRevIndex); |
165 } | 165 } |
166 | 166 |
167 /** | 167 /** |
168 * Visit history of a given file only. | 168 * Visit history of a given file only. |
169 * @param file path relative to repository root. Pass <code>null</code> to reset. | 169 * @param file path relative to repository root. Pass <code>null</code> to reset. |