[fpc-pascal] Is there some example of an FPC program for use in svn hook calls (email)?
bo.berglund at gmail.com
Thu Dec 14 19:54:49 CET 2017
On Thu, 14 Dec 2017 19:37:55 +0100 (CET),
marcov at stack.nl (Marco van de Voort) wrote:
>In our previous episode, Bo Berglund said:
>> But *sending email* is not the problem, I have done this in many
>> applications using Indy TIdSMTP. Instead it is getting data out oof
>> svn and formatting these in a friendly looking email to be sent....
>Actually process.runcommand was developed to get the output of SVN commands.
>It is used to create the mergelogs http://www.stack.nl/~marcov/mergelogs26/
Thanks for your suggestion!
Do you mean replace the current code:
AProcess.Executable := Command;
AProcess.Options := [poUsePipes];
for i := 0 to Parameters.Count -1 do
BytesRead := AProcess.Output.Read(Buffer, BUF_SIZE);
until BytesRead = 0; // Stop if no more data is available
OutputStream.Position := 0;
With something like this:
if AProcess.RunCommand(Command, Parameters.Strings, sTmp) then
SvnData.Text := sTmp);
Result := true;
Are all of those preliminaries unnecessary and could be discarded
How can I view what is actually happening in the command window when
debugging the code?
When I started this (in Lazarus 1.6) I selected a new "Program" rather
than a "Console application".
Developer in Sweden
More information about the fpc-pascal