Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r2 - in trunk: bin src www

delphiaddinfortortoisesvn
Discussion topic

Hide all messages in topic

All messages in topic

svn commit: r2 - in trunk: bin src www

Author scdevelop
Full name Santiago C.
Date 2006-02-16 20:19:16 PST
Message Author: scdevelop
Date: Thu Feb 16 20:19:15 2006
New Revision: 2

Added:
   trunk/bin/
   trunk/bin/TortoiseSVNaddin.dll (contents, props changed)
   trunk/src/
   trunk/src/TortoiseSVNaddin.dpr
   trunk/www/TortoiseSVNaddin.dll (contents, props changed)
   trunk/www/TortoiseSVNaddin.dpr
   trunk/www/screenshot.gif (contents, props changed)
Modified:
   trunk/www/index.html
Log:


Added: trunk/bin/TortoiseSVNaddin.dll
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/bin/Tortoi​seSVNaddin.dll?view=​auto&rev=2
====================​====================​====================​==================
Binary file. No diff available.

Added: trunk/src/TortoiseSVNaddin.dpr
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/src/Tortoi​seSVNaddin.dpr?view=​auto&rev=2
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/TortoiseSVNaddin.dpr Thu Feb 16 20:19:15 2006
@@ -0,0 +1,224 @@
+library TortoiseSVNaddin;
+
+uses
+ ShareMem, Windows, WinTypes, WinProcs, SysUtils, Dialogs, VcsIntf, ToolIntf,
+ ExptIntf, VirtIntf, Registry, ShellApi, Controls;
+
+
+type
+ TTortoiseSVN = class( TIVCSCLient )
+private
+ notifier: TIAddInNotifier;
+ TSVNPath: string;
+ procedure TSVNExec( params: string );
+public
+ constructor Create;
+ function GetIDString: string; override;
+ function GetMenuName: string; override;
+ function GetVerbCount: Integer; override;
+ function GetVerb(Index: Integer): string; override;
+ function GetVerbState(Index: Integer): Word; override;
+ procedure ExecuteVerb(Index: Integer); override;
+ procedure ProjectChange; override;
+ procedure FileNotification(NotifyCode: TFileNotification;
+ const FileName: string; var Cancel: Boolean);
+ procedure EventNotification(NotifyCode: TEventNotification;
+ var Cancel: Boolean);
+end;
+
+
+const
+ SVN_LOG = 0;
+ SVN_CHECK_MODIFICATIONS = 1;
+ SVN_ADD = 2;
+ SVN_COMMIT = 3;
+ SVN_DIFF = 4;
+ SVN_REPOSITORY_BROWSER = 5;
+ SVN_SETTINGS = 6;
+ SVN_ABOUT = 7;
+ SVN_VERB_COUNT = 8;
+
+
+type TTortoiseSVNNotifier = class( TIAddInNotifier )
+private
+ tortoiseSVN: TTortoiseSVN;
+public
+ constructor Create( tortoiseSVN: TTortoiseSVN);
+ procedure FileNotification(NotifyCode: TFileNotification;
+ const FileName: string; var Cancel: Boolean); override; stdcall;
+ procedure EventNotification(NotifyCode: TEventNotification;
+ var Cancel: Boolean); override; stdcall;
+end;
+
+
+procedure HandleException;
+begin
+ if Assigned(ToolServices) then
+ ToolServices.RaiseEx​ception(ReleaseExcep​tion)
+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;
+ notifier:= TTortoiseSVNNotifier​.Create(self);
+ ToolServices.AddNotifier( notifier );
+end;
+
+function TTortoiseSVN.GetIDString: string;
+begin
+ Result:= 'Subversion.TortoiseSVN';
+end;
+
+function TTortoiseSVN.GetMenuName: string;
+begin
+ Result:= 'TortoiseSVN';
+end;
+
+function TTortoiseSVN.GetVerbCount: Integer;
+begin
+ Result:= SVN_VERB_COUNT;
+end;
+
+function TTortoiseSVN.GetVerb(Index: Integer): string;
+begin
+ case index of
+ SVN_LOG:
+ Result:= '&Log...';
+ SVN_CHECK_MODIFICATIONS:
+ Result:= 'Check &modifications...';
+ SVN_ADD:
+ Result:= '&Add...';
+ SVN_COMMIT:
+ Result:= '&Commit...';
+ SVN_DIFF:
+ Result:= '&Diff..';
+ SVN_REPOSITORY_BROWSER:
+ Result:= 'Repository &browser...';
+ SVN_SETTINGS:
+ Result:= '&Settings...';
+ SVN_ABOUT:
+ Result:= '&About...';
+ end;
+end;
+
+function TTortoiseSVN.GetVerb​State(Index: Integer): Word;
+begin
+ Result:= 0;
+ case index of
+ SVN_LOG:
+ if ToolServices.GetProjectName <> '' then
+ Result:= vsEnabled;
+ SVN_CHECK_MODIFICATIONS:
+ if ToolServices.GetProjectName <> '' then
+ Result:= vsEnabled;
+ SVN_ADD:
+ if ToolServices.GetProjectName <> '' then
+ Result:= vsEnabled;
+ SVN_COMMIT:
+ if ToolServices.GetProjectName <> '' then
+ Result:= vsEnabled;
+ SVN_DIFF:
+ if ToolServices.GetCurrentFile <> '' 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);
+begin
+ case index of
+ SVN_LOG:
+ TSVNExec( '/command:log /notempfile /path:' + AnsiQuotedStr( ExtractFilePath(Tool​Services.GetProjectN​ame), '"' ) );
+ SVN_CHECK_MODIFICATIONS:
+ TSVNExec( '/command:repostatus /notempfile /path:' + AnsiQuotedStr( ExtractFilePath(Tool​Services.GetProjectN​ame), '"' ) );
+ SVN_ADD:
+ TSVNExec( '/command:add /notempfile /path:' + AnsiQuotedStr( ExtractFilePath(Tool​Services.GetProjectN​ame), '"' ) );
+ SVN_COMMIT:
+ if MessageDlg( 'All project files will be saved before commit. Continue?', mtConfirmation, [mbYes, mbNo], 0 ) = mrYes then begin
+ ToolServices.SaveProject;
+ TSVNExec( '/command:commit /notempfile /path:' + AnsiQuotedStr( ExtractFilePath(Tool​Services.GetProjectN​ame), '"' ) );
+ end;
+ SVN_DIFF:
+ TSVNExec( '/command:diff /notempfile /path:' + AnsiQuotedStr( ToolServices.GetCurrentFile, '"' ) );
+ SVN_REPOSITORY_BROWSER:
+ if ToolServices.GetProjectName <> '' then
+ TSVNExec( '/command:repobrowser /notempfile /path:' + AnsiQuotedStr( ExtractFilePath(Tool​Services.GetProjectN​ame), '"' ) )
+ else
+ TSVNExec( '/command:repobrowser' );
+ SVN_SETTINGS:
+ TSVNExec( '/command:settings' );
+ SVN_ABOUT:
+ TSVNExec( '/command:about' );
+ end;
+end;
+
+procedure TTortoiseSVN.ProjectChange;
+begin
+//
+end;
+
+procedure TTortoiseSVN.FileNot​ification(NotifyCode​: TFileNotification;
+ const FileName: string; var Cancel: Boolean);
+begin
+//
+end;
+
+procedure TTortoiseSVN.EventNo​tification(NotifyCod​e: TEventNotification;
+ var Cancel: Boolean);
+begin
+//
+end;
+
+
+
+
+constructor TTortoiseSVNNotifier.Create( tortoiseSVN: TTortoiseSVN );
+begin
+ self.tortoiseSVN:= tortoiseSVN;
+end;
+
+procedure TTortoiseSVNNotifier​.FileNotification(No​tifyCode: TFileNotification;
+ const FileName: string; var Cancel: Boolean); stdcall;
+begin
+ tortoiseSVN.FileNotification( NotifyCode, FileName, Cancel );
+end;
+
+procedure TTortoiseSVNNotifier​.EventNotification(N​otifyCode: TEventNotification;
+ var Cancel: Boolean); stdcall;
+begin
+ tortoiseSVN.EventNotification( NotifyCode, Cancel );
+end;
+
+
+
+function InitVCS(Delphi: TIToolServices): TIVCSClient; stdcall;
+begin
+ ExptIntf.ToolServices:= Delphi;
+ Result:= TTortoiseSVN.Create;
+end;
+
+exports
+ InitVCS name VCSManagerEntryPoint;
+
+begin
+end.
+

Added: trunk/www/TortoiseSVNaddin.dll
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/www/Tortoi​seSVNaddin.dll?view=​auto&rev=2
====================​====================​====================​==================
Binary file. No diff available.

Added: trunk/www/TortoiseSVNaddin.dpr
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/www/Tortoi​seSVNaddin.dpr?view=​auto&rev=2
====================​====================​====================​==================
--- (empty file)
+++ trunk/www/TortoiseSVNaddin.dpr Thu Feb 16 20:19:15 2006
@@ -0,0 +1,224 @@
+library TortoiseSVNaddin;
+
+uses
+ ShareMem, Windows, WinTypes, WinProcs, SysUtils, Dialogs, VcsIntf, ToolIntf,
+ ExptIntf, VirtIntf, Registry, ShellApi, Controls;
+
+
+type
+ TTortoiseSVN = class( TIVCSCLient )
+private
+ notifier: TIAddInNotifier;
+ TSVNPath: string;
+ procedure TSVNExec( params: string );
+public
+ constructor Create;
+ function GetIDString: string; override;
+ function GetMenuName: string; override;
+ function GetVerbCount: Integer; override;
+ function GetVerb(Index: Integer): string; override;
+ function GetVerbState(Index: Integer): Word; override;
+ procedure ExecuteVerb(Index: Integer); override;
+ procedure ProjectChange; override;
+ procedure FileNotification(NotifyCode: TFileNotification;
+ const FileName: string; var Cancel: Boolean);
+ procedure EventNotification(NotifyCode: TEventNotification;
+ var Cancel: Boolean);
+end;
+
+
+const
+ SVN_LOG = 0;
+ SVN_CHECK_MODIFICATIONS = 1;
+ SVN_ADD = 2;
+ SVN_COMMIT = 3;
+ SVN_DIFF = 4;
+ SVN_REPOSITORY_BROWSER = 5;
+ SVN_SETTINGS = 6;
+ SVN_ABOUT = 7;
+ SVN_VERB_COUNT = 8;
+
+
+type TTortoiseSVNNotifier = class( TIAddInNotifier )
+private
+ tortoiseSVN: TTortoiseSVN;
+public
+ constructor Create( tortoiseSVN: TTortoiseSVN);
+ procedure FileNotification(NotifyCode: TFileNotification;
+ const FileName: string; var Cancel: Boolean); override; stdcall;
+ procedure EventNotification(NotifyCode: TEventNotification;
+ var Cancel: Boolean); override; stdcall;
+end;
+
+
+procedure HandleException;
+begin
+ if Assigned(ToolServices) then
+ ToolServices.RaiseEx​ception(ReleaseExcep​tion)
+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;
+ notifier:= TTortoiseSVNNotifier​.Create(self);
+ ToolServices.AddNotifier( notifier );
+end;
+
+function TTortoiseSVN.GetIDString: string;
+begin
+ Result:= 'Subversion.TortoiseSVN';
+end;
+
+function TTortoiseSVN.GetMenuName: string;
+begin
+ Result:= 'TortoiseSVN';
+end;
+
+function TTortoiseSVN.GetVerbCount: Integer;
+begin
+ Result:= SVN_VERB_COUNT;
+end;
+
+function TTortoiseSVN.GetVerb(Index: Integer): string;
+begin
+ case index of
+ SVN_LOG:
+ Result:= '&Log...';
+ SVN_CHECK_MODIFICATIONS:
+ Result:= 'Check &modifications...';
+ SVN_ADD:
+ Result:= '&Add...';
+ SVN_COMMIT:
+ Result:= '&Commit...';
+ SVN_DIFF:
+ Result:= '&Diff..';
+ SVN_REPOSITORY_BROWSER:
+ Result:= 'Repository &browser...';
+ SVN_SETTINGS:
+ Result:= '&Settings...';
+ SVN_ABOUT:
+ Result:= '&About...';
+ end;
+end;
+
+function TTortoiseSVN.GetVerb​State(Index: Integer): Word;
+begin
+ Result:= 0;
+ case index of
+ SVN_LOG:
+ if ToolServices.GetProjectName <> '' then
+ Result:= vsEnabled;
+ SVN_CHECK_MODIFICATIONS:
+ if ToolServices.GetProjectName <> '' then
+ Result:= vsEnabled;
+ SVN_ADD:
+ if ToolServices.GetProjectName <> '' then
+ Result:= vsEnabled;
+ SVN_COMMIT:
+ if ToolServices.GetProjectName <> '' then
+ Result:= vsEnabled;
+ SVN_DIFF:
+ if ToolServices.GetCurrentFile <> '' 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);
+begin
+ case index of
+ SVN_LOG:
+ TSVNExec( '/command:log /notempfile /path:' + AnsiQuotedStr( ExtractFilePath(Tool​Services.GetProjectN​ame), '"' ) );
+ SVN_CHECK_MODIFICATIONS:
+ TSVNExec( '/command:repostatus /notempfile /path:' + AnsiQuotedStr( ExtractFilePath(Tool​Services.GetProjectN​ame), '"' ) );
+ SVN_ADD:
+ TSVNExec( '/command:add /notempfile /path:' + AnsiQuotedStr( ExtractFilePath(Tool​Services.GetProjectN​ame), '"' ) );
+ SVN_COMMIT:
+ if MessageDlg( 'All project files will be saved before commit. Continue?', mtConfirmation, [mbYes, mbNo], 0 ) = mrYes then begin
+ ToolServices.SaveProject;
+ TSVNExec( '/command:commit /notempfile /path:' + AnsiQuotedStr( ExtractFilePath(Tool​Services.GetProjectN​ame), '"' ) );
+ end;
+ SVN_DIFF:
+ TSVNExec( '/command:diff /notempfile /path:' + AnsiQuotedStr( ToolServices.GetCurrentFile, '"' ) );
+ SVN_REPOSITORY_BROWSER:
+ if ToolServices.GetProjectName <> '' then
+ TSVNExec( '/command:repobrowser /notempfile /path:' + AnsiQuotedStr( ExtractFilePath(Tool​Services.GetProjectN​ame), '"' ) )
+ else
+ TSVNExec( '/command:repobrowser' );
+ SVN_SETTINGS:
+ TSVNExec( '/command:settings' );
+ SVN_ABOUT:
+ TSVNExec( '/command:about' );
+ end;
+end;
+
+procedure TTortoiseSVN.ProjectChange;
+begin
+//
+end;
+
+procedure TTortoiseSVN.FileNot​ification(NotifyCode​: TFileNotification;
+ const FileName: string; var Cancel: Boolean);
+begin
+//
+end;
+
+procedure TTortoiseSVN.EventNo​tification(NotifyCod​e: TEventNotification;
+ var Cancel: Boolean);
+begin
+//
+end;
+
+
+
+
+constructor TTortoiseSVNNotifier.Create( tortoiseSVN: TTortoiseSVN );
+begin
+ self.tortoiseSVN:= tortoiseSVN;
+end;
+
+procedure TTortoiseSVNNotifier​.FileNotification(No​tifyCode: TFileNotification;
+ const FileName: string; var Cancel: Boolean); stdcall;
+begin
+ tortoiseSVN.FileNotification( NotifyCode, FileName, Cancel );
+end;
+
+procedure TTortoiseSVNNotifier​.EventNotification(N​otifyCode: TEventNotification;
+ var Cancel: Boolean); stdcall;
+begin
+ tortoiseSVN.EventNotification( NotifyCode, Cancel );
+end;
+
+
+
+function InitVCS(Delphi: TIToolServices): TIVCSClient; stdcall;
+begin
+ ExptIntf.ToolServices:= Delphi;
+ Result:= TTortoiseSVN.Create;
+end;
+
+exports
+ InitVCS name VCSManagerEntryPoint;
+
+begin
+end.
+

Modified: trunk/www/index.html
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/www/index.​html?view=diff&r​ev=2&p1=trunk/ww​w/index.html&r1=​1&p2=trunk/www/i​ndex.html&r2=2
====================​====================​====================​==================
--- trunk/www/index.html (original)
+++ trunk/www/index.html Thu Feb 16 20:19:15 2006
@@ -13,94 +13,87 @@
 </head>
 <body>
 
-<p>This is the initial web content for your project. Please customize
-this to fit your project. You don't need to answer all these questions
-or follow this exact format, but we do like to see this kind of
-information before we approve projects for public viewing.
-</p>
-
-<p>Until your project is approved, only you can view it and work on
-it.
-</p>
+<div class="h2">
+<h2>Descripti​on</h2>
 
+<p>
+A very simple add-in for Delphi and C++ Builder IDE's (currently working but tested on version 5 only).
+
+<p>
+This will add a menu with the most common TortoiseSVN commands to work with the current project files.
+<br>
+Current supported commands are:
 <ul>
-<li>This index.html will be used if and only if you have the "Use
-Project Home Page" option checked on the "Administer Project" page
-(click the "Admin" tab).</li>
+<li>Log (project)
+<li>Check modifications (project)
+<li>Add (project)
+<li>Commit (project)
+<li>Diff (current editor file)
+<li>Repository browser
+<li>Settings
+<li>About
+</ul>
 
-<li>To edit this file, check out your project via CVS and edit www/index.html.
+<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 ;)
 
-<li>You can 'cvs add' and commit other files under the project's "www"
-directory and they will published to your project web site.</li>
+</div>
 
-<li>Also, consider starting a thread in the "dev" mailing list to get
-these discussion started. A good one is an "introduction" thread where
-people post messages about themselves and their interest in the
-project.</li>
 
-<li>You can add a "Highlights:" line to the top of all web pages by adding a file www/project_highlights.html </li>
-</ul>
+<div class="h2">
+<h2>Screensho​t</h2>
 
+<p>
+This is the TortoiseSVN menu integrated on C++ Builder 5 IDE main menu:
 
-<h3>Mission</h3>
+<p>
+<img src="screenshot.gif">
 
-<p>What is the goal of this project?
-</p>
+</div>
 
-<p>What is the scope of this project?
-</p>
 
-<p>For example:</p>
 
-<ul>
-<li>Develop just enough functionality to scratch a particular itch</li>
-<li>Build a tool just like XYZ, but less broken</li>
-<li>Build the best XYZ-tool ever!</li>
-</ul>
+<div class="h2">
+<h2>Requireme​nts</h2>
 
+<a href="http://tortoisesvn.tigris.org">TortoiseSVN</a> must be installed.
+The add-in was tested with version 1.3
 
