From be397b29a5da65c41c7e56fbac59b06700cec182 Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Mon, 21 Jul 2008 11:50:21 +0000 Subject: [PATCH] We are completely user unfriendly. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25765 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/VCBackend.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/VCBackend.cpp b/src/VCBackend.cpp index ae40e5dd6f..7dac4e5f2d 100644 --- a/src/VCBackend.cpp +++ b/src/VCBackend.cpp @@ -13,8 +13,11 @@ #include "VCBackend.h" #include "Buffer.h" +#include "frontends/alert.h" + #include "support/debug.h" #include "support/filetools.h" +#include "support/gettext.h" #include "support/lstrings.h" #include "support/Path.h" #include "support/Systemcall.h" @@ -39,6 +42,10 @@ int VCS::doVCCommand(string const & cmd, FileName const & path) Systemcall one; support::PathChanger p(path); int const ret = one.startscript(Systemcall::Wait, cmd); + if (ret) + frontend::Alert::error(_("Revision control error."), + _("Please check you have installed revision control program.") + "\n" + + from_ascii(cmd)); return ret; } @@ -336,6 +343,9 @@ 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())); -- 2.39.5