GetLatestVCS([Recursive: Boolean = False;] [bUpdateToMetabase: Boolean = False]);
Recursive. The parameter, determining whether the last version for the child objects of the current objects will be obtained:
If the True value is set, then the last version of the current object and all its child objects will be obtained.
If the False value is set, then the last version of the object will be obtained.
bUpdateToMetabase. The parameter determining whether the updated object will be saved to the repository base on obtaining the last version:
If the True value is set, on obtaining the last version of the object the updated object will be saved to the repository. Date and time of object change is also updated, that is, the current DBMS server time is set.
If the False value is set (default), on obtaining the last version the object in the repository is not updated. Only the local copy of the object will be updated.
The GetLatestVCS method gets information about the object from the version control system and in accordance with it updates the object in the repository.
If the method is activated, the files that correspond to the current object will be searched in the version control system. If the files are found, according to their content the repository object (if the bUpdateToMetabase parameter has the True value) or its local copy (by default) will be updated.
If True is passed as a value of the Recursive parameter, the child objects will be checked and updated. If the version control system contains files, corresponding to the added objects of the repository, then based on the information from those files the new objects will be created in the repository. If there are files, in the status of which the indicator of removal was set, in the version control system, the appropriate repository objects will be removed.
On working with Git control system, the GetLatestVCS method updates objects according to their version in local repository version stored on the current computer. To get information from DBMS server, use the IMetabase.PullPush method.
Add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObjectDescriptor;
Begin
MB := MetabaseClass.Active;
MB.Root.GetLatestVCS(True, True);
End Sub UserProc;
After executing the example the last information about the objects of the whole repository is received from the version control system. If the version control system contains files, corresponding to the added objects of the repository, then based on the information from those files the new objects will be created in the repository. If there are files, in the status of which the indicator of removal was set, in the version control system, the appropriate repository objects will be removed.
See also: