Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r6 - trunk: bin bin/oldOTA src src/oldOTA www

delphiaddinfortortoisesvn
Discussion topic

Back to topic list

svn commit: r6 - trunk: bin bin/oldOTA src src/oldOTA www

Author scdevelop
Full name Santiago C.
Date 2006-04-26 10:50:17 PDT
Message Author: scdevelop
Date: 2006-04-26 10:50:17-0700
New Revision: 6

Added:
   trunk/bin/TortoiseSV​NaddinBPL.bpl (contents, props changed)
   trunk/bin/TortoiseSV​NaddinDLL.dll (contents, props changed)
   trunk/bin/oldOTA/
   trunk/bin/oldOTA/Tor​toiseSVNaddin.dll (contents, props changed)
   trunk/src/TortoiseSV​NaddinBPL.dof
   trunk/src/TortoiseSV​NaddinBPL.dpk
   trunk/src/TortoiseSV​NaddinDLL.dof
   trunk/src/TortoiseSV​NaddinDLL.dpr
   trunk/src/icons.res (contents, props changed)
   trunk/src/oldOTA/
   trunk/src/oldOTA/Tor​toiseSVNaddin.dof
   trunk/src/oldOTA/Tor​toiseSVNaddin.dpr
   trunk/src/oldOTA/readme.txt
   trunk/src/readme.txt
   trunk/src/tsvnWizard.pas
   trunk/www/TortoiseSV​NaddinBPL.bpl (contents, props changed)
   trunk/www/TortoiseSV​NaddinDLL.dll (contents, props changed)
Removed:
   trunk/bin/TortoiseSVNaddin.dll
   trunk/src/TortoiseSVNaddin.dpr
   trunk/www/TortoiseSVNaddin.dll
   trunk/www/TortoiseSVNaddin.dpr
Modified:
   trunk/www/index.html
   trunk/www/screenshot.gif

Log:
New version using the "new" Open Tools API.

Removed: trunk/bin/TortoiseSVNaddin.dll
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/bin/Tortoi​seSVNaddin.dll?view=​auto&rev=5

Added: trunk/bin/TortoiseSV​NaddinBPL.bpl
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/bin/Tortoi​seSVNaddinBPL.bpl?vi​ew=auto&rev=6
====================​====================​====================​==================
Binary file. No diff available.

Added: trunk/bin/TortoiseSV​NaddinDLL.dll
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/bin/Tortoi​seSVNaddinDLL.dll?vi​ew=auto&rev=6
====================​====================​====================​==================
Binary file. No diff available.

Added: trunk/bin/oldOTA/Tor​toiseSVNaddin.dll
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/bin/oldOTA​/TortoiseSVNaddin.dl​l?view=auto&rev=​6
====================​====================​====================​==================
Binary file. No diff available.

Removed: trunk/src/TortoiseSVNaddin.dpr
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/src/Tortoi​seSVNaddin.dpr?view=​auto&rev=5

Added: trunk/src/TortoiseSV​NaddinBPL.dof
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/src/Tortoi​seSVNaddinBPL.dof?vi​ew=auto&rev=6
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/TortoiseSV​NaddinBPL.dof 2006-04-26 10:50:17-0700
@@ -0,0 +1,82 @@
+[Compiler]
+A=1
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=1
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinType​s=Windows;WinProcs=W​indows;DbiTypes=BDE;​DbiProcs=BDE;DbiErrs​=BDE;
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=TortoiseSVN add-in
+[Directories]
+OutputDir=
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=Vcl50;Vclx50
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=
+HostApplication=
+[Language]
+ActiveLang=
+ProjectLang=$00002C0A
+RootDir=
+[Version Info]
+IncludeVerInfo=1
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=11274
+CodePage=1252
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=

Added: trunk/src/TortoiseSV​NaddinBPL.dpk
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/src/Tortoi​seSVNaddinBPL.dpk?vi​ew=auto&rev=6
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/TortoiseSV​NaddinBPL.dpk 2006-04-26 10:50:17-0700
@@ -0,0 +1,35 @@
+package TortoiseSVNaddinBPL;
+
+{$R *.RES}
+{$ALIGN ON}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST ON}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'TortoiseSVN add-in'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ Vcl50;
+
+contains
+ tsvnWizard in 'tsvnWizard.pas';
+
+end.

