Changeset 188
- Timestamp:
- 09/30/08 13:47:30 (4 years ago)
- Location:
- trunk/lingosource/castlib1
- Files:
-
- 4 edited
-
OSCmenu_Utilities.ls (modified) (1 diff)
-
doCommandMovieScript.ls (modified) (1 diff)
-
subversion_version_field.txt (modified) (1 diff)
-
svn_Utilities.ls (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib1/OSCmenu_Utilities.ls
r180 r188 341 341 342 342 subli.add("SVN Update selected castlib...") 343 pLookUpCommandList.setaprop("SVN Update selected castlib...", ["mSVN_Update_SelectedCastlib me, chooseNewPath_optional, onlyUpdate_SVN_WorkingFolder_optional ", "svn_Utilities"])343 pLookUpCommandList.setaprop("SVN Update selected castlib...", ["mSVN_Update_SelectedCastlib me, chooseNewPath_optional, onlyUpdate_SVN_WorkingFolder_optional, selectionList_optional", "svn_Utilities"]) 344 344 345 345 subli.add("SVN Update Current Movie...") -
trunk/lingosource/castlib1/doCommandMovieScript.ls
r116 r188 11 11 12 12 ---- This handler used to be in "thisMovieScript", but due to a scope bug with calling handlers in other movies -> tell the stage 13 -- unfortunately this doesn't fix the problem. have to investiagetlater WHY... so calling handlers, which are in this movie will fail13 -- unfortunately this doesn't fix the problem. I have to investigate later WHY... so calling handlers, which are in this movie will fail 14 14 15 15 -
trunk/lingosource/castlib1/subversion_version_field.txt
r186 r188 1 r1 881 r190 -
trunk/lingosource/castlib1/svn_Utilities.ls
r180 r188 1905 1905 1906 1906 if count(castlibList) < 1 then 1907 alert "No castlib selected. The parameter didn't yi led a valid list. Make sure, that you provide a linear list with integers, specifying a number of a castlib each."1907 alert "No castlib selected. The parameter didn't yield a valid list. Make sure, that you provide a linear list with integers, specifying a number of a castlib each." 1908 1908 return 0 1909 1909 end if … … 2453 2453 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2454 2454 2455 on mSVN_Update_SelectedCastlib me, chooseNewPath, onlyUpdate_SVN_WorkingFolder, dontShowAlert2455 on mSVN_Update_SelectedCastlib me, chooseNewPath, onlyUpdate_SVN_WorkingFolder, selectionList, dontShowAlert 2456 2456 2457 2457 actCL = the activecastlib 2458 castlibList = [actCL] 2459 2460 selectionList = string(selectionList) 2461 if length(selectionList) > 0 then 2462 2463 if char 1 of selectionList <> "[" then put "[" before selectionList 2464 if the last char of selectionList <> "]" then put "]" after selectionList 2465 2466 selectionList = value(selectionList) 2467 if listP(selectionList) then 2468 clnum = the number of castlibs + 1 2469 castlibList = [] 2470 selectionListCnt = count(selectionList) 2471 repeat with n = 1 to selectionListCnt 2472 int = integer(selectionList[n]) 2473 if integerP(int) then 2474 if clnum > int then 2475 if castlibList.getPos(int) < 1 then castlibList.add(int) 2476 end if 2477 end if 2478 end repeat 2479 end if 2480 end if 2481 2482 if count(castlibList) < 1 then 2483 alert "No castlib selected. The parameter didn't yield a valid list. Make sure, that you provide a linear list with integers, specifying a number of a castlib each." 2484 return 0 2485 end if 2486 put "Updating castlibs:" && castlibList 2487 2458 2488 2459 2489 workingCopies = value(getPref("svn_wCopies_paths_Binary.txt")) … … 2472 2502 2473 2503 2474 fname = castlib(actCL).filename 2504 isMac = (the platform contains "mac") 2505 castlibPathList = [] 2475 2506 2476 2507 --------------------------------------- … … 2482 2513 the itemdelimiter = mp 2483 2514 2484 if length(fname) > 0 then 2485 2486 offs = offset(mp, fname) 2487 if offs <> 1 then 2488 alert "Castlib" && castlib(actCL) && "is not within your current moviepath. This is not supported." 2515 2516 repeat with actCL in castlibList 2517 fname = castlib(actCL).filename 2518 if length(fname) > 0 then 2519 2520 offs = offset(mp, fname) 2521 if offs <> 1 then 2522 alert "Castlib" && castlib(actCL) && "is not within your current moviepath. This is not supported." 2523 return 0 2524 end if 2525 2526 relpath = fname 2527 delete char 1 to mplen of relpath 2528 2529 newpath = workingFolder & relpath 2530 -- newpathDir = newpath 2531 -- delete the last item of newpathDir 2532 2533 -- if baFolderExists(newpathDir) <> 1 then baCreateFolder(newpathDir) 2534 -- baCopyFileProgress(fname, newpath, "Always", "Copying castlib " & actCL & " to working folder", "", 33) 2535 2536 if isMac then 2537 castlibPathList.add([#newpath:newpath, #newpathUnix: baUnixName(newpath), #fname:fname]) 2538 else 2539 castlibPathList.add([#newpath:newpath, #newpathUnix: newpath, #fname:fname]) 2540 end if 2541 2542 else 2543 2544 -- musty something REALLY wrong, as the filename should ALWAYS be of any length (internal castlibs ) 2489 2545 return 0 2546 2490 2547 end if 2491 2548 2492 relpath = fname 2493 delete char 1 to mplen of relpath 2494 2495 newpath = workingFolder & relpath 2496 newpathDir = newpath 2497 delete the last item of newpathDir 2498 -- if baFolderExists(newpathDir) <> 1 then baCreateFolder(newpathDir) 2499 -- baCopyFileProgress(fname, newpath, "Always", "Copying castlib " & actCL & " to working folder", "", 33) 2500 2501 else 2502 2503 -- musty something REALLY wrong, as the filename should ALWAYS be of any length (internal castlibs ) 2504 return 0 2505 2506 end if 2549 end repeat 2507 2550 2508 2551 the itemdelimiter = olddelim … … 2510 2553 else 2511 2554 2512 newpath = fname 2555 repeat with actCL in castlibList 2556 fname = castlib(actCL).filename 2557 newpath = fname 2558 if isMac then 2559 castlibPathList.add([#newpath:newpath, #newpathUnix: baUnixName(newpath), #fname:fname]) 2560 else 2561 castlibPathList.add([#newpath:newpath, #newpathUnix: newpath, #fname:fname]) 2562 end if 2563 end repeat 2564 2513 2565 end if 2514 2566 --------------------------------------- … … 2539 2591 svnBinary = baUnixName(svnBinary) 2540 2592 workingFolderUnix = baUnixName(workingFolder) 2541 newpathUnix = baUnixName(newpath)2593 -- newpathUnix = baUnixName(newpath) 2542 2594 else 2543 newpathUnix = newpath2595 -- newpathUnix = newpath 2544 2596 workingFolderUnix = workingFolder 2545 2597 if the last char of workingFolderUnix = the last char of the applicationpath then delete the last char of workingFolderUnix … … 2547 2599 2548 2600 2549 mDisplayWaitStatusText me, "SVN update:" && newpathUnix 2550 2551 theresult = mDoShellCmd(me, svnBinary && "update" && QUOTE & newpathUnix & QUOTE, RETURN, 0, 1) 2552 2553 2554 if count(theresult) > 0 then 2555 2556 -------- reload the refreshed movie: 2557 if the moviepath contains workingFolder then 2558 2559 -- go to movie the moviepath & the moviename 2560 2601 mDisplayWaitStatusText me, "SVN update..." -- && newpathUnix 2602 2603 repeat with castlibPaths in castlibPathList 2604 theresult = mDoShellCmd(me, svnBinary && "update" && QUOTE & castlibPaths[#newpathUnix] & QUOTE, RETURN, 0, 1) 2605 if count(theresult) > 0 then 2606 if doReturnToOldMovie = 1 then go to movie oldmovie 2607 if dontShowAlert <> 1 then alert "svn application did not respond, something seems to have failed. :-(" 2608 setPref("svn_wCopies_paths_Binary.txt", string(workingCopies)) 2609 if statusSwitched = 1 then statusSwitched = mSwitchToStatusMode(me, 0) 2610 exit 2561 2611 else 2562 2563 if onlyUpdate_SVN_WorkingFolder <> 1 then 2564 2565 -------------------------- now get the updated movies over here: 2566 if the last char of workingFolder <> the last char of the applicationpath then put the last char of the applicationpath after workingFolder 2567 2568 put "Copy file from " & workingFolder & " to " & oldmoviepath 2569 2570 2571 erg = baCopyFileProgress(newpath, fname, "Always", "Replacing castlib with the version of the working folder", "", 33) 2612 put theresult[1] 2613 end if 2614 end repeat 2615 2616 2617 2618 -------- reload the refreshed movie: 2619 if the moviepath contains workingFolder then 2620 2621 -- go to movie the moviepath & the moviename 2622 2623 else 2624 2625 if onlyUpdate_SVN_WorkingFolder <> 1 then 2626 2627 -------------------------- now get the updated movies over here: 2628 if the last char of workingFolder <> the last char of the applicationpath then put the last char of the applicationpath after workingFolder 2629 2630 put "Copy file from " & workingFolder & " to " & oldmoviepath 2631 2632 2633 repeat with castlibPaths in castlibPathList 2634 2635 erg = baCopyFileProgress(castlibPathList[#newpath], castlibPathList[#fname], "Always", "Replacing castlib with the version of the working folder", "", 33) 2572 2636 if erg <> 0 then 2573 alert "An error occurred during copying the file (" & newpath& "). Error:" && erg2637 alert "An error occurred during copying the file (" & castlibPathList[#newpath] & "). Error:" && erg 2574 2638 else 2575 put "Replaced file:" && newpath2639 put "Replaced file:" && castlibPathList[#newpath] 2576 2640 end if 2577 2641 2578 2579 ---------------------------------- 2580 2581 end if 2582 2583 end if 2584 2585 put theresult[1] 2586 2587 if doReturnToOldMovie = 1 then go to movie oldmovie 2588 2589 if dontShowAlert <> 1 then alert "Done, see the results of the svn operation in the message window." 2590 2591 else 2592 2593 if doReturnToOldMovie = 1 then go to movie oldmovie 2594 2595 if dontShowAlert <> 1 then alert "svn application did not respond, something seems to have failed. :-(" 2596 end if 2642 end repeat 2643 ---------------------------------- 2644 2645 end if 2646 2647 end if 2648 2649 2650 2651 if doReturnToOldMovie = 1 then go to movie oldmovie 2652 2653 if dontShowAlert <> 1 then alert "Done, see the results of the svn operation in the message window." 2654 2597 2655 2598 2656 … … 2875 2933 2876 2934 if count(castlibList) < 1 then 2877 alert "No castlib selected. The parameter didn't yi led a valid list. Make sure, that you provide a linear list with integers, specifying a number of a castlib each."2935 alert "No castlib selected. The parameter didn't yield a valid list. Make sure, that you provide a linear list with integers, specifying a number of a castlib each." 2878 2936 if statusSwitched = 1 then statusSwitched = mSwitchToStatusMode(me, 0) 2879 2937 return 0
Note: See TracChangeset
for help on using the changeset viewer.
