}
final List<VcsFileRevision> revisions = new ArrayList<VcsFileRevision>();
revisions.addAll(getHistory(filePath, vcsRoot, myProject, DEFAULT_LIMIT));
- return createAppendableSession(vcsRoot, revisions);
+ return createAppendableSession(vcsRoot, revisions, null);
}
public void reportAppendableHistory(FilePath filePath, final VcsAppendableHistorySessionPartner partner) throws VcsException {
final List<HgFileRevision> history = getHistory(filePath, vcsRoot, myProject, DEFAULT_LIMIT);
if (history.size() == 0) return;
- final VcsAbstractHistorySession emptySession = createAppendableSession(vcsRoot, Collections.<VcsFileRevision>emptyList());
+ final VcsAbstractHistorySession emptySession = createAppendableSession(vcsRoot, Collections.<VcsFileRevision>emptyList(), null);
partner.reportCreatedEmptySession(emptySession);
for (HgFileRevision hgFileRevision : history) {
partner.finished();
}
- private VcsAbstractHistorySession createAppendableSession(final VirtualFile vcsRoot, List<VcsFileRevision> revisions) {
- return new VcsAbstractHistorySession(revisions) {
+ private VcsAbstractHistorySession createAppendableSession(final VirtualFile vcsRoot, List<VcsFileRevision> revisions, @Nullable VcsRevisionNumber number) {
+ return new VcsAbstractHistorySession(revisions, number) {
@Nullable
protected VcsRevisionNumber calcCurrentRevisionNumber() {
return new HgWorkingCopyRevisionsCommand(myProject).firstParent(vcsRoot);
@Override
public VcsHistorySession copy() {
- return createAppendableSession(vcsRoot, getRevisionList());
+ return createAppendableSession(vcsRoot, getRevisionList(), getCurrentRevisionNumber());
}
};
}