From: Lars Gullik Bjønnes Date: Sun, 19 Aug 2001 14:06:27 +0000 (+0000) Subject: fixed some bugs in the version control handling X-Git-Tag: 1.6.10~20792 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=35058c638ea817a58d1c72119dba1879d79c6302;p=features.git fixed some bugs in the version control handling git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2553 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 1ef58cb0a3..0933ebb2ea 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2001-08-19 Lars Gullik Bjønnes + + * vc-backend.h (RCS::versionString): add RCS to version + (CVS::versionString): add CVS to version + + * vc-backend.C (scanMaster): do not add CVS to version. + (scanMaster): do not add RCS to version + + * lyxvc.C (versionString): new method + + * lyxfunc.C (initMiniBuffer): use LyXVC::versionString + 2001-08-18 Lars Gullik Bjønnes * Spacing.C (set): initialize fval diff --git a/src/lyxvc.C b/src/lyxvc.C index 40dcf2547d..a5b9afd0d9 100644 --- a/src/lyxvc.C +++ b/src/lyxvc.C @@ -200,9 +200,14 @@ bool LyXVC::inUse() } -string const & LyXVC::version() const +//string const & LyXVC::version() const +//{ +// return vcs->version(); +//} + +string const LyXVC::versionString() const { - return vcs->version(); + return vcs->versionString(); } diff --git a/src/lyxvc.h b/src/lyxvc.h index e2cc228138..75bc7871cd 100644 --- a/src/lyxvc.h +++ b/src/lyxvc.h @@ -82,7 +82,9 @@ public: bool inUse(); /// Returns the version number. - string const & version() const; + //string const & version() const; + /// Returns the version number. + string const versionString() const; /// Returns the userid of the person who has locked the doc. string const & locker() const; diff --git a/src/vc-backend.C b/src/vc-backend.C index 0e3bac747e..c745b38fb2 100644 --- a/src/vc-backend.C +++ b/src/vc-backend.C @@ -112,7 +112,9 @@ void RCS::scanMaster() vcstatus = UNLOCKED; continue; } - string tmpt, s1, s2; + string tmpt; + string s1; + string s2; do { ifs >> tmpt; s1 = strip(tmpt, ';'); @@ -136,7 +138,6 @@ void RCS::scanMaster() << endl; } } - version_ = "RCS: " + version_; } @@ -245,8 +246,7 @@ void CVS::scanMaster() LRegex::SubMatches const & sm = reg.exec(line); //sm[0]; // whole matched string //sm[1]; // filename - version_ = "CVS: "; - version_ += LSubstring(line, sm[2].first, + version_ = LSubstring(line, sm[2].first, sm[2].second); string file_date = LSubstring(line, sm[3].first, sm[3].second); diff --git a/src/vc-backend.h b/src/vc-backend.h index bd54e89484..0df186cde2 100644 --- a/src/vc-backend.h +++ b/src/vc-backend.h @@ -39,7 +39,11 @@ public: /// virtual void getLog(string const &) = 0; /// - string const & version() const { return version_; } + virtual string const versionString() const = 0; + /// + string const & version() const { + return version_; + } /// string const & locker() const { return locker_; } /// @@ -96,6 +100,10 @@ public: virtual void undoLast(); /// virtual void getLog(string const &); + /// + virtual string const versionString() const { + return "RCS: " + version_; + } }; @@ -121,6 +129,10 @@ public: virtual void undoLast(); /// virtual void getLog(string const &); + /// + virtual string const versionString() const { + return "CVS: " + version_; + } private: string file_; };