你也可以做到這一點編程,使用Subversion客戶端DLL。下面是用Delphi編寫XE小例子:
program svnext;
{$APPTYPE CONSOLE}
uses
SysUtils,
SvnClient;
procedure Main;
var
SvnClient: TSvnClient;
SvnItem: TSvnItem;
begin
// Subversion client DLL directory; here I simply use the .exe's directory
// (I copied the DLLs there manually.)
BaseDllDir := ExtractFilePath(ParamStr(0));
SvnClient := nil;
SvnItem := nil;
try
SvnClient := TSvnClient.Create;
SvnClient.Initialize;
SvnItem := TSvnItem.Create(SvnClient, nil, ParamStr(1));
Writeln(SvnItem.PropValues['svn:externals']);
finally
SvnItem.Free;
SvnClient.Free;
end;
end;
begin
try
Main;
except
on E: Exception do
begin
ExitCode := 1;
Writeln(Format('[%s] %s', [E.ClassName, E.Message]));
end;
end;
end.
您可能必須調整爲Delphi 2007的代碼似乎版本Insight在此期間已經演變和失去(一些)的向後兼容性。
你可以使用顛覆命令行實用程序來做到這一點?這總是正確的做法。 –
像'svn propget svn:externals'? –