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

Changeset 18 for trunk/lingosource


Ignore:
Timestamp:
09/04/07 16:32:13 (5 years ago)
Author:
alex
Message:

added even more svn handlers

Location:
trunk/lingosource
Files:
3 edited

Legend:

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

    r16 r18  
    167167  ---------------------------------------------------- scripttext export functions: 
    168168  li.add("") 
    169   li.add("Scripttext export for SVN") 
    170   subli = [] 
    171   li.add(subli) 
    172   subli.add("mExportScriptsToFolder me, skipIcons, selectionOnly, convertLineBreaksToUnix") 
     169  li.add("Scripttext ex/import for SVN") 
     170  subli = [] 
     171  li.add(subli) 
     172  subli.add("mExportScriptsToFolder me, skipIcons, selectionOnly, convertLineBreaksToUnix, chooseNewPath") 
     173  subli.add("mImportScriptWithThumbnail me, thePath, castlibNumber, dontWarn, infolist") 
     174  subli.add("") 
     175  subli.add("mSVN_Update_Working_Copy_ScriptText me, chooseNewPath") 
    173176  subli.add("mSVN_Update_And_Import_ScriptsFromFolder me, thePath, selectionOnly") 
    174177  subli.add("") 
    175   subli.add("mImportScriptWithThumbnail me, thePath, castlibNumber, dontWarn, infolist") 
     178  subli.add("mSVN_Commit_CurrentScripts_ScriptText me, selected_Members_Only") 
     179  subli.add("") 
     180  subli.add("mSVN_Delete_Selected_Scripts me, chooseNewPath") 
     181   
    176182   
    177183  ---------------------------------------------------- svn functions: 
    178184  li.add("") 
    179   li.add("SVN") 
    180   subli = [] 
    181   li.add(subli) 
    182   subli.add("mSVN_Delete_Selected_Scripts me, chooseNewPath") 
    183   subli.add("") 
    184   subli.add("mSVN_Update_Working_Copy_ScriptText me, chooseNewPath") 
    185   subli.add("mSVN_Commit_CurrentScripts_ScriptText me, selected_Members_Only") 
    186   subli.add("") 
     185  li.add("SVN -- binary director files") 
     186  subli = [] 
     187  li.add(subli) 
     188  subli.add("mSVN_Update_SelectedCastlib me, chooseNewPath, onlyUpdate_SVN_WorkingFolder") 
    187189  subli.add("mSVN_Update_CurrentMovie_Binaries me, chooseNewPath, onlyUpdate_SVN_WorkingFolder") 
     190  subli.add("") 
     191  subli.add("mSVN_Commit_SelectedCastlib me, chooseNewPath, commitMsg") 
    188192  subli.add("mSVN_Commit_CurrentMovie_Binaries me, chooseNewPath, commitMsg") 
    189     subli.add("") 
     193  ---------------------------------------------------- 
     194   
     195  li.add("") 
     196  li.add("SVN -- binary AND text") 
     197  subli = [] 
     198  li.add(subli) 
     199   
     200  subli.add("mSVN_Commit_SelectedCastlib_AND_Scripttext me, chooseNewPath, commitMsg") 
    190201  subli.add("mSVN_Commit_CurrentMovie_Binaries_AND_Scripttext me, chooseNewPath, commitMsg") 
    191202  ---------------------------------------------------- 
  • trunk/lingosource/castlib1/alexUtilities.ls

    r16 r18  
    30903090-- export all scripts into a folder (I use this to compare to versions of a movie, open movie 1, export all scripts, open movie 2 and export all scripts and then compare with bbdiff both folders) 
    30913091 
    3092 on mExportScriptsToFolder me, skipIcons, selectionOnly, convertLineBreaksToUnix, theFolder 
    3093   mExportAllScriptsToDiskWithFolder me, skipIcons, selectionOnly, convertLineBreaksToUnix 
    3094 end 
    3095  
    3096 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    3097  
    3098 on mExportAllScriptsToDiskWithFolder me, skipIcons, selectionOnly, convertLineBreaksToUnix, theFolder 
     3092on mExportScriptsToFolder me, skipIcons, selectionOnly, convertLineBreaksToUnix, chooseNewPath 
     3093  mExportAllScriptsToDiskWithFolder me, skipIcons, selectionOnly, convertLineBreaksToUnix, void, chooseNewPath 
     3094end 
     3095 
     3096-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     3097 
     3098on mExportAllScriptsToDiskWithFolder me, skipIcons, selectionOnly, convertLineBreaksToUnix, theFolder, chooseNewPath 
    30993099   
    31003100  theFolder = string(theFolder) 
    31013101  if length(theFolder) < 1 then 
    3102     theFolder = mGetFolderPathFromUser(me) 
     3102     
     3103    if chooseNewPath <> 1 then 
     3104      workingCopies = value(getPref("svn_workingCopies_paths.txt")) 
     3105      if ilk(workingCopies) <> #proplist then workingCopies = [:] 
     3106       
     3107      theFolder = mGetWorkingCopyPath(me, the moviepath & the moviename, chooseNewPath, workingCopies, "No working copy is specified for this movies scripttext. Please select a working copy for the scripttext now.") 
     3108    end if 
     3109     
     3110    if length(theFolder) < 1 then 
     3111       
     3112      theFolder = mGetFolderPathFromUser(me) 
     3113       
     3114    end if 
     3115     
    31033116  end if 
    31043117   
    31053118  if length(theFolder) < 1 then exit 
    31063119   
    3107   if selectionOnly = 1 then 
    3108     cl = the activecastlib 
    3109     sel = the selection of castlib cl 
    3110      
    3111     firstCastNum = cl 
    3112     lastCastNum = cl     
     3120  if ilk(selectionOnly) = #castlib then 
     3121    firstCastNum = selectionOnly.number 
     3122    lastCastNum = firstCastNum 
     3123    selectionOnly = 0 
    31133124     
    31143125  else 
    3115     firstCastNum = 1 
    3116     lastCastNum = the number of castlibs 
    3117   end if 
     3126    if selectionOnly = 1 then 
     3127      cl = the activecastlib 
     3128      sel = the selection of castlib cl 
     3129       
     3130      firstCastNum = cl 
     3131      lastCastNum = cl     
     3132       
     3133    else 
     3134      firstCastNum = 1 
     3135      lastCastNum = the number of castlibs 
     3136    end if 
     3137  end if 
     3138   
    31183139   
    31193140  isMac = (the platform contains "mac") -- we need the differentiation because of the dreaded 31 char limit 
     
    38263847  if length(svnBinary) < 1 then exit 
    38273848   
    3828   workingFolder = mGetWorkingCopyPath(me, the moviepath & the moviename, chooseNewPath, workingCopies) 
     3849  workingFolder = mGetWorkingCopyPath(me, the moviepath & the moviename, chooseNewPath, workingCopies, "No working copy is specified for this movies scripttext. Please select a working copy for the scripttext now.") 
    38293850  if length(workingFolder) < 1 then exit 
    38303851   
     
    38613882  if length(svnBinary) < 1 then exit 
    38623883   
    3863   workingFolder = mGetWorkingCopyPath(me, the moviepath & the moviename, chooseNewPath, workingCopies) 
     3884  workingFolder = mGetWorkingCopyPath(me, the moviepath & the moviename, chooseNewPath, workingCopies, "No working copy is specified for this movies scripttext. Please select a working copy for the scripttext now.") 
    38643885  if length(workingFolder) < 1 then exit 
    38653886   
     
    40404061   
    40414062   
    4042   theResult = mSVN_Commit_CurrentScripts_ScriptText(me, 0, chooseNewPath, commitMsg) 
     4063  theResult = mSVN_Commit_CurrentScripts_ScriptText(me, 0, chooseNewPath, commitMsg, 1) 
    40434064   
    40444065  theResult = mSVN_Commit_CurrentMovie_Binaries(me, chooseNewPath, commitMsg, 1) 
     
    40484069-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    40494070 
    4050 on mSVN_Commit_CurrentMovie_Binaries me, chooseNewPath, commitMsg, dontSave 
     4071on mSVN_Commit_SelectedCastlib_AND_Scripttext me, chooseNewPath, commitMsg  
     4072   
     4073  commitMsg = string(commitMsg) 
     4074  if length(commitMsg) < 1 then 
     4075    commitMsg = baPrompt("Commit message", "Enter commit message", "Commitmessage", 0, -2, -2) 
     4076     
     4077    if length(commitMsg) < 1 then 
     4078      alert "You must enter a message for the commit action." 
     4079      exit 
     4080    end if 
     4081  end if 
     4082   
     4083  theResult = mSVN_Commit_CurrentScripts_ScriptText(me, castlib(the activecastlib), chooseNewPath, commitMsg, 1) 
     4084   
     4085  theResult = mSVN_Commit_SelectedCastlib(me, chooseNewPath, commitMsg, 1) 
     4086   
     4087end 
     4088 
     4089-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     4090 
     4091on mSVN_Commit_SelectedCastlib me, chooseNewPath, commitMsg, dontSave, dontShowAlert 
     4092   
     4093  actCL = the activecastlib 
    40514094   
    40524095  workingCopies = value(getPref("svn_wCopies_paths_Binary.txt")) 
     
    40564099  if length(svnBinary) < 1 then return 0 
    40574100   
    4058   workingFolder = mGetWorkingCopyPath(me, the moviepath & the moviename, chooseNewPath, workingCopies) 
     4101  workingFolder = mGetWorkingCopyPath(me, the moviepath & the moviename, chooseNewPath, workingCopies, "No working copy is specified for this movies binaries (director files). Please select a working copy of the director files.") 
     4102  if length(workingFolder) < 1 then return 0 
     4103   
     4104   
     4105  --------------------------------------- 
     4106  msg = string(commitMsg) 
     4107  if length(msg) < 1 then 
     4108    msg = baPrompt("Commit message", "Enter commit message", "Commitmessage", 0, -2, -2) 
     4109     
     4110    if length(msg) < 1 then 
     4111      alert "You must enter a message for the commit action." 
     4112      return 0 
     4113    end if 
     4114  end if 
     4115  --------------------------------------- 
     4116   
     4117   
     4118  --------------------------------------- 
     4119  if dontSave <> 1 then 
     4120    -- this flag is only for the case, we come here from the combined commit call "mSVN_Commit_CurrentMovie_Binaries_AND_Scripttext" 
     4121    -- as the movie was already saved in "mSVN_Commit_CurrentScripts_ScriptText" 
     4122     
     4123    if workingCopies.getaprop(#dontWarnWhenSaving) <> 1 then 
     4124      answer = baMsgBoxEx("The castlib will be saved before committing.", "Save castlib?", "Save", "Cancel", "Always save", "Question", 1, "left", "Arial", 14, 4, -2, -2) 
     4125      if answer = "Cancel" then return 0 
     4126      if answer = "Always save" then workingCopies.setaprop(#dontWarnWhenSaving, 1) 
     4127    end if 
     4128     
     4129    if the moviepath & the moviename = castlib(actCL).filename then 
     4130      savemovie() 
     4131    else 
     4132      castlib(actCL).save() 
     4133    end if 
     4134     
     4135  end if 
     4136  ---------------------------------------- 
     4137   
     4138  fname = castlib(actCL).filename 
     4139   
     4140   
     4141  --------------------------------------- 
     4142  if workingFolder <> the moviepath then 
     4143     
     4144    mp = the moviepath 
     4145    mplen = length(mp) 
     4146    olddelim = the itemdelimiter 
     4147    the itemdelimiter = mp 
     4148     
     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." 
     4155        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 
     4173     
     4174    the itemdelimiter = olddelim 
     4175     
     4176  else 
     4177     
     4178    newpath = fname 
     4179  end if 
     4180  --------------------------------------- 
     4181   
     4182   
     4183  --------------------------------------- 
     4184  if the platform contains "mac" then 
     4185    svnBinary = baUnixName(svnBinary) 
     4186    workingFolder = baUnixName(workingFolder) 
     4187    newpath = baUnixName(newpath) 
     4188  else 
     4189    if the last char of workingFolder = the last char of the applicationpath then delete the last char of workingFolder 
     4190  end if 
     4191  --------------------------------------- 
     4192   
     4193   
     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") 
     4199    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) 
     4219   
     4220   
     4221  --------------------------------------- 
     4222  if count(theresult) > 0 then 
     4223    theResult = theresult[1] 
     4224     
     4225    put theResult 
     4226    if dontShowAlert <> 1 then alert "Done, see the results of the svn operation in the message window." 
     4227     
     4228  else 
     4229    if dontShowAlert <> 1 then alert "svn application did not respond, something seems to have failed. :-(" 
     4230  end if 
     4231  --------------------------------------- 
     4232   
     4233  setPref("svn_wCopies_paths_Binary.txt", string(workingCopies)) 
     4234   
     4235  return 1 
     4236   
     4237end 
     4238 
     4239-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     4240 
     4241on mSVN_Commit_CurrentMovie_Binaries me, chooseNewPath, commitMsg, dontSave, dontShowAlert 
     4242   
     4243  workingCopies = value(getPref("svn_wCopies_paths_Binary.txt")) 
     4244  if ilk(workingCopies) <> #proplist then workingCopies = [:] 
     4245   
     4246  svnBinary = mGetSVNBinaryPath(me, workingCopies) 
     4247  if length(svnBinary) < 1 then return 0 
     4248   
     4249  workingFolder = mGetWorkingCopyPath(me, the moviepath & the moviename, chooseNewPath, workingCopies, "No working copy is specified for this movies binaries (director files). Please select a working copy of the director files.") 
    40594250  if length(workingFolder) < 1 then return 0 
    40604251   
     
    41064297      if length(fname) > 0 then 
    41074298         
    4108         offs = offset(mp, fname) 
    4109         if offs <> 1 then 
    4110           alert "Castlib" && castlib(n) && "is not within your current moviepath. This is not supported." 
    4111           return 0 
     4299        if the moviepath & the moviename <> fname then 
     4300          offs = offset(mp, fname) 
     4301          if offs <> 1 then 
     4302            alert "Castlib" && castlib(n) && "is not within your current moviepath. This is not supported." 
     4303            return 0 
     4304          end if 
     4305          relpath = fname 
     4306          delete char 1 to mplen of relpath 
     4307           
     4308          newpath = workingFolder & relpath 
     4309          newpathDir = newpath 
     4310          delete the last item of newpathDir 
     4311          if baFolderExists(newpathDir) <> 1 then baCreateFolder(newpathDir) 
     4312          baCopyFileProgress(fname, newpath, "Always", "Copying castlib " & n & " to working folder", "", 33) 
     4313           
    41124314        end if 
    4113         relpath = fname 
    4114         delete char 1 to mplen of relpath 
    4115          
    4116         newpath = workingFolder & relpath 
    4117         newpathDir = newpath 
    4118         delete the last item of newpathDir 
    4119         if baFolderExists(newpathDir) <> 1 then baCreateFolder(newpathDir) 
    4120         baCopyFileProgress(fname, newpath, "Always", "Copying castlib " & n & " to working folder", "", 33) 
    41214315         
    41224316      end if 
     
    42014395     
    42024396    put theResult 
    4203     alert "Done, see the results of the svn operation in the message window." 
     4397    if dontShowAlert <> 1 then alert "Done, see the results of the svn operation in the message window." 
    42044398     
    42054399  else 
    4206     alert "svn application did not respond, something seems to have failed. :-(" 
     4400    if dontShowAlert <> 1 then alert "svn application did not respond, something seems to have failed. :-(" 
    42074401  end if 
    42084402  --------------------------------------- 
     
    42154409-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    42164410 
    4217 on mSVN_Update_CurrentMovie_Binaries me, chooseNewPath, onlyUpdate_SVN_WorkingFolder 
     4411on mSVN_Update_SelectedCastlib me, chooseNewPath, onlyUpdate_SVN_WorkingFolder, dontShowAlert 
     4412   
     4413  actCL = the activecastlib 
    42184414   
    42194415  workingCopies = value(getPref("svn_wCopies_paths_Binary.txt")) 
     
    42234419  if length(svnBinary) < 1 then exit 
    42244420   
    4225   workingFolder = mGetWorkingCopyPath(me, the moviepath & the moviename, chooseNewPath, workingCopies) 
     4421  workingFolder = mGetWorkingCopyPath(me, the moviepath & the moviename, chooseNewPath, workingCopies, "No working copy is specified for this movies binaries (director files). Please select a working copy of the director files.") 
    42264422  if length(workingFolder) < 1 then exit 
    42274423   
    4228   if the platform contains "mac" then 
    4229     svnBinary = baUnixName(svnBinary) 
    4230     workingFolder = baUnixName(workingFolder) 
    4231   else 
    4232     if the last char of workingFolder = the last char of the applicationpath then delete the last char of workingFolder 
    4233   end if 
     4424   
    42344425   
    42354426  oldmoviepath = the moviepath 
    42364427  oldmovie = oldmoviepath & the moviename 
     4428   
     4429   
     4430  fname = castlib(actCL).filename 
     4431   
     4432  --------------------------------------- 
     4433  if workingFolder <> the moviepath then 
     4434     
     4435    mp = the moviepath 
     4436    mplen = length(mp) 
     4437    olddelim = the itemdelimiter 
     4438    the itemdelimiter = mp 
     4439     
     4440    if length(fname) > 0 then 
     4441       
     4442      offs = offset(mp, fname) 
     4443      if offs <> 1 then 
     4444        alert "Castlib" && castlib(actCL) && "is not within your current moviepath. This is not supported." 
     4445        return 0 
     4446      end if 
     4447       
     4448      relpath = fname 
     4449      delete char 1 to mplen of relpath 
     4450       
     4451      newpath = workingFolder & relpath 
     4452      newpathDir = newpath 
     4453      delete the last item of newpathDir 
     4454      -- if baFolderExists(newpathDir) <> 1 then baCreateFolder(newpathDir) 
     4455      -- baCopyFileProgress(fname, newpath, "Always", "Copying castlib " & actCL & " to working folder", "", 33) 
     4456       
     4457    else 
     4458       
     4459      -- musty something REALLY wrong, as the filename should ALWAYS be of any length (internal castlibs ) 
     4460      return 0 
     4461       
     4462    end if 
     4463     
     4464    the itemdelimiter = olddelim 
     4465     
     4466  else 
     4467     
     4468    newpath = fname 
     4469  end if 
     4470  --------------------------------------- 
     4471   
     4472   
     4473   
     4474  doReturnToOldMovie = 0 
    42374475   
    42384476  if (onlyUpdate_SVN_WorkingFolder <> 1) or (the moviepath contains workingFolder) then 
     
    42444482    ------------------------------ 
    42454483     
    4246     onlyUpdate_SVN_WorkingFolder = 1 
    4247   end if 
    4248    
    4249   theresult = shell_cmd_list(svnBinary && "update" && QUOTE & workingFolder & QUOTE) 
     4484    doReturnToOldMovie = 1 
     4485     
     4486  end if 
     4487   
     4488   
     4489   
     4490  if the platform contains "mac" then 
     4491    svnBinary = baUnixName(svnBinary) 
     4492    workingFolderUnix = baUnixName(workingFolder) 
     4493    newpathUnix = baUnixName(newpath) 
     4494  else 
     4495    newpathUnix = newpath 
     4496    workingFolderUnix = workingFolder 
     4497    if the last char of workingFolderUnix = the last char of the applicationpath then delete the last char of workingFolderUnix 
     4498  end if 
     4499   
     4500   
     4501  theresult = shell_cmd_list(svnBinary && "update" && QUOTE & newpathUnix & QUOTE) 
     4502   
    42504503   
    42514504  if count(theresult) > 0 then 
     
    42534506    -------- reload the refreshed movie: 
    42544507    if the moviepath contains workingFolder then 
     4508       
    42554509      -- go to movie the moviepath & the moviename 
     4510       
    42564511    else 
    42574512       
    42584513      if onlyUpdate_SVN_WorkingFolder <> 1 then 
     4514         
    42594515        -------------------------- now get the updated movies over here: 
    42604516        if the last char of workingFolder <> the last char of the applicationpath then put the last char of the applicationpath after workingFolder 
    42614517         
     4518        put "Copy file from " & workingFolder & " to " & oldmoviepath 
     4519         
     4520         
     4521        erg = baCopyFileProgress(newpath, fname, "Always", "Replacing castlib with the version of the working folder", "", 33) 
     4522        if erg <> 0 then 
     4523          alert "An error occurred during copying the file (" & newpath & "). Error:" && erg 
     4524        else 
     4525          put "Replaced file:" && newpath 
     4526        end if 
     4527         
     4528         
     4529        ---------------------------------- 
     4530         
     4531      end if 
     4532       
     4533    end if 
     4534     
     4535    put theresult[1] 
     4536     
     4537    if doReturnToOldMovie = 1 then go to movie oldmovie 
     4538     
     4539    if dontShowAlert <> 1 then alert "Done, see the results of the svn operation in the message window." 
     4540     
     4541  else 
     4542     
     4543    if doReturnToOldMovie = 1 then go to movie oldmovie 
     4544     
     4545    if dontShowAlert <> 1 then alert "svn application did not respond, something seems to have failed. :-(" 
     4546  end if 
     4547   
     4548   
     4549  setPref("svn_wCopies_paths_Binary.txt", string(workingCopies)) 
     4550   
     4551end 
     4552 
     4553-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     4554 
     4555on mSVN_Update_CurrentMovie_Binaries me, chooseNewPath, onlyUpdate_SVN_WorkingFolder, dontShowAlert 
     4556   
     4557  workingCopies = value(getPref("svn_wCopies_paths_Binary.txt")) 
     4558  if ilk(workingCopies) <> #proplist then workingCopies = [:] 
     4559   
     4560  svnBinary = mGetSVNBinaryPath(me, workingCopies) 
     4561  if length(svnBinary) < 1 then exit 
     4562   
     4563  workingFolder = mGetWorkingCopyPath(me, the moviepath & the moviename, chooseNewPath, workingCopies, "No working copy is specified for this movies binaries (director files). Please select a working copy of the director files.") 
     4564  if length(workingFolder) < 1 then exit 
     4565   
     4566  if the platform contains "mac" then 
     4567    svnBinary = baUnixName(svnBinary) 
     4568    workingFolderUnix = baUnixName(workingFolder) 
     4569  else 
     4570    workingFolderUnix = workingFolder 
     4571    if the last char of workingFolderUnix = the last char of the applicationpath then delete the last char of workingFolderUnix 
     4572  end if 
     4573   
     4574  oldmoviepath = the moviepath 
     4575  oldmovie = oldmoviepath & the moviename 
     4576   
     4577   
     4578  doReturnToOldMovie = 0 
     4579   
     4580  if (onlyUpdate_SVN_WorkingFolder <> 1) or (the moviepath contains workingFolder) then 
     4581     
     4582    ------------------------------ 
     4583    -- close this movie by issuing a "new movie..." command 
     4584    -- in order to replace the current movie, with the updated movie 
     4585    dispatchcommand(4097) 
     4586    ------------------------------ 
     4587     
     4588    doReturnToOldMovie = 1 
     4589     
     4590  end if 
     4591   
     4592  theresult = shell_cmd_list(svnBinary && "update" && QUOTE & workingFolderUnix & QUOTE) 
     4593   
     4594  if count(theresult) > 0 then 
     4595     
     4596    -------- reload the refreshed movie: 
     4597    if the moviepath contains workingFolder then 
     4598       
     4599      -- go to movie the moviepath & the moviename 
     4600       
     4601    else 
     4602       
     4603      if onlyUpdate_SVN_WorkingFolder <> 1 then 
     4604         
     4605        -------------------------- now get the updated movies over here: 
     4606        if the last char of workingFolder <> the last char of the applicationpath then put the last char of the applicationpath after workingFolder 
     4607         
     4608        put "Copy files from " & workingFolder & " to " & oldmoviepath 
    42624609        mCopyAllFiles(me, workingFolder, oldmoviepath) 
    42634610         
    42644611        ---------------------------------- 
     4612         
    42654613      end if 
    42664614       
     
    42694617    put theresult[1] 
    42704618     
    4271     if onlyUpdate_SVN_WorkingFolder = 1 then go to movie oldmovie 
    4272      
    4273     alert "Done, see the results of the svn operation in the message window." 
     4619    if doReturnToOldMovie = 1 then go to movie oldmovie 
     4620     
     4621    if dontShowAlert <> 1 then alert "Done, see the results of the svn operation in the message window." 
    42744622     
    42754623  else 
    42764624     
    4277     if onlyUpdate_SVN_WorkingFolder = 1 then go to movie oldmovie 
    4278      
    4279     alert "svn application did not respond, something seems to have failed. :-(" 
     4625    if doReturnToOldMovie = 1 then go to movie oldmovie 
     4626     
     4627    if dontShowAlert <> 1 then alert "svn application did not respond, something seems to have failed. :-(" 
    42804628  end if 
    42814629   
     
    42954643    if thisFolder starts ".svn" then next repeat 
    42964644    if not(baFolderExists(toFolder & thisFolder)) then 
     4645      put "Attempting to create folder:" && toFolder & thisFolder 
    42974646      erg = baCreateFolder(toFolder & thisFolder) 
     4647       
     4648      if erg = 0 then put "successfully created folder" 
     4649      else put "Unable to create folder." 
     4650       
    42984651    else 
    42994652      erg = 1 
     
    43294682-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    43304683 
    4331 on mSVN_Commit_CurrentScripts_ScriptText me, selected_Members_Only, chooseNewPath, commitMsg 
     4684on mSVN_Commit_CurrentScripts_ScriptText me, selected_Members_Only, chooseNewPath, commitMsg, dontShowAlert 
    43324685   
    43334686  workingCopies = value(getPref("svn_workingCopies_paths.txt")) 
     
    43374690  if length(svnBinary) < 1 then return 0 
    43384691   
    4339   workingFolder = mGetWorkingCopyPath(me, the moviepath & the moviename, chooseNewPath, workingCopies) 
     4692  workingFolder = mGetWorkingCopyPath(me, the moviepath & the moviename, chooseNewPath, workingCopies, "No working copy is specified for this movies scripttext. Please select a working copy for the scripttext now.") 
    43404693  if length(workingFolder) < 1 then return 0 
    43414694   
     
    43624715   
    43634716   
    4364   saveMovie() 
     4717  clibfolder = "" 
     4718   
     4719   
     4720  -------- if we work on only one castlib: 
     4721   
     4722  if ilk(selected_Members_Only) = #castLib then 
     4723    selected_Members_Only.save() 
     4724     
     4725    delim = the last char of the applicationpath 
     4726     
     4727    olddelim = the itemdelimiter 
     4728    the itemdelimiter = delim 
     4729     
     4730    if the last item of workingFolder = "castlib" & selected_Members_Only.number then 
     4731      clibfolder = workingFolder 
     4732    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     
     4740     
     4741  else 
     4742    saveMovie() 
     4743     
     4744  end if 
    43654745   
    43664746   
    43674747  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  -------- 
    43684753   
    43694754   
     
    44304815     
    44314816    put theResult 
    4432     alert "Done, see the results of the svn operation in the message window." 
     4817     
     4818     
     4819    if dontShowAlert <> 1 then 
     4820      alert "Done, see the results of the svn operation in the message window." 
     4821    end if 
    44334822     
    44344823  else 
    4435     alert "svn application did not respond, something seems to have failed. :-(" 
     4824    alert "svn application did not respond, something seems to have failed, while commiting the scripttext. :-(" 
    44364825  end if 
    44374826   
     
    45174906-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    45184907 
    4519 on mGetWorkingCopyPath me, movieIdentifier, chooseNewPath, workingCopies 
     4908on mGetWorkingCopyPath me, movieIdentifier, chooseNewPath, workingCopies, selectMsg 
    45204909   
    45214910  movieIdentifier = string(movieIdentifier) 
     
    45394928  end if 
    45404929   
     4930   
    45414931  if chooseNewPath = 1 then 
    45424932    workingFolder = baGetFolder(the moviepath, "Please select a working copy for SVN update", 3, "Select working copy", -2, -2) 
     
    45444934   
    45454935  if workingFolder = "" then 
    4546     alert "No working copy is specified for this movie. Please select a working copy now." 
     4936     
     4937    selectMsg = string(selectMsg) 
     4938    if length(selectMsg) < 1 then selectMsg = "No working copy is specified for this movie. Please select a working copy now." 
     4939     
     4940    alert selectMsg 
     4941     
    45474942    workingFolder = baGetFolder(the moviepath, "Please select a working copy for SVN update", 3, "Select working copy", -2, -2) 
    45484943  end if 
  • trunk/lingosource/castlib2/memberInfo.xml

    r16 r18  
    3636                <memberName>SpriteNameBeaver</memberName> 
    3737        </SpriteNameBeaver> 
     38        <commonmoviescript> 
     39                <scriptType>#parent</scriptType> 
     40                <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 
     41                <memberName>commonMovieScript</memberName> 
     42        </commonmoviescript> 
     43        <commonmoviescript> 
     44                <scriptType>#parent</scriptType> 
     45                <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 
     46                <memberName>commonMovieScript</memberName> 
     47        </commonmoviescript> 
    3848        <commonMovieScript> 
    3949                <scriptType>#parent</scriptType> 
Note: See TracChangeset for help on using the changeset viewer.