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

Changeset 45 for trunk/lingosource


Ignore:
Timestamp:
10/25/07 13:41:26 (5 years ago)
Author:
alex
Message:

svn compare to working copy now compares more than only one member

Location:
trunk/lingosource
Files:
4 edited

Legend:

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

    r42 r45  
    235235    subli = [] 
    236236    li.add(subli) 
    237     subli.add("Compare selected script with Working Copy...") 
    238     pLookUpCommandList.setaprop("Compare selected script with Working Copy...", "mCompareCurrentScriptToWorkingCopy me, convertLineBreaksToUnix") 
     237    subli.add("Compare selected scripts with Working Copy...") 
     238    pLookUpCommandList.setaprop("Compare selected scripts with Working Copy...", "mCompareCurrentScriptToWorkingCopy me, convertLineBreaksToUnix") 
    239239     
    240240    subli.add("Export selected script to Working Copy and Open...") 
  • trunk/lingosource/castlib1/alexUtilities.ls

    r42 r45  
    32463246         
    32473247        if length(thePath) < 1 then 
    3248           alert "Corresponding member was not found" 
    3249           exit   
    3250         end if 
    3251          
    3252          
    3253          
    3254         --------------------- 
    3255         -- create a temporary file from scripttext: 
    3256         tempSrcPath = shell_cmd_list("mktemp -t temp_BBDiff_file1") 
    3257         tempSrcPath = tempSrcPath[1] 
    3258          
    3259         if mCheckForXtra(me, "budapi") = 0 then 
    3260           tempSrcHFSPath = shell_cmd_list("osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE) 
    3261           tempSrcHFSPath = tempSrcHFSPath[1] 
     3248           
     3249          put "Corresponding file for member " & memref.name && "(" & memref & ") was not found" 
     3250           
     3251           
    32623252        else 
    3263           tempSrcHFSPath = baHFSName(tempSrcPath) 
    3264         end if 
    3265          
    3266          
    3267          
    3268         ------------------------------------------ trac subversion support works better with unix linebreaks... 
    3269         if voidP(convertLineBreaksToUnix) then convertLineBreaksToUnix = 1 
    3270         if convertLineBreaksToUnix = "" then convertLineBreaksToUnix = 1 
    3271          
    3272         if convertLineBreaksToUnix = 1 then 
    3273            
    3274           if mCheckForXtra(me, "Pregex") = 1 then 
    3275              
    3276             scrTextLi = [st] 
    3277             pregex_replace(scrTextLi, "\x0D\x0A?", "g", "\x0A") 
    3278             st = scrTextLi[1] 
    3279              
     3253           
     3254           
     3255           
     3256          --------------------- 
     3257          -- create a temporary file from scripttext: 
     3258          tempSrcPath = shell_cmd_list("mktemp -t temp_BBDiff_file1") 
     3259          tempSrcPath = tempSrcPath[1] 
     3260           
     3261          if mCheckForXtra(me, "budapi") = 0 then 
     3262            tempSrcHFSPath = shell_cmd_list("osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE) 
     3263            tempSrcHFSPath = tempSrcHFSPath[1] 
    32803264          else 
    3281              
    3282             fndStr = numToChar(13) & numToChar(10) 
    3283             offs = offset(fndStr, st) 
    3284             repeat while offs > 0 
    3285               delete char offs of st 
    3286               offs = offset(fndStr, st) 
    3287             end repeat 
    3288              
    3289             fndStr = numToChar(13) 
    3290             offs = offset(fndStr, st) 
    3291             repeat while offs > 0 
    3292               put numToChar(10) into char offs of st 
    3293               offs = offset(fndStr, st) 
    3294             end repeat 
    3295              
     3265            tempSrcHFSPath = baHFSName(tempSrcPath) 
    32963266          end if 
    3297         end if 
    3298         ----------------------------------------- 
    3299          
    3300          
    3301          
    3302         theResult = mSaveTextToTempFile(me, st, tempSrcHFSPath) 
    3303         --------------------- 
    3304          
    3305          
    3306          
    3307         if mCheckForXtra(me, "budapi") = 0 then 
    3308           comm = thePath 
    3309           offs = offset(":", comm) 
    3310           repeat while offs 
    3311             put "/" into char offs of comm 
    3312             offs = offset(":", comm) 
    3313           end repeat 
    3314           put "/Volumes/" before comm 
    3315         else 
    3316           comm = baUnixName(thePath) 
    3317         end if 
    3318          
    3319         theResult = shell_cmd_list(bbdiffpath & " --ignore-curly-quotes --ignore-spaces --wait --resume " &QUOTE& tempSrcPath &QUOTE&&QUOTE& comm &QUOTE && "2>&1") 
    3320          
    3321         -- since we used the --wait and the --resume switch, we will only come to this line AFTER the diff process in bbedit is finished 
    3322          
    3323         if count(theResult) > 0 then 
    3324           alert "No differences found" 
    3325            
    3326         else 
    3327            
    3328           -------- now write the results of the BBEdit diff back into the script members 
    3329           scrText = mGetTextFromTempFile(me, tempSrcHFSPath) 
    3330            
     3267           
     3268           
     3269           
     3270          ------------------------------------------ trac subversion support works better with unix linebreaks... 
     3271          if voidP(convertLineBreaksToUnix) then convertLineBreaksToUnix = 1 
     3272          if convertLineBreaksToUnix = "" then convertLineBreaksToUnix = 1 
    33313273           
    33323274          if convertLineBreaksToUnix = 1 then 
    3333             ------------------------------------------ trac subversion support works better with unix linebreaks... 
     3275             
    33343276            if mCheckForXtra(me, "Pregex") = 1 then 
    33353277               
    3336               scrTextLi = [scrText] 
    3337               if the platform contains "mac" then 
    3338                 pregex_replace(scrTextLi, "\x0D?\x0A", "g", "\x0D") 
    3339               else 
    3340                 pregex_replace(scrTextLi, "\x0D([^\x0A])", "g", "\x0D\x0A\1") 
    3341                 pregex_replace(scrTextLi, "([^\x0D])\x0A", "g", "\1\x0D\x0A") 
    3342               end if 
    3343               scrText = scrTextLi[1] 
     3278              scrTextLi = [st] 
     3279              pregex_replace(scrTextLi, "\x0D\x0A?", "g", "\x0A") 
     3280              st = scrTextLi[1] 
    33443281               
    33453282            else 
    33463283               
    3347               if the platform contains "mac" then 
     3284              fndStr = numToChar(13) & numToChar(10) 
     3285              offs = offset(fndStr, st) 
     3286              repeat while offs > 0 
     3287                delete char offs of st 
     3288                offs = offset(fndStr, st) 
     3289              end repeat 
     3290               
     3291              fndStr = numToChar(13) 
     3292              offs = offset(fndStr, st) 
     3293              repeat while offs > 0 
     3294                put numToChar(10) into char offs of st 
     3295                offs = offset(fndStr, st) 
     3296              end repeat 
     3297               
     3298            end if 
     3299          end if 
     3300          ----------------------------------------- 
     3301           
     3302           
     3303           
     3304          theResult = mSaveTextToTempFile(me, st, tempSrcHFSPath) 
     3305          --------------------- 
     3306           
     3307           
     3308           
     3309          if mCheckForXtra(me, "budapi") = 0 then 
     3310            comm = thePath 
     3311            offs = offset(":", comm) 
     3312            repeat while offs 
     3313              put "/" into char offs of comm 
     3314              offs = offset(":", comm) 
     3315            end repeat 
     3316            put "/Volumes/" before comm 
     3317          else 
     3318            comm = baUnixName(thePath) 
     3319          end if 
     3320           
     3321          theResult = shell_cmd_list(bbdiffpath & " --ignore-curly-quotes --ignore-spaces --wait --resume " &QUOTE& tempSrcPath &QUOTE&&QUOTE& comm &QUOTE && "2>&1") 
     3322           
     3323          -- since we used the --wait and the --resume switch, we will only come to this line AFTER the diff process in bbedit is finished 
     3324           
     3325          if count(theResult) > 0 then 
     3326            put "No differences found for member: " & memref.name && "(" & memref & ")" 
     3327             
     3328          else 
     3329             
     3330            -------- now write the results of the BBEdit diff back into the script members 
     3331            scrText = mGetTextFromTempFile(me, tempSrcHFSPath) 
     3332             
     3333             
     3334            if convertLineBreaksToUnix = 1 then 
     3335              ------------------------------------------ trac subversion support works better with unix linebreaks... 
     3336              if mCheckForXtra(me, "Pregex") = 1 then 
    33483337                 
    3349                 -- first convert windows to mac 
    3350                 fndStr = numToChar(13) & numToChar(10) 
    3351                 offs = offset(fndStr, scrText) 
    3352                 repeat while offs > 0 
    3353                   put numToChar(13) into char offs to offs+1 of scrText 
    3354                   offs = offset(fndStr, scrText) 
    3355                 end repeat 
    3356                  
    3357                 -- now convert unix to mac 
    3358                 fndStr = numToChar(10) 
    3359                 offs = offset(fndStr, scrText) 
    3360                 repeat while offs > 0 
    3361                   put numToChar(13) into char offs of scrText 
    3362                   offs = offset(fndStr, scrText) 
    3363                 end repeat 
     3338                scrTextLi = [scrText] 
     3339                if the platform contains "mac" then 
     3340                  pregex_replace(scrTextLi, "\x0D?\x0A", "g", "\x0D") 
     3341                else 
     3342                  pregex_replace(scrTextLi, "\x0D([^\x0A])", "g", "\x0D\x0A\1") 
     3343                  pregex_replace(scrTextLi, "([^\x0D])\x0A", "g", "\1\x0D\x0A") 
     3344                end if 
     3345                scrText = scrTextLi[1] 
    33643346                 
    33653347              else 
    33663348                 
    3367                 fndStr = numToChar(13) & numToChar(10) 
    3368                 offs = offset(fndStr, scrText) 
    3369                 repeat while offs > 0 
    3370                   put "ÀÀÀ" into char offs+1 of scrText 
     3349                if the platform contains "mac" then 
     3350                   
     3351                  -- first convert windows to mac 
     3352                  fndStr = numToChar(13) & numToChar(10) 
    33713353                  offs = offset(fndStr, scrText) 
    3372                 end repeat 
    3373                  
    3374                  
    3375                 fndStr = numToChar(10) 
    3376                 offs = offset(fndStr, scrText) 
    3377                 repeat while offs > 0 
    3378                   put numToChar(13) & numToChar(10) into char offs of scrText 
     3354                  repeat while offs > 0 
     3355                    put numToChar(13) into char offs to offs+1 of scrText 
     3356                    offs = offset(fndStr, scrText) 
     3357                  end repeat 
     3358                   
     3359                  -- now convert unix to mac 
     3360                  fndStr = numToChar(10) 
    33793361                  offs = offset(fndStr, scrText) 
    3380                 end repeat 
    3381                  
    3382                  
    3383                  
    3384                 fndStr = numToChar(13) & "ÀÀÀ" 
    3385                 offs = offset(fndStr, scrText) 
    3386                 repeat while offs > 0 
    3387                   put numToChar(13) & numToChar(10) into char offs to offs+3 of scrText 
     3362                  repeat while offs > 0 
     3363                    put numToChar(13) into char offs of scrText 
     3364                    offs = offset(fndStr, scrText) 
     3365                  end repeat 
     3366                   
     3367                else 
     3368                   
     3369                  fndStr = numToChar(13) & numToChar(10) 
    33883370                  offs = offset(fndStr, scrText) 
    3389                 end repeat 
    3390                  
    3391                  
    3392                  
    3393                 fndStr = "ÀÀÀ" 
    3394                 offs = offset(fndStr, scrText) 
    3395                 repeat while offs > 0 
    3396                   put numToChar(13) & numToChar(10) into char offs to offs+2 of scrText 
     3371                  repeat while offs > 0 
     3372                    put "ÀÀÀ" into char offs+1 of scrText 
     3373                    offs = offset(fndStr, scrText) 
     3374                  end repeat 
     3375                   
     3376                   
     3377                  fndStr = numToChar(10) 
    33973378                  offs = offset(fndStr, scrText) 
    3398                 end repeat 
     3379                  repeat while offs > 0 
     3380                    put numToChar(13) & numToChar(10) into char offs of scrText 
     3381                    offs = offset(fndStr, scrText) 
     3382                  end repeat 
     3383                   
     3384                   
     3385                   
     3386                  fndStr = numToChar(13) & "ÀÀÀ" 
     3387                  offs = offset(fndStr, scrText) 
     3388                  repeat while offs > 0 
     3389                    put numToChar(13) & numToChar(10) into char offs to offs+3 of scrText 
     3390                    offs = offset(fndStr, scrText) 
     3391                  end repeat 
     3392                   
     3393                   
     3394                   
     3395                  fndStr = "ÀÀÀ" 
     3396                  offs = offset(fndStr, scrText) 
     3397                  repeat while offs > 0 
     3398                    put numToChar(13) & numToChar(10) into char offs to offs+2 of scrText 
     3399                    offs = offset(fndStr, scrText) 
     3400                  end repeat 
     3401                   
     3402                end if 
    33993403                 
    34003404              end if 
    3401                
     3405              ----------------------------------------- 
    34023406            end if 
    3403             ----------------------------------------- 
     3407             
     3408             
     3409             
     3410            case memtype of 
     3411                 
     3412                ----------------------- 
     3413              #script: 
     3414                memref.scripttext = scrText 
     3415                 
     3416                ----------------------- 
     3417              #field: 
     3418                memref.text = scrText 
     3419                 
     3420                ----------------------- 
     3421              #text: 
     3422                memref.rtf = scrText 
     3423                 
     3424                ----------------------- 
     3425              otherwise: 
     3426                memref.text = scrText 
     3427                 
     3428            end case 
     3429             
     3430             
     3431             
     3432             
    34043433          end if 
    34053434           
    3406            
    3407            
    3408           case memtype of 
    3409                
    3410               ----------------------- 
    3411             #script: 
    3412               memref.scripttext = scrText 
    3413                
    3414               ----------------------- 
    3415             #field: 
    3416               memref.text = scrText 
    3417                
    3418               ----------------------- 
    3419             #text: 
    3420               memref.rtf = scrText 
    3421                
    3422               ----------------------- 
    3423             otherwise: 
    3424               memref.text = scrText 
    3425                
    3426           end case 
    3427            
    3428            
     3435          -- exit -- we only proceed one script member, WHY ??? 
    34293436           
    34303437           
    34313438        end if 
    34323439         
    3433         exit -- we only proceed one script member 
    3434          
    3435          
    3436       end if 
    3437        
     3440      end if -- corresponding file not found for this member 
    34383441       
    34393442    end repeat 
  • trunk/lingosource/castlib1/memberInfo.xml

    r42 r45  
    55                <comments></comments> 
    66                <memberName>thisMoviesScript</memberName> 
    7                 <fName>thisMoviesScript</fName> 
     7                <fname>thisMoviesScript</fname> 
    88        </thisMoviesScript> 
    99        <keyboardNavigation_FrameLoop> 
     
    1111                <comments></comments> 
    1212                <memberName>keyboardNavigation_FrameLoop</memberName> 
    13                 <fName>keyboardNavigation_FrameLoop</fName> 
     13                <fname>keyboardNavigation_FrameLoop</fname> 
    1414        </keyboardNavigation_FrameLoop> 
    1515        <simpleBMMenu> 
     
    1717                <comments></comments> 
    1818                <memberName>simpleBMMenu</memberName> 
    19                 <fName>simpleBMMenu</fName> 
     19                <fname>simpleBMMenu</fname> 
    2020        </simpleBMMenu> 
    2121        <OSCmenu_Utilities> 
     
    2323                <comments></comments> 
    2424                <memberName>OSCmenu_Utilities</memberName> 
    25                 <fName>OSCmenu_Utilities</fName> 
     25                <fname>OSCmenu_Utilities</fname> 
    2626        </OSCmenu_Utilities> 
    2727        <alexUtilities> 
     
    2929                <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 
    3030                <memberName>alexUtilities</memberName> 
    31                 <fName>alexUtilities</fName> 
     31                <fname>alexUtilities</fname> 
    3232        </alexUtilities> 
    3333        <convert_Lingo_2_CSS_Html> 
     
    3535                <comments>~/Documents/Scripts/lingo/convert_Lingo_2_CSS_Html.ls</comments> 
    3636                <memberName>convert_Lingo_2_CSS_Html</memberName> 
    37                 <fName>convert_Lingo_2_CSS_Html</fName> 
     37                <fname>convert_Lingo_2_CSS_Html</fname> 
    3838        </convert_Lingo_2_CSS_Html> 
    3939        <OSCmenu_Handlers> 
     
    4141                <comments></comments> 
    4242                <memberName>OSCmenu_Handlers</memberName> 
    43                 <fName>OSCmenu_Handlers</fName> 
     43                <fname>OSCmenu_Handlers</fname> 
    4444        </OSCmenu_Handlers> 
    4545        <resizewindowfs> 
     
    4747                <comments></comments> 
    4848                <memberName>resizewindowfs</memberName> 
    49                 <fName>resizewindowfs</fName> 
     49                <fname>resizewindowfs</fname> 
    5050        </resizewindowfs> 
    5151        <showHideHelp> 
     
    5353                <comments></comments> 
    5454                <memberName>showHideHelp</memberName> 
    55                 <fName>showHideHelp</fName> 
     55                <fname>showHideHelp</fname> 
    5656        </showHideHelp> 
    5757        <texthyperlinkBehavior> 
     
    5959                <comments>/Users/alex/Documents/ALIEN/myLinkedScripts/texthyperlinkBehavior.ls</comments> 
    6060                <memberName>texthyperlinkBehavior</memberName> 
    61                 <fName>texthyperlinkBehavior</fName> 
     61                <fname>texthyperlinkBehavior</fname> 
    6262        </texthyperlinkBehavior> 
    6363        <bbdiff> 
     
    6565                <comments></comments> 
    6666                <memberName>bbdiff</memberName> 
    67                 <fName>bbdiff</fName> 
     67                <fname>bbdiff</fname> 
    6868        </bbdiff> 
    6969        <menu1_button> 
     
    7171                <comments></comments> 
    7272                <memberName>menu1_button</memberName> 
    73                 <fName>menu1_button</fName> 
     73                <fname>menu1_button</fname> 
    7474        </menu1_button> 
    7575        <menu2_button> 
     
    7777                <comments></comments> 
    7878                <memberName>menu2_button</memberName> 
    79                 <fName>menu2_button</fName> 
     79                <fname>menu2_button</fname> 
    8080        </menu2_button> 
    8181        <pastefeld> 
     
    8383                <comments></comments> 
    8484                <memberName>pastefeld</memberName> 
    85                 <fName>pastefeld</fName> 
     85                <fname>pastefeld</fname> 
    8686        </pastefeld> 
    8787        <oldclipboard> 
     
    8989                <comments></comments> 
    9090                <memberName>oldclipboard</memberName> 
    91                 <fName>oldclipboard</fName> 
     91                <fname>oldclipboard</fname> 
    9292        </oldclipboard> 
    9393        <searchword> 
     
    9595                <comments></comments> 
    9696                <memberName>searchword</memberName> 
    97                 <fName>searchword</fName> 
     97                <fname>searchword</fname> 
    9898        </searchword> 
    9999        <helptext> 
     
    104104rtf</comments> 
    105105                <memberName>helptext</memberName> 
    106                 <fName>helptext</fName> 
     106                <fname>helptext</fname> 
    107107        </helptext> 
    108108        <statusOutput> 
     
    113113rtf</comments> 
    114114                <memberName>statusOutput</memberName> 
    115                 <fName>statusOutput</fName> 
     115                <fname>statusOutput</fname> 
    116116        </statusOutput> 
    117117        <test> 
     
    119119                <comments></comments> 
    120120                <memberName>test</memberName> 
    121                 <fName>test</fName> 
     121                <fname>test</fname> 
    122122        </test> 
    123123        <tester2> 
     
    125125                <comments></comments> 
    126126                <memberName>tester2</memberName> 
    127                 <fName>tester2</fName> 
     127                <fname>tester2</fname> 
    128128        </tester2> 
    129129        <tester4> 
     
    131131                <comments></comments> 
    132132                <memberName>tester4</memberName> 
    133                 <fName>tester4</fName> 
     133                <fname>tester4</fname> 
    134134        </tester4> 
    135135</Untitled> 
  • trunk/lingosource/castlib2/memberInfo.xml

    r33 r45  
    55                <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 
    66                <memberName>commonMovieScript</memberName> 
    7                 <fName>commonMovieScript</fName> 
     7                <fname>commonMovieScript</fname> 
    88        </commonmoviescript> 
    99        <FileIOFunktionen> 
     
    1111                <comments>~/Documents/Scripts/lingo/FileIOFunktionen.ls</comments> 
    1212                <memberName>FileIOFunktionen</memberName> 
    13                 <fName>FileIOFunktionen</fName> 
     13                <fname>FileIOFunktionen</fname> 
    1414        </FileIOFunktionen> 
    1515        <GetSetPrefs> 
     
    1717                <comments>~/Documents/Scripts/lingo/GetSetPrefs.ls</comments> 
    1818                <memberName>GetSetPrefs</memberName> 
    19                 <fName>GetSetPrefs</fName> 
     19                <fname>GetSetPrefs</fname> 
    2020        </GetSetPrefs> 
    2121        <aleXtrasMovieScript> 
     
    2323                <comments>~/Documents/Scripts/lingo/aleXtrasMovieScript.ls</comments> 
    2424                <memberName>aleXtrasMovieScript</memberName> 
    25                 <fName>aleXtrasMovieScript</fName> 
     25                <fname>aleXtrasMovieScript</fname> 
    2626        </aleXtrasMovieScript> 
    2727        <PseudoXMLPS> 
     
    2929                <comments>~/Documents/Scripts/lingo/PseudoXMLPS.ls</comments> 
    3030                <memberName>PseudoXMLPS</memberName> 
    31                 <fName>PseudoXMLPS</fName> 
     31                <fname>PseudoXMLPS</fname> 
    3232        </PseudoXMLPS> 
    3333        <simpleGoToAction> 
     
    3535                <comments>/Users/alex/Documents/ALIEN/myLinkedScripts/simpleGoToAction.ls</comments> 
    3636                <memberName>simpleGoToAction</memberName> 
    37                 <fName>simpleGoToAction</fName> 
     37                <fname>simpleGoToAction</fname> 
    3838        </simpleGoToAction> 
    3939        <SpriteNameBeaver> 
     
    4141                <comments>~/Documents/Scripts/lingo/SpriteNameBeaver.ls</comments> 
    4242                <memberName>SpriteNameBeaver</memberName> 
    43                 <fName>SpriteNameBeaver</fName> 
     43                <fname>SpriteNameBeaver</fname> 
    4444        </SpriteNameBeaver> 
    4545</Untitled> 
Note: See TracChangeset for help on using the changeset viewer.