X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FVCBackend.h;h=970972af48b50db7d233d7647cfb6451dcdce21d;hb=7e69ac220dd958b57ec40f198355c7e0ba8d720e;hp=6d3903c68698476125b465a436011ac7f9b28abf;hpb=2f9ef2b98a6170d4c890ce3325ddc3ad9105bbad;p=lyx.git diff --git a/src/VCBackend.h b/src/VCBackend.h index 6d3903c686..970972af48 100644 --- a/src/VCBackend.h +++ b/src/VCBackend.h @@ -33,9 +33,6 @@ public: UNLOCKED, LOCKED, NOLOCKING, - /// This file is not in version control, but it could be aded - /// (because the path is under version control) - UNVERSIONED, }; VCS(Buffer * b) : owner_(b) {} @@ -105,8 +102,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 @@ -542,6 +539,27 @@ protected: /// Check in files \p f with log \p msg LyXVC::CommandResult checkIn(std::vector const & f, std::string const & msg, std::string & log); + +private: + /** + * Real code for obtaining file revision info. Fills all file-related caches + * and returns true if successfull. + * "?" is stored in rev_file_cache_ as a signal if request for obtaining info + * was already unsuccessful. + */ + bool getFileRevisionInfo(); + /// cache for file revision number, "?" if already unsuccessful, isNumber==true + std::string rev_file_cache_; + /// cache for author of last commit + std::string rev_author_cache_; + /// cache for date of last commit + std::string rev_date_cache_; + /// cache for time of last commit + std::string rev_time_cache_; + /// fills rev_tree_cache_, returns true if successfull. + bool getTreeRevisionInfo(); + /// cache for tree revision number, "?" if already unsuccessful + std::string rev_tree_cache_; }; } // namespace lyx