X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FVCBackend.h;h=636cd9d4708c905745119289198a5b030f694c9f;hb=5a8e91d1c5381d8c152b12269707b547d5241624;hp=f0851cb46d489c86690afc5d772e18fb153509fd;hpb=ceb2303e2b9dbdd09798e5536ce16067e6d76e90;p=lyx.git diff --git a/src/VCBackend.h b/src/VCBackend.h index f0851cb46d..636cd9d470 100644 --- a/src/VCBackend.h +++ b/src/VCBackend.h @@ -35,9 +35,11 @@ public: NOLOCKING, }; - VCS(Buffer * b) : owner_(b) {} + VCS(Buffer * b) : vcstatus(NOLOCKING), owner_(b) {} virtual ~VCS() {} + /// the name of the vc backend + virtual std::string vcname() const = 0; /// register a file for version control virtual void registrer(std::string const & msg) = 0; /// can this operation be processed in the current VCS? @@ -49,7 +51,7 @@ public: /// copy a file. Return non-empty log on success, empty log on failure. virtual std::string copy(support::FileName const &, std::string const &) = 0; /// check in the current revision. - /// \p log is non-empty on success and may be empty on failure. + /// \p log is non-empty on success and may be empty on failure. virtual LyXVC::CommandResult checkIn(std::string const & msg, std::string & log) = 0; /// can this operation be processed in the current VCS? @@ -102,8 +104,8 @@ public: virtual bool prepareFileRevisionEnabled() = 0; /// Check the directory of file and all parent directories - /// for the existence of the given pathname - static bool checkparentdirs(support::FileName const & file, std::string const & pathname); + /// for the existence of repository-info like .git or .svn + static bool checkparentdirs(support::FileName const & file, std::string const & vcsdir); protected: /// parse information from the version file @@ -150,6 +152,8 @@ public: /// get file from repo, the caller must ensure that it does not exist locally static bool retrieve(support::FileName const & file); + virtual std::string vcname() const { return "RCS"; }; + virtual void registrer(std::string const & msg); virtual bool renameEnabled(); @@ -234,6 +238,8 @@ public: /// get file from repo, the caller must ensure that it does not exist locally static bool retrieve(support::FileName const & file); + virtual std::string vcname() const { return "CVS"; }; + virtual void registrer(std::string const & msg); virtual bool renameEnabled(); @@ -373,6 +379,8 @@ public: /// get file from repo, the caller must ensure that it does not exist locally static bool retrieve(support::FileName const & file); + virtual std::string vcname() const { return "SVN"; }; + virtual void registrer(std::string const & msg); virtual bool renameEnabled(); @@ -481,6 +489,8 @@ public: /// get file from repo, the caller must ensure that it does not exist locally static bool retrieve(support::FileName const & file); + virtual std::string vcname() const { return "GIT"; }; + virtual void registrer(std::string const & msg); virtual bool renameEnabled();