~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlSystem.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
ImportĀ upstreamĀ versionĀ 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
{
8
8
        public abstract class VersionControlSystem
9
9
        {
 
10
                /// <summary>
 
11
                /// Creates an instance of a repository for this version control system
 
12
                /// </summary>
 
13
                /// <returns>
 
14
                /// The repository instance.
 
15
                /// </returns>
10
16
                public Repository CreateRepositoryInstance ()
11
17
                {
12
18
                        Repository rep = OnCreateRepositoryInstance ();
13
19
                        rep.VersionControlSystem = this;
14
20
                        return rep;
15
21
                }
16
 
                
 
22
 
 
23
                /// <summary>
 
24
                /// Identifier of the version control system
 
25
                /// </summary>
 
26
                /// <value>
 
27
                /// The identifier.
 
28
                /// </value>
 
29
                /// <remarks>
 
30
                /// This identifier is stored in configuration files, so it should not change.
 
31
                /// The default implementation returns the full name of the class.
 
32
                /// </remarks>
17
33
                public virtual string Id {
18
34
                        get { return GetType().ToString(); }
19
35
                }
20
36
                
 
37
                /// <summary>
 
38
                /// Display name of the version control system
 
39
                /// </summary>
21
40
                public abstract string Name { get; }
22
 
                
 
41
 
 
42
                /// <summary>
 
43
                /// Gets a value indicating whether this version control system is available
 
44
                /// </summary>
 
45
                /// <remarks>
 
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.
 
48
                /// </remarks>
23
49
                public virtual bool IsInstalled {
24
50
                        get { return false; }
25
51
                }
26
52
                
 
53
                /// <summary>
 
54
                /// Creates an instance of a repository for this version control system
 
55
                /// </summary>
27
56
                protected abstract Repository OnCreateRepositoryInstance ();
28
 
                public abstract Gtk.Widget CreateRepositoryEditor (Repository repo);
29
 
                
 
57
                
 
58
                /// <summary>
 
59
                /// Creates an editor object for a repository.
 
60
                /// </summary>
 
61
                /// <returns>
 
62
                /// The repository editor.
 
63
                /// </returns>
 
64
                /// <param name='repo'>
 
65
                /// A repository
 
66
                /// </param>
 
67
                public abstract IRepositoryEditor CreateRepositoryEditor (Repository repo);
 
68
                
 
69
                /// <summary>
 
70
                /// Gets a repository for a given local path and identifier
 
71
                /// </summary>
 
72
                /// <returns>
 
73
                /// The repository.
 
74
                /// </returns>
 
75
                /// <param name='path'>
 
76
                /// A local path
 
77
                /// </param>
 
78
                /// <param name='id'>
 
79
                /// An identifier. This identifier is generated by MD and normally identifies
 
80
                /// a project.
 
81
                /// </param>
 
82
                /// <remarks>
 
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.
 
88
                /// </remarks>
30
89
                public virtual Repository GetRepositoryReference (FilePath path, string id)
31
90
                {
32
91
                        return VersionControlService.InternalGetRepositoryReference (path, id);
33
92
                }
34
 
 
 
93
                
 
94
                /// <summary>
 
95
                /// Currently unused
 
96
                /// </summary>
35
97
                public virtual void StoreRepositoryReference (Repository repo, FilePath path, string id)
36
98
                {
37
99
                        VersionControlService.InternalStoreRepositoryReference (repo, path, id);