Model for Source Control Packages

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Model for Source Control Packages.

The following model represents an example of a source control implementation. In the model, you see the interfaces that you must implement and the environment services that you must call. Like all services, you actually call the methods of a particular interface that you obtain by way of the service. The names of the classes are identified to make it easier to see how source control is carried out.

SCC_TUP Examples
Example Source Control Project

You can implement source control for your new project types in Visual Studio using the list of interfaces shown in the following table.

InterfaceUse
IVsQueryEditQuerySave2Called by projects and editors before they save or change (dirty) files. This interface is accessed using the SVsQueryEditQuerySave service.
IVsTrackProjectDocuments2Called by projects to request permission to add, remove, or rename a file or directory. This interface is also called by projects to inform the environment when an approved add, remove, or rename action is complete. It is accessed using the SVsTrackProjectDocuments service.
IVsTrackProjectDocumentsEvents2Implemented by any entity that registers to be notified when projects add, rename, or remove a file or directory. To register for event notification, call AdviseTrackProjectDocumentsEvents.
IVsSccManager2Called by projects to register with the source control package and to obtain information on source control status. This interface is accessed using the SVsSccManager service.
IVsSccProject2Implemented by the project to respond to source control requests for information about files and to obtain the source control settings required for the project file.

IVsQueryEditQuerySave2
IVsSccManager2
IVsSccProject2
IVsTrackProjectDocuments2
AdviseTrackProjectDocumentsEvents
IVsTrackProjectDocumentsEvents2
Supporting Source Control

Show: