Login | Register
My pages Projects Community openCollabNet

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

delphiaddinfortortoisesvn
Discussion topic

Hide all messages in topic

All messages in topic

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

Author otto_noll
Full name Otto Noll
Date 2009-01-09 08:08:57 PST
Message Author: otto_noll
Date: 2009-01-09 08:08:56-0800
New Revision: 58

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

Log:
Add "Update" 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​=58&r1=57&r2​=58
====================​====================​====================​==================
--- branches/SOPTIM/src/​tsvnWizard.pas (original)
+++ branches/SOPTIM/src/​tsvnWizard.pas 2009-01-09 08:08:56-0800
@@ -34,7 +34,8 @@
         SVN_REVERT,
         SVN_STATUS,
         SVN_TAG,
- SVN_UNLOCK
+ SVN_UNLOCK,
+ SVN_UPDATE
     );
 type TTortoiseSVN = class(TNotifierObject, IOTANotifier, IOTAWizard)
 private
@@ -241,7 +242,7 @@
           MItem.Visible := True;
           PMenu.Items.Add(MItem);
           //Creating Submenu of the Popupmenu
- for J:= SVN_Add to SVN_UNLOCK do begin
+ for J:= SVN_Add to SVN_UPDATE do begin
             bmp:= TBitmap.create;
             try
               bmp.LoadFromResourceName( HInstance, getBitmapName(J) );
@@ -290,6 +291,7 @@
     (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_STATU​S))) as TMenuItem).Enabled := false;
     (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_TAG))​) as TMenuItem).Enabled := false;
     (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_UNLOC​K))) as TMenuItem).Enabled := false;
+ (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_UPDAT​E))) as TMenuItem).Enabled := false;
     GetCurrentModuleFile​List(files);
     if files.Count > 0 then
     begin
@@ -309,6 +311,7 @@
       (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_STATU​S))) as TMenuItem).Enabled := true;
       (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_TAG))​) as TMenuItem).Enabled := true;
       (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_UNLOC​K))) as TMenuItem).Enabled := true;
+ (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_UPDAT​E))) as TMenuItem).Enabled := true;
     end;
 end;
 
@@ -377,6 +380,8 @@
             Result:= 'tag';
         SVN_UNLOCK:
             Result:= 'unlock';
+ SVN_UPDATE:
+ Result:= 'update';
     end;
 end;
 
@@ -437,6 +442,8 @@
             Result:= 'Tag...';
         SVN_UNLOCK:
             Result:= 'Unlock...';
+ SVN_UPDATE:
+ Result:= 'Update...';
     end;
 end;
 
@@ -490,6 +497,8 @@
             ;// this verb state is updated by TTortoiseSVN.CheckOn_Popup
         SVN_TAG:
             ;// this verb state is updated by TTortoiseSVN.CheckOn_Popup
+ SVN_UPDATE:
+ ;// this verb state is updated by TTortoiseSVN.CheckOn_Popup
         SVN_UPDATE_TO_SANDBOX:
             if GetCurrentProject <> nil then
                 Result:= vsEnabled;
@@ -643,7 +652,16 @@
                   TSVNExec( '/command:unlock /notempfile /path:' + AnsiQuotedStr( ExtractFileName(GetC​urrentModuleFileList​(TStringList.create)​[0] ), '"' ) )
               else if GetCurrentModuleFile​List(TStringList.cre​ate).Count = 1 then
                   TSVNExec( '/command:unlock /notempfile /path:' + AnsiQuotedStr(GetCur​rentModuleFileList(T​StringList.create)[0​], '"' ) );
- (BorlandIDEServices as IOTAActionServices).​ReloadFile(GetCurren​tModuleFileList(TStr​ingList.create)[0]);​
+ (BorlandIDEServices as IOTAActionServices).​ReloadFile(GetCurren​tModuleFileList(TStr​ingList.create)[0]);​
+ end;
+ SVN_UPDATE:
+ if project <> nil then
+ begin
+ if GetCurrentModuleFile​List(TStringList.cre​ate).Count > 1 then
+ TSVNExec( '/command:update /notempfile /path:' + AnsiQuotedStr( ExtractFileName(GetC​urrentModuleFileList​(TStringList.create)​[0] ), '"' ) )
+ else if GetCurrentModuleFile​List(TStringList.cre​ate).Count = 1 then
+ TSVNExec( '/command:update /notempfile /path:' + AnsiQuotedStr(GetCur​rentModuleFileList(T​StringList.create)[0​], '"' ) );
+ (BorlandIDEServices as IOTAActionServices).​ReloadFile(GetCurren​tModuleFileList(TStr​ingList.create)[0]);​
             end;
         SVN_GRAPH:
             if project <> nil then
Messages per page: