Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Visual Source Safe
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01163758
Message ID:
01166917
Vues:
11
David,

Would you have any examples of creating VSS databases, checking in/out files, ect
using VFP?

Thanks



>Kevin,
>
>It works pretty well.
>
>
>* this code pins the current version of every file in a VSS project
>
>* code based off KB article found at http://support.microsoft.com/support/kb/articles/Q258/1/46.asp&NoWebContent=1
>* and http://www.michaelis.net/SourceSafe/Faq.htm#_Toc33748951
>* and http://www.eps-software.com/download/whitepaper_extendingsourcesafe.pdf
>* and http://msdn.microsoft.com/library/en-us/dnvss/html/vssauto.asp?frame=true
>
>public loVSS
>
>loVSS = createobject( "SourceSafe" )
>loVSS.Open( "\\vss01\vss\srcsafe.ini", "", "" )
>
>set step on
>ltStart = datetime()
>
>*PinProject( "$/X/Y/Z/Prod/" )
>PinProject( "$/A/B/C/Test/" )
>
>? "Done at", datetime(), " elapsed time:", datetime() - ltStart
>return
>
>
>function PinProject( lcProject )
>local loProject, loItems, loItem, lnVersionNumber, loOldItem
>
>lcProject = addbs( lcProject )
>
>? datetime(), " now working on project:" + lcProject
>? ""
>
>loProject = loVSS.VSSItem( lcProject ) && sets current project
>loItems = loProject.Items() && collection of items in this project
>
>for each loItem in loItems
>   do case
>      case ( loItem.Type = 0 )
>         * recurse into the subproject (folder)
>         PinProject( lcProject + loItem.Name + "/" )
>
>      case ( loItem.Type = 1 )
>         * a file to process
>         @ $,0 say loItem.Name + space(30)
>         lnVersionNumber = loItem.VersionNumber
>         loOldItem = loItem.Version( lnVersionNumber )
>         loProject.Share( loOldItem, "", 0 )
>   endcase
>endfor
>return
>
>
>>Anyone have experience working with VSS in VFP through COM?
>>
>>I'd like to add files to VSS, check in/out, get latest, get file version
>>info, ect.
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform