Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r7 - trunk: bin src www

delphiaddinfortortoisesvn
Discussion topic

Hide all messages in topic

All messages in topic

svn commit: r7 - trunk: bin src www

Author scdevelop
Full name Santiago C.
Date 2006-05-04 08:35:45 PDT
Message Author: scdevelop
Date: 2006-05-04 08:35:45-0700
New Revision: 7

Added:
   trunk/bin/readme.txt
   trunk/www/icons.res (contents, props changed)
   trunk/www/screenshot2.gif (contents, props changed)
   trunk/www/tsvnWizard.pas
Removed:
   trunk/www/TortoiseSV​NaddinBPL.bpl
   trunk/www/TortoiseSV​NaddinDLL.dll
Modified:
   trunk/bin/TortoiseSV​NaddinBPL.bpl
   trunk/bin/TortoiseSV​NaddinDLL.dll
   trunk/src/readme.txt
   trunk/src/tsvnWizard.pas
   trunk/www/index.html

Log:
Updated tsvnWizard.pas - now works on Borland Developer Studio.
Updated some documentation and web page.


Modified: trunk/bin/TortoiseSV​NaddinBPL.bpl
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/bin/Tortoi​seSVNaddinBPL.bpl?vi​ew=diff&rev=7​&p1=trunk/bin/Torto​iseSVNaddinBPL.bpl​&p2=trunk/bin/Tort​oiseSVNaddinBPL.bpl​&r1=6&r2=7
====================​====================​====================​==================
Binary files. No diff available.

Modified: trunk/bin/TortoiseSV​NaddinDLL.dll
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/bin/Tortoi​seSVNaddinDLL.dll?vi​ew=diff&rev=7​&p1=trunk/bin/Torto​iseSVNaddinDLL.dll​&p2=trunk/bin/Tort​oiseSVNaddinDLL.dll​&r1=6&r2=7
====================​====================​====================​==================
Binary files. No diff available.

Added: trunk/bin/readme.txt
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/bin/readme​.txt?view=auto&r​ev=7
====================​====================​====================​==================
--- (empty file)
+++ trunk/bin/readme.txt 2006-05-04 08:35:45-0700
@@ -0,0 +1,2 @@
+This binaries are for Delphi/C++Builder 5 only.
+For other IDE version please get the sources.

Modified: trunk/src/readme.txt
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/src/readme​.txt?view=diff&r​ev=7&p1=trunk/sr​c/readme.txt&p2=​trunk/src/readme.txt​&r1=6&r2=7
====================​====================​====================​==================
--- trunk/src/readme.txt (original)
+++ trunk/src/readme.txt 2006-05-04 08:35:45-0700
@@ -1,11 +1,11 @@
 These projects use the "new" OpenTools API (available in Delphi 4 and newer).
 
 
-To compile you will need to add the following entry:
+To compile you may need to add the following entry:
 
    $(DELPHI)\source\toolsapi
 
-to the IDE library path.
+to the IDE library path (depends on IDE version).
 
 
 All the add-in functionality is in the source file "tsvnWizard.pas".

Modified: trunk/src/tsvnWizard.pas
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/src/tsvnWi​zard.pas?view=diff​&rev=7&p1=trun​k/src/tsvnWizard.pas​&p2=trunk/src/ts​vnWizard.pas&r1=​6&r2=7
====================​====================​====================​==================
--- trunk/src/tsvnWizard.pas (original)
+++ trunk/src/tsvnWizard.pas 2006-05-04 08:35:45-0700
@@ -5,7 +5,7 @@
 interface
 
 uses ToolsAPI, SysUtils, Windows, Dialogs, Menus, Registry, ShellApi,
- Classes, Controls, Graphics, ImgList, ExtCtrls;
+ Classes, Controls, Graphics, ImgList, ExtCtrls, ActnList;
 
 const
     SVN_PROJECT_EXPLORER = 0;
@@ -21,29 +21,23 @@
     SVN_ABOUT = 10;
     SVN_VERB_COUNT = 11;
 
-type TSVNAction = class(TBasicAction)
-public
- menuitem: TMenuItem
-end;
-
 type TTortoiseSVN = class(TNotifierObject, IOTANotifier, IOTAWizard)
 private
     timer: TTimer;
     tsvnMenu: TMenuItem;
- actionList: array[0..SVN_VERB_COUNT-1] of TSVNAction;
     TSVNPath: string;
- procedure tick( sender: tobject );
+ procedure Tick( sender: tobject );
     procedure TSVNExec( params: string );
     function GetBitmapName(Index: Integer): string;
     function GetVerb(Index: Integer): string;
     function GetVerbState(Index: Integer): Word;
     procedure ExecuteVerb(Index: Integer);
- procedure createMenu;
- procedure updateAction( sender: TObject );
- procedure executeAction( sender: TObject );
+ procedure CreateMenu;
+ procedure UpdateAction( sender: TObject );
+ procedure ExecuteAction( sender: TObject );
 public
- constructor create;
- destructor destroy; override;
+ constructor Create;
+ destructor Destroy; override;
     function GetIDString: string;
     function GetName: string;
     function GetState: TWizardState;
@@ -104,7 +98,7 @@
     end;
 end;
 
-constructor TTortoiseSVN.create;
+constructor TTortoiseSVN.Create;
 var reg: TRegistry;
 begin
     Reg := TRegistry.Create;
@@ -126,7 +120,7 @@
 
 end;
 
-procedure TTortoiseSVN.tick( sender: tobject );
+procedure TTortoiseSVN.Tick( sender: tobject );
 var intf: INTAServices;
 begin
     if BorlandIDEServices.Q​ueryInterface( INTAServices, intf ) = s_OK then begin
@@ -136,51 +130,51 @@
     end;
 end;
 
-procedure TTortoiseSVN.createMenu;
+procedure TTortoiseSVN.CreateMenu;
 var mainMenu: TMainMenu;
     item: TMenuItem;
     i: integer;
     bmp: TBitmap;
+ action: TAction;
 begin
     if tsvnMenu <> nil then exit;
-
+
     tsvnMenu:= TMenuItem.Create(nil);
     tsvnMenu.Caption:= 'TortoiseSVN';
 
+
     for i:= 0 to SVN_VERB_COUNT-1 do begin
- actionList[i]:= TSVNAction.create(nil);
- actionList[i].OnExecute:= executeAction;
- actionList[i].OnUpdate:= updateAction;
 
         bmp:= TBitmap.create;
         try
           bmp.LoadFromResourceName( HInstance, getBitmapName(i) );
         except end;
 
- item:= TMenuItem.Create( tsvnMenu );
- item.action:= actionList[i];
- item.Tag:= i;
- item.Caption:= getVerb(i);
+ action:= TAction.Create(nil);
+ action.ActionList:= (BorlandIDEServices as INTAServices).ActionList;
+ action.Caption:= getVerb(i);
+ action.Hint:= getVerb(i);
         if (bmp.Width = 16) and (bmp.height = 16) then
- item.ImageIndex:= (BorlandIDEServices as INTAServices).AddMasked( bmp, clBlack );
+ action.ImageIndex:= (BorlandIDEServices as INTAServices).AddMasked( bmp, clBlack );
         bmp.free;
+ action.OnUpdate:= updateAction;
+ action.OnExecute:= executeAction;
+ action.Tag:= i;
 
- tsvnMenu.add( item );
+ item:= TMenuItem.Create( tsvnMenu );
+ item.action:= action;
 
- actionList[i].menuitem:= item;
+ tsvnMenu.add( item );
     end;
 
     mainMenu:= (BorlandIDEServices as INTAServices).MainMenu;
     mainMenu.Items.Insert( mainMenu.Items.Count-1, tsvnMenu );
 end;
 
-destructor TTortoiseSVN.destroy;
-var i: integer;
+destructor TTortoiseSVN.Destroy;
 begin
     if tsvnMenu <> nil then begin
         tsvnMenu.free;
- for i:= 0 to SVN_VERB_COUNT-1 do
- actionList[i].free;
     end;
     inherited;
 end;
@@ -334,18 +328,18 @@
     end;
 end;
 
-procedure TTortoiseSVN.updateAction( sender: TObject );
-var action: TSVNAction;
+procedure TTortoiseSVN.UpdateAction( sender: TObject );
+var action: TAction;
 begin
- action:= sender as TSVNAction;
- action.menuitem.Enabled:= getVerbState( action.menuitem.tag ) = vsEnabled;
+ action:= sender as TAction;
+ action.Enabled:= getVerbState( action.tag ) = vsEnabled;
 end;
 
-procedure TTortoiseSVN.executeAction( sender: TObject );
-var action: TSVNAction;
+procedure TTortoiseSVN.ExecuteAction( sender: TObject );
+var action: TAction;
 begin
- action:= sender as TSVNAction;
- executeVerb( action.menuitem.tag );
+ action:= sender as TAction;
+ executeVerb( action.tag );
 end;
 
 

Removed: trunk/www/TortoiseSV​NaddinBPL.bpl
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/www/Tortoi​seSVNaddinBPL.bpl?vi​ew=auto&rev=6

Removed: trunk/www/TortoiseSV​NaddinDLL.dll
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/www/Tortoi​seSVNaddinDLL.dll?vi​ew=auto&rev=6

Added: trunk/www/icons.res
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/www/icons.​res?view=auto&re​v=7
====================​====================​====================​==================
Binary file. No diff available.

Modified: trunk/www/index.html
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/www/index.​html?view=diff&r​ev=7&p1=trunk/ww​w/index.html&p2=​trunk/www/index.html​&r1=6&r2=7
====================​====================​====================​==================
--- trunk/www/index.html (original)
+++ trunk/www/index.html 2006-05-04 08:35:45-0700
@@ -17,7 +17,7 @@
 <h3>Descriptio​n</h3>
 
 <p>
-A very simple add-in for Delphi and C++ Builder IDE's (currently working but tested on version 5 only).
+A very simple add-in for Delphi and C++ Builder IDE's (a.k.a Borland Developer Studio).
 
 <p>
 This will add a menu with the most common TortoiseSVN commands to work with the current project files.
@@ -40,20 +40,24 @@
 
 <p>
 This add-in is just to facilitate working with TortoiseSVN without leaving the IDE. It's not meant to be a
-fully-IDE-integrated VCS system (if you want to give the project such status, you are welcome ;)
+fully-IDE-integrated VCS system.
 
 </div>
 
 
 <div class="h3">
-<h3>Screensho​t</h3>
+<h3>Screensho​ts</h3>
 
 <p>
 This is the TortoiseSVN menu integrated on C++ Builder 5 IDE main menu:
-
 <p>
 <img src="screenshot.gif">
 
+<p>
+This is the TortoiseSVN menu integrated on Borland Developer Studio 2006 main menu:
+<p>
+<img src="screenshot2.gif">
+
 </div>
 
 
@@ -87,15 +91,14 @@
 <h3>Binaries - installation</h3>
 
 <p>
-The add-in is available as a <a href="TortoiseSVNadd​inBPL.bpl">Delphi​ package</a>. Just install it in the IDE as any other package.
+The add-in builds and installs as a Delphi package. As there exist many versions of IDE's it's recommended that you
+create your own package for your particular environment.
+
 <p>
-It is also available as an <a href="TortoiseSVNadd​inDLL.dll">expert​ DLL</a>.
-In this case you need to copy the DLL to any directory of your choice and create the following registry key:
-<pre>HKEY_CUR​RENT_USER\Software​Borland\Delphi\5.​0\Experts</pre​>
-and add a string value (any name is fine) containing the path of the DLL.
+For Delphi/C++Builder 5 you can get prebuilt binaries (check the "bin" folder in the file section).
 
 <p>
- If it's the case, replace "Delphi" with "C++Builder" and/or replace the version number.
+It's also possible to build the add-in as a DLL (see the readme files for details).
 
 </div>
 
@@ -104,10 +107,14 @@
 <h3>Source code - compiling</h3>
 
 <p>
-The source files are available in the file section under the "src" folder. Please see the readme file for details.
+The main source file is available <a href="tsvnWizard.pas​">here</a>.​ You will also need <a href="icons.res">​this</a> resource file.
+You just need to create a package project, add the main source file, build and install.
 
 <p>
-The add-in uses the "new" Open Tools API, so it compiles in Delphi 4 and above (I used Borland Delphi 5).
+If you use Delphi 5 you can get already-made project files (check the "src" folder in the file section).
+
+<p>
+The add-in uses the "new" Open Tools API, so it compiles in Delphi 4 and above.
 <br>
 It can be easily (at least I think so) converted to C++ and compiled in C++ Builder, if necessary.
 
@@ -132,9 +139,6 @@
 <p>
 Have comments, suggestions, etc., or just find this useful? <a href="mailto:scdevel​op at tigris dot org">Dr​op me a line!</a>
 
-<p>
-I would also like to know if someone uses/compiles this in Delphi 2005 or above. Thanks!
-
 </div>
 
 </body>

Added: trunk/www/screenshot2.gif
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/www/screen​shot2.gif?view=auto​&rev=7
====================​====================​====================​==================
Binary file. No diff available.

Added: trunk/www/tsvnWizard.pas
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/www/tsvnWi​zard.pas?view=auto​&rev=7
====================​====================​====================​==================
--- (empty file)
+++ trunk/www/tsvnWizard.pas 2006-05-04 08:35:45-0700
@@ -0,0 +1,419 @@
+unit tsvnWizard;
+
+{$R 'icons.res'}
+
+interface
+
+uses ToolsAPI, SysUtils, Windows, Dialogs, Menus, Registry, ShellApi,
+ Classes, Controls, Graphics, ImgList, ExtCtrls, ActnList;
+
+const
+ SVN_PROJECT_EXPLORER = 0;
+ SVN_LOG = 1;
+ SVN_CHECK_MODIFICATIONS = 2;
+ SVN_ADD = 3;
+ SVN_UPDATE = 4;
+ SVN_COMMIT = 5;
+ SVN_DIFF = 6;
+ SVN_REVERT = 7;
+ SVN_REPOSITORY_BROWSER = 8;
+ SVN_SETTINGS = 9;
+ SVN_ABOUT = 10;
+ SVN_VERB_COUNT = 11;
+
+type TTortoiseSVN = class(TNotifierObject, IOTANotifier, IOTAWizard)
+private
+ timer: TTimer;
+ tsvnMenu: TMenuItem;
+ TSVNPath: string;
+ procedure Tick( sender: tobject );
+ procedure TSVNExec( params: string );
+ function GetBitmapName(Index: Integer): string;
+ function GetVerb(Index: Integer): string;
+ function GetVerbState(Index: Integer): Word;
+ procedure ExecuteVerb(Index: Integer);
+ procedure CreateMenu;
+ procedure UpdateAction( sender: TObject );
+ procedure ExecuteAction( sender: TObject );
+public
+ constructor Create;
+ destructor Destroy; override;
+ function GetIDString: string;
+ function GetName: string;
+ function GetState: TWizardState;
+ procedure Execute;
+end;
+
+
+{$IFNDEF DLL_MODE}
+
+procedure Register;
+
+{$ELSE}
+
+function InitWizard(const BorlandIDEServices: IBorlandIDEServices;
+ RegisterProc: TWizardRegisterProc;
+ var Terminate: TWizardTerminateProc): Boolean; stdcall;
+
+{$ENDIF}
+
+
+implementation
+
+function GetCurrentProject: IOTAProject;
+var
+ ModServices: IOTAModuleServices;
+ Module: IOTAModule;
+ Project: IOTAProject;
+ ProjectGroup: IOTAProjectGroup;
+ i: Integer;
+begin
+ Result := nil;
+ ModServices := BorlandIDEServices as IOTAModuleServices;
+ if ModServices <> nil then
+ for i := 0 to ModServices.ModuleCount - 1 do
+ begin
+ Module := ModServices.Modules[i];
+ if Supports(Module, IOTAProjectGroup, ProjectGroup) then
+ begin
+ Result := ProjectGroup.ActiveProject;
+ Exit;
+ end
+ else if Supports(Module, IOTAProject, Project) then
+ begin // In the case of unbound packages, return the 1st
+ if Result = nil then
+ Result := Project;
+ end;
+ end;
+end;
+
+function GetCurrentFileName: string;
+var editor: IOTAEditorServices;
+begin
+ result:= '';
+ editor:= BorlandIDEServices as IOTAEditorServices;
+ if editor <> nil then begin
+ if editor.TopBuffer <> nil then
+ result:= editor.TopBuffer.FileName;
+ end;
+end;
+
+constructor TTortoiseSVN.Create;
+var reg: TRegistry;
+begin
+ Reg := TRegistry.Create;
+ try
+ Reg.RootKey := HKEY_LOCAL_MACHINE;
+ if Reg.OpenKeyReadOnly( '\SOFTWARE\TortoiseSVN' ) then
+ TSVNPath:= Reg.ReadString( 'ProcPath' );
+ finally
+ Reg.CloseKey;
+ Reg.Free;
+ end;
+
+ tsvnMenu:= nil;
+
+ timer:= TTimer.create(nil);
+ timer.interval:= 200;
+ timer.OnTimer:= tick;
+ timer.enabled:= true;
+
+end;
+
+procedure TTortoiseSVN.Tick( sender: tobject );
+var intf: INTAServices;
+begin
+ if BorlandIDEServices.Q​ueryInterface( INTAServices, intf ) = s_OK then begin
+ self.createMenu;
+ timer.free;
+ timer:= nil;
+ end;
+end;
+
+procedure TTortoiseSVN.CreateMenu;
+var mainMenu: TMainMenu;
+ item: TMenuItem;
+ i: integer;
+ bmp: TBitmap;
+ action: TAction;
+begin
+ if tsvnMenu <> nil then exit;
+
+ tsvnMenu:= TMenuItem.Create(nil);
+ tsvnMenu.Caption:= 'TortoiseSVN';
+
+
+ for i:= 0 to SVN_VERB_COUNT-1 do begin
+
+ bmp:= TBitmap.create;
+ try
+ bmp.LoadFromResourceName( HInstance, getBitmapName(i) );
+ except end;
+
+ action:= TAction.Create(nil);
+ action.ActionList:= (BorlandIDEServices as INTAServices).ActionList;
+ action.Caption:= getVerb(i);
+ action.Hint:= getVerb(i);
+ if (bmp.Width = 16) and (bmp.height = 16) then
+ action.ImageIndex:= (BorlandIDEServices as INTAServices).AddMasked( bmp, clBlack );
+ bmp.free;
+ action.OnUpdate:= updateAction;
+ action.OnExecute:= executeAction;
+ action.Tag:= i;
+
+ item:= TMenuItem.Create( tsvnMenu );
+ item.action:= action;
+
+ tsvnMenu.add( item );
+ end;
+
+ mainMenu:= (BorlandIDEServices as INTAServices).MainMenu;
+ mainMenu.Items.Insert( mainMenu.Items.Count-1, tsvnMenu );
+end;
+
+destructor TTortoiseSVN.Destroy;
+begin
+ if tsvnMenu <> nil then begin
+ tsvnMenu.free;
+ end;
+ inherited;
+end;
+
+function TTortoiseSVN.GetBitm​apName(Index: Integer): string;
+begin
+ case index of
+ SVN_PROJECT_EXPLORER:
+ Result:= 'explorer';
+ SVN_LOG:
+ Result:= 'log';
+ SVN_CHECK_MODIFICATIONS:
+ Result:= 'check';
+ SVN_ADD:
+ Result:= 'add';
+ SVN_UPDATE:
+ Result:= 'update';
+ SVN_COMMIT:
+ Result:= 'commit';
+ SVN_DIFF:
+ Result:= 'diff';
+ SVN_REVERT:
+ Result:= 'revert';
+ SVN_REPOSITORY_BROWSER:
+ Result:= 'repository';
+ SVN_SETTINGS:
+ Result:= 'settings';
+ SVN_ABOUT:
+ Result:= 'about';
+ end;
+end;
+
+function TTortoiseSVN.GetVerb(Index: Integer): string;
+begin
+ case index of
+ SVN_PROJECT_EXPLORER:
+ Result:= '&Project explorer...';
+ SVN_LOG:
+ Result:= '&Log...';
+ SVN_CHECK_MODIFICATIONS:
+ Result:= 'Check &modifications...';
+ SVN_ADD:
+ Result:= '&Add...';
+ SVN_UPDATE:
+ Result:= '&Update to revision...';
+ SVN_COMMIT:
+ Result:= '&Commit...';
+ SVN_DIFF:
+ Result:= '&Diff...';
+ SVN_REVERT:
+ Result:= '&Revert...';
+ SVN_REPOSITORY_BROWSER:
+ Result:= 'Repository &browser...';
+ SVN_SETTINGS:
+ Result:= '&Settings...';
+ SVN_ABOUT:
+ Result:= '&About...';
+ end;
+end;
+
+const vsEnabled = 1;
+
+function TTortoiseSVN.GetVerb​State(Index: Integer): Word;
+begin
+ Result:= 0;
+ case index of
+ SVN_PROJECT_EXPLORER:
+ if GetCurrentProject <> nil then
+ Result:= vsEnabled;
+ SVN_LOG:
+ if GetCurrentProject <> nil then
+ Result:= vsEnabled;
+ SVN_CHECK_MODIFICATIONS:
+ if GetCurrentProject <> nil then
+ Result:= vsEnabled;
+ SVN_ADD:
+ if GetCurrentProject <> nil then
+ Result:= vsEnabled;
+ SVN_UPDATE:
+ if GetCurrentProject <> nil then
+ Result:= vsEnabled;
+ SVN_COMMIT:
+ if GetCurrentProject <> nil then
+ Result:= vsEnabled;
+ SVN_DIFF:
+ if GetCurrentFileName <> '' then
+ Result:= vsEnabled;
+ SVN_REVERT:
+ if GetCurrentProject <> nil then
+ Result:= vsEnabled;
+ SVN_REPOSITORY_BROWSER:
+ Result:= vsEnabled;
+ SVN_SETTINGS:
+ Result:= vsEnabled;
+ SVN_ABOUT:
+ Result:= vsEnabled;
+ end;
+end;
+
+procedure TTortoiseSVN.TSVNExec( params: string );
+begin
+ WinExec( pchar( TSVNPath + ' ' + params ), SW_SHOW );
+end;
+
+procedure TTortoiseSVN.ExecuteVerb(Index: Integer);
+var project: IOTAProject;
+ filename: string;
+begin
+ project:= GetCurrentProject();
+ filename:= getCurrentFileName();
+ case index of
+ SVN_PROJECT_EXPLORER:
+ if project <> nil then
+ ShellExecute( 0, 'open', pchar( ExtractFilePath(proj​ect.GetFileName) ), '', '', SW_SHOWNORMAL );
+ SVN_LOG:
+ if project <> nil then
+ TSVNExec( '/command:log /notempfile /path:' + AnsiQuotedStr( ExtractFilePath(proj​ect.GetFileName), '"' ) );
+ SVN_CHECK_MODIFICATIONS:
+ if project <> nil then
+ TSVNExec( '/command:repostatus /notempfile /path:' + AnsiQuotedStr( ExtractFilePath(proj​ect.GetFileName), '"' ) );
+ SVN_ADD:
+ if project <> nil then
+ TSVNExec( '/command:add /notempfile /path:' + AnsiQuotedStr( ExtractFilePath(proj​ect.GetFileName), '"' ) );
+ SVN_UPDATE:
+ if project <> nil then
+ if MessageDlg( 'All project files will be saved before update. Continue?', mtConfirmation, [mbYes, mbNo], 0 ) = mrYes then begin
+ (BorlandIDEServices as IOTAModuleServices).saveAll;
+ TSVNExec( '/command:update /rev /notempfile /path:' + AnsiQuotedStr( ExtractFilePath(proj​ect.GetFileName), '"' ) );
+ end;
+ SVN_COMMIT:
+ if project <> nil then
+ if MessageDlg( 'All project files will be saved before commit. Continue?', mtConfirmation, [mbYes, mbNo], 0 ) = mrYes then begin
+ (BorlandIDEServices as IOTAModuleServices).saveAll;
+ TSVNExec( '/command:commit /notempfile /path:' + AnsiQuotedStr( ExtractFilePath(proj​ect.GetFileName), '"' ) );
+ end;
+ SVN_DIFF:
+ if filename <> '' then
+ TSVNExec( '/command:diff /notempfile /path:' + AnsiQuotedStr( filename, '"' ) );
+ SVN_REVERT:
+ if project <> nil then
+ TSVNExec( '/command:revert /notempfile /path:' + AnsiQuotedStr( ExtractFilePath(proj​ect.GetFileName), '"' ) );
+ SVN_REPOSITORY_BROWSER:
+ if project <> nil then
+ TSVNExec( '/command:repobrowser /notempfile /path:' + AnsiQuotedStr( ExtractFilePath(proj​ect.GetFileName), '"' ) )
+ else
+ TSVNExec( '/command:repobrowser' );
+ SVN_SETTINGS:
+ TSVNExec( '/command:settings' );
+ SVN_ABOUT:
+ TSVNExec( '/command:about' );
+ end;
+end;
+
+procedure TTortoiseSVN.UpdateAction( sender: TObject );
+var action: TAction;
+begin
+ action:= sender as TAction;
+ action.Enabled:= getVerbState( action.tag ) = vsEnabled;
+end;
+
+procedure TTortoiseSVN.ExecuteAction( sender: TObject );
+var action: TAction;
+begin
+ action:= sender as TAction;
+ executeVerb( action.tag );
+end;
+
+
+function TTortoiseSVN.GetIDString: string;
+begin
+ result:= 'Subversion.TortoiseSVN';
+end;
+
+function TTortoiseSVN.GetName: string;
+begin
+ result:= 'TortoiseSVN add-in';
+end;
+
+function TTortoiseSVN.GetState: TWizardState;
+begin
+ result:= [wsEnabled];
+end;
+
+procedure TTortoiseSVN.Execute;
+begin
+end;
+
+
+
+{$IFNDEF DLL_MODE}
+
+procedure Register;
+begin
+ RegisterPackageWizar​d(TTortoiseSVN.creat​e);
+end;
+
+{$ELSE}
+
+var wizardID: integer;
+
+procedure FinalizeWizard;
+var
+ WizardServices: IOTAWizardServices;
+begin
+ Assert(Assigned(Borl​andIDEServices));
+
+ WizardServices := BorlandIDEServices as IOTAWizardServices;
+ Assert(Assigned(Wiza​rdServices));
+
+ WizardServices.RemoveWizard( wizardID );
+
+end;
+
+function InitWizard(const BorlandIDEServices: IBorlandIDEServices;
+ RegisterProc: TWizardRegisterProc;
+ var Terminate: TWizardTerminateProc): Boolean; stdcall;
+var
+ WizardServices: IOTAWizardServices;
+begin
+ Assert(BorlandIDEServices <> nil);
+ Assert(ToolsAPI.Borl​andIDEServices = BorlandIDEServices);
+
+ Terminate := FinalizeWizard;
+
+ WizardServices := BorlandIDEServices as IOTAWizardServices;
+ Assert(Assigned(Wiza​rdServices));
+
+ wizardID:= WizardServices.AddWi​zard(TTortoiseSVN.Cr​eate as IOTAWizard);
+
+ result:= wizardID >= 0;
+end;
+
+
+exports
+ InitWizard name WizardEntryPoint;
+
+{$ENDIF}
+
+
+
+end.
+
Messages per page: