comparison src/org/tmatesoft/hg/core/HgLogCommand.java @ 316:ee6b467c1a5f

Supply HGFileRevision with copy information when possible, calculate it otherwise
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 28 Sep 2011 13:09:16 +0200
parents 6d1804fe0ed7
children d68dcb3b5f49
comparison
equal deleted inserted replaced
315:8952f89be195 316:ee6b467c1a5f
224 if (fileNode.isCopy()) { 224 if (fileNode.isCopy()) {
225 // even if we do not follow history, report file rename 225 // even if we do not follow history, report file rename
226 do { 226 do {
227 if (handler instanceof FileHistoryHandler) { 227 if (handler instanceof FileHistoryHandler) {
228 HgFileRevision src = new HgFileRevision(repo, fileNode.getCopySourceRevision(), fileNode.getCopySourceName()); 228 HgFileRevision src = new HgFileRevision(repo, fileNode.getCopySourceRevision(), fileNode.getCopySourceName());
229 HgFileRevision dst = new HgFileRevision(repo, fileNode.getRevision(0), fileNode.getPath()); 229 HgFileRevision dst = new HgFileRevision(repo, fileNode.getRevision(0), fileNode.getPath(), src.getPath());
230 try { 230 try {
231 ((FileHistoryHandler) handler).copy(src, dst); 231 ((FileHistoryHandler) handler).copy(src, dst);
232 } catch (RuntimeException ex) { 232 } catch (RuntimeException ex) {
233 throw new HgCallbackTargetException(ex).setRevision(fileNode.getCopySourceRevision()).setFileName(fileNode.getCopySourceName()); 233 throw new HgCallbackTargetException(ex).setRevision(fileNode.getCopySourceRevision()).setFileName(fileNode.getCopySourceName());
234 } 234 }