From 3fe61ffb8fc6064ecde4d7330ea84775663a1c42 Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Tue, 22 Jul 2008 12:25:54 +0000 Subject: [PATCH] VCS: adjust cvs revert to other archs. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25799 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/VCBackend.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/VCBackend.cpp b/src/VCBackend.cpp index abe23df406..a6625ad34e 100644 --- a/src/VCBackend.cpp +++ b/src/VCBackend.cpp @@ -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(); } -- 2.39.5