Svn2RevisionInc: Show at least some warning if svn command is not in path. Patch from Sandro Cumerlato.

git-svn-id: trunk@49236 -
This commit is contained in:
juha 2015-06-01 11:23:47 +00:00
parent 533cb5e719
commit 1fca252176

View File

@ -99,6 +99,25 @@ var
const
RevisionIncComment = '// Created by Svn2RevisionInc';
function SvnInPath: Boolean;
var
P: TProcessUTF8;
begin
Result := True;
P := TProcessUTF8.Create(nil);
try
P.Options := [poUsePipes, poWaitOnExit];
P.CommandLine := 'svn --version';
try
P.Execute;
except
Result := False;
end;
finally
P.Destroy;
end;
end;
function GitInPath: Boolean;
var
P: TProcessUTF8;
@ -549,6 +568,9 @@ begin
exit;
end;
if not SvnInPath then
debugln('Warning: svn not in path.');
Result := True;
end;