X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FVCBackend.cpp;h=2235c073f41e35527b7d3617034b61f5fbdae268;hb=0c7bd9a57f2a308bb9659200eda3b7e45f8d5d3c;hp=974fa7d9c903d88f4289b816af432c11623d6b58;hpb=306b136cc005a1aeb9a6861ee0ac6fe2a2dd53e3;p=lyx.git diff --git a/src/VCBackend.cpp b/src/VCBackend.cpp index 974fa7d9c9..2235c073f4 100644 --- a/src/VCBackend.cpp +++ b/src/VCBackend.cpp @@ -13,6 +13,7 @@ #include "VCBackend.h" #include "Buffer.h" +#include "DispatchResult.h" #include "LyX.h" #include "FuncRequest.h" @@ -30,6 +31,7 @@ #include "support/TempFile.h" #include +#include using namespace std; using namespace lyx::support; @@ -494,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; @@ -564,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 @@ -1118,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; @@ -1783,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; @@ -1842,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(); @@ -2232,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; @@ -2248,7 +2257,7 @@ bool GIT::prepareFileRevisionEnabled() bool GIT::toggleReadOnlyEnabled() { - return false; + return true; }