VCS: adjust cvs revert to other archs.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25799 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2008-07-22 12:25:54 +00:00
parent 7372c4abbe
commit 3fe61ffb8f

View File

@ -352,14 +352,16 @@ bool CVS::checkOutEnabled()
void CVS::revert()
{
// This is sensitive operation, so at lest some check before
if (doVCCommand("cvs --help", FileName(owner_->filePath())))
return;
// Reverts to the version in CVS repository and
// gets the updated version from the repository.
string const fil = quoteName(onlyFilename(owner_->absFileName()));
doVCCommand("rm -f " + fil + "; cvs update " + fil,
// This is sensitive operation, so at lest some check about
// existence of cvs program and its file
if (doVCCommand("cvs log "+ fil, FileName(owner_->filePath())))
return;
FileName f(owner_->absFileName());
f.removeFile();
doVCCommand("cvs update " + fil,
FileName(owner_->filePath()));
owner_->markClean();
}