You've already forked lazarus-ccr
fpsvnsync: more fixes for copying properties
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@155 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -51,8 +51,6 @@
|
|||||||
</Debugging>
|
</Debugging>
|
||||||
</Linking>
|
</Linking>
|
||||||
<Other>
|
<Other>
|
||||||
<CustomOptions Value="-Faheaptrc
|
|
||||||
"/>
|
|
||||||
<CompilerPath Value="$(CompPath)"/>
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
</Other>
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
|
@ -184,16 +184,16 @@ var
|
|||||||
|
|
||||||
procedure ApplyPropChanges;
|
procedure ApplyPropChanges;
|
||||||
var
|
var
|
||||||
|
Files: TStrings;
|
||||||
SourcePropInfo: TSvnPropInfo;
|
SourcePropInfo: TSvnPropInfo;
|
||||||
DestPropInfo: TSvnPropInfo;
|
DestPropInfo: TSvnPropInfo;
|
||||||
BaseFileName: string;
|
SourceFileName: string;
|
||||||
|
SourceFileProp: TSvnFileProp;
|
||||||
DestFileName: string;
|
DestFileName: string;
|
||||||
DestFileProp: TSvnFileProp;
|
DestFileProp: TSvnFileProp;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
|
|
||||||
function CreatePropInfo(const BaseDir: string): TSvnPropInfo;
|
function CreatePropInfo(const BaseDir: string): TSvnPropInfo;
|
||||||
var
|
|
||||||
Files: TStrings;
|
|
||||||
begin
|
begin
|
||||||
Result := TSvnPropInfo.Create;
|
Result := TSvnPropInfo.Create;
|
||||||
Files := SvnLog.LogEntry[0].GetFileList(BaseDir);
|
Files := SvnLog.LogEntry[0].GetFileList(BaseDir);
|
||||||
@ -233,26 +233,40 @@ var
|
|||||||
begin
|
begin
|
||||||
SourcePropInfo := CreatePropInfo(FSourceWC);
|
SourcePropInfo := CreatePropInfo(FSourceWC);
|
||||||
DestPropInfo := CreatePropInfo(FDestWC);
|
DestPropInfo := CreatePropInfo(FDestWC);
|
||||||
|
Files := SvnLog.LogEntry[0].GetFileList('');
|
||||||
|
|
||||||
if SourcePropInfo.FileCount<>DestPropInfo.FileCount then begin
|
if SourcePropInfo.FileCount<>Files.Count then begin
|
||||||
writeln('FileName number mismatch: ',
|
writeln('Source FileName number mismatch: ',
|
||||||
SourcePropInfo.FileCount, '<>', DestPropInfo.FileCount);
|
SourcePropInfo.FileCount, '<>', Files.Count);
|
||||||
halt(2);
|
halt(2);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
for i := 0 to SourcePropInfo.FileCount-1 do begin
|
if DestPropInfo.FileCount<>Files.Count then begin
|
||||||
BaseFileName := Copy(SourcePropInfo[i].FileName, length(FSourceWC)+1, 4000);
|
writeln('Destination FileName number mismatch: ',
|
||||||
DestFileName := FDestWC + BaseFileName;
|
DestPropInfo.FileCount, '<>', Files.Count);
|
||||||
|
halt(2);
|
||||||
|
end;
|
||||||
|
|
||||||
|
for i := 0 to Files.Count-1 do begin
|
||||||
|
SourceFileName := FSourceWC + Files[i];
|
||||||
|
DestFileName := FDestWC + Files[i];
|
||||||
|
SourceFileProp := SourcePropInfo.GetFileItem(SourceFileName);
|
||||||
DestFileProp := DestPropInfo.GetFileItem(DestFileName);
|
DestFileProp := DestPropInfo.GetFileItem(DestFileName);
|
||||||
|
|
||||||
if BaseFileName <> Copy(DestFileProp.FileName, Length(FDestWC)+1, 4000) then begin
|
if SourceFileProp=nil then begin
|
||||||
writeln('FileName mismatch: ',
|
writeln('Missing source file properties for ', SourceFileName);
|
||||||
SourcePropInfo[i].FileName, '<>', DestFileProp.FileName);
|
|
||||||
halt(3);
|
halt(3);
|
||||||
end;
|
end;
|
||||||
CopyFileProp(SourcePropInfo[i], DestPropInfo[i]);
|
|
||||||
|
if SourceFileProp=nil then begin
|
||||||
|
writeln('Missing destination file properties for ', DestFileName);
|
||||||
|
halt(3);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
CopyFileProp(SourceFileProp, DestFileProp);
|
||||||
|
end;
|
||||||
|
|
||||||
|
Files.Free;
|
||||||
SourcePropInfo.Free;
|
SourcePropInfo.Free;
|
||||||
DestPropInfo.Free;
|
DestPropInfo.Free;
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user