Login | Register
My pages Projects Community openCollabNet

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

delphiaddinfortortoisesvn
Discussion topic

Back to topic list

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

Author otto_noll
Full name Otto Noll
Date 2009-01-09 07:48:55 PST
Message Author: otto_noll
Date: 2009-01-09 07:48:54-0800
New Revision: 57

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

Log:
Add "Unlock" 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​=57&r1=56&r2​=57
====================​====================​====================​==================
--- branches/SOPTIM/src/​tsvnWizard.pas (original)
+++ branches/SOPTIM/src/​tsvnWizard.pas 2009-01-09 07:48:54-0800
@@ -33,7 +33,8 @@
         SVN_RESOLVE,
         SVN_REVERT,
         SVN_STATUS,
- SVN_TAG
+ SVN_TAG,
+ SVN_UNLOCK
     );
 type TTortoiseSVN = class(TNotifierObject, IOTANotifier, IOTAWizard)
 private
@@ -240,7 +241,7 @@
           MItem.Visible := True;
           PMenu.Items.Add(MItem);
           //Creating Submenu of the Popupmenu
- for J:= SVN_Add to SVN_TAG do begin
+ for J:= SVN_Add to SVN_UNLOCK do begin
             bmp:= TBitmap.create;
             try
               bmp.LoadFromResourceName( HInstance, getBitmapName(J) );
@@ -288,6 +289,7 @@
     (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_REVER​T))) as TMenuItem).Enabled := false;
     (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;
     GetCurrentModuleFile​List(files);
     if files.Count > 0 then
     begin
@@ -306,6 +308,7 @@
       (submenu.FindCompone​nt('ESVNFeature_'+in​ttostr(ord(SVN_REVER​T))) as TMenuItem).Enabled := true;
       (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;
     end;
 end;
 
@@ -372,6 +375,8 @@
             Result:= 'status';
         SVN_TAG:
             Result:= 'tag';
+ SVN_UNLOCK:
+ Result:= 'unlock';
     end;
 end;
 
@@ -430,6 +435,8 @@
             Result:= 'Status...';
         SVN_TAG:
             Result:= 'Tag...';
+ SVN_UNLOCK:
+ Result:= 'Unlock...';
     end;
 end;
 
@@ -479,6 +486,8 @@
             ;// this verb state is updated by TTortoiseSVN.CheckOn_Popup
         SVN_STATUS:
             ;// this verb state is updated by TTortoiseSVN.CheckOn_Popup
+ SVN_UNLOCK:
+ ;// this verb state is updated by TTortoiseSVN.CheckOn_Popup
         SVN_TAG:
             ;// this verb state is updated by TTortoiseSVN.CheckOn_Popup
         SVN_UPDATE_TO_SANDBOX:
@@ -627,6 +636,15 @@
                   (BorlandIDEServices as IOTAActionServices).​ReloadFile(GetCurren​tModuleFileList(TStr​ingList.create)[0]);​
               end;
             end;
+ SVN_UNLOCK:
+ if project <> nil then
+ begin
+ if GetCurrentModuleFile​List(TStringList.cre​ate).Count > 1 then
+ 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]);​
+ end;
         SVN_GRAPH:
             if project <> nil then
             begin

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

Messages

Show all messages in topic

svn commit: r57 - branches/SOPTIM/src/tsvnWizard.pas otto_noll Otto Noll 2009-01-09 07:48:55 PST
Messages per page: