remove SVN reporitory path from filename if possible

fixes: http://bugs.freepascal.org/view.php?id=12585

git-svn-id: trunk@17268 -
This commit is contained in:
darius 2008-11-07 18:12:42 +00:00
parent 7890257f16
commit 8924fb15cb

View File

@ -49,11 +49,12 @@ type
FRepositoryPath: string;
{ private declarations }
SVNStatus: TSVNStatus;
procedure SetRepositoryPath(const AValue: string);
procedure UpdateFilesListView(Data: PtrInt);
procedure ChangeCursor(ACursor: TCursor);
public
{ public declarations }
property RepositoryPath: string read FRepositoryPath write FrepositoryPath;
property RepositoryPath: string read FRepositoryPath write SetRepositoryPath;
end;
procedure ShowSVNStatusFrm(ARepoPath: string);
@ -162,6 +163,7 @@ procedure TSVNStatusFrm.UpdateFilesListView(Data: PtrInt);
var
i: integer;
StatusItem : PSVNStatusItem;
Path: string;
begin
SVNFileListView.BeginUpdate;
SVNFileListView.Clear;
@ -178,7 +180,10 @@ begin
Checked := StatusItem^.Checked;
//path
SubItems.Add(StatusItem^.Path);
Path := StatusItem^.Path;
if pos(RepositoryPath, Path) = 1 then
System.Delete(Path, 1, Length(RepositoryPath) - 1);
SubItems.Add(Path);
//extension
SubItems.Add(StatusItem^.Extension);
@ -212,6 +217,11 @@ begin
ChangeCursor(crDefault);
end;
procedure TSVNStatusFrm.SetRepositoryPath(const AValue: string);
begin
FRepositoryPath := AppendPathDelim(AValue);
end;
procedure TSVNStatusFrm.ChangeCursor(ACursor: TCursor);
begin
SVNCommitMsgMemo.Cursor := ACursor;