Changeset 161 for trunk/lingosource/castlib1/svn_Utilities.ls
- Timestamp:
- 04/06/08 09:33:26 (4 years ago)
- File:
-
- 1 edited
-
trunk/lingosource/castlib1/svn_Utilities.ls (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib1/svn_Utilities.ls
r151 r161 1809 1809 1810 1810 1811 theResult = mSVN_Commit_CurrentScripts_ScriptText(me, 0, chooseNewPath, commitMsg, 1 )1811 theResult = mSVN_Commit_CurrentScripts_ScriptText(me, 0, chooseNewPath, commitMsg, 1, void, 2) 1812 1812 1813 1813 theResult = mSVN_Commit_CurrentMovie_Binaries(me, chooseNewPath, commitMsg, 1) 1814 1814 1815 end 1816 1817 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1818 1819 on mGetCurrentRevision me, svnBinary, WorkingFolder 1820 1821 versionNumber = mDoShellCmd(me, svnBinary && QUOTE & WorkingFolder & QUOTE, RETURN, 0, 1) 1822 if count(versionNumber) < 1 then return void 1823 versionNumber = versionNumber[1] 1824 1825 offs = offset(":", versionNumber) 1826 if offs > 0 then delete char 1 to offs of versionNumber 1827 1828 if length(versionNumber) < 1 then return void 1829 1830 versionNumberInt = integer(versionNumber) 1831 repeat while not(integerP(versionNumberInt)) 1832 if length(versionNumber) < 1 then return void 1833 delete the last char of versionNumber 1834 versionNumberInt = integer(versionNumber) 1835 end repeat 1836 1837 return versionNumberInt 1815 1838 1816 1839 end … … 1831 1854 1832 1855 1833 theResult = mSVN_Commit_CurrentScripts_ScriptText(me, castlib(the activecastlib), chooseNewPath, commitMsg, 1, selectionList )1856 theResult = mSVN_Commit_CurrentScripts_ScriptText(me, castlib(the activecastlib), chooseNewPath, commitMsg, 1, selectionList, 2) 1834 1857 1835 1858 theResult = mSVN_Commit_SelectedCastlib(me, chooseNewPath, commitMsg, 1, 0, selectionList) … … 1931 1954 -- end if 1932 1955 1956 1957 -------------------- get version number: 1958 if the platform contains "mac" then 1959 svnBin = baUnixName(svnBinary) 1960 workFolder = baUnixName(workingFolder) 1961 else 1962 workFolder = workingFolder 1963 if the last char of workFolder = the last char of the applicationpath then delete the last char of workFolder 1964 end if 1965 versionNumber = mGetCurrentRevision(me, svnBin & "version", workFolder) 1966 1967 if integerP(versionNumber) then 1968 1969 versionNumber = versionNumber + 2 -- the version will raise 1970 1971 VersionCheckUrl = string(mGetVersionCheckUrl(me, the moviepath & the moviename, workingCopies, "Select an URL to use for version checking.")) 1972 if length(VersionCheckUrl) > 0 then 1973 mscript = member("aleXtrasMovieScript") 1974 ident = "" 1975 if mGetMemType(me, mscript) = #script then ident = string(xscr().mGetThisMovieName()) 1976 if length(ident) < 1 then ident = the moviename 1977 1978 placeholder = "%%password:" 1979 offs = offset(placeholder, VersionCheckUrl) 1980 if offs > 0 then 1981 thePassword = VersionCheckUrl.char[offs+length(placeholder) .. length(VersionCheckUrl)] 1982 thePassword = word 1 to thePassword.word.count of thePassword 1983 delete char offs to length(VersionCheckUrl) of VersionCheckUrl 1984 end if 1985 1986 VersionCheckUrl = word 1 to VersionCheckUrl.word.count of VersionCheckUrl & "?movieName=" & ident 1987 1988 updateurl = 0 1989 repeat with cl in castlibList 1990 versmem = member("subversion_version_field", cl) 1991 if [#field, #text].getPos(mGetMemType(me, versmem)) > 0 then 1992 if updateurl = 0 then updateurl = 1 1993 curr = versmem.text 1994 if char 1 of curr = "r" then delete char 1 of curr 1995 curr = integer(curr) 1996 if not(integerP(curr)) then curr = 0 1997 if curr < versionNumber then 1998 versmem.text = "r" & versionNumber 1999 versmem.comments = VersionCheckUrl 2000 else 2001 updateurl = 2 2002 end if 2003 end if 2004 end repeat 2005 2006 if updateurl = 1 then 2007 if length(thePassword) then 2008 id = getnettext(VersionCheckUrl & "&version=" & thePassword & versionNumber) 2009 end if 2010 end if 2011 2012 end if 2013 end if 2014 --------------------- // version number 2015 2016 1933 2017 if isInternal = 1 then 1934 2018 savemovie() … … 1941 2025 end if 1942 2026 ---------------------------------------- 2027 2028 exit 1943 2029 1944 2030 … … 2146 2232 mDisplayWaitStatusText me, "Saving movie..." 2147 2233 2234 2235 -------------------- get version number: 2236 if the platform contains "mac" then 2237 svnBin = baUnixName(svnBinary) 2238 workFolder = baUnixName(workingFolder) 2239 else 2240 workFolder = workingFolder 2241 if the last char of workFolder = the last char of the applicationpath then delete the last char of workFolder 2242 end if 2243 versionNumber = mGetCurrentRevision(me, svnBin & "version", workFolder) 2244 2245 if integerP(versionNumber) then 2246 2247 versionNumber = versionNumber + 2 -- the version will raise 2248 2249 VersionCheckUrl = string(mGetVersionCheckUrl(me, the moviepath & the moviename, workingCopies, "Select an URL to use for version checking.")) 2250 if length(VersionCheckUrl) > 0 then 2251 mscript = member("aleXtrasMovieScript") 2252 ident = "" 2253 if mGetMemType(me, mscript) = #script then ident = string(xscr().mGetThisMovieName()) 2254 if length(ident) < 1 then ident = the moviename 2255 2256 placeholder = "%%password:" 2257 offs = offset(placeholder, VersionCheckUrl) 2258 if offs > 0 then 2259 thePassword = VersionCheckUrl.char[offs+length(placeholder) .. length(VersionCheckUrl)] 2260 thePassword = word 1 to thePassword.word.count of thePassword 2261 delete char offs to length(VersionCheckUrl) of VersionCheckUrl 2262 end if 2263 2264 VersionCheckUrl = word 1 to VersionCheckUrl.word.count of VersionCheckUrl & "?movieName=" & ident 2265 2266 updateurl = 0 2267 repeat with cl = the number of castlibs down to 1 2268 versmem = member("subversion_version_field", cl) 2269 if [#field, #text].getPos(mGetMemType(me, versmem)) > 0 then 2270 if updateurl = 0 then updateurl = 1 2271 curr = versmem.text 2272 if char 1 of curr = "r" then delete char 1 of curr 2273 curr = integer(curr) 2274 if not(integerP(curr)) then curr = 0 2275 if curr < versionNumber then 2276 versmem.text = "r" & versionNumber 2277 versmem.comments = VersionCheckUrl 2278 else 2279 updateurl = 2 2280 end if 2281 end if 2282 end repeat 2283 2284 if updateurl = 1 then 2285 if length(thePassword) then 2286 id = getnettext(VersionCheckUrl & "&version=" & thePassword & versionNumber) 2287 end if 2288 end if 2289 2290 end if 2291 end if 2292 --------------------- // version number 2293 2294 2148 2295 saveMovie() 2149 2296 … … 2589 2736 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2590 2737 2591 on mSVN_Commit_CurrentScripts_ScriptText me, selected_Members_Only, chooseNewPath, commitMsg, dontShowAlert, selectionList 2738 on mSVN_Commit_CurrentScripts_ScriptText me, selected_Members_Only, chooseNewPath, commitMsg, dontShowAlert, selectionList, versionIncrease 2592 2739 2593 2740 workingCopies = value(getPref("svn_workingCopies_paths.txt")) … … 2631 2778 2632 2779 2780 2781 -------------------- get version number: 2782 VersionCheckUrl = "" 2783 2784 if the platform contains "mac" then 2785 svnBin = baUnixName(svnBinary) 2786 workFolder = baUnixName(workingFolder) 2787 else 2788 workFolder = workingFolder 2789 if the last char of workFolder = the last char of the applicationpath then delete the last char of workFolder 2790 end if 2791 versionNumber = mGetCurrentRevision(me, svnBin & "version", workFolder) 2792 2793 if integerP(versionNumber) then 2794 2795 if voidP(versionIncrease) then versionIncrease = 1 2796 versionNumber = versionNumber + versionIncrease + 1 -- the version will raise 2797 2798 VersionCheckUrl = string(mGetVersionCheckUrl(me, the moviepath & the moviename, workingCopies, "Select an URL to use for version checking.")) 2799 if length(VersionCheckUrl) > 0 then 2800 mscript = member("aleXtrasMovieScript") 2801 ident = "" 2802 if mGetMemType(me, mscript) = #script then ident = string(xscr().mGetThisMovieName()) 2803 if length(ident) < 1 then ident = the moviename 2804 2805 placeholder = "%%password:" 2806 offs = offset(placeholder, VersionCheckUrl) 2807 if offs > 0 then 2808 thePassword = VersionCheckUrl.char[offs+length(placeholder) .. length(VersionCheckUrl)] 2809 thePassword = word 1 to thePassword.word.count of thePassword 2810 delete char offs to length(VersionCheckUrl) of VersionCheckUrl 2811 end if 2812 2813 VersionCheckUrl = word 1 to VersionCheckUrl.word.count of VersionCheckUrl & "?movieName=" & ident 2814 2815 end if 2816 2817 end if 2818 --------------------- // version number 2819 2820 2821 2822 2633 2823 -------- if we work on only one castlib: 2634 2824 2635 2825 if ilk(selected_Members_Only) = #castLib then 2636 2637 2826 2638 2827 ----------------------------------------------------- … … 2694 2883 the itemdelimiter = delim 2695 2884 2885 updateurl = 0 2886 2696 2887 repeat with n = count(castlibList) down to 1 2697 2888 … … 2700 2891 mDisplayWaitStatusText me, "Saving castlib:" && selected_Members_Only 2701 2892 2893 2894 -------------------- get version number: 2895 2896 if length(VersionCheckUrl) > 0 then 2897 versmem = member("subversion_version_field", n) 2898 if [#field, #text].getPos(mGetMemType(me, versmem)) > 0 then 2899 if updateurl = 0 then updateurl = 1 2900 curr = versmem.text 2901 if char 1 of curr = "r" then delete char 1 of curr 2902 curr = integer(curr) 2903 if not(integerP(curr)) then curr = 0 2904 if curr < versionNumber then 2905 versmem.text = "r" & versionNumber 2906 versmem.comments = VersionCheckUrl 2907 else 2908 updateurl = 2 2909 end if 2910 end if 2911 end if 2912 --------------------- // version number 2913 2914 2702 2915 selected_Members_Only.save() 2703 2704 2705 2916 2706 2917 if the last item of workingFolder = "castlib" & selected_Members_Only.number then … … 2719 2930 end repeat 2720 2931 2932 -------------------- get version number: 2933 if updateurl = 1 then 2934 if length(thePassword) then 2935 id = getnettext(VersionCheckUrl & "&version=" & thePassword & versionNumber) 2936 end if 2937 end if 2938 --------------------- // version number 2939 2721 2940 the itemdelimiter = olddelim 2722 2941 … … 2726 2945 2727 2946 mDisplayWaitStatusText me, "Saving movie..." 2947 2948 2949 -------------------- get version number: 2950 updateurl = 0 2951 if length(VersionCheckUrl) > 0 then 2952 repeat with cl = the number of castlibs down to 1 2953 versmem = member("subversion_version_field", cl) 2954 if [#field, #text].getPos(mGetMemType(me, versmem)) > 0 then 2955 if updateurl = 0 then updateurl = 1 2956 curr = versmem.text 2957 if char 1 of curr = "r" then delete char 1 of curr 2958 curr = integer(curr) 2959 if not(integerP(curr)) then curr = 0 2960 if curr < versionNumber then 2961 versmem.text = "r" & versionNumber 2962 versmem.comments = VersionCheckUrl 2963 else 2964 updateurl = 2 2965 end if 2966 end if 2967 end repeat 2968 end if 2969 2970 if updateurl = 1 then 2971 if length(thePassword) then 2972 id = getnettext(VersionCheckUrl & "&version=" & thePassword & versionNumber) 2973 end if 2974 end if 2975 --------------------- // version number 2976 2728 2977 2729 2978 saveMovie() … … 2943 3192 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2944 3193 2945 on mGet WorkingCopyPath me, movieIdentifier, chooseNewPath, workingCopies, selectMsg3194 on mGetVersionCheckUrl me, movieIdentifier, workingCopies, selectMsg 2946 3195 2947 3196 movieIdentifier = string(movieIdentifier) … … 2957 3206 end if 2958 3207 3208 versionCheckUrlList = workingCopies.getaprop(#versionCheckUrls) 3209 if not(objectP(versionCheckUrlList)) then 3210 versionCheckUrlList = [:] 3211 workingCopies.setaprop(#versionCheckUrls, versionCheckUrlList) 3212 end if 3213 3214 versionCheckUrl = string(versionCheckUrlList.getaprop(movieIdentifier)) 3215 3216 if versionCheckUrl = "" then 3217 selectMsg = string(selectMsg) 3218 if length(selectMsg) < 1 then selectMsg = "No update check URL is specified for this movie. Please enter an URL." 3219 3220 -- if mCheckForXtra(me, "BudApi") = 1 then 3221 -- versionCheckUrl = baPrompt("Select URL", selectMsg, "http://www.farbflash.de/cgi-bin/versionCheck.pl %%password: secretpassword", 0, -2, -2) 3222 -- else 3223 muiobj = new(xtra "Mui") 3224 versionCheckUrl = muiobj.GetUrl("http://www.farbflash.de/cgi-bin/versionChecker.pl %%password: secretpassword", 1) 3225 muiobj = 0 3226 -- end if 3227 3228 if length(versionCheckUrl) < 1 then return "" 3229 3230 versionCheckUrlList.setaprop(movieIdentifier, versionCheckUrl) 3231 3232 if savePrefs = 1 then setPref("svn_workingCopies_paths.txt", string(workingCopies)) 3233 3234 end if 3235 3236 return versionCheckUrl 3237 3238 end 3239 3240 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3241 3242 on mGetWorkingCopyPath me, movieIdentifier, chooseNewPath, workingCopies, selectMsg 3243 3244 movieIdentifier = string(movieIdentifier) 3245 if length(movieIdentifier) < 1 then 3246 movieIdentifier = the moviepath & the moviename 3247 end if 3248 3249 savePrefs = 0 3250 if ilk(workingCopies) <> #proplist then 3251 workingCopies = value(getPref("svn_workingCopies_paths.txt")) 3252 if ilk(workingCopies) <> #proplist then workingCopies = [:] 3253 savePrefs = 1 3254 end if 3255 2959 3256 workingFolder = string(workingCopies.getaprop(movieIdentifier)) 2960 3257
Note: See TracChangeset
for help on using the changeset viewer.
