Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r62 - branches/SOPTIM/src/tsvnWizard.pas

delphiaddinfortortoisesvn
Discussion topic

Hide all messages in topic

All messages in topic

svn commit: r62 - branches/SOPTIM/src/tsvnWizard.pas

Author otto_noll
Full name Otto Noll
Date 2009-01-12 05:15:45 PST
Message Author: otto_noll
Date: 2009-01-12 05:15:45-0800
New Revision: 62

Modified:
   branches/SOPTIM/src/​tsvnWizard.pas

Log:
Introduce SVNExec( params: string ) now the svn command line interpreter is accessible if it's installed.

Modified: branches/SOPTIM/src/​tsvnWizard.pas
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/branches/SOPTIM/​src/tsvnWizard.pas?v​iew=diff&pathrev​=62&r1=61&r2​=62
====================​====================​====================​==================
--- branches/SOPTIM/src/​tsvnWizard.pas (original)
+++ branches/SOPTIM/src/​tsvnWizard.pas 2009-01-12 05:15:45-0800
@@ -42,9 +42,10 @@
 private
     timer: TTimer;
     tsvnMenu: TMenuItem;
- TSVNPath: string;
+ TSVNPath,SVNPath: string;
     procedure Tick( sender: TObject );
     procedure TSVNExec( params: string );
+ procedure SVNExec(params: String);
     function GetBitmapName(Index: ESVNFeature): string;
     function GetVerb(Index: ESVNFeature): string;
     function GetVerbState(Index: ESVNFeature): Word;
@@ -558,6 +559,41 @@
   CloseHandle(ProcInfo.hThread);
 end;
 
+
+procedure TTortoiseSVN.SVNExec(params: String);
+var
+ StartInfo : TStartupInfo;
+ ProcInfo : TProcessInformation;
+ CreateOK : Boolean;
+begin
+ FillChar(StartInfo,S​izeOf(TStartupInfo),​#0);
+ FillChar(ProcInfo,Si​zeOf(TProcessInforma​tion),#0);
+ StartInfo.cb := SizeOf(TStartupInfo);
+// StartInfo.dwFlags:=S​TARTF_USESHOWWINDOW;​
+// StartInfo.wShowWindow:= 0;
+ CreateOK := CreateProcess(nil, //__in_opt LPCTSTR lpApplicationName,
+ pchar('svn '+ params), //__inout_opt LPTSTR lpCommandLine,
+ nil, //__in_opt LPSECURITY_ATTRIBUTES lpProcessAttributes,
+ nil, //__in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
+ False, //__in BOOL bInheritHandles,
+ CREATE_NEW_PROCESS_GROUP + NORMAL_PRIORITY_CLASS, //__in DWORD dwCreationFlags,
+ nil, //__in_opt LPVOID lpEnvironment,
+ nil, //__in_opt LPCTSTR lpCurrentDirectory,
+ StartInfo, //__in LPSTARTUPINFO lpStartupInfo,
+ ProcInfo); //__out LPPROCESS_INFORMATION lpProcessInformation
+ { check to see if successful }
+ if not CreateOK then
+ begin
+ ShowMessage('Unable to run ' + SVNPath + ' ' + params);
+ end;
+ WaitForSingleObject( ProcInfo.hProcess, INFINITE );
+ CloseHandle(ProcInfo.hProcess);
+ CloseHandle(ProcInfo.hThread);
+end;
+
+
+
+
 procedure TTortoiseSVN.ExecuteVerb(Index: ESVNFeature);
 var project: IOTAProject;
     i: integer;
Messages per page: