2011-06-17 12:18 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/setup.ui
* contrib/hbide/ideedit.prg
* contrib/hbide/ideeditor.prg
* contrib/hbide/idesaveload.prg
+ Implemented: integration with Microsoft Visual SourceSafe for
version control. Current implementation only offers, Checkin,
Checkout, Undocheckout, Get Latest Version. Diff is not funtional
as it should be.
; It is assumed that VSS is already installed on your system
and Project(s) and files are already setup for your sources.
The interface to carry-out these operations is right-click on
editing instance and choosing an action via "Source Control - VSS"
sub-menu. Your input will be highly valuable.
; Probably this will be my last commit before release 3.0.0.
This commit is contained in:
@@ -16,6 +16,23 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2011-06-17 12:18 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbide/setup.ui
|
||||
* contrib/hbide/ideedit.prg
|
||||
* contrib/hbide/ideeditor.prg
|
||||
* contrib/hbide/idesaveload.prg
|
||||
+ Implemented: integration with Microsoft Visual SourceSafe for
|
||||
version control. Current implementation only offers, Checkin,
|
||||
Checkout, Undocheckout, Get Latest Version. Diff is not funtional
|
||||
as it should be.
|
||||
; It is assumed that VSS is already installed on your system
|
||||
and Project(s) and files are already setup for your sources.
|
||||
The interface to carry-out these operations is right-click on
|
||||
editing instance and choosing an action via "Source Control - VSS"
|
||||
sub-menu. Your input will be highly valuable.
|
||||
|
||||
; Probably this will be my last commit before release 3.0.0.
|
||||
|
||||
2011-06-17 20:27 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbgtinfo.ch
|
||||
* harbour/src/rtl/gtwvt/gtwvt.c
|
||||
|
||||
@@ -515,6 +515,21 @@ METHOD IdeEdit:execEvent( nMode, oEdit, p, p1 )
|
||||
::redo()
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE "Diff"
|
||||
::oEditor:vssExecute( "Diff" )
|
||||
EXIT
|
||||
CASE "Get Latest Version"
|
||||
::oEditor:vssExecute( "Get" )
|
||||
EXIT
|
||||
CASE "Checkin"
|
||||
::oEditor:vssExecute( "Checkin" )
|
||||
EXIT
|
||||
CASE "Undo Checkout"
|
||||
::oEditor:vssExecute( "Undocheckout" )
|
||||
EXIT
|
||||
CASE "Checkout"
|
||||
::oEditor:vssExecute( "Checkout" )
|
||||
EXIT
|
||||
ENDSWITCH
|
||||
EXIT
|
||||
|
||||
|
||||
@@ -81,6 +81,7 @@ CLASS IdeEditsManager INHERIT IdeObject
|
||||
|
||||
DATA qContextMenu
|
||||
DATA qContextSub
|
||||
DATA qSrcControlSub
|
||||
DATA aActions INIT {}
|
||||
DATA aProtos INIT {}
|
||||
|
||||
@@ -251,6 +252,17 @@ METHOD IdeEditsManager:create( oIde )
|
||||
aadd( ::aActions, { "Close Split" , ::qContextSub:addAction( "Close Split Window" ) } )
|
||||
aadd( ::aActions, { "" , ::qContextSub:addSeparator() } )
|
||||
aadd( ::aActions, { "Format" , ::qContextMenu:addAction( ::oFormatDock:oWidget:toggleViewAction() ) } )
|
||||
//
|
||||
::qSrcControlSub := ::qContextMenu:addMenu( "Source Control - VSS" )
|
||||
aadd( ::aActions, { "Get" , ::qSrcControlSub:addAction( "Get Latest Version" ) } )
|
||||
aadd( ::aActions, { "" , ::qSrcControlSub:addSeparator() } )
|
||||
aadd( ::aActions, { "Checkout" , ::qSrcControlSub:addAction( "Checkout" ) } )
|
||||
aadd( ::aActions, { "UndoCheckout" , ::qSrcControlSub:addAction( "Undo Checkout" ) } )
|
||||
aadd( ::aActions, { "" , ::qSrcControlSub:addSeparator() } )
|
||||
aadd( ::aActions, { "Checkin" , ::qSrcControlSub:addAction( "Checkin" ) } )
|
||||
aadd( ::aActions, { "" , ::qSrcControlSub:addSeparator() } )
|
||||
aadd( ::aActions, { "Diff" , ::qSrcControlSub:addAction( "Diff" ) } )
|
||||
|
||||
|
||||
/* Define code completer */
|
||||
::oIde:qProtoList := QStringList()
|
||||
@@ -1255,6 +1267,7 @@ CLASS IdeEditor INHERIT IdeObject
|
||||
METHOD prepareBufferToLoad( cBuffer )
|
||||
METHOD prepareBufferToSave( cBuffer )
|
||||
METHOD reload()
|
||||
METHOD vssExecute( cAction )
|
||||
|
||||
ENDCLASS
|
||||
|
||||
@@ -1534,6 +1547,42 @@ METHOD IdeEditor:prepareBufferToLoad( cBuffer )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeEditor:vssExecute( cAction )
|
||||
LOCAL cPath, cFile, cExt, cCmd, cC, oProcess, cBatch, cOutput := ""
|
||||
LOCAL aCmd := {}
|
||||
|
||||
IF ! empty( ::oINI:cVSSExe ) .AND. ! empty( ::oINI:cVSSDatabase )
|
||||
hb_fNameSplit( ::sourceFile, @cPath, @cFile, @cExt )
|
||||
|
||||
aadd( aCmd, "SET ssdir=" + hbide_pathToOSPath( ::oINI:cVSSDatabase ) )
|
||||
aadd( aCmd, "SET Force_dir=YES" )
|
||||
IF cAction == "Checkin"
|
||||
aadd( aCmd, "call " + '"' + ::oINI:cVSSExe + '/ss.exe' + '" ' + cAction + " " + cFile + cExt + " -ChbIDE" )
|
||||
ELSEIF cAction == "Checkout"
|
||||
aadd( aCmd, "call " + '"' + ::oINI:cVSSExe + '/ss.exe' + '" ' + cAction + " " + cFile + cExt + " -C-" )
|
||||
ELSE
|
||||
aadd( aCmd, "call " + '"' + ::oINI:cVSSExe + '/ss.exe' + '" ' + cAction + " " + cFile + cExt )
|
||||
ENDIF
|
||||
|
||||
cBatch := hbide_getShellCommandsTempFile( aCmd )
|
||||
|
||||
cCmd := hbide_getShellCommand()
|
||||
cC := iif( hbide_getOS() == "nix", "", "/C " )
|
||||
|
||||
oProcess := HbpProcess():new()
|
||||
//
|
||||
oProcess:output := {|cOut| cOutput += cOut }
|
||||
oProcess:finished := {|| iif( !empty( cOutput ), ::reload(), NIL ), MsgBox( cOutput ) }
|
||||
oProcess:workingPath := hbide_pathToOSPath( cPath )
|
||||
|
||||
oProcess:addArg( cC + cBatch )
|
||||
oProcess:start( cCmd )
|
||||
ENDIF
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeEditor:reload()
|
||||
LOCAL nAttr, nPos, qCursor, nHPos, nVPos
|
||||
|
||||
|
||||
@@ -108,6 +108,9 @@ CLASS IdeINI INHERIT IdeObject
|
||||
DATA cPathSnippets INIT ""
|
||||
DATA cPathThemes INIT ""
|
||||
|
||||
DATA cVSSExe INIT ""
|
||||
DATA cVSSDatabase INIT ""
|
||||
|
||||
DATA cCurrentProject INIT ""
|
||||
DATA cCurrentTheme INIT ""
|
||||
DATA cCurrentCodec INIT ""
|
||||
@@ -406,6 +409,8 @@ METHOD IdeINI:save( cHbideIni )
|
||||
aadd( txt_, "ShowHideDocks" + "=" + iif( ::lShowHideDocks , "YES", "NO" ) )
|
||||
aadd( txt_, "ChangeLog" + "=" + ::cChangeLog )
|
||||
aadd( txt_, "UserChangeLog" + "=" + ::cUserChangeLog )
|
||||
aadd( txt_, "VSSExe" + "=" + ::cVSSExe )
|
||||
aadd( txt_, "VSSDatabase" + "=" + ::cVSSDatabase )
|
||||
|
||||
aadd( txt_, "" )
|
||||
aadd( txt_, "[PROJECTS]" )
|
||||
@@ -724,6 +729,10 @@ METHOD IdeINI:load( cHbideIni )
|
||||
CASE "ShowHideDocks" ; ::lShowHideDocks := !( cVal == "NO" ) ; EXIT
|
||||
CASE "ChangeLog" ; ::cChangeLog := cVal ; EXIT
|
||||
CASE "UserChangeLog" ; ::cUserChangeLog := cVal ; EXIT
|
||||
//
|
||||
CASE "VSSExe" ; ::cVSSExe := cVal ; EXIT
|
||||
CASE "VSSDatabase" ; ::cVSSDatabase := cVal ; EXIT
|
||||
|
||||
|
||||
ENDSWITCH
|
||||
ENDIF
|
||||
@@ -1049,7 +1058,7 @@ CLASS IdeSetup INHERIT IdeObject
|
||||
DATA oINI
|
||||
DATA qOrgPalette
|
||||
DATA aItems INIT {}
|
||||
DATA aTree INIT { "General", "Selections", "Font", "Paths", "Variables", "Dictionaries", "Themes", "Formatting" }
|
||||
DATA aTree INIT { "General", "Selections", "Font", "Paths", "Variables", "Dictionaries", "Themes", "Formatting", "VSS" }
|
||||
DATA aStyles INIT { "cleanlooks", "windows", "windowsxp", ;
|
||||
"windowsvista", "cde", "motif", "plastique", "macintosh" }
|
||||
DATA aKeyItems INIT {}
|
||||
@@ -1161,6 +1170,10 @@ METHOD IdeSetup:setIcons()
|
||||
/* Dictionaries */
|
||||
::oUI:q_buttonDictPath : setIcon( hbide_image( "open" ) )
|
||||
|
||||
/* VSS */
|
||||
::oUI:q_buttonVSSExe : setIcon( hbide_image( "open" ) )
|
||||
::oUI:q_buttonVSSDatabase : setIcon( hbide_image( "open" ) )
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
@@ -1232,6 +1245,9 @@ METHOD IdeSetup:disConnectSlots()
|
||||
::oUI:q_comboRightTabPos :disconnect( "currentIndexChanged(int)" )
|
||||
::oUI:q_comboBottomTabPos :disconnect( "currentIndexChanged(int)" )
|
||||
|
||||
::oUI:q_buttonVSSExe :disconnect( "clicked()" )
|
||||
::oUI:q_buttonVSSDatabase :disconnect( "clicked()" )
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
@@ -1302,6 +1318,9 @@ METHOD IdeSetup:connectSlots()
|
||||
::oUI:q_comboRightTabPos :connect( "currentIndexChanged(int)", {|i| ::execEvent( "comboRightTabPos_currentIndexChanged" , i ) } )
|
||||
::oUI:q_comboBottomTabPos :connect( "currentIndexChanged(int)", {|i| ::execEvent( "comboBottomTabPos_currentIndexChanged", i ) } )
|
||||
|
||||
::oUI:q_buttonVSSExe :connect( "clicked()" , {| | ::execEvent( "buttonVSSExe_clicked" ) } )
|
||||
::oUI:q_buttonVSSDatabase :connect( "clicked()" , {| | ::execEvent( "buttonVSSDatabase_clicked" ) } )
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
@@ -1452,6 +1471,9 @@ METHOD IdeSetup:populate()
|
||||
::oUI:q_comboRightTabPos:setCurrentIndex( ::oINI:nDocksRightTabPos )
|
||||
::oUI:q_comboBottomTabPos:setCurrentIndex( ::oINI:nDocksBottomTabPos )
|
||||
|
||||
::oUI:q_editVSSExe:setText( ::oINI:cVSSExe )
|
||||
::oUI:q_editVSSDatabase:setText( ::oINI:cVSSDatabase )
|
||||
|
||||
::connectSlots()
|
||||
|
||||
::pushThemesData()
|
||||
@@ -1764,6 +1786,18 @@ METHOD IdeSetup:execEvent( cEvent, p, p1 )
|
||||
|
||||
CASE "buttonIni_clicked"
|
||||
EXIT
|
||||
CASE "buttonVSSExe_clicked"
|
||||
IF ! empty( cPath := hbide_fetchADir( ::oDlg, "Visual SourceSafe Installation Path", ::oINI:cVSSExe ) )
|
||||
::oINI:cVSSExe := cPath
|
||||
::oUI:q_editVSSExe:setText( hbide_pathStripLastSlash( cPath ) )
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE "buttonVSSDatabase_clicked"
|
||||
IF ! empty( cPath := hbide_fetchADir( ::oDlg, "Visual SourceSafe Database Path", ::oINI:cVSSDatabase ) )
|
||||
::oINI:cVSSDatabase := cPath
|
||||
::oUI:q_editVSSDatabase:setText( hbide_pathStripLastSlash( cPath ) )
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE "buttonHrbRoot_clicked"
|
||||
IF ! empty( cPath := hbide_fetchADir( ::oDlg, "Harbour's Root Path", ::oINI:cPathHrbRoot ) )
|
||||
::oINI:cPathHrbRoot := cPath
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>8</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="pageGeneral">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
@@ -3105,6 +3105,99 @@
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="pageRepos">
|
||||
<widget class="QGroupBox" name="groupBox_26">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>349</width>
|
||||
<height>365</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_35">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>12</x>
|
||||
<y>12</y>
|
||||
<width>61</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Executable:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="editVSSExe">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>76</x>
|
||||
<y>12</y>
|
||||
<width>225</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Path to VSS executable - ss.exe</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QToolButton" name="buttonVSSExe">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>312</x>
|
||||
<y>12</y>
|
||||
<width>25</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_36">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>12</x>
|
||||
<y>52</y>
|
||||
<width>61</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Database:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="editVSSDatabase">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>76</x>
|
||||
<y>48</y>
|
||||
<width>225</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Path to VSS database where <srcsave.ini> resides</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QToolButton" name="buttonVSSDatabase">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>312</x>
|
||||
<y>48</y>
|
||||
<width>25</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="buttonClose">
|
||||
<property name="geometry">
|
||||
|
||||
Reference in New Issue
Block a user