-<p>What are high-level features you are sure to build?
-</p>
-<ul>
+</div>
 
-<li>What would you write on a billboard about your project? Users
-might only look for a few seconds.</li>
 
-<li>Use the issue tracker to track features and enhancement
-requests. It is not just for bugs, pre-populate it with feature
-descriptions so that potential contributors know what you would like them
-to work on.</li>
-</ul>
+<div class="h2">
+<h2>Binaries - installation</h2>
 
-<p>What are the high-level assumptions or ground rules for the project?
-</p>
+You just need to copy <a href="TortoiseSVNadd​in.dll">this</​a> DLL to any directory of your choice.
+Then create the following registry key:
+<pre>HKEY_CUR​RENT_USER\Software​Borland\Delphi\5.​0\Version Control</pre>
+and add a string value named "VCSManager" containing the path of the DLL.
 
-<p>For example:
-</p>
+<p>
+ If it's the case, replace "Delphi" with "C++Builder" and/or replace the version number.
 
-<ul>
-<li> we will use programming language X on operating system Y for now.
+</div>
 
-<li>We will, or will not, consider certain functional areas like
-internationalization, high security, concurrency, etc. The list of
-functional areas will depend on what you are trying to do.
 
-<li>Try to keep this part short.
-</ul>
+<div class="h2">
+<h2>Source code - compiling</h2>
 
+<a href="TortoiseSVNadd​in.dpr">This</​a> is the Delphi library project (just one file) that generates
+the DLL.
 
-<h3>Related resources</h3>
+<p>
+You will need to add the following entry:
+<pre>$(DELPH​I)\source\toolsapi​</pre>
+to the IDE library path.
 
-<ul>
-<li>Link to other stuff that you know about. It will help you
-research requirements and provide a useful resource to potential
-contributors.</li>
+<p>
+The project can be easily (I think so) converted to C++ and compiled in C++ Builder, if necessary.
+
+</div>
 
-<li>Why reinvent the wheel? What is better about this wheel? Is there
-any existing project that you can partner with or reuse?</li>
 
-<li>Where would you go to try to find potential contibutors?</li>
-</ul>
 
 </body>
 </html>

Added: trunk/www/screenshot.gif
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/www/screen​shot.gif?view=auto​&rev=2
====================​====================​====================​==================
Binary file. No diff available.
Messages per page: