8
8
public abstract class VersionControlSystem
11
/// Creates an instance of a repository for this version control system
14
/// The repository instance.
10
16
public Repository CreateRepositoryInstance ()
12
18
Repository rep = OnCreateRepositoryInstance ();
13
19
rep.VersionControlSystem = this;
24
/// Identifier of the version control system
30
/// This identifier is stored in configuration files, so it should not change.
31
/// The default implementation returns the full name of the class.
17
33
public virtual string Id {
18
34
get { return GetType().ToString(); }
38
/// Display name of the version control system
21
40
public abstract string Name { get; }
43
/// Gets a value indicating whether this version control system is available
46
/// If the version control system depends on some native tools or libraries, this method should
47
/// check if those dependencies are properly installed and return <c>false</c> if they are not.
23
49
public virtual bool IsInstalled {
24
50
get { return false; }
54
/// Creates an instance of a repository for this version control system
27
56
protected abstract Repository OnCreateRepositoryInstance ();
28
public abstract Gtk.Widget CreateRepositoryEditor (Repository repo);
59
/// Creates an editor object for a repository.
62
/// The repository editor.
64
/// <param name='repo'>
67
public abstract IRepositoryEditor CreateRepositoryEditor (Repository repo);
70
/// Gets a repository for a given local path and identifier
75
/// <param name='path'>
79
/// An identifier. This identifier is generated by MD and normally identifies
83
/// If the local path belongs to a repository that has already returned
84
/// in previous calls, the same repository instance should be returned
85
/// to optimize memory and resource use. MonoDevelop keeps track of
86
/// repository references and will Dispose the repository only when
87
/// the last reference to the repo is freed.
30
89
public virtual Repository GetRepositoryReference (FilePath path, string id)
32
91
return VersionControlService.InternalGetRepositoryReference (path, id);
35
97
public virtual void StoreRepositoryReference (Repository repo, FilePath path, string id)
37
99
VersionControlService.InternalStoreRepositoryReference (repo, path, id);