Mercurial > hg4j
comparison src/org/tmatesoft/hg/core/HgLogCommand.java @ 683:98ff1fb49abe
Update commands to use changeset Nodeid and int in uniform way, clients of core.* classes shall not go back and forth from int to Nodeid
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 24 Jul 2013 16:40:15 +0200 |
parents | 6526d8adbc0f |
children | e970b333f284 |
comparison
equal
deleted
inserted
replaced
682:f568330dd9c0 | 683:98ff1fb49abe |
---|---|
175 startRev = rev1; | 175 startRev = rev1; |
176 endRev = rev2; | 176 endRev = rev2; |
177 } | 177 } |
178 // TODO [2.0 API break] shall throw HgBadArgumentException, like other commands do | 178 // TODO [2.0 API break] shall throw HgBadArgumentException, like other commands do |
179 return this; | 179 return this; |
180 } | |
181 | |
182 /** | |
183 * Limit history to specified range. | |
184 * | |
185 * @see #range(int, int) | |
186 * @param cset1 range start revision | |
187 * @param cset2 range end revision | |
188 * @return <code>this</code> instance for convenience | |
189 * @throws HgBadArgumentException if revisions are not valid changeset identifiers | |
190 */ | |
191 public HgLogCommand range(Nodeid cset1, Nodeid cset2) throws HgBadArgumentException { | |
192 CsetParamKeeper pk = new CsetParamKeeper(repo); | |
193 int r1 = pk.set(cset1).get(); | |
194 int r2 = pk.set(cset2).get(); | |
195 return range(r1, r2); | |
196 } | |
197 | |
198 /** | |
199 * Select specific changeset by index | |
200 * @see #changeset(Nodeid) | |
201 * @param revisionIndex index of changelog revision | |
202 * @return <code>this</code> for convenience | |
203 * @throws HgBadArgumentException if failed to find supplied changeset revision | |
204 */ | |
205 public HgLogCommand changeset(int revisionIndex) throws HgBadArgumentException { | |
206 int ri = new CsetParamKeeper(repo).set(revisionIndex).get(); | |
207 return range(ri, ri); | |
180 } | 208 } |
181 | 209 |
182 /** | 210 /** |
183 * Select specific changeset | 211 * Select specific changeset |
184 * | 212 * |