#include "support/lstrings.h"
#include "support/PathChanger.h"
#include "support/Systemcall.h"
#include "support/lstrings.h"
#include "support/PathChanger.h"
#include "support/Systemcall.h"
- if (ret && reportError)
+ if (ret && reportError) {
+ docstring rcsmsg;
+ if (prefixIs(cmd, "ci "))
+ rcsmsg = "\n" + _("Check whether the GNU RCS package is installed on your system.");
frontend::Alert::error(_("Revision control error."),
bformat(_("Some problem occurred while running the command:\n"
frontend::Alert::error(_("Revision control error."),
bformat(_("Some problem occurred while running the command:\n"
{
LYXERR(Debug::LYXVC, "LyXVC::RCS: retrieve.\n\t" << file);
// The caller ensures that file does not exist, so no need to check that.
{
LYXERR(Debug::LYXVC, "LyXVC::RCS: retrieve.\n\t" << file);
// The caller ensures that file does not exist, so no need to check that.
FileName const entries(onlyPath(file.absFileName()) + "/CVS/Entries");
string const tmpf = '/' + onlyFileName(file.absFileName()) + '/';
LYXERR(Debug::LYXVC, "LyXVC: Checking if file is under cvs in `" << entries
FileName const entries(onlyPath(file.absFileName()) + "/CVS/Entries");
string const tmpf = '/' + onlyFileName(file.absFileName()) + '/';
LYXERR(Debug::LYXVC, "LyXVC: Checking if file is under cvs in `" << entries
LYXERR(Debug::LYXVC, "LyXVC::CVS: scanMaster. \n Checking: " << master_);
// Ok now we do the real scan...
ifstream ifs(master_.toFilesystemEncoding().c_str());
LYXERR(Debug::LYXVC, "LyXVC::CVS: scanMaster. \n Checking: " << master_);
// Ok now we do the real scan...
ifstream ifs(master_.toFilesystemEncoding().c_str());
LYXERR(Debug::LYXVC, "\tlooking for `" << tmpf << '\'');
string line;
static regex const reg("/(.*)/(.*)/(.*)/(.*)/(.*)");
LYXERR(Debug::LYXVC, "\tlooking for `" << tmpf << '\'');
string line;
static regex const reg("/(.*)/(.*)/(.*)/(.*)/(.*)");
//sm[5]; // tag or tagdate
FileName file(owner_->absFileName());
if (file.isReadableFile()) {
//sm[5]; // tag or tagdate
FileName file(owner_->absFileName());
if (file.isReadableFile()) {
- time_t mod = file.lastModified();
- string mod_date = rtrim(asctime(gmtime(&mod)), "\n");
+ time_t const mod = file.lastModified();
+ string const mod_date = rtrim(asctime(gmtime(&mod)), "\n");
LYXERR(Debug::LYXVC, "Date in Entries: `" << file_date
<< "'\nModification date of file: `" << mod_date << '\'');
if (file.isReadOnly()) {
// readonly checkout is unlocked
LYXERR(Debug::LYXVC, "Date in Entries: `" << file_date
<< "'\nModification date of file: `" << mod_date << '\'');
if (file.isReadOnly()) {
// readonly checkout is unlocked
} else {
FileName bdir(addPath(master_.onlyPath().absFileName(),"Base"));
FileName base(addName(bdir.absFileName(),name));
// if base version is existent "cvs edit" was used to lock
} else {
FileName bdir(addPath(master_.onlyPath().absFileName(),"Base"));
FileName base(addName(bdir.absFileName(),name));
// if base version is existent "cvs edit" was used to lock
return doVCCommand("cvs -q edit " + getTarget(File),
FileName(owner_->filePath()));
}
return doVCCommand("cvs -q edit " + getTarget(File),
FileName(owner_->filePath()));
}
return doVCCommand("cvs -q unedit " + getTarget(File),
FileName(owner_->filePath()));
}
return doVCCommand("cvs -q unedit " + getTarget(File),
FileName(owner_->filePath()));
}
string const fname = onlyFileName(file.absFileName());
LYXERR(Debug::LYXVC, "LyXVC: Checking if file is under svn control for `" << fname << '\'');
string const fname = onlyFileName(file.absFileName());
LYXERR(Debug::LYXVC, "LyXVC: Checking if file is under svn control for `" << fname << '\'');
{
// vcstatus code is somewhat superflous,
// until we want to implement read-only toggle for svn.
{
// vcstatus code is somewhat superflous,
// until we want to implement read-only toggle for svn.
FileName tmpf = tempfile.name();
if (tmpf.empty()) {
LYXERR(Debug::LYXVC, "Could not generate logfile " << tmpf);
FileName tmpf = tempfile.name();
if (tmpf.empty()) {
LYXERR(Debug::LYXVC, "Could not generate logfile " << tmpf);
tmpf.refresh();
bool found = !tmpf.isFileEmpty();
LYXERR(Debug::LYXVC, "GIT control: " << (found ? "enabled" : "disabled"));
tmpf.refresh();
bool found = !tmpf.isFileEmpty();
LYXERR(Debug::LYXVC, "GIT control: " << (found ? "enabled" : "disabled"));
{
// vcstatus code is somewhat superflous,
// until we want to implement read-only toggle for git.
{
// vcstatus code is somewhat superflous,
// until we want to implement read-only toggle for git.