Mercurial > jhg
diff src/org/tmatesoft/hg/core/LogCommand.java @ 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 | 7ec89d637f50 |
children | 645829962785 |
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());