Metabase > Metabase Assembly Interfaces > IMetabaseDefinition > IMetabaseDefinition.VcsName
VcsName: String;
VcsName: String;
The VcsName property determines a version control system type.
This property is relevant to use if the repository is added to version control system.
Executing the example requires a repository connected to version control system and a local GIT repository on the C drive.
Add a link to the Metabase system assembly.
Sub UserProc;
Var
Def: IMetabaseDefinition;
Begin
// Get repository
Def := MetabaseClass.Active.Definition;
// Display type of the current version control system and local repository folder
Debug.WriteLine("Current version control system: " + Def.VcsName);
Debug.WriteLine("Current local folder: " + Def.VcsLocalPath);
// Set version control system and local repository folder
Def.VcsName := "Git";
Def.VcsLocalPath := "C:\VS\git_repo";
// Save changes
Def.Save;
End Sub UserProc;
Public Shared Sub Main(Params: StartParams);
Var
Def: IMetabaseDefinition;
Begin
// Get repository
Def := Params.Metabase.Definition;
// Display type of the current version control system and local repository folder
System.Diagnostics.Debug.WriteLine("Current version control system: " + Def.VcsName);
System.Diagnostics.Debug.WriteLine("Current local folder: " + Def.VcsLocalPath);
// Set version control system and local repository folder
Def.VcsName := "Git";
Def.VcsLocalPath := "C:\VS\git_repo";
// Save changes
Def.Save();
End Sub;
After executing the example the console window displays the type of the current version control system and path to the local folder, GIT is set as a version control system and is set up to the specified path to the local GIT repository.
See also: