Changeset 221
- Timestamp:
- 12/21/08 17:39:56 (3 years ago)
- Location:
- trunk/lingosource/castlib1
- Files:
-
- 2 added
- 5 edited
-
OSCmenu_Utilities.ls (modified) (3 diffs)
-
alexUtilities.ls (modified) (2 diffs)
-
member32_1.ls (added)
-
member8_1.html (added)
-
memberInfo.xml (modified) (2 diffs)
-
subversion_version_field.txt (modified) (1 diff)
-
svn_Utilities.ls (modified) (48 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib1/OSCmenu_Utilities.ls
r215 r221 303 303 304 304 305 306 307 305 li.add("") 308 306 li.add("Subversion SVN") 309 307 svn_subli = [] 310 308 li.add(svn_subli) 309 310 ---------------------------------------------------- most used svn functions: 311 svn_subli.add("SVN Quicklinks") 312 subli = [] 313 svn_subli.add(subli) 314 315 subli.add("SVN Update selected castlib(s)...") 316 pLookUpCommandList.setaprop("SVN Update selected castlib(s)...", ["mSVN_Update_SelectedCastlib_and_source me, chooseNewPath_optional, onlyUpdate_SVN_WorkingFolder_optional, selectionList_optional, revisionNumber_optional", "svn_Utilities"]) 317 318 subli.add("") 319 320 subli.add("SVN Commit selected castlib(s) (and scripttext)...") 321 pLookUpCommandList.setaprop("SVN Commit selected castlib(s) (and scripttext)...", ["mSVN_Commit_SelectedCastlib_AND_Scripttext me, chooseNewPath_optional, commitMsg, selectionList_optional", "svn_Utilities"]) 322 323 324 311 325 ---------------------------------------------------- scripttext export functions: 312 326 svn_subli.add("Scripttext ex/import for SVN") … … 321 335 subli.add("") 322 336 subli.add("SVN Update ScriptText in Working Copy...") 323 pLookUpCommandList.setaprop("SVN Update ScriptText in Working Copy...", ["mSVN_Update_Working_Copy_ScriptText me, chooseNewPath_optional", "svn_Utilities"])337 pLookUpCommandList.setaprop("SVN Update ScriptText in Working Copy...", ["mSVN_Update_Working_Copy_ScriptText me, revisionNumber_optional, chooseNewPath_optional, selectionOnly_optional", "svn_Utilities"]) 324 338 325 339 subli.add("") … … 332 346 pLookUpCommandList.setaprop("SVN Commit ScriptText only...", ["mSVN_Commit_CurrentScripts_ScriptText me, selected_Members_Only_optional", "svn_Utilities"]) 333 347 334 subli.add("") 335 subli.add("SVN Delete Selected Scripts...") 336 pLookUpCommandList.setaprop("SVN Delete Selected Scripts...", ["mSVN_Delete_Selected_Scripts me, chooseNewPath_optional", "svn_Utilities"]) 348 349 -- subli.add("") 350 -- subli.add("SVN Delete Selected Scripts...") 351 -- pLookUpCommandList.setaprop("SVN Delete Selected Scripts...", ["mSVN_Delete_Selected_Scripts me, chooseNewPath_optional", "svn_Utilities"]) 337 352 338 353 -
trunk/lingosource/castlib1/alexUtilities.ls
r215 r221 35 35 property pHandlerMenuWindowName 36 36 property pStatusMode -- are we in "show status" mode => maximized 37 38 property pCaseLists 37 39 38 40 … … 3202 3204 3203 3205 end 3206 3207 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3208 on ____________CONVERT_CASE 3209 end 3210 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3211 3212 3213 3214 on mUpperCase me, aString 3215 3216 if not(listP(pCaseLists)) then mCreateCaseLists me 3217 3218 lowercase = pCaseLists.getaprop(#lowercase) 3219 uppercase = pCaseLists.getaprop(#uppercase) 3220 3221 repeat with i = length(aString) down to 1 3222 pos = getPos(lowercase, char i of aString) 3223 if pos > 0 then 3224 put uppercase[pos] into char i of aString 3225 end if 3226 end repeat 3227 3228 return aString 3229 3230 end 3231 3232 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3233 3234 on mLowerCase me, aString 3235 3236 if not(listP(pCaseLists)) then mCreateCaseLists me 3237 3238 lowercase = pCaseLists.getaprop(#lowercase) 3239 uppercase = pCaseLists.getaprop(#uppercase) 3240 3241 repeat with i = length(aString) down to 1 3242 pos = getPos(uppercase, char i of aString) 3243 if pos > 0 then 3244 put lowercase[pos] into char i of aString 3245 end if 3246 end repeat 3247 3248 return aString 3249 end 3250 3251 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3252 3253 on mCreateCaseLists me 3254 3255 pCaseLists = [:] 3256 3257 if the platform contains "Macintosh" then 3258 vA = numToChar(229) 3259 else 3260 vA = numToChar(194) 3261 end if 3262 3263 -- pUPPERCASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZZçË"&vA& "Ìéæèêíëìîñï 3264 ÍòôÛ®¯ÎÙ" 3265 -- pLowercase = "abcdefghijklmnopqrstuvwxyz"&""&"Ÿ¿ÏØ" 3266 pCaseLists.setaprop(#uppercase, ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "ç", "Ë", vA, "A", "", "Ì", "", "", "", "é", "æ", "è", "ê", "í", "ë", "ì", "", "î", "ñ", "ï", " 3267 ", "Í", "ò", "ô", "U", "", "®", "¯", "Î", "Ù"]) 3268 pCaseLists.setaprop(#lowercase, ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "", "", vA, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "Ÿ", "¿", "Ï", "Ø"]) 3269 3270 end 3271 -
trunk/lingosource/castlib1/memberInfo.xml
r215 r221 43 43 <fName>simpleBMMenu</fName> 44 44 </simpleBMMenu> 45 <member8_1> 46 <scriptType>#text</scriptType> 47 <comments></comments> 48 <memberName>member8_1</memberName> 49 <fName>member8_1</fName> 50 </member8_1> 45 51 <OSCmenu_Utilities> 46 52 <scriptType>#score</scriptType> … … 139 145 <fName>statusOutput</fName> 140 146 </statusOutput> 147 <member32_1> 148 <scriptType>#movie</scriptType> 149 <comments></comments> 150 <memberName>member32_1</memberName> 151 <fName>member32_1</fName> 152 </member32_1> 141 153 </Untitled> -
trunk/lingosource/castlib1/subversion_version_field.txt
r217 r221 1 r2 191 r223 -
trunk/lingosource/castlib1/svn_Utilities.ls
r217 r221 356 356 bbeditBinary = mFindUnixAppInPath(me, "bbedit") 357 357 if length(bbeditBinary) > 0 then 358 mDoShellCmd(me, bbeditBinary && QUOTE & baUnixName(thePath) & QUOTE)358 mDoShellCmd(me, bbeditBinary && QUOTE & mConvertHFS2Unix(me, thePath) & QUOTE) 359 359 exit 360 360 end if … … 541 541 DirectImageInstance = 0 542 542 if skipIcons <> 1 then 543 if mCheckForXtra(me, "DirectImage") = 1 then 544 if the platform contains "mac" then 545 DirectImageInstance = new(xtra "DirectImage", 234521832) 546 else 547 DirectImageInstance = new(xtra "DirectImage", 228285877) 548 end if 549 else if mCheckForXtra(me, "SharpExport") = 1 then 543 if mCheckForXtra(me, "SharpExport") = 1 then 550 544 SharpExportInst = new(xtra "SharpExport") 551 545 else … … 557 551 isMac = (the platform contains "mac") -- we need the differentiation because of the dreaded 31 char limit 558 552 553 ----------------------- 554 resetUNames = 0 555 if isMac then 556 if baSysFolder("prefs") starts "/" then 557 baReturnUnixNames(0) 558 resetUNames = 1 559 end if 560 end if 561 ----------------------- 562 559 563 doit = 0 560 564 561 562 565 statusSwitched = mSwitchToStatusMode(me, 1) 563 566 564 567 repeat with m = firstCastNum to lastCastNum 568 569 listOfAllFiles = ["memberinfo"] 565 570 566 571 thisFolder = theFolder & "castlib" & m … … 680 685 681 686 if memref <> member(theDefaultName, m) then 682 put "Member" && memref && "is duplicate. Member with duplicate names are not supported "687 put "Member" && memref && "is duplicate. Member with duplicate names are not supported. (Can't have the same file twice in one folder.)" 683 688 next repeat 684 689 end if … … 743 748 snam = baShortFileName(thisFolder & origname & ext) 744 749 if length(snam) > 0 then 750 -- alterText = mGetTextFromFile(me, thisFolder & origname & ext) 751 alterText = mGetTextFromFile(me, snam) 752 else 745 753 alterText = mGetTextFromFile(me, thisFolder & origname & ext) 746 754 end if … … 749 757 end if 750 758 759 listOfAllFiles.add(mLowerCase(me, origname)) 760 751 761 if alterText <> scrText then 752 762 … … 758 768 759 769 mSaveToTextFile me, scrText, thisFolder & theDefaultName & ext 770 771 760 772 761 773 bmexp = 0 … … 826 838 827 839 840 ----------------------- 841 if isMac then baReturnUnixNames(1) 842 ----------------------- 843 844 flist = baFileList(thisFolder, "*.*") 845 846 847 -- put "flist =" && flist 848 -- put "listOfAllFiles =" && listOfAllFiles 849 repeat with thisFile in flist 850 split = mSplitPath(me, thisFile) 851 if listOfAllFiles.getPos(mLowerCase(me, split[#basename])) < 1 then 852 if isMac then 853 erg = baDeleteFile(mConvertHFS2Unix(me, thisFolder & thisFile)) 854 else 855 erg = baDeleteFile(thisFolder & thisFile) 856 end if 857 if erg = 1 then 858 put "Deleted file" && thisFolder & thisFile 859 else 860 put "Unable to delete file" && thisFolder & thisFile 861 end if 862 end if 863 end repeat 864 865 ----------------------- 866 if isMac then baReturnUnixNames(0) 867 ----------------------- 868 869 828 870 end repeat 871 872 if resetUNames = 1 then baReturnUnixNames(1) 829 873 830 874 DirectImageInstance = 0 … … 1557 1601 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1558 1602 1559 on mSVN_Update_Working_Copy_ScriptText me, chooseNewPath1603 on mSVN_Update_Working_Copy_ScriptText me, revisionNumber, chooseNewPath, selectionList, dontShowAlert 1560 1604 1561 1605 workingCopies = value(getPref("svn_workingCopies_paths.txt")) … … 1569 1613 1570 1614 if the platform contains "mac" then 1571 svnBinary = baUnixName(svnBinary)1572 workingFolder = baUnixName(workingFolder)1615 svnBinary = mConvertHFS2Unix(me, svnBinary) 1616 workingFolder = mConvertHFS2Unix(me, workingFolder) 1573 1617 else 1574 1618 if the last char of workingFolder = the last char of the applicationpath then delete the last char of workingFolder … … 1578 1622 mDisplayWaitStatusText me, "Updating folder:" && workingFolder 1579 1623 1580 theresult = mDoShellCmd(me, svnBinary && "update" && QUOTE & workingFolder & QUOTE, RETURN, 0, 1) 1624 1625 revisionNumber = getValidRevNumber(me, revisionNumber) 1626 1627 castlibList = getCastlibList(me, selectionList) 1628 1629 if count(castlibList) < 1 then 1630 theresult = mDoShellCmd(me, svnBinary && "update" && QUOTE & workingFolder & QUOTE, RETURN, 0, 1) 1631 1632 else 1633 1634 theresult = [] 1635 repeat with num in castlibList 1636 1637 if the platform contains "mac" then thePath = workingFolder & "castlib" & num & "/" 1638 else thePath = workingFolder & "castlib" & num & the last char of the moviepath 1639 1640 ret = mDoShellCmd(me, svnBinary && "update" && "-r" && revisionNumber && QUOTE & thePath & QUOTE, RETURN, 0, 1) 1641 if count(ret) > 0 then theresult.add(ret[1]) 1642 1643 end repeat 1644 1645 end if 1581 1646 1582 1647 if statusSwitched = 1 then statusSwitched = mSwitchToStatusMode(me, 0) 1583 1648 1584 1649 if count(theresult) > 0 then 1585 put theresult[1] 1586 alert "Done, see the results of the svn operation in the message window." 1650 repeat with n = 1 to count(theresult) 1651 put theresult[n] 1652 end repeat 1653 if dontShowAlert <> 1 then 1654 alert "Done, see the results of the svn operation in the message window." 1655 end if 1587 1656 else 1588 alert "svn application did not respond, something seems to have failed. :-(" 1657 if dontShowAlert <> 1 then 1658 alert "svn application did not respond, something seems to have failed. :-(" 1659 end if 1589 1660 end if 1590 1661 … … 1593 1664 end 1594 1665 1666 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1667 1668 on getValidRevNumber me, revisionNumber 1669 if integerP(integer(revisionNumber)) then return string(revisionNumber) 1670 1671 revisionNumber = string(revisionNumber) 1672 if length(revisionNumber) < 1 then 1673 revisionNumber = "HEAD" 1674 else 1675 if char 1 of revisionNumber = "'" then delete char 1 of revisionNumber 1676 if the last char of revisionNumber = "'" then delete the last char of revisionNumber 1677 end if 1678 1679 return QUOTE & revisionNumber & QUOTE 1680 end 1595 1681 1596 1682 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx … … 1611 1697 if the platform contains "mac" then 1612 1698 isMac = 1 1613 svnBinary = baUnixName(svnBinary)1699 svnBinary = mConvertHFS2Unix(me, svnBinary) 1614 1700 1615 1701 else … … 1737 1823 1738 1824 if isMac = 1 then 1739 ufpath = baUnixName(fpath)1825 ufpath = mConvertHFS2Unix(me, fpath) 1740 1826 else 1741 1827 ufpath = fpath … … 1797 1883 1798 1884 if isMac = 1 then 1799 workingFolder = baUnixName(workingFolder)1885 workingFolder = mConvertHFS2Unix(me, workingFolder) 1800 1886 else 1801 1887 if the last char of workingFolder = the last char of the applicationpath then delete the last char of workingFolder … … 1898 1984 1899 1985 1900 castlibList = 0 1901 selectionList = string(selectionList) 1902 if length(selectionList) > 0 then 1903 if char 1 of selectionList <> "[" then put "[" before selectionList 1904 if the last char of selectionList <> "]" then put "]" after selectionList 1905 selectionList = value(selectionList) 1906 if listP(selectionList) then 1907 clnum = the number of castlibs + 1 1908 castlibList = [] 1909 selectionListCnt = count(selectionList) 1910 repeat with n = 1 to selectionListCnt 1911 int = integer(selectionList[n]) 1912 if integerP(int) then 1913 if clnum > int then 1914 if castlibList.getPos(int) < 1 then castlibList.add(int) 1915 end if 1916 end if 1917 end repeat 1918 end if 1919 end if 1920 1921 if castlibList = 0 then 1922 castlibList = [] 1923 actCL = the activecastlib 1924 castlibList.add(actCL) 1925 end if 1926 1986 castlibList = getCastlibList(me, selectionList, the activecastlib) 1927 1987 1928 1988 mpname = the moviepath & the moviename … … 1989 2049 -------------------- get version number: 1990 2050 if the platform contains "mac" then 1991 svnBin = baUnixName(svnBinary)1992 workFolder = baUnixName(workingFolder)2051 svnBin = mConvertHFS2Unix(me, svnBinary) 2052 workFolder = mConvertHFS2Unix(me, workingFolder) 1993 2053 else 1994 2054 workFolder = workingFolder … … 2092 2152 offs = offset(mp, fname) 2093 2153 if offs <> 1 then 2094 alert "Castlib" && castlib( actCL) && "is not within your current moviepath. This is not supported."2154 alert "Castlib" && castlib(cl) && "is not within your current moviepath. This is not supported." 2095 2155 if statusSwitched = 1 then statusSwitched = mSwitchToStatusMode(me, 0) 2096 2156 return 0 … … 2104 2164 delete the last item of newpathDir 2105 2165 if baFolderExists(newpathDir) <> 1 then baCreateFolder(newpathDir) 2106 baCopyFileProgress(fname, newpath, "Always", "Copying castlib " & actCL& " to working folder", "", 33)2166 baCopyFileProgress(fname, newpath, "Always", "Copying castlib " & cl & " to working folder", "", 33) 2107 2167 2108 2168 castlibList[r] = [cl, fname, newpath, newpathDir] … … 2137 2197 --------------------------------------- 2138 2198 if the platform contains "mac" then 2139 svnBinary = baUnixName(svnBinary)2140 workingFolder = baUnixName(workingFolder)2199 svnBinary = mConvertHFS2Unix(me, svnBinary) 2200 workingFolder = mConvertHFS2Unix(me, workingFolder) 2141 2201 2142 2202 castlibListCnt = count(castlibList) 2143 2203 repeat with r = 1 to castlibListCnt 2144 castlibList[r][3] = baUnixName(castlibList[r][3])2204 castlibList[r][3] = mConvertHFS2Unix(me, castlibList[r][3]) 2145 2205 end repeat 2146 2206 … … 2272 2332 -------------------- get version number: 2273 2333 if the platform contains "mac" then 2274 svnBin = baUnixName(svnBinary)2275 workFolder = baUnixName(workingFolder)2334 svnBin = mConvertHFS2Unix(me, svnBinary) 2335 workFolder = mConvertHFS2Unix(me, workingFolder) 2276 2336 else 2277 2337 workFolder = workingFolder … … 2388 2448 --------------------------------------- 2389 2449 if the platform contains "mac" then 2390 svnBinary = baUnixName(svnBinary)2391 workingFolder = baUnixName(workingFolder)2450 svnBinary = mConvertHFS2Unix(me, svnBinary) 2451 workingFolder = mConvertHFS2Unix(me, workingFolder) 2392 2452 else 2393 2453 if the last char of workingFolder = the last char of the applicationpath then delete the last char of workingFolder … … 2486 2546 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2487 2547 2488 on mSVN_Update_SelectedCastlib me, chooseNewPath, onlyUpdate_SVN_WorkingFolder, selectionList, revisionNumber, dontShowAlert 2489 2490 actCL = the activecastlib 2491 castlibList = [actCL] 2548 on mSVN_Update_SelectedCastlib_and_source me, chooseNewPath, onlyUpdate_SVN_WorkingFolder, selectionList, revisionNumber, dontShowAlert 2549 mSVN_Update_Working_Copy_ScriptText me, revisionNumber, void, selectionList, 1 2550 mSVN_Update_SelectedCastlib me, chooseNewPath, onlyUpdate_SVN_WorkingFolder, selectionList, revisionNumber, dontShowAlert 2551 end 2552 2553 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2554 2555 on getCastlibList me, selectionList, defaultCLNum 2556 2557 castlibList = 0 2492 2558 2493 2559 selectionList = string(selectionList) 2494 2560 if length(selectionList) > 0 then 2561 2562 offs = offset("'", selectionList) 2563 repeat while offs > 0 2564 put QUOTE into char offs of selectionList 2565 offs = offset("'", selectionList) 2566 end repeat 2495 2567 2496 2568 if char 1 of selectionList <> "[" then put "[" before selectionList … … 2503 2575 selectionListCnt = count(selectionList) 2504 2576 repeat with n = 1 to selectionListCnt 2505 int = integer(selectionList[n]) 2506 if integerP(int) then 2507 if clnum > int then 2508 if castlibList.getPos(int) < 1 then castlibList.add(int) 2577 2578 cl = castlib(selectionList[n]) 2579 if ilk(cl) = #castlib then 2580 int = cl.number 2581 if castlibList.getPos(int) < 1 then 2582 castlibList.add(int) 2583 end if 2584 else 2585 int = integer(selectionList[n]) 2586 if integerP(int) then 2587 if clnum > int then 2588 if castlibList.getPos(int) < 1 then castlibList.add(int) 2589 end if 2509 2590 end if 2510 2591 end if … … 2512 2593 end if 2513 2594 end if 2595 2596 if not(listP(castlibList)) then castlibList = [] 2597 2598 if count(castlibList) < 1 then 2599 if ilk(defaultCLNum) = #integer then 2600 castlibList.add(defaultCLNum) 2601 else if listP(defaultCLNum) then 2602 castlibList = defaultCLNum 2603 end if 2604 end if 2605 2606 return castlibList 2607 end 2608 2609 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2610 2611 on mSVN_Update_SelectedCastlib me, chooseNewPath, onlyUpdate_SVN_WorkingFolder, selectionList, revisionNumber, dontShowAlert 2612 2613 castlibList = getCastlibList(me, selectionList, the activecastlib) 2514 2614 2515 2615 if count(castlibList) < 1 then … … 2568 2668 2569 2669 if isMac then 2570 castlibPathList.add([#newpath:newpath, #newpathUnix: baUnixName(newpath), #fname:fname])2670 castlibPathList.add([#newpath:newpath, #newpathUnix: mConvertHFS2Unix(me, newpath), #fname:fname]) 2571 2671 else 2572 2672 castlibPathList.add([#newpath:newpath, #newpathUnix: newpath, #fname:fname]) … … 2590 2690 newpath = fname 2591 2691 if isMac then 2592 castlibPathList.add([#newpath:newpath, #newpathUnix: baUnixName(newpath), #fname:fname])2692 castlibPathList.add([#newpath:newpath, #newpathUnix: mConvertHFS2Unix(me, newpath), #fname:fname]) 2593 2693 else 2594 2694 castlibPathList.add([#newpath:newpath, #newpathUnix: newpath, #fname:fname]) … … 2622 2722 2623 2723 if the platform contains "mac" then 2624 svnBinary = baUnixName(svnBinary)2625 workingFolderUnix = baUnixName(workingFolder)2724 svnBinary = mConvertHFS2Unix(me, svnBinary) 2725 workingFolderUnix = mConvertHFS2Unix(me, workingFolder) 2626 2726 -- newpathUnix = baUnixName(newpath) 2627 2727 else … … 2634 2734 mDisplayWaitStatusText me, "SVN update..." -- && newpathUnix 2635 2735 2636 if integerP(integer(revisionNumber)) then 2637 revisionNumber = string(revisionNumber) 2638 else 2639 revisionNumber = string(revisionNumber) 2640 if length(revisionNumber) < 1 then 2641 revisionNumber = "HEAD" 2642 else 2643 if char 1 of revisionNumber = "'" then delete char 1 of revisionNumber 2644 if the last char of revisionNumber = "'" then delete the last char of revisionNumber 2645 end if 2646 revisionNumber = QUOTE & revisionNumber & QUOTE 2647 end if 2648 2736 2737 revisionNumber = getValidRevNumber(me, revisionNumber) 2649 2738 2650 2739 repeat with castlibPaths in castlibPathList … … 2727 2816 2728 2817 2818 oldmoviepath = the moviepath 2819 oldmovie = oldmoviepath & the moviename 2820 2821 2729 2822 if the platform contains "mac" then 2730 svnBinary = baUnixName(svnBinary) 2731 workingFolderUnix = baUnixName(workingFolder) 2823 2824 if the platform contains "mac" then 2825 if not(interface(xtra "budapi") contains "baUnixName") then 2826 alert "Please update your copy of the buddyApi xtra to the latest version, baUnixName() is missing." 2827 exit 2828 end if 2829 end if 2830 2831 2832 svnBinary = mConvertHFS2Unix(me, svnBinary) 2833 workingFolderUnix = mConvertHFS2Unix(me, workingFolder) 2834 targetPath = mConvertHFS2Unix(me, oldmoviepath) 2835 2836 theDelim = "/" 2837 if the last char of targetPath = theDelim then delete the last char of targetPath 2838 if the last char of workingFolderUnix = theDelim then delete the last char of workingFolderUnix 2839 2732 2840 else 2733 2841 workingFolderUnix = workingFolder 2734 if the last char of workingFolderUnix = the last char of the applicationpath then delete the last char of workingFolderUnix 2735 end if 2736 2737 oldmoviepath = the moviepath 2738 oldmovie = oldmoviepath & the moviename 2842 targetPath = oldmoviepath 2843 theDelim = the last char of the applicationpath 2844 if the last char of workingFolderUnix = theDelim then delete the last char of workingFolderUnix 2845 if the last char of targetPath = theDelim then delete the last char of targetPath 2846 end if 2847 2739 2848 2740 2849 … … 2758 2867 mDisplayWaitStatusText me, "SVN update:" && workingFolderUnix 2759 2868 2760 if integerP(integer(revisionNumber)) then 2761 revisionNumber = string(revisionNumber) 2762 else 2763 revisionNumber = string(revisionNumber) 2764 if length(revisionNumber) < 1 then 2765 revisionNumber = "HEAD" 2766 else 2767 if char 1 of revisionNumber = "'" then delete char 1 of revisionNumber 2768 if the last char of revisionNumber = "'" then delete the last char of revisionNumber 2769 end if 2770 revisionNumber = QUOTE & revisionNumber & QUOTE 2771 end if 2869 revisionNumber = getValidRevNumber(me, revisionNumber) 2772 2870 2773 2871 theresult = mDoShellCmd(me, svnBinary && "update" && "-r" && revisionNumber && QUOTE & workingFolderUnix & QUOTE, RETURN, 0, 1) … … 2788 2886 2789 2887 put "Copy files from " & workingFolder & " to " & oldmoviepath 2790 mCopyAllFiles(me, workingFolder, oldmoviepath) 2888 2889 -- mCopyAllFiles(me, workingFolder, oldmoviepath, theresult) 2890 2891 mCopyAllFiles(me, workingFolder, oldmoviepath, theresult, workingFolderUnix, targetPath) 2791 2892 2792 2893 ---------------------------------- … … 2799 2900 2800 2901 if doReturnToOldMovie = 1 then 2801 -- put RETURN & "go to movie" && oldmovie & RETURN2902 -- put RETURN & "go to movie" && oldmovie & RETURN 2802 2903 go to movie oldmovie 2803 2904 end if … … 2822 2923 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2823 2924 2824 on mCopyAllFiles me, fromFolder, toFolder 2825 2826 flist = baFolderList(fromFolder) 2827 flistCnt = count(flist) 2828 repeat with n = flistCnt down to 1 2829 thisFolder = flist[n] 2830 if thisFolder starts ".svn" then next repeat 2831 if not(baFolderExists(toFolder & thisFolder)) then 2832 put "Attempting to create folder:" && toFolder & thisFolder 2833 erg = baCreateFolder(toFolder & thisFolder) 2834 2835 if erg = 0 then put "successfully created folder" 2836 else put "Unable to create folder." 2837 2838 else 2839 erg = 1 2840 end if 2841 2842 if erg = 1 then 2843 mCopyAllFiles me, fromFolder & thisFolder & the last char of toFolder, toFolder & thisFolder & the last char of toFolder 2844 else 2845 alert "Unable to create folder (" & thisFolder & "). Error:" && erg 2846 end if 2847 2848 end repeat 2849 2850 flist = baFileList(fromFolder, "*.*") 2851 flistCnt = count(flist) 2852 repeat with n = 1 to flistCnt 2853 thisFile = flist[n] 2854 if thisFile starts ".svn" then next repeat 2855 -- we get ourselves only dir and cast files: 2856 len = length(thisFile) 2857 ext = thisFile.char[len-3 .. len] 2858 if ext = ".dir" or ext = ".cst" then 2859 erg = baCopyFileProgress(fromFolder & thisFile, toFolder & thisFile, "Always", "Replacing movie with the version of the working folder", "", 33) 2860 if erg <> 0 then 2861 alert "An error occurred during copying the file (" & thisFile & "). Error:" && erg 2925 on mCopyAllFiles me, fromFolder, toFolder, listOfChangedFiles, fromFolderUnix, toFolderUnix 2926 2927 if the platform contains "mac" then 2928 if not(interface(xtra "budapi") contains "baReturnUnixNames") then 2929 alert "Please update your copy of the buddyApi xtra to the latest version, baReturnUnixNames() is missing." 2930 listOfChangedFiles = 0 2931 end if 2932 end if 2933 2934 if listP(listOfChangedFiles) then -- we have a list with status messages from svn for each file 2935 2936 resetUNames = 0 2937 if the platform contains "mac" then 2938 if not(baSysFolder("prefs") starts "/") then 2939 baReturnUnixNames(1) 2940 resetUNames = 1 2941 end if 2942 end if 2943 2944 repeat with thisFile in listOfChangedFiles 2945 if char 2 of thisFile = " " then 2946 action = char 1 of thisFile 2947 delete char 1 of thisFile 2948 repeat while char 1 of thisFile = " " 2949 delete char 1 of thisFile 2950 if length(thisFile) < 1 then exit repeat 2951 end repeat 2952 if length(thisFile) > 0 then 2953 offs = offset(fromFolderUnix, thisFile) 2954 if offs = 1 then 2955 case action of 2956 "D": -- deleted 2957 erg = baDeleteFile(toFolderUnix & thisFile) 2958 2959 if erg <> 1 then 2960 alert "An error occurred during deleting the file (" & toFolderUnix & thisFile & "). Error:" && erg 2961 else 2962 put "Delted file:" && toFolderUnix & thisFile 2963 end if 2964 2965 "U", "A": -- updated, added 2966 delete char 1 to length(fromFolderUnix) of thisFile 2967 erg = baCopyFileProgress(fromFolderUnix & thisFile, toFolderUnix & thisFile, "Always", "Replacing file " & thisFile & " with the version of the working folder", "", 33) 2968 2969 if erg <> 0 then 2970 alert "An error occurred during copying the file (" & thisFile & "). Error:" && erg 2971 else 2972 put "Replaced file:" && thisFile 2973 end if 2974 2975 end case 2976 else 2977 put "Couldn't copy file" && thisFile && "as it doesn't seem to be in the current path:" && fromFolderUnix 2978 end if 2979 2980 end if 2981 end if 2982 end repeat 2983 2984 if resetUNames = 1 then baReturnUnixNames(0) 2985 2986 else -- no list? we just copy over all .dir and .cst and .ls files 2987 2988 flist = baFolderList(fromFolder) 2989 flistCnt = count(flist) 2990 repeat with n = flistCnt down to 1 2991 thisFolder = flist[n] 2992 if thisFolder starts ".svn" then next repeat 2993 if not(baFolderExists(toFolder & thisFolder)) then 2994 put "Attempting to create folder:" && toFolder & thisFolder 2995 erg = baCreateFolder(toFolder & thisFolder) 2996 2997 if erg = 0 then put "successfully created folder" 2998 else put "Unable to create folder." 2999 2862 3000 else 2863 put "Replaced file:" && thisFile3001 erg = 1 2864 3002 end if 2865 end if 2866 end repeat 2867 3003 3004 if erg = 1 then 3005 mCopyAllFiles me, fromFolder & thisFolder & the last char of toFolder, toFolder & thisFolder & the last char of toFolder 3006 else 3007 alert "Unable to create folder (" & thisFolder & "). Error:" && erg 3008 end if 3009 3010 end repeat 3011 3012 flist = baFileList(fromFolder, "*.*") 3013 flistCnt = count(flist) 3014 repeat with n = 1 to flistCnt 3015 thisFile = flist[n] 3016 if thisFile starts ".svn" then next repeat 3017 -- we get ourselves only dir and cast files: 3018 len = length(thisFile) 3019 ext = thisFile.char[len-3 .. len] 3020 if ext = ".dir" or ext = ".cst" or ext = ".ls" then 3021 erg = baCopyFileProgress(fromFolder & thisFile, toFolder & thisFile, "Always", "Replacing movie with the version of the working folder", "", 33) 3022 if erg <> 0 then 3023 alert "An error occurred during copying the file (" & thisFile & "). Error:" && erg 3024 else 3025 put "Replaced file:" && thisFile 3026 end if 3027 end if 3028 end repeat 3029 3030 end if 2868 3031 end 2869 3032 … … 2918 3081 2919 3082 if the platform contains "mac" then 2920 svnBin = baUnixName(svnBinary)2921 workFolder = baUnixName(workingFolder)3083 svnBin = mConvertHFS2Unix(me, svnBinary) 3084 workFolder = mConvertHFS2Unix(me, workingFolder) 2922 3085 else 2923 3086 workFolder = workingFolder … … 2962 3125 2963 3126 ----------------------------------------------------- 2964 2965 selectionList = string(selectionList) 2966 if length(selectionList) > 0 then 2967 2968 if char 1 of selectionList <> "[" then put "[" before selectionList 2969 if the last char of selectionList <> "]" then put "]" after selectionList 2970 2971 selectionList = value(selectionList) 2972 if listP(selectionList) then 2973 clnum = the number of castlibs + 1 2974 castlibList = [] 2975 selectionListCnt = count(selectionList) 2976 repeat with n = 1 to selectionListCnt 2977 int = integer(selectionList[n]) 2978 if integerP(int) then 2979 if clnum > int then 2980 if castlibList.getPos(int) < 1 then castlibList.add(int) 2981 end if 2982 end if 2983 end repeat 2984 end if 2985 end if 2986 2987 if castlibList = 0 then 2988 castlibList = [] 2989 castlibList.add(selected_Members_Only.number) 2990 end if 3127 processIOnlySelectedMembers = 1 3128 clsellist = string(selectionList) 3129 if length(clsellist) > 0 then 3130 if listP(value(clsellist)) then processIOnlySelectedMembers = 0 3131 end if 3132 castlibList = getCastlibList(me, selectionList, selected_Members_Only.number) 2991 3133 2992 3134 … … 3007 3149 end if 3008 3150 3009 3010 3011 mDisplayWaitStatusText me, "Commiting scripttext for castlibs:" && castlibList3012 3013 put "Commiting scripttext for castlibs:" && castlibList3014 3151 ----------------------------------------------------- 3015 3152 … … 3024 3161 3025 3162 selected_Members_Only = castlib(castlibList[n]) 3026 3027 mDisplayWaitStatusText me, "Saving castlib:" && selected_Members_Only3028 3029 3163 3030 3164 -------------------- get version number: … … 3051 3185 3052 3186 3053 selected_Members_Only.save()3054 3055 3187 if the last item of workingFolder = "castlib" & selected_Members_Only.number then 3056 3188 clibfolder = workingFolder … … 3063 3195 -------- 3064 3196 3065 3066 mExportAllScriptsToDiskWithFolder me, 1, selected_Members_Only, 1, workingFolder3067 3197 3068 3198 end repeat … … 3084 3214 else -- treat all: 3085 3215 3086 mDisplayWaitStatusText me, "Saving movie..." 3087 3216 processIOnlySelectedMembers = 0 3088 3217 3089 3218 -------------------- get version number: … … 3119 3248 3120 3249 3121 saveMovie()3122 3123 mExportAllScriptsToDiskWithFolder me, 1, selected_Members_Only, 1, workingFolder3124 3125 3250 castlibList = 0 3126 3251 … … 3128 3253 3129 3254 3255 workingFolderOriginal = workingFolder 3130 3256 3131 3257 if castlibList = 0 then … … 3135 3261 -------- 3136 3262 3137 3138 3263 if the platform contains "mac" then 3139 svnBinary = baUnixName(svnBinary)3140 workingFolder = baUnixName(workingFolder)3264 svnBinary = mConvertHFS2Unix(me, svnBinary) 3265 workingFolder = mConvertHFS2Unix(me, workingFolder) 3141 3266 else 3142 3267 if the last char of workingFolder = the last char of the applicationpath then delete the last char of workingFolder … … 3148 3273 else 3149 3274 3150 if the platform contains "mac" then svnBinary = baUnixName(svnBinary)3275 if the platform contains "mac" then svnBinary = mConvertHFS2Unix(me, svnBinary) 3151 3276 cnt = count(castlibList) 3152 3277 … … 3156 3281 3157 3282 if the platform contains "mac" then 3158 castlibList[n][3] = baUnixName(castlibList[n][3])3283 castlibList[n][3] = mConvertHFS2Unix(me, castlibList[n][3]) 3159 3284 else 3160 3285 str = castlibList[n][3] … … 3190 3315 end if 3191 3316 3317 3318 3319 -------- if we work on only one castlib: 3320 3321 if ilk(selected_Members_Only) = #castLib then 3322 3323 mDisplayWaitStatusText me, "Commiting scripttext for castlibs:" && castlibList 3324 put "Commiting scripttext for castlibs:" && castlibList 3325 repeat with n = count(castlibList) down to 1 3326 3327 selected_Members_Only = castlib(castlibList[n][1]) 3328 if processIOnlySelectedMembers = 0 then processEntireCastlib = selected_Members_Only 3329 else processEntireCastlib = 1 3330 mDisplayWaitStatusText me, "Saving castlib:" && selected_Members_Only 3331 selected_Members_Only.save() 3332 mExportAllScriptsToDiskWithFolder me, 1, processEntireCastlib, 1, mConvertUnix2Hfs(me, castlibList[n][3]) 3333 3334 end repeat 3335 3336 else -- treat all: 3337 3338 mDisplayWaitStatusText me, "Saving movie..." 3339 saveMovie() 3340 mExportAllScriptsToDiskWithFolder me, 1, processIOnlySelectedMembers, 1, workingFolderOriginal 3341 3342 end if 3343 3344 3192 3345 theresult = mDoShellCmd(me, svnBinary && "status" & workingFolder, RETURN, 0, 1) 3193 3346 … … 3206 3359 case meth of 3207 3360 "!": -- deleted file (missing here, but in the repository present) 3208 -- I don't think, it is a good idea to delete the file in the repository in this case 3209 -- as it may also be the case, that we only have a subset of the castlibs/scripts 3210 -- therefore I just skip these files and leave it to the user what to do with them in his svn client application 3211 -- we only put a message, so the user is made aware of this fact 3212 put "Missing file!" && answ && "is missing here, but present in the repository" 3213 3214 mDisplayWaitStatusText me, "Missing file!" && answ && "is missing here, but present in the repository" 3361 3362 if processIOnlySelectedMembers = 1 then 3363 -- I don't think, it is a good idea to delete the file in the repository in this case 3364 -- as it may also be the case, that we only have a subset of the castlibs/scripts 3365 -- therefore I just skip these files and leave it to the user what to do with them in his svn client application 3366 -- we only put a message, so the user is made aware of this fact 3367 put "Missing file!" && answ && "is missing here, but present in the repository" 3368 3369 mDisplayWaitStatusText me, "Missing file!" && answ && "is missing here, but present in the repository" 3370 3371 else 3372 3373 mDoShellCmd(me, svnBinary && "rm" && QUOTE & answ & QUOTE, RETURN, 0, 1) 3374 3375 put "Deleted file" && answ && "in the repository" 3376 3377 mDisplayWaitStatusText me, "Deleted file" && answ && "in the repository" 3378 3379 end if 3215 3380 3216 3381
Note: See TracChangeset
for help on using the changeset viewer.
