Descobri que o Tortoise oferece um objeto COM possibilitando que o Delphi, por exemplo, levante informações sobre um determinado arquivo.
http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-subwcrev-com-interface.html
Veja como ficou meu código:
procedure TG4GetInfoSVN.GetInfoSVN;
var
vSvnObject : Variant; //Buffer para a criação do objeto OLE
lModulo : IOTAModule; //Serviço de módulo
begin
try
vSvnObject := CreateOleObject('SubWCRev.object');
lModulo := (BorlandIDEServices as IOTAModuleServices).CurrentModule;
if (Assigned(lModulo)) then
begin
vSvnObject.GetWcinfo(lModulo.FileName,1,1);
if (vSvnObject.IsSVNItem) then
begin
fGetInfoSVN := TfGetInfoSVN.Create(Application);
fGetInfoSVN.SetFileName(lModulo.FileName);
fGetInfoSVN.AddInfo('URL',vSvnObject.URL);
fGetInfoSVN.AddInfo('Autor',vSvnObject.Author);
fGetInfoSVN.AddInfo('Revisão',vSvnObject.Revision);
fGetInfoSVN.AddInfo('Mínima',vSvnObject.MinRev);
fGetInfoSVN.AddInfo('Máxima',vSvnObject.MaxRev);
fGetInfoSVN.AddInfo('Data',vSvnObject.Date);
fGetInfoSVN.AddInfo('Modificado',vSvnObject.HasModifications);
if (vSvnObject.IsLocked) then
begin
fGetInfoSVN.AddInfo('Bloqueado em',vSvnObject.LockCreationDate);
fGetInfoSVN.AddInfo('Bloqueado por',vSvnObject.LockOwner);
fGetInfoSVN.AddInfo('Motivo',vSvnObject.LockComment);
end;
fGetInfoSVN.ShowModal;
fGetInfoSVN.Free;
fGetInfoSVN := nil;
end else
begin
MessageBox(Application.Handle,PWideChar(Format('O arquivo [%s] não está no SVN!',[lModulo.FileName])),'Atenção!',MB_OK + MB_ICONERROR);
end;
end else
begin
MessageBox(Application.Handle,'Não há um arquivo de código ativo','Atenção!',MB_OK + MB_ICONINFORMATION);
end;
finally
vSvnObject := Unassigned;
end;
end;