Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using SCCText on an entire project?
Message
De
20/04/2011 09:42:17
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01507870
Message ID:
01507904
Vues:
77
>>How can I easily run SCCText (or SCCTextX) on each SCX and VCX in my project?
>>
>>I'm not looking for some super duper total Source Control trick... I just want the ascii output that SCCText creates, dumped right into the folder where each SCX and VCX in the project lives.
>>
>>(To share exactly what happens next.. I'm pushing the contents of the directory up to a Mercurial repository space up in the cloud. And I want a text version of each file to go up with each push.)
>
>
>LOCAL loProject, ;
>      loEx AS Exception, ;
>      loFile, ;
>      lcSCCText
>      
>lcSCCText = HOME(0) + "SCCText.PRG"
>
>IF !FILE(lcSCCText)
>   MESSAGEBOX("Unable to file " + HOME(0) + "SCCText.PRG", 16, "Error")
>ENDIF
>
>TRY
>   loProject = _vfp.ActiveProject 
>CATCH TO loEx
>   
>ENDTRY
>
>IF TYPE("loEx") = "O"
>   MESSAGEBOX("There are no active projects", 64, "Error")
>   RETURN
>ENDIF
>
>FOR EACH loFile IN loProject.Files
>    ? "Generating: " + loFile.Name 
>    IF INLIST(loFile.Type, "V", "K", "R") 	&& VCX/SCX/FRX
>       DO (lcSCCText) WITH loFile.Name
>    ENDIF
>ENDFOR
>
This works great... I created a PRG for this, which I then call from a ProjectHook class to fire this off with each build.

Funny thing is, I learned that you cannot SCCText generate on the actual VCX that has the ProjectHook that is calling the PRG that attempts to codegen the very same VCX. It gives some kind of "Classlib In Use" error or somthing like that. No big deal..That vcx only has one class that has only one line of code that calls the PRG.


So, I just wrote a condition to skip that ProjectHook VCX. No problem.

This is cool because I am pushing my source code up to a Mercurial account, and now I can weasily view diff changes on the SCA and VCA files. Before, you could noy see the diff changes on the binary VCX and SCX files.

.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform