Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TFS commandline functions
Message
From
28/06/2011 11:09:48
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Source Safe Control
Title:
TFS commandline functions
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01516517
Message ID:
01516517
Views:
103
Hello,

I am using TFS for source control, which works great, but sometimes it's annoying that it is not integrated in VFP.
In VFP I check if a file is readonly in the projecthook in QueryModifyFile():
*-- Check if the library file that you open is readonly.
*
LOCAL loWSH AS Scripting.FileSystemObject
loWSH = CREATEOBJECT("Scripting.FileSystemObject")
*
LOCAL loFile AS SCRIPTING.File
loFile = loWSH.GetFile(oFile.Name)
*
IF loFile.Attributes/2 <> INT(loFile.Attributes/2)
	MESSAGEBOX("Warning: file is readonly!",16)
ELSE
	CLEAR CLASSLIB (oFile.Name)
ENDIF
*
This gives the messagebox warning to the developer if the file is readonly. Now I am wondering if I could use at this place the commandline tools in TFS in order to let the user checkout the file right on the spot, (or tell the user that someone else has checked it out) so you don't need to go to the Source Control Explorer in VS. I have read some examples of TFS commandline functions, but I could not yet get it to work, maybe someone has done this before, or has better resources for that?
Christian Isberner
Software Consultant
Next
Reply
Map
View

Click here to load this message in the networking platform