Login | Register
My pages Projects Community openCollabNet

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

delphiaddinfortortoisesvn
Discussion topic

Hide all messages in topic

All messages in topic

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

Author otto_noll
Full name Otto Noll
Date 2009-01-05 05:37:24 PST
Message Author: otto_noll
Date: 2009-01-05 05:37:23-0800
New Revision: 35

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

Log:
Add "Blame" to context menu

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​=35&r1=34&r2​=35
====================​====================​====================​==================
--- branches/SOPTIM/src/​tsvnWizard.pas (original)
+++ branches/SOPTIM/src/​tsvnWizard.pas 2009-01-05 05:37:23-0800
@@ -19,6 +19,7 @@
         SVN_SETTINGS,
         SVN_ABOUT,
         SVN_ADD,
+ SVN_BLAME,
         SVN_DIFF
     );
 type TTortoiseSVN = class(TNotifierObject, IOTANotifier, IOTAWizard)
@@ -236,12 +237,14 @@
     submenu := popup.FindComponent(​'TortoiseSVN_popmenu​') as TMenuItem;
     files:= TStringList.create;
     (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_DIFF)​)) as TMenuItem).Enabled := false;
+ (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_BLAME​))) as TMenuItem).Enabled := false;
     (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_ADD))​) as TMenuItem).Enabled := false;
     GetCurrentModuleFile​List(files);
     if files.Count > 0 then
     begin
       (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_DIFF)​)) as TMenuItem).Enabled := true;
       (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_ADD))​) as TMenuItem).Enabled := true;
+ (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_BLAME​))) as TMenuItem).Enabled := true;
     end;
 end;
 
@@ -282,6 +285,8 @@
             Result:= 'about';
         SVN_ADD:
             Result:= 'add';
+ SVN_BLAME:
+ Result:= 'blame';
     end;
 end;
 
@@ -312,6 +317,8 @@
             Result:= '&About...';
         SVN_ADD:
             Result:= 'Add...';
+ SVN_BLAME:
+ Result:= 'Blame...';
     end;
 end;
 
@@ -335,6 +342,8 @@
                 Result:= vsEnabled;
         SVN_ADD:
             ;// this verb state is updated by TTortoiseSVN.CheckOn_Popup
+ SVN_BLAME:
+ ;// this verb state is updated by TTortoiseSVN.CheckOn_Popup
         SVN_UPDATE_TO_SANDBOX:
             if GetCurrentProject <> nil then
                 Result:= vsEnabled;
@@ -352,6 +361,7 @@
             Result:= vsEnabled;
         SVN_ABOUT:
             Result:= vsEnabled;
+
     end;
 end;
 
@@ -391,6 +401,14 @@
                 end;
               end;
             end;
+ SVN_BLAME:
+ if project <> nil then
+ begin
+ if GetCurrentModuleFile​List(TStringList.cre​ate).Count > 1 then
+ TSVNExec( '/command:blame /notempfile /path:' + AnsiQuotedStr( ExtractFileName(GetC​urrentModuleFileList​(TStringList.create)​[0] ), '"' ) )
+ else if GetCurrentModuleFile​List(TStringList.cre​ate).Count = 1 then
+ TSVNExec( '/command:blame /notempfile /path:' + AnsiQuotedStr(GetCur​rentModuleFileList(T​StringList.create)[0​], '"' ) );
+ end;
         SVN_UPDATE_TO_SANDBOX:
             if project <> nil then
                 if MessageDlg( 'All project files will be saved before update. Continue?', mtConfirmation, [mbYes, mbNo], 0 ) = mrYes then begin
Messages per page: