Logo

Hacker’s Guide to Visual FoxPro
An irreverent look at how Visual FoxPro really works. Tells you the inside scoop on every command, function, property, event and method of Visual FoxPro.

AddToSCC, RemoveFromSCC

These two methods of the File object allow an individual file to come under, or be freed from, source code control.

Usage

lResult = filFile.AddToSCC()
lResult = filFile.RemoveFromSCC()

Use these two methods to add a file to your source code control system or remove it.

Like the other SCC methods, these commands suffer from confirmation dialogs getting in the way of the processing. This means that you can't entirely automate things—you'll have to manually click in these dialogs. Since they aren't part of Fox's interface, even a risky maneuver like KEYBOARDing values won't work.

Example

* Clear all the files in a project out of SCC
oProject = _VFP.ActiveProject
FOR EACH oFile IN oProject.Files
  IF oFile.ReadOnly  && if .T., it is under SCC
    oFile.RemoveFromSCC()
  ENDIF
ENDFOR

See Also

CheckIn, CheckOut, File, GetLatestVersion, Project, UndoCheckout