Mercurial > hg4j
changeset 126:b92a638764be
Dispatch chnagesets even if Handler is not FileHistoryHandler
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Tue, 15 Feb 2011 07:03:14 +0100 |
parents | 26ad21b250e4 |
children | 2e395db595e2 |
files | src/org/tmatesoft/hg/core/LogCommand.java |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/LogCommand.java Tue Feb 15 06:40:36 2011 +0100 +++ b/src/org/tmatesoft/hg/core/LogCommand.java Tue Feb 15 07:03:14 2011 +0100 @@ -175,18 +175,20 @@ } else { HgDataFile fileNode = repo.getFileNode(file); fileNode.history(startRev, endRev, this); - if (handler instanceof FileHistoryHandler && fileNode.isCopy()) { + if (fileNode.isCopy()) { // even if we do not follow history, report file rename do { - FileRevision src = new FileRevision(repo, fileNode.getCopySourceRevision(), fileNode.getCopySourceName()); - FileRevision dst = new FileRevision(repo, fileNode.getRevision(0), fileNode.getPath()); - ((FileHistoryHandler) handler).copy(src, dst); + if (handler instanceof FileHistoryHandler) { + FileRevision src = new FileRevision(repo, fileNode.getCopySourceRevision(), fileNode.getCopySourceName()); + FileRevision dst = new FileRevision(repo, fileNode.getRevision(0), fileNode.getPath()); + ((FileHistoryHandler) handler).copy(src, dst); + } if (limit > 0 && count >= limit) { // if limit reach, follow is useless. break; } if (followHistory) { - fileNode = repo.getFileNode(src.getPath()); + fileNode = repo.getFileNode(fileNode.getCopySourceName()); fileNode.history(this); } } while (followHistory && fileNode.isCopy());