Farbflash projects: Imaging lingo table | 3-D scene list | Find all | Handler menu | Lingo message window

Changeset 20 for trunk/lingosource


Ignore:
Timestamp:
09/12/07 18:27:50 (5 years ago)
Author:
alex
Message:

a text member can be used to specify the castlibs to process when commiting to subversion

Location:
trunk/lingosource
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lingosource/castlib1/OSCmenu_Utilities.ls

    r18 r20  
    198198  li.add(subli) 
    199199   
    200   subli.add("mSVN_Commit_SelectedCastlib_AND_Scripttext me, chooseNewPath, commitMsg") 
     200  subli.add("mSVN_Commit_SelectedCastlib_AND_Scripttext me, chooseNewPath, commitMsg, selectionListMember") 
    201201  subli.add("mSVN_Commit_CurrentMovie_Binaries_AND_Scripttext me, chooseNewPath, commitMsg") 
    202202  ---------------------------------------------------- 
  • trunk/lingosource/castlib1/alexUtilities.ls

    r18 r20  
    40694069-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    40704070 
    4071 on mSVN_Commit_SelectedCastlib_AND_Scripttext me, chooseNewPath, commitMsg  
     4071on mSVN_Commit_SelectedCastlib_AND_Scripttext me, chooseNewPath, commitMsg, selectionListMember 
    40724072   
    40734073  commitMsg = string(commitMsg) 
     
    40814081  end if 
    40824082   
    4083   theResult = mSVN_Commit_CurrentScripts_ScriptText(me, castlib(the activecastlib), chooseNewPath, commitMsg, 1) 
    4084    
    4085   theResult = mSVN_Commit_SelectedCastlib(me, chooseNewPath, commitMsg, 1) 
    4086    
    4087 end 
    4088  
    4089 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    4090  
    4091 on mSVN_Commit_SelectedCastlib me, chooseNewPath, commitMsg, dontSave, dontShowAlert 
    4092    
    4093   actCL = the activecastlib 
     4083  theResult = mSVN_Commit_CurrentScripts_ScriptText(me, castlib(the activecastlib), chooseNewPath, commitMsg, 1, selectionListMember) 
     4084   
     4085  theResult = mSVN_Commit_SelectedCastlib(me, chooseNewPath, commitMsg, 1, 0, selectionListMember) 
     4086   
     4087end 
     4088 
     4089-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     4090 
     4091on mSVN_Commit_SelectedCastlib me, chooseNewPath, commitMsg, dontSave, dontShowAlert, selectionListMember 
     4092   
     4093   
     4094  castlibList = 0 
     4095  selectionListMember = member(selectionListMember) 
     4096  if length(selectionListMember) > 0 then 
     4097    mem = member(selectionListMember) 
     4098    if not(voidP(mem)) then 
     4099      dertext = mem.text 
     4100      dertext = value(dertext.line[1]) 
     4101      if listP(dertext) then 
     4102        castlibList = [] 
     4103        dertextCnt = count(dertext) 
     4104        repeat with n = 1 to dertextCnt 
     4105          if listP(dertext[n]) then 
     4106            castlibList.add(n) 
     4107          end if 
     4108        end repeat 
     4109      end if 
     4110    end if 
     4111  end if 
     4112   
     4113  if castlibList = 0 then 
     4114    castlibList = [] 
     4115    actCL = the activecastlib 
     4116    castlibList.add(actCL) 
     4117  end if 
     4118   
     4119   
     4120  mpname = the moviepath & the moviename 
     4121  isInternal = 0 
     4122  repeat with cl in castlibList 
     4123    if castlib(cl).filename = mpname then 
     4124      isInternal = 1 
     4125      exit repeat 
     4126    end if 
     4127  end repeat 
     4128   
     4129  if count(castlibList) < 1 then return 0 
     4130   
    40944131   
    40954132  workingCopies = value(getPref("svn_wCopies_paths_Binary.txt")) 
     
    41274164    end if 
    41284165     
    4129     if the moviepath & the moviename = castlib(actCL).filename then 
     4166    --    if the moviepath & the moviename = castlib(actCL).filename then 
     4167    --      savemovie() 
     4168    --    else 
     4169    --      castlib(actCL).save() 
     4170    --   end if 
     4171     
     4172    if isInternal = 1 then 
    41304173      savemovie() 
    41314174    else 
    4132       castlib(actCL).save() 
     4175      repeat with cl in castlibList 
     4176        castlib(cl).save() 
     4177      end repeat 
    41334178    end if 
    41344179     
     
    41364181  ---------------------------------------- 
    41374182   
    4138   fname = castlib(actCL).filename 
     4183   
     4184   
     4185   
     4186  --  fname = castlib(actCL).filename 
    41394187   
    41404188   
     
    41474195    the itemdelimiter = mp 
    41484196     
    4149     fname = castlib(actCL).filename 
    4150     if length(fname) > 0 then 
    4151        
    4152       offs = offset(mp, fname) 
    4153       if offs <> 1 then 
    4154         alert "Castlib" && castlib(actCL) && "is not within your current moviepath. This is not supported." 
     4197     
     4198    repeat with cl in castlibList 
     4199       
     4200      fname = castlib(cl).filename 
     4201       
     4202      if length(fname) > 0 then 
     4203         
     4204        offs = offset(mp, fname) 
     4205        if offs <> 1 then 
     4206          alert "Castlib" && castlib(actCL) && "is not within your current moviepath. This is not supported." 
     4207          return 0 
     4208        end if 
     4209         
     4210        relpath = fname 
     4211        delete char 1 to mplen of relpath 
     4212         
     4213        newpath = workingFolder & relpath 
     4214        newpathDir = newpath 
     4215        delete the last item of newpathDir 
     4216        if baFolderExists(newpathDir) <> 1 then baCreateFolder(newpathDir) 
     4217        baCopyFileProgress(fname, newpath, "Always", "Copying castlib " & actCL & " to working folder", "", 33) 
     4218         
     4219        castlibList[cl] = [cl, fname, newpath, newpathDir] 
     4220         
     4221      else 
     4222         
     4223        -- must be something REALLY wrong, as the filename should ALWAYS be of any length (internal castlibs ) 
    41554224        return 0 
    4156       end if 
    4157        
    4158       relpath = fname 
    4159       delete char 1 to mplen of relpath 
    4160        
    4161       newpath = workingFolder & relpath 
    4162       newpathDir = newpath 
    4163       delete the last item of newpathDir 
    4164       if baFolderExists(newpathDir) <> 1 then baCreateFolder(newpathDir) 
    4165       baCopyFileProgress(fname, newpath, "Always", "Copying castlib " & actCL & " to working folder", "", 33) 
    4166        
    4167     else 
    4168        
    4169       -- musty something REALLY wrong, as the filename should ALWAYS be of any length (internal castlibs ) 
    4170       return 0 
    4171        
    4172     end if 
     4225         
     4226      end if 
     4227       
     4228    end repeat 
     4229     
    41734230     
    41744231    the itemdelimiter = olddelim 
     
    41764233  else 
    41774234     
    4178     newpath = fname 
     4235    repeat with cl in castlibList 
     4236      newpath = fname 
     4237      castlibList[cl] = [cl, fname, fname] 
     4238    end repeat 
     4239     
    41794240  end if 
    41804241  --------------------------------------- 
     
    41854246    svnBinary = baUnixName(svnBinary) 
    41864247    workingFolder = baUnixName(workingFolder) 
    4187     newpath = baUnixName(newpath) 
     4248     
     4249    repeat with cl in castlibList 
     4250      castlibList[cl][3] = baUnixName(castlibList[cl][3]) 
     4251    end repeat 
     4252     
    41884253  else 
    41894254    if the last char of workingFolder = the last char of the applicationpath then delete the last char of workingFolder 
     
    41924257   
    41934258   
    4194   --------------------------------------- 
    4195   theresult = shell_cmd_list(svnBinary && "update" && QUOTE & newpath & QUOTE) 
    4196    
    4197   if count(theresult) < 1 then 
    4198     theresult = shell_cmd_list(svnBinary && "update" && QUOTE & newpath & QUOTE && "2>&1") 
     4259   
     4260  repeat with cl in castlibList 
     4261    --------------------------------------- 
     4262    theresult = shell_cmd_list(svnBinary && "update" && QUOTE & castlibList[cl][3] & QUOTE) 
     4263     
    41994264    if count(theresult) < 1 then 
    4200       theError = theresult[1] 
    4201     else 
    4202       theError = "svn did not respond at all." 
    4203     end if 
    4204     alert "Can't proceed svn error while trying to update:" && theError 
    4205     return 0   
    4206   end if 
    4207   --------------------------------------- 
    4208    
    4209    
    4210   theresult = shell_cmd_list(svnBinary && "status" && QUOTE & newpath & QUOTE) 
    4211    
    4212   cnt = count(theresult) 
    4213   if cnt < 1 then 
    4214     alert "Apparently there are no changes to the most recent version in the svn repository: svn status is empty" 
    4215     return 0 
    4216   end if 
    4217    
    4218   theresult = shell_cmd_list(svnBinary && "ci --message" && QUOTE & msg & QUOTE && QUOTE & newpath & QUOTE) 
     4265      theresult = shell_cmd_list(svnBinary && "update" && QUOTE & castlibList[cl][3] & QUOTE && "2>&1") 
     4266      if count(theresult) < 1 then 
     4267        theError = theresult[1] 
     4268      else 
     4269        theError = "svn did not respond at all." 
     4270      end if 
     4271      alert "Can't proceed svn error while trying to update:" && theError 
     4272      return 0   
     4273    end if 
     4274    --------------------------------------- 
     4275     
     4276     
     4277     
     4278    theresult = shell_cmd_list(svnBinary && "status" && QUOTE & castlibList[cl][3] & QUOTE) 
     4279     
     4280    cnt = count(theresult) 
     4281    if cnt < 1 then 
     4282      alert "Apparently there are no changes to the most recent version in the svn repository: svn status is empty" 
     4283      return 0 
     4284    end if 
     4285     
     4286  end repeat 
     4287   
     4288  pathStr = "" 
     4289  repeat with cl in castlibList 
     4290    put " " & QUOTE & castlibList[cl][3] & QUOTE after pathStr 
     4291  end repeat 
     4292   
     4293  theresult = shell_cmd_list(svnBinary && "ci --message" && QUOTE & msg & QUOTE & pathStr) 
    42194294   
    42204295   
     
    46824757-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    46834758 
    4684 on mSVN_Commit_CurrentScripts_ScriptText me, selected_Members_Only, chooseNewPath, commitMsg, dontShowAlert 
     4759on mSVN_Commit_CurrentScripts_ScriptText me, selected_Members_Only, chooseNewPath, commitMsg, dontShowAlert, selectionListMember 
    46854760   
    46864761  workingCopies = value(getPref("svn_workingCopies_paths.txt")) 
     
    47154790   
    47164791   
     4792   
     4793   
    47174794  clibfolder = "" 
    47184795   
     4796  castlibList = 0 
     4797   
     4798   
    47194799   
    47204800  -------- if we work on only one castlib: 
    47214801   
    47224802  if ilk(selected_Members_Only) = #castLib then 
    4723     selected_Members_Only.save() 
     4803     
     4804     
     4805    ----------------------------------------------------- 
     4806     
     4807    selectionListMember = member(selectionListMember) 
     4808    if length(selectionListMember) > 0 then 
     4809      mem = member(selectionListMember) 
     4810      if not(voidP(mem)) then 
     4811        dertext = mem.text 
     4812        dertext = value(dertext.line[1]) 
     4813        if listP(dertext) then 
     4814          castlibList = [] 
     4815          dertextCnt = count(dertext) 
     4816          repeat with n = 1 to dertextCnt 
     4817            if listP(dertext[n]) then 
     4818              castlibList.add(n) 
     4819            end if 
     4820          end repeat 
     4821        end if 
     4822      end if 
     4823    end if 
     4824     
     4825    if castlibList = 0 then 
     4826      castlibList = [] 
     4827      castlibList.add(selected_Members_Only.number) 
     4828    end if 
     4829     
     4830     
     4831    mpname = the moviepath & the moviename 
     4832    isInternal = 0 
     4833    repeat with cl in castlibList 
     4834      if castlib(cl).filename = mpname then 
     4835        isInternal = 1 
     4836        exit repeat 
     4837      end if 
     4838    end repeat 
     4839     
     4840    if count(castlibList) < 1 then return 0 
     4841    ----------------------------------------------------- 
    47244842     
    47254843    delim = the last char of the applicationpath 
     
    47284846    the itemdelimiter = delim 
    47294847     
    4730     if the last item of workingFolder = "castlib" & selected_Members_Only.number then 
    4731       clibfolder = workingFolder 
     4848    repeat with n = count(castlibList) down to 1 
     4849       
     4850      selected_Members_Only = castlib(castlibList[n]) 
     4851       
     4852      selected_Members_Only.save() 
     4853       
     4854       
     4855       
     4856      if the last item of workingFolder = "castlib" & selected_Members_Only.number then 
     4857        clibfolder = workingFolder 
     4858      else 
     4859        if the last char of workingFolder <> delim then put delim after workingFolder 
     4860        clibfolder = workingFolder & "castlib" & selected_Members_Only.number 
     4861      end if 
     4862       
     4863      castlibList[n] = [castlibList[n], clibfolder, workingFolder] 
     4864      -------- 
     4865       
     4866       
     4867      mExportAllScriptsToDiskWithFolder me, 1, selected_Members_Only, 1, workingFolder 
     4868       
     4869    end repeat 
     4870     
     4871    the itemdelimiter = olddelim 
     4872     
     4873     
     4874     
     4875  else -- treat all: 
     4876     
     4877    saveMovie() 
     4878     
     4879    mExportAllScriptsToDiskWithFolder me, 1, selected_Members_Only, 1, workingFolder 
     4880     
     4881    castlibList = [] 
     4882     
     4883  end if 
     4884   
     4885   
     4886   
     4887  if castlibList = 0 then 
     4888     
     4889    -------- if we work on only one castlib: 
     4890    if length(clibfolder) then workingFolder = clibfolder 
     4891    -------- 
     4892     
     4893     
     4894    if the platform contains "mac" then 
     4895      svnBinary = baUnixName(svnBinary) 
     4896      workingFolder = baUnixName(workingFolder) 
    47324897    else 
    4733       if the last char of workingFolder <> delim then put delim after workingFolder 
    4734       clibfolder = workingFolder & "castlib" & selected_Members_Only.number 
    4735     end if 
    4736      
    4737     the itemdelimiter = olddelim 
    4738     -------- 
    4739      
     4898      if the last char of workingFolder = the last char of the applicationpath then delete the last char of workingFolder 
     4899    end if 
     4900     
     4901    workingFolder = " " & QUOTE & workingFolder & QUOTE 
    47404902     
    47414903  else 
    4742     saveMovie() 
    4743      
    4744   end if 
    4745    
    4746    
    4747   mExportAllScriptsToDiskWithFolder me, 1, selected_Members_Only, 1, workingFolder 
    4748    
    4749    
    4750   -------- if we work on only one castlib: 
    4751   if length(clibfolder) then workingFolder = clibfolder 
    4752   -------- 
    4753    
    4754    
    4755   if the platform contains "mac" then 
    4756     svnBinary = baUnixName(svnBinary) 
    4757     workingFolder = baUnixName(workingFolder) 
    4758   else 
    4759     if the last char of workingFolder = the last char of the applicationpath then delete the last char of workingFolder 
    4760   end if 
    4761    
    4762    
    4763   theresult = shell_cmd_list(svnBinary && "update" && QUOTE & workingFolder & QUOTE) 
     4904     
     4905    if the platform contains "mac" then svnBinary = baUnixName(svnBinary) 
     4906    cnt = count(castlibList) 
     4907     
     4908    workingFolder = "" 
     4909     
     4910    repeat with n = 1 to cnt 
     4911       
     4912      if the platform contains "mac" then 
     4913        castlibList[n][3] = baUnixName(castlibList[n][3]) 
     4914      else 
     4915        str = castlibList[n][3] 
     4916        if the last char of str = the last char of the applicationpath then 
     4917          delete the last char of str 
     4918          castlibList[n][3] = str 
     4919        end if 
     4920      end if 
     4921       
     4922      put " " & QUOTE & castlibList[n][3] & QUOTE after workingFolder 
     4923    end repeat 
     4924     
     4925  end if 
     4926   
     4927   
     4928  theresult = shell_cmd_list(svnBinary && "update" & workingFolder) 
     4929   
    47644930   
    47654931  if count(theresult) < 1 then 
    4766     theresult = shell_cmd_list(svnBinary && "update" && QUOTE & workingFolder & QUOTE && "2>&1") 
     4932    theresult = shell_cmd_list(svnBinary && "update" & workingFolder && "2>&1") 
    47674933    if count(theresult) < 1 then 
    47684934      theError = theresult[1] 
     
    47744940  end if 
    47754941   
    4776   theresult = shell_cmd_list(svnBinary && "status" && QUOTE & workingFolder & QUOTE) 
     4942  theresult = shell_cmd_list(svnBinary && "status" & workingFolder) 
    47774943   
    47784944  cnt = count(theresult) 
     
    48084974  end repeat 
    48094975   
    4810   theresult = shell_cmd_list(svnBinary && "ci --message" && QUOTE & msg & QUOTE && QUOTE & workingFolder & QUOTE) 
     4976   
     4977   
     4978  theresult = shell_cmd_list(svnBinary && "ci --message" && QUOTE & msg & QUOTE & workingFolder) 
    48114979   
    48124980   
  • trunk/lingosource/castlib2/memberInfo.xml

    r18 r20  
    4646                <memberName>commonMovieScript</memberName> 
    4747        </commonmoviescript> 
     48        <commonmoviescript> 
     49                <scriptType>#parent</scriptType> 
     50                <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 
     51                <memberName>commonMovieScript</memberName> 
     52        </commonmoviescript> 
    4853        <commonMovieScript> 
    4954                <scriptType>#parent</scriptType> 
Note: See TracChangeset for help on using the changeset viewer.