Mercurial > hg4j
comparison src/org/tmatesoft/hg/repo/Revlog.java @ 328:a674b8590362
Move file tree history to upper API level
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 05 Oct 2011 07:13:57 +0200 |
parents | 3f09b8c19142 |
children | 8da7ade36c57 |
comparison
equal
deleted
inserted
replaced
327:3f09b8c19142 | 328:a674b8590362 |
---|---|
85 public final int getLastRevision() { | 85 public final int getLastRevision() { |
86 return content.revisionCount() - 1; | 86 return content.revisionCount() - 1; |
87 } | 87 } |
88 | 88 |
89 public final Nodeid getRevision(int revision) { | 89 public final Nodeid getRevision(int revision) { |
90 // XXX cache nodeids? | 90 // XXX cache nodeids? Rather, if context.getCache(this).getRevisionMap(create == false) != null, use it |
91 return Nodeid.fromBinary(content.nodeid(revision), 0); | 91 return Nodeid.fromBinary(content.nodeid(revision), 0); |
92 } | 92 } |
93 | 93 |
94 /** | |
95 * FIXME need to be careful about (1) ordering of the revisions in the return list; (2) modifications (sorting) of the argument array | |
96 */ | |
94 public final List<Nodeid> getRevisions(int... revisions) { | 97 public final List<Nodeid> getRevisions(int... revisions) { |
95 ArrayList<Nodeid> rv = new ArrayList<Nodeid>(revisions.length); | 98 ArrayList<Nodeid> rv = new ArrayList<Nodeid>(revisions.length); |
96 Arrays.sort(revisions); | 99 Arrays.sort(revisions); |
97 getRevisionsInternal(rv, revisions); | 100 getRevisionsInternal(rv, revisions); |
98 return rv; | 101 return rv; |