Index: svn/StudioHook.cls.xml
===================================================================
diff -u -r1539 -r1545
--- svn/StudioHook.cls.xml (.../StudioHook.cls.xml) (revision 1539)
+++ svn/StudioHook.cls.xml (.../StudioHook.cls.xml) (revision 1545)
@@ -196,7 +196,12 @@
set UpdateToVersion = $select(tMenu(2)["to head":"",1:0)
do ..SubversionUpdate(.InternalName,.Action,.Target,.Msg,.Reload,UpdateToVersion)
} elseif tMenu="getlatest" {
- do ..SubversionGetLatest()
+ #dim Feedback As %CharacterStream = ..svnHelper.SubversionGetLatest()
+ Do Feedback.Rewind()
+ While 'Feedback.AtEnd
+ {
+ Write Feedback.ReadLine(),!
+ }
} elseif tMenu="pre-commit" {
do ..SubversionPreCommit(.InternalName,.Action,.Target,.Msg,.Reload)
} elseif tMenu="check" {
@@ -259,7 +264,7 @@
if (tMenu(2) [ "status") do ..SubversionProjectStatus(.InternalName,.Action,.Target,.Msg,.Reload,.tCmd)
if (tMenu(2) [ "update") do ..SubversionProjectUpdate(.InternalName,.Action,.Target,.Msg,.Reload,.tCmd)
do tCmd.Execute()
- set tSC=..PostProcessing(tCmd)
+ Set ..IsDisconnected =..svnHelper.PostProcessing(tCmd)
]]>
@@ -561,95 +566,6 @@
]]>
-
-
-
-
-
-
-performs results display and post processing (if desired)
-pCmd:svn.Command
-%Status
-0 {
- If ..Debug write "SubCommand: ",pCmd.SubCommand," & Reload = "_+pCmd.Reload,!
- if pCmd.SubCommand="checkout" {
- // checkout returns full external name - with path
- set i="" set tCmdResult=pCmd.Results.GetNext(.i)
- If ..Debug w !,"tCmdResult:",tCmdResult," -> ",tCmdResult.Action , "---> ", pCmd.Results.GetNext(.i)
- while tCmdResult'=$$$NULLOREF {
- if tCmdResult.Action="A" {
- set tSC=..svnHelper.SVNImport(tCmdResult.ExternalName)
- w " *** Studio HINT: please make sure you add this file into your copy of project!",!
- } elseif tCmdResult.Action="D" {
- set tIName=..svnHelper.InternalName(tCmdResult.ExternalName)
- if ..svnHelper.HasToBeSynchronized(tIName) do ..svnHelper.DeleteCode(tIName)
- } else {
- // other actions here?
- }
- set tCmdResult=pCmd.Results.GetNext(.i)
- }
- // +DK 1.21
- } elseif (pCmd.SubCommand="update")&(pCmd.Reload) {
- // update returns only external name without path
- If ..Debug w !,"Updating.. ",pCmd.SubCommand
- set i="" set tCmdResult=pCmd.Results.GetNext(.i)
- while tCmdResult'=$$$NULLOREF {
- // +DK 1.21, DK 2.11 (G option)
-
- if (tCmdResult.Action="A")||(tCmdResult.Action="U")||(tCmdResult.Action="G") {
- set tFile=tCmdResult.ExternalName
- if $length(tFile) set tSC=..svnHelper.SVNImport(tFile)
- } elseif (tCmdResult.Action="D") {
- set tIName=..svnHelper.InternalName(tCmdResult.ExternalName)
- if ..svnHelper.HasToBeSynchronized(tIName) do ..svnHelper.DeleteCode(tIName)
- } elseif (tCmdResult.Action="S")||(tCmdResult.Action="C") {
- set $$$SVNGlobal("SourceControl",$$$PRODUCT,"HasConflicts")=1
- set tIName=..svnHelper.InternalName(tCmdResult.ExternalName)
- do ..svnHelper.Failed.Insert(tIName_" (Conflict)")
- }
- set tCmdResult=pCmd.Results.GetNext(.i)
- }
- } else {
-
- // other commands?
- }
- // -DK 1.21
- }
-
- // Compile wat nodig is (sourcecode die via importcode is ingeladen
-
- if (..svnHelper.ExecCompile && ( ..svnHelper.Failed.Count() = 0 )) {
- Do ..svnHelper.CompileImportedSourceCode()
- }
-
- set ..IsDisconnected=pCmd.IsDisconnected
- // clean-up
- if 'pCmd.Log set tSC=pCmd.%DeleteId(pCmd.%Id())
-
- quit tSC
-]]>
-
-
@@ -1039,7 +873,7 @@
set tCmd.File=..svnHelper.ExternalName(InternalName,$$$FULLPATH)
do tCmd.Execute()
set tIsDisconnected=..IsDisconnected
- set tSC=..PostProcessing(tCmd) // postprocessing may reset IsDisconnected!
+ set tSC=..svnHelper.PostProcessing(tCmd) // postprocessing may reset IsDisconnected!
set ..IsDisconnected=tIsDisconnected
if '..IsDisconnected {
// FMA no need for a SVN tutorial all the time...
@@ -1210,7 +1044,9 @@
set tCmd.SubCommand="commit"
do tCmd.Options.SetAt("deleted by user","-m")
do tCmd.Execute()
- if 'isDirectory do ..PostProcessing(tCmd)
+ if 'isDirectory {
+ Set ..IsDisconnected = ..svnHelper.PostProcessing(tCmd)
+ }
} else {
write !," *** Studio: please commit to propagate deletion to repository. ***"
}
Index: svn/Helper.cls.xml
===================================================================
diff -u -r1538 -r1545
--- svn/Helper.cls.xml (.../Helper.cls.xml) (revision 1538)
+++ svn/Helper.cls.xml (.../Helper.cls.xml) (revision 1545)
@@ -2,7 +2,7 @@
-svn,%occErrors
+svn,%occErrors,vhLib.Macro
1
%RegisteredObject
@@ -90,6 +90,79 @@
1
+
+%Boolean
+1
+1
+
+
+
+%GlobalCharacterStream
+
+
+
+1
+
+
+
+
+1
+0){
+ Do SvnHelper.MailGefaaldeSvnCommands("GetLatest")
+ }Else{
+ Do SvnHelper.VoerUitUnitTesten()
+ }
+ }Catch E{
+ #dim Exception As TECH.Exceptions.Exception = ##class(TECH.ExceptionHandler).Catch()
+ #dim From As %String = $$$SystemMail($$$Server_" - Subversion")
+ #dim MailTo As %String = $listbuild($$$SVNGlobal("SourceControl","SVN","MailWhenFailed"))
+ Do SendMiniMailForced^vhLib.Mail(From,MailTo,"Subversion GetLatest() failed on ["_$$$Server_"]",Exception.ToString(),0)
+ Do ##class(TECH.ExceptionHandler).Throw(Exception)
+ }
+]]>
+
+
+
+1
+
+
+
+
+Actie:%String
+ 0
+ {
+ Set FeedbackStream = ##class(%GlobalCharacterStream).%New()
+ Do FeedbackStream.WriteLine("Server : "_##class(TECH.Context.RuntimeContext).Instance().GeefServerNaam())
+ Do FeedbackStream.WriteLine("Namespace : "_##class(TECH.Context.RuntimeContext).Instance().GeefNamespace())
+ Do FeedbackStream.WriteLine()
+ Do FeedbackStream.CopyFrom(..GeefFailedCharacterStream(Actie))
+ #dim From As %String = $$$SystemMail($$$Server_" - Subversion")
+ #dim MailTo As %String = $listbuild($$$SVNGlobal("SourceControl","SVN","MailWhenFailed"))
+ Do SendMiniMailForced^vhLib.Mail(From,MailTo,"Subversion failed on ["_$$$Server_"]",FeedbackStream,1)
+ Do ..Failed.Clear()
+ }
+]]>
+
+
!!!! Path and WorkSpacePath are case sensitive
@@ -187,7 +260,6 @@
Filename:%String
-%Status
@@ -1143,6 +1214,8 @@
set $$$SVNGlobal("SourceControl","SVN","CacheFileBridgeActive")=1
+ Set $$$SVNGlobal("SourceControl","SVN","MailWhenFailed") = "ict_development@vahoecke.be"
+
quit
]]>
@@ -1160,18 +1233,26 @@
+
+
+
+
+Actie:%String=""
+%GlobalCharacterStream
@@ -1190,6 +1271,7 @@
1
%Status
+
+
+%CharacterStream
+
+
+
+
+1
+
+
+
+
+
+performs results display and post processing (if desired)
+pCmd:svn.Command
+%CharacterStream
+0 {
+ If ..Debug Do ..Feedback.WriteLine("SubCommand: "_pCmd.SubCommand_" & Reload = "_+pCmd.Reload)
+ if pCmd.SubCommand="checkout" {
+ // checkout returns full external name - with path
+ set i="" set tCmdResult=pCmd.Results.GetNext(.i)
+ If ..Debug Do ..Feedback.WriteLine("tCmdResult:"_tCmdResult_" -> "_tCmdResult.Action_"---> "_pCmd.Results.GetNext(.i))
+ while tCmdResult'=$$$NULLOREF {
+ if tCmdResult.Action="A" {
+ Do ..SVNImport(tCmdResult.ExternalName)
+ Do ..Feedback.WriteLine(" *** Studio HINT: please make sure you add this file into your copy of project!")
+ } elseif tCmdResult.Action="D" {
+ set tIName=..InternalName(tCmdResult.ExternalName)
+ if ..HasToBeSynchronized(tIName) do ..DeleteCode(tIName)
+ } else {
+ // other actions here?
+ }
+ set tCmdResult=pCmd.Results.GetNext(.i)
+ }
+ // +DK 1.21
+ } elseif (pCmd.SubCommand="update")&(pCmd.Reload) {
+ // update returns only external name without path
+ If ..Debug Do ..Feedback.WriteLine("Updating.. "_pCmd.SubCommand)
+ set i="" set tCmdResult=pCmd.Results.GetNext(.i)
+ while tCmdResult'=$$$NULLOREF {
+ // +DK 1.21, DK 2.11 (G option)
+
+ if (tCmdResult.Action="A")||(tCmdResult.Action="U")||(tCmdResult.Action="G") {
+ set tFile=tCmdResult.ExternalName
+ if $length(tFile) Do ..SVNImport(tFile)
+ } elseif (tCmdResult.Action="D") {
+ set tIName=..InternalName(tCmdResult.ExternalName)
+ if ..HasToBeSynchronized(tIName) do ..DeleteCode(tIName)
+ } elseif (tCmdResult.Action="S")||(tCmdResult.Action="C") {
+ set $$$SVNGlobal("SourceControl",$$$PRODUCT,"HasConflicts")=1
+ set tIName=..InternalName(tCmdResult.ExternalName)
+ do ..Failed.Insert(tIName_" (Conflict)")
+ }
+ set tCmdResult=pCmd.Results.GetNext(.i)
+ }
+ } else {
+
+ // other commands?
+ }
+ // -DK 1.21
+ }
+
+ // Compile wat nodig is (sourcecode die via importcode is ingeladen
+
+ if (..ExecCompile && ( ..Failed.Count() = 0 )) {
+ Do ..CompileImportedSourceCode()
+ }
+
+ #dim IsDisconnected As %Boolean =pCmd.IsDisconnected
+ // clean-up
+ if 'pCmd.Log set tSC=pCmd.%DeleteId(pCmd.%Id())
+
+ quit IsDisconnected
+]]>
+