You've already forked lazarus-ccr
fpsvnsync: fixed setting svn:eolstyle on files that are not text/plain, needed for lazarus r13688.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@323 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -26,10 +26,10 @@
|
|||||||
</RunParams>
|
</RunParams>
|
||||||
<RequiredPackages Count="2">
|
<RequiredPackages Count="2">
|
||||||
<Item1>
|
<Item1>
|
||||||
<PackageName Value="FCL"/>
|
<PackageName Value="svnpkg"/>
|
||||||
</Item1>
|
</Item1>
|
||||||
<Item2>
|
<Item2>
|
||||||
<PackageName Value="svnpkg"/>
|
<PackageName Value="FCL"/>
|
||||||
</Item2>
|
</Item2>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="1">
|
<Units Count="1">
|
||||||
|
@ -204,7 +204,8 @@ var
|
|||||||
|
|
||||||
procedure CopyFileProp(SourceProp, DestProp: TSvnFileProp);
|
procedure CopyFileProp(SourceProp, DestProp: TSvnFileProp);
|
||||||
var
|
var
|
||||||
j: integer;
|
j, pass: integer;
|
||||||
|
IsSvnEolProp: boolean;
|
||||||
Command: string;
|
Command: string;
|
||||||
begin
|
begin
|
||||||
if SourceProp.Properties.Text=DestProp.Properties.Text then exit;
|
if SourceProp.Properties.Text=DestProp.Properties.Text then exit;
|
||||||
@ -221,13 +222,21 @@ var
|
|||||||
writeln('svn ', Command);
|
writeln('svn ', Command);
|
||||||
writeln('svn result: ', ExecuteSvnCommand(Command));
|
writeln('svn result: ', ExecuteSvnCommand(Command));
|
||||||
end;
|
end;
|
||||||
for j:=0 to SourceProp.Properties.Count-1 do begin
|
// first pass set svn:eolstyle, later it might not be possible
|
||||||
Command := format('propset %s "%s" "%s"',
|
// because of the mime style is non-text.
|
||||||
[SourceProp.Properties.Names[j],
|
for pass := 1 to 2 do begin
|
||||||
SourceProp.Properties.ValueFromIndex[j],
|
for j:=0 to SourceProp.Properties.Count-1 do begin
|
||||||
DestProp.FileName]);
|
IsSvnEolProp := SourceProp.Properties.Names[j]='svn:eol-style';
|
||||||
writeln('svn ', Command);
|
if ((pass=1) and (IsSvnEolProp=true)) or
|
||||||
writeln('svn result: ', ExecuteSvnCommand(Command));
|
((pass=2) and (IsSvnEolProp=false)) then begin
|
||||||
|
Command := format('propset %s "%s" "%s"',
|
||||||
|
[SourceProp.Properties.Names[j],
|
||||||
|
SourceProp.Properties.ValueFromIndex[j],
|
||||||
|
DestProp.FileName]);
|
||||||
|
writeln('svn ', Command);
|
||||||
|
writeln('svn result: ', ExecuteSvnCommand(Command));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -309,8 +318,11 @@ begin
|
|||||||
|
|
||||||
DestRoot := GetRepositoryRoot(FDestWC);
|
DestRoot := GetRepositoryRoot(FDestWC);
|
||||||
writeln('------');
|
writeln('------');
|
||||||
except
|
except on E: Exception do
|
||||||
halt(9);
|
begin
|
||||||
|
writeln(E.Message);
|
||||||
|
halt(9);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
XmlOutput := TMemoryStream.Create;
|
XmlOutput := TMemoryStream.Create;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user