Lets start some cleanup of old version() VCS API

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33436 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2010-02-12 06:30:41 +00:00
parent c0f9fb76a8
commit 89158dad83
3 changed files with 17 additions and 16 deletions

View File

@ -123,10 +123,7 @@ public:
/// Is the document under administration by VCS?
bool inUse() const;
/// FIXME Either rename or kill, we have revisionInfo now.
/// Returns the version number.
//std::string const & version() const;
/// Returns the version number.
/// Returns the RCS + version number for messages
std::string const versionString() const;
/**

View File

@ -4,6 +4,7 @@
* Licence details can be found in the file COPYING.
*
* \author Lars Gullik Bjønnes
* \author Pavel Sanda
*
* Full author contact details are available in file CREDITS.
*/
@ -240,7 +241,7 @@ bool RCS::lockingToggleEnabled()
void RCS::revert()
{
doVCCommand("co -f -u" + version() + " "
doVCCommand("co -f -u" + version_ + " "
+ quoteName(onlyFilename(owner_->absFileName())),
FileName(owner_->filePath()));
// We ignore changes and just reload!
@ -251,7 +252,7 @@ void RCS::revert()
void RCS::undoLast()
{
LYXERR(Debug::LYXVC, "LyXVC: undoLast");
doVCCommand("rcs -o" + version() + " "
doVCCommand("rcs -o" + version_ + " "
+ quoteName(onlyFilename(owner_->absFileName())),
FileName(owner_->filePath()));
}
@ -483,8 +484,10 @@ bool CVS::toggleReadOnlyEnabled()
}
string CVS::revisionInfo(LyXVC::RevisionInfo const)
string CVS::revisionInfo(LyXVC::RevisionInfo const info)
{
if (info == LyXVC::File)
return version_;
return string();
}

View File

@ -5,6 +5,7 @@
* Licence details can be found in the file COPYING.
*
* \author Lars Gullik Bjønnes
* \author Pavel Sanda
*
* Full author contact details are available in file CREDITS.
*/
@ -66,8 +67,6 @@ public:
virtual void getLog(support::FileName const &) = 0;
/// return the current version description
virtual std::string const versionString() const = 0;
/// return the current version
std::string const & version() const { return version_; }
/// return the user who has locked the file
std::string const & locker() const { return locker_; }
/// set the owning buffer
@ -104,12 +103,6 @@ protected:
/// The status of the VC controlled file.
VCStatus vcstatus;
/**
* The version of the VC file. I am not sure if this can be a
* string or if it must be a float/int.
*/
std::string version_;
/// The user currently keeping the lock on the VC file.
std::string locker_;
/// The buffer using this VC
@ -165,6 +158,12 @@ public:
protected:
virtual void scanMaster();
private:
/**
* The version of the VC file. I am not sure if this can be a
* string or if it must be a float/int.
*/
std::string version_;
};
@ -217,6 +216,8 @@ protected:
private:
support::FileName file_;
// revision number from scanMaster
std::string version_;
};
@ -257,7 +258,7 @@ public:
virtual void getLog(support::FileName const &);
virtual std::string const versionString() const {
return "SVN: " + version_;
return "SVN: " + rev_file_cache_;
}
virtual bool toggleReadOnlyEnabled();