Index: svn/Command.cls.xml =================================================================== diff -u -r1515 -r1518 --- svn/Command.cls.xml (.../Command.cls.xml) (revision 1515) +++ svn/Command.cls.xml (.../Command.cls.xml) (revision 1518) @@ -152,6 +152,8 @@ for ii=0,1 set tCmd(ii)=$s($$$ISWINDOWS:"cmd /C ",$$$ISUNIX:"bash -c ",1:"?") set:..File="..xml" ..File="" set tSC=..%Save() + if ..File = "" set ..File = ..LocalWorkspace set tSC=..%Save() + // +DK 2.16 // this is windows only commands concatenation f ii=0,1 set tCmd(ii)=tCmd(ii)_""""_..Command Index: svn/StudioHook.cls.xml =================================================================== diff -u -r1515 -r1518 --- svn/StudioHook.cls.xml (.../StudioHook.cls.xml) (revision 1515) +++ svn/StudioHook.cls.xml (.../StudioHook.cls.xml) (revision 1518) @@ -180,7 +180,8 @@ do ..SubversionBranchDelete(.InternalName,.Action,.Target,.Msg,.Reload) } } elseif tMenu="update" { - do ..SubversionUpdate(.InternalName,.Action,.Target,.Msg,.Reload) + set UpdateToVersion = $select(tMenu(2)["to head":"",1:0) + do ..SubversionUpdate(.InternalName,.Action,.Target,.Msg,.Reload,UpdateToVersion) } elseif tMenu="pre-commit" { do ..SubversionPreCommit(.InternalName,.Action,.Target,.Msg,.Reload) } elseif tMenu="check" { @@ -277,7 +278,7 @@ - + pCmd:svn.Command,InternalName:%String %Status 1 ?23,tCmdDelim write $p(pCmd.CommandString,tCmdDelim,i),! - // write !," *** Studio: result:" - //} + do tResult.Rewind() while tResult.AtEnd=0 { Set line = tResult.ReadLine() write line,! - - //restored !! JBL if ($Extract($ZCVT(line,"U"),1,$length("Restored"))=$ZCVT("Restored","U")) - { - Set File = $PIECE(line,"'",2) + { Set File = $PIECE(line,"'",2) write "Restore file : ",File,! set tSC=..svnHelper.SVNImport(File) - w !," *** Studio HINT: please make sure you add this file into your copy of project!",! + w " *** Studio HINT: please make sure you add this file into your copy of project!",! } } - - - // single file action - // DK 2.14, make sure we load ALL modified files when 'Whole folder' option checked in, even when command executed - // with a file being open - //if pCmd.InternalName'=""&&pCmd.Reload { - if ('((pCmd.InternalName="")!(pCmd.File="")))&&pCmd.Reload { - // file level UPDATE/REVERT commands only + + if ( '##class(%File).DirectoryExists(pCmd.File) ) && ( pCmd.Reload ) { write !!," *** Studio: performing item reload:",! do ..svnHelper.SVNImport(..svnHelper.ExternalName(InternalName,$$$FULLPATH)) - // + DK 1.21 reset Reload to prevent loop set pCmd.Reload=0 set pCmd.Comment="Reload reset from 1 to 0 by post-processing" set tSC=pCmd.%Save() - // -DK 1.21 - } - + } + if pCmd.Results.Count()>0 { - // Do something, e.g. we may wish to import into Cache all NEWLY ADDED files resulting - // from CHECKOUT command etc.. - If ..Debug w !,"SubCommand: ",pCmd.SubCommand + 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!" + w " *** Studio HINT: please make sure you add this file into your copy of project!",! } elseif tCmdResult.Action="D" { - do ..svnHelper.SVNDelete(..svnHelper.InternalName(tCmdResult.ExternalName)) + set tIName=..svnHelper.InternalName(tCmdResult.ExternalName) + if ..svnHelper.HasToBeSynchronized(tIName) do ..svnHelper.DeleteCode(tIName) } else { // other actions here? } @@ -755,36 +736,41 @@ // +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=..svnHelper.LocalWorkspacePath(..svnHelper.Branch)_tCmdResult.ExternalName - if ($find(tFile,".") '= 0) - { - set:tCmdResult.ExternalName'="" tSC=..svnHelper.SVNImport(tFile) - } + + 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 InternalName = ..svnHelper.InternalName(tCmdResult.ExternalName) - w !,"*** svn post-processing: Deleted '"_InternalName_"' from Studio" - do ..svnHelper.SVNDelete(InternalName) - } else { - // other actions? + 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) Do ..svnHelper.CompileImportedSourceCode() + 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 ]]> @@ -880,7 +866,7 @@ if ##class(TECH.SourceCodeUtils).Type(InternalName)="project" { set ..ProjectNameOriginal=$p(InternalName,".",1) //set ..ProjectNameModified=$tr($p(InternalName,".",1)," ","_") - set ..ProjectNameModified = ..svnHelper.ExternalName(InternalName,$$$NOPATH) + set ..ProjectNameModified = ..svnHelper.ExternalName(InternalName,$$$FULLPATH) } // see if the file exists in working folder, if not, it's a NEW file => add into repository do ..svnHelper.SVNExport(InternalName)