fpsvnsync: another fix for using revision in svn copy command

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@643 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
vsnijders
2008-12-23 14:48:32 +00:00
parent 6506f6323d
commit 1249b16f70

View File

@ -163,9 +163,15 @@ var
if LogPath.Action in [caModify, caAdd] then begin
SourceFile := FSourceWC + LogPath.Path;
if LogPath.CopyFromPath<>'' then begin
Command := format('copy "%1:s%2:s@%0:d" "%3:s"',
[LogPath.CopyFromRevision,
DestRoot, LogPath.CopyFromPath, DestFile]);
if ExtractFileName(LogPath.CopyFromPath)=ExtractFileName(DestFile) then
// to prevent that svn complains that the target is not a directory
Command := format('copy "%1:s%2:s@%0:d" "%3:s"',
[LogPath.CopyFromRevision, DestRoot, LogPath.CopyFromPath,
ExtractFileDir(DestFile)])
else
Command := format('copy "%1:s%2:s@%0:d" "%3:s"',
[LogPath.CopyFromRevision, DestRoot,
LogPath.CopyFromPath, DestFile]);
writeln('svn '+ Command);
ExecuteSvnCommand(Command);
end;