From 895de1efbd525ee96e61ec8ce173ad15152beffe Mon Sep 17 00:00:00 2001 From: darius Date: Wed, 12 Nov 2008 09:17:28 +0000 Subject: [PATCH] fixed showing diff from SVNLogForm at certain revision number git-svn-id: trunk@17351 - --- components/lazsvnpkg/svnlogform.pas | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/lazsvnpkg/svnlogform.pas b/components/lazsvnpkg/svnlogform.pas index 80c4307487..030fb3317e 100644 --- a/components/lazsvnpkg/svnlogform.pas +++ b/components/lazsvnpkg/svnlogform.pas @@ -263,15 +263,18 @@ procedure TSVNLogFrm.mnuShowDiffClick(Sender: TObject); var path: string; i: integer; + revision: integer; begin {$note implement opening file in source editor} - if Assigned(SVNActionsListView.Selected) then + if Assigned(SVNActionsListView.Selected) and Assigned(LogListView.Selected) then begin debugln('TSVNLogFrm.mnuShowDiffClick Path=' ,SVNActionsListView.Selected.SubItems[0]); + revision := StrToInt(LogListView.Selected.Caption); path := SVNActionsListView.Selected.SubItems[0]; Delete(path, 1, 1); i := pos('/', path); - ShowSVNDiffFrm('-r PREV', RepositoryPath + Copy(path, i, length(path) - i + 1)); + ShowSVNDiffFrm(Format('-r %d:%d', [revision - 1, revision]), + RepositoryPath + Copy(path, i, length(path) - i + 1)); end; end;