Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using SCCText on an entire project?
Message
 
À
19/04/2011 23:55:50
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:
01507894
Vues:
162
>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
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform