Login | Register
My pages Projects Community openCollabNet

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

delphiaddinfortortoisesvn
Discussion topic

Back to topic list

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

Author otto_noll
Full name Otto Noll
Date 2009-01-08 11:23:56 PST
Message Author: otto_noll
Date: 2009-01-08 11:23:56-0800
New Revision: 40

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

Log:
Redesigned of TSVNExec. Now Tortoise and the IDE running in the same thread and the IDE is not accessible while Tortoise is running. This has to be because otherwise there might be some problems with the file integrity.

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​=40&r1=39&r2​=40
====================​====================​====================​==================
--- branches/SOPTIM/src/​tsvnWizard.pas (original)
+++ branches/SOPTIM/src/​tsvnWizard.pas 2009-01-08 11:23:56-0800
@@ -402,8 +402,32 @@
 end;
 
 procedure TTortoiseSVN.TSVNExec( params: string );
-begin
- WinExec( pchar( TSVNPath + ' ' + params ), SW_SHOW );
+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);
+ CreateOK := CreateProcess(nil, //__in_opt LPCTSTR lpApplicationName,
+ pchar( TSVNPath + ' ' + 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 ' + TSVNPath + ' ' + params);
+ end;
+ WaitForSingleObject( ProcInfo.hProcess, INFINITE );
+ CloseHandle(ProcInfo.hProcess);
+ CloseHandle(ProcInfo.hThread);
 end;
 
 procedure TTortoiseSVN.ExecuteVerb(Index: ESVNFeature);

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r40 - branches/SOPTIM/src/tsvnWizard.pas otto_noll Otto Noll 2009-01-08 11:23:56 PST
Messages per page: