Click or drag to resize

VersionControlManager Class

Base class for classes for managing version control for documents and catalogs. Provides a partial generic implementation of IVersionControl, allowing subclasses to provide specifics relating to documents and catalogs.
Inheritance Hierarchy
SystemObject
  Demo3D.Gui.VersionControlVersionControlManager

Namespace:  Demo3D.Gui.VersionControl
Assembly:  Demo3D.Core (in Demo3D.Core.dll) Version: 18.03.00
Syntax
C#
public abstract class VersionControlManager : IDisposable

The VersionControlManager type exposes the following members.

Properties
  NameDescription
Public propertyDefaultEmailAddress
The default Git email address to use.
Public propertyDefaultUsername
The default Git user name to use.
Public propertyHasUncommittedChanges
Whether this document has any uncommitted changes.
Public propertyIsVersionControlEnabled
Whether version control is enabled for this document.
Public propertyRepositoryPath
When implemented in a derived class, gets the full path of the root folder of the repository.
Top
Methods
  NameDescription
Public methodCheckoutBranchAsync
Checks out a specified branch. Note that any unsaved or uncommitted changes will be lost.
Public methodCheckoutCommitAsync
Checks out a specified commit, resulting in a detached HEAD. Note that any unsaved or uncommitted changes will be lost.
Public methodCommitAsync
Commits all current changes.
Public methodDispose
Unsubscribes from the file watcher.
Protected methodDispose(Boolean)
Unsubscribes from the file watcher.
Public methodMakeSubfoldersNotReadOnly
Removes the read-only attribute from all subfolders. OneDrive often likes to make folders read-only, so for models/catalogs saved to OneDrive, the subfolders are often automatically read-only. This causes problems for Git, as it needs to be able to delete the folders when checking out a commit, so we need to remove the read-only attribute.
Public methodReload
When implemented in a derived class, reloads the current document.
Public methodRevertToCommitAsync
Reverts to a specified commit by creating a new commit that reverts all more recent commits. Note that any unsaved or uncommitted changes will be lost.
Public methodSaveChanges
When implemented in a derived class, saves any unsaved changes.
Public methodShowCommitDifferences
Shows visually the differences between two versions of a specified file.
Public methodShowLocalDifferences
Shows visually the differences between the local copy and the last committed version of a file.
Public methodSuspendCommitChangedExternally
Gets an IDisposable instance which will disable publishing of the CommitChangedExternally event and re-enable when disposed.
Public methodUndoLocalChangesAsync
Deletes all local changes.
Top
Events
  NameDescription
Public eventCommitChangedExternally
Occurs when an external version control operation results in checking out a different commit.
Public eventRepositoryModifiedExternally
Occurs when something is modified in the version control repository outside Emulate3D.
Top
See Also