X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FVCBackend.cpp;h=9f9a3ff082ecce8d89473f46ce23c347721df58a;hb=2de30c62f8d671a8c8d4d52a6a7310e2c5ca84de;hp=6a6ea080d7691381a7abc35beb04c1ed3f8ff1c0;hpb=5fe5ae3e80da2afa6f4a54c0727335df052fdaf2;p=lyx.git diff --git a/src/VCBackend.cpp b/src/VCBackend.cpp index 6a6ea080d7..9f9a3ff082 100644 --- a/src/VCBackend.cpp +++ b/src/VCBackend.cpp @@ -31,6 +31,7 @@ #include "support/TempFile.h" #include +#include using namespace std; using namespace lyx::support; @@ -495,6 +496,7 @@ bool RCS::prepareFileRevision(string const &revis, string & f) + quoteName(onlyFileName(owner_->absFileName())) + " > " + quoteName(tmpf.toFilesystemEncoding()), FileName(owner_->filePath())); + tmpf.refresh(); if (tmpf.isFileEmpty()) return false; @@ -565,6 +567,8 @@ void CVS::scanMaster() // Ok extract the fields. smatch sm; + // false positive from coverity + // coverity[CHECKED_RETURN] regex_match(line, sm, reg); //sm[0]; // whole matched string @@ -1119,6 +1123,7 @@ bool CVS::prepareFileRevision(string const & revis, string & f) doVCCommandWithOutput("cvs update -p -r" + rev + ' ' + getTarget(File), FileName(owner_->filePath()), tmpf); + tmpf.refresh(); if (tmpf.isFileEmpty()) return false; @@ -1430,7 +1435,7 @@ bool SVN::fileLock(bool lock, FileName const & tmpf, string &status) + " > " + quoteName(tmpf.toFilesystemEncoding()), FileName(owner_->filePath())); - // Lock error messages go unfortunately on stderr and are unreachible this way. + // Lock error messages go unfortunately on stderr and are unreachable this way. ifstream ifs(tmpf.toFilesystemEncoding().c_str()); string line; while (ifs) { @@ -1784,6 +1789,7 @@ bool SVN::prepareFileRevision(string const & revis, string & f) + quoteName(onlyFileName(owner_->absFileName())) + " > " + quoteName(tmpf.toFilesystemEncoding()), FileName(owner_->filePath())); + tmpf.refresh(); if (tmpf.isFileEmpty()) return false; @@ -1843,6 +1849,7 @@ FileName const GIT::findFile(FileName const & file) quoteName(fname) + " > " + quoteName(tmpf.toFilesystemEncoding()), file.onlyPath()); + tmpf.refresh(); bool found = !tmpf.isFileEmpty(); LYXERR(Debug::LYXVC, "GIT control: " << (found ? "enabled" : "disabled")); return found ? file : FileName(); @@ -2233,6 +2240,7 @@ bool GIT::prepareFileRevision(string const & revis, string & f) + quoteName(onlyFileName(owner_->absFileName())) + " > " + quoteName(tmpf.toFilesystemEncoding()), FileName(owner_->filePath())); + tmpf.refresh(); if (tmpf.isFileEmpty()) return false; @@ -2249,7 +2257,7 @@ bool GIT::prepareFileRevisionEnabled() bool GIT::toggleReadOnlyEnabled() { - return false; + return true; }