Added: trunk/src/TortoiseSV​NaddinDLL.dof
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/src/Tortoi​seSVNaddinDLL.dof?vi​ew=auto&rev=6
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/TortoiseSV​NaddinDLL.dof 2006-04-26 10:50:17-0700
@@ -0,0 +1,82 @@
+[Compiler]
+A=1
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=1
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinType​s=Windows;WinProcs=W​indows;DbiTypes=BDE;​DbiProcs=BDE;DbiErrs​=BDE;
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=
+[Directories]
+OutputDir=
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=Vcl50
+Conditionals=DLL_MODE
+DebugSourceDirs=
+UsePackages=1
+[Parameters]
+RunParams=
+HostApplication=
+[Language]
+ActiveLang=
+ProjectLang=$00002C0A
+RootDir=
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=11274
+CodePage=1252
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=

Added: trunk/src/TortoiseSV​NaddinDLL.dpr
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/src/Tortoi​seSVNaddinDLL.dpr?vi​ew=auto&rev=6
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/TortoiseSV​NaddinDLL.dpr 2006-04-26 10:50:17-0700
@@ -0,0 +1,22 @@
+library TortoiseSVNaddinDLL;
+
+{ Important note about DLL memory management: ShareMem must be the
+ first unit in your library's USES clause AND your project's (select
+ Project-View Source) USES clause if your DLL exports any procedures or
+ functions that pass strings as parameters or function results. This
+ applies to all strings passed to and from your DLL--even those that
+ are nested in records and classes. ShareMem is the interface unit to
+ the BORLNDMM.DLL shared memory manager, which must be deployed along
+ with your DLL. To avoid using BORLNDMM.DLL, pass string information
+ using PChar or ShortString parameters. }
+
+uses
+ ShareMem,
+ SysUtils,
+ Classes,
+ tsvnWizard in 'tsvnWizard.pas';
+
+{$R *.RES}
+
+begin
+end.

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

Added: trunk/src/oldOTA/Tor​toiseSVNaddin.dof
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/src/oldOTA​/TortoiseSVNaddin.do​f?view=auto&rev=​6
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/oldOTA/Tor​toiseSVNaddin.dof 2006-04-26 10:50:17-0700
@@ -0,0 +1,82 @@
+[Compiler]
+A=1
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=1
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinType​s=Windows;WinProcs=W​indows;DbiTypes=BDE;​DbiProcs=BDE;DbiErrs​=BDE;
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=
+[Directories]
+OutputDir=
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=Vcl50;Vclx50
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=
+HostApplication=
+[Language]
+ActiveLang=
+ProjectLang=$00002C0A
+RootDir=
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=11274
+CodePage=1252
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=

Added: trunk/src/oldOTA/Tor​toiseSVNaddin.dpr
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/src/oldOTA​/TortoiseSVNaddin.dp​r?view=auto&rev=​6
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/oldOTA/Tor​toiseSVNaddin.dpr 2006-04-26 10:50:17-0700
@@ -0,0 +1,252 @@
+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_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 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_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;
+
+function TTortoiseSVN.GetVerb​State(Index: Integer): Word;
+begin
+ Result:= 0;
+ case index of
+ SVN_PROJECT_EXPLORER:
+ if ToolServices.GetProjectName <> '' then
+ Result:= vsEnabled;
+ 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_UPDATE:
+ if ToolServices.GetProjectName <> '' then
+ Result:= vsEnabled;
+ SVN_COMMIT:
+ if ToolServices.GetProjectName <> '' then
+ Result:= vsEnabled;
+ SVN_DIFF:
+ if ToolServices.GetCurrentFile <> '' then
+ Result:= vsEnabled;
+ SVN_REVERT:
+ if ToolServices.GetProjectName <> '' 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_PROJECT_EXPLORER:
+ ShellExecute( 0, 'open', pchar( ExtractFilePath(Tool​Services.GetProjectN​ame) ), '', '', SW_SHOWNORMAL );
+ 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_UPDATE:
+ if MessageDlg( 'All project files will be saved before update. Continue?', mtConfirmation, [mbYes, mbNo], 0 ) = mrYes then begin
+ ToolServices.SaveProject;
+ TSVNExec( '/command:update /rev /notempfile /path:' + AnsiQuotedStr( ExtractFilePath(Tool​Services.GetProjectN​ame), '"' ) );
+ end;
+ 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:
+ if ToolServices.SaveFile( ToolServices.GetCurrentFile ) then
+ TSVNExec( '/command:diff /notempfile /path:' + AnsiQuotedStr( ToolServices.GetCurrentFile, '"' ) );
+ SVN_REVERT:
+ TSVNExec( '/command:revert /notempfile /path:' + AnsiQuotedStr( ToolServices.GetProjectName, '"' ) );
+ 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/src/oldOTA/readme.txt
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/src/oldOTA​/readme.txt?view=aut​o&rev=6
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/oldOTA/readme.txt 2006-04-26 10:50:17-0700
@@ -0,0 +1,19 @@
+This project uses the "old" OpenTools API and the VcsIntf unit (supported by Delphi 7 or older).
+
+
+To compile you will need to add the following entry:
+
+ $(DELPHI)\source\toolsapi
+
+to the IDE library path.
+
+
+To install it you just need to copy the generated DLL to any directory of your choice.
+Then create the following registry key:
+
+ HKEY_CURRENT_USER\S​oftware\Borland\De​lphi\5.0\Version Control
+
+and add a string value named "VCSManager" containing the path of the DLL.
+
+If it's the case, replace "Delphi" with "C++Builder" and/or replace the version number.
+

Added: trunk/src/readme.txt
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/src/readme​.txt?view=auto&r​ev=6
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/readme.txt 2006-04-26 10:50:17-0700
@@ -0,0 +1,32 @@
+These projects use the "new" OpenTools API (available in Delphi 4 and newer).
+
+
+To compile you will need to add the following entry:
+
+ $(DELPHI)\source\toolsapi
+
+to the IDE library path.
+
+
+All the add-in functionality is in the source file "tsvnWizard.pas".
+This file references a conditional constant 'DLL_MODE' that enables to compile the
+add-in as BPL or as DLL at your own choice.
+
+
+"TortoiseSVNaddinBPL.dpk" is a Delphi 5 package. Just build and install it.
+(You may need to update it or create a new package for your particular IDE version).
+
+
+"TortoiseSVNaddinDLL.dpr" is a DLL project.
+To install it you need to copy the generated DLL to any directory of your choice
+and create the following registry key:
+
+ HKEY_CURRENT_USER\S​oftware\Borland\De​lphi\5.0\Experts
+
+and add a string value (any name is fine) containing the path of the DLL.
+
+If it's the case, replace "Delphi" with "C++Builder" and/or replace the version number.
+
+
+For more information on the Open Tools API please check http://www.gexperts.​org/opentools/ .
+

Added: trunk/src/tsvnWizard.pas
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/src/tsvnWi​zard.pas?view=auto​&rev=6
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/tsvnWizard.pas 2006-04-26 10:50:17-0700
@@ -0,0 +1,425 @@
+unit tsvnWizard;
+
+{$R 'icons.res'}
+
+interface
+
+uses ToolsAPI, SysUtils, Windows, Dialogs, Menus, Registry, ShellApi,
+ Classes, Controls, Graphics, ImgList, ExtCtrls;
+
+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 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 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;
+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);
+ if (bmp.Width = 16) and (bmp.height = 16) then
+ item.ImageIndex:= (BorlandIDEServices as INTAServices).AddMasked( bmp, clBlack );
+ bmp.free;
+
+ tsvnMenu.add( item );
+
+ actionList[i].menuitem:= item;
+ end;
+
+ mainMenu:= (BorlandIDEServices as INTAServices).MainMenu;
+ mainMenu.Items.Insert( mainMenu.Items.Count-1, tsvnMenu );
+end;
+
+destructor TTortoiseSVN.destroy;
+var i: integer;
+begin
+ if tsvnMenu <> nil then begin
+ tsvnMenu.free;
+ for i:= 0 to SVN_VERB_COUNT-1 do
+ actionList[i].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: TSVNAction;
+begin
+ action:= sender as TSVNAction;
+ action.menuitem.Enabled:= getVerbState( action.menuitem.tag ) = vsEnabled;
+end;
+
+procedure TTortoiseSVN.executeAction( sender: TObject );
+var action: TSVNAction;
+begin
+ action:= sender as TSVNAction;
+ executeVerb( action.menuitem.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.
+

Removed: trunk/www/TortoiseSVNaddin.dll
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/www/Tortoi​seSVNaddin.dll?view=​auto&rev=5

Removed: trunk/www/TortoiseSVNaddin.dpr
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/www/Tortoi​seSVNaddin.dpr?view=​auto&rev=5

Added: 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
====================​====================​====================​==================
Binary file. No diff available.

Added: 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
====================​====================​====================​==================
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=6&p1=trunk/ww​w/index.html&p2=​trunk/www/index.html​&r1=5&r2=6
====================​====================​====================​==================
--- trunk/www/index.html (original)
+++ trunk/www/index.html 2006-04-26 10:50:17-0700
@@ -27,12 +27,16 @@
 <li>Log (project)
 <li>Check modifications (project)
 <li>Add (project)
+<li>Update (project)
 <li>Commit (project)
 <li>Diff (current editor file)
+<li>Revert (project)
 <li>Repository browser
 <li>Settings
 <li>About
 </ul>
+and an extra command to open an explorer window with current project (to access advanced TortoiseSVN commands).
+
 
 <p>
 This add-in is just to facilitate working with TortoiseSVN without leaving the IDE. It's not meant to be a
@@ -64,14 +68,31 @@
 </div>
 
 
+
+<div class="h3">
+<h3>Usage tips - known issues</h3>
+
+<ul>
+<li>The "update" and "revert" commands are a bit tricky. You may need to reload your editor files
+after you use them.
+<li>All commands (except "diff") are project-based. This is to avoid over-populating the menu with
+two versions of every command (file and project).
+</ul>
+
+</div>
+
+
+
 <div class="h3">
 <h3>Binaries - installation</h3>
 
 <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.
+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.
+<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.
 
 <p>
  If it's the case, replace "Delphi" with "C++Builder" and/or replace the version number.
@@ -83,17 +104,10 @@
 <h3>Source code - compiling</h3>
 
 <p>
-<a href="TortoiseSVNadd​in.dpr">This</​a> is the Delphi library project (just one file) that generates
-the DLL.
+The source files are available in the file section under the "src" folder. Please see the readme file for details.
 
 <p>
-You will need to add the following entry:
-<pre>$(DELPH​I)\source\toolsapi​</pre>
-to the IDE library path.
-
-<p>
-The add-in uses the "old" Open Tools API, so it should compile in any Delphi version which supports it
-(I used Borland Delphi 5).
+The add-in uses the "new" Open Tools API, so it compiles in Delphi 4 and above (I used Borland Delphi 5).
 <br>
 It can be easily (at least I think so) converted to C++ and compiled in C++ Builder, if necessary.
 
@@ -101,11 +115,26 @@
 
 
 <div class="h3">
+<h3>Comments</h3>
+
+<p>
+The first add-in version (made with the "old" Open tools API) is still available just in case you want it.
+Check "src/oldOTA" and "bin/oldOTA" in the file section.
+<p>
+It is known to work in all Delphi versions up to 7.
+
+</div>
+
+
+<div class="h3">
 <h3>Feedback</h3>
 
 <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>

Modified: trunk/www/screenshot.gif
Url: http://delphiaddinfo​rtortoisesvn.tigris.​org/source/browse/de​lphiaddinfortortoise​svn/trunk/www/screen​shot.gif?view=diff​&rev=6&p1=trun​k/www/screenshot.gif​&p2=trunk/www/sc​reenshot.gif&r1=​5&r2=6
====================​====================​====================​==================
Binary files. No diff available.

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

Messages

Show all messages in topic

svn commit: r6 - trunk: bin bin/oldOTA src src/oldOTA www scdevelop Santiago C. 2006-04-26 10:50:17 PDT
Messages per page: