11 #include "support/syscall.h"
28 virtual void scanMaster() = 0;
30 virtual void registrer(string const & msg) = 0;
32 virtual void checkIn(string const & msg) = 0;
34 virtual void checkOut() = 0;
36 virtual void revert() = 0;
38 virtual void undoLast() = 0;
40 virtual void getLog(string const &) = 0;
42 virtual string const versionString() const = 0;
44 string const & version() const {
48 string const & locker() const { return locker_; }
50 void owner(Buffer * b) { owner_ = b; }
52 Buffer * owner() const { return owner_; }
54 VCStatus status() const { return vcstatus; }
57 static int doVCCommand(string const &, string const &);
59 /** The master VC file. For RCS this is *,v or RCS/ *,v. master should
64 /// The status of the VC controlled file.
67 /** The version of the VC file. I am not sure if this can be a
68 string of if it must be a
72 /// The user currently keeping the lock on the VC file.
74 /// The buffer using this VC
80 class RCS : public VCS {
84 RCS(string const & m);
86 static string const find_file(string const & file);
88 static void retrive(string const & file);
90 virtual void scanMaster();
92 virtual void registrer(string const & msg);
94 virtual void checkIn(string const & msg);
96 virtual void checkOut();
98 virtual void revert();
100 virtual void undoLast();
102 virtual void getLog(string const &);
104 virtual string const versionString() const {
105 return "RCS: " + version_;
111 class CVS : public VCS {
115 CVS(string const & m, string const & f);
117 static string const find_file(string const & file);
119 virtual void scanMaster();
121 virtual void registrer(string const & msg);
123 virtual void checkIn(string const & msg);
125 virtual void checkOut();
127 virtual void revert();
129 virtual void undoLast();
131 virtual void getLog(string const &);
133 virtual string const versionString() const {
134 return "CVS: " + version_;