X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FVCBackend.cpp;h=fbe367b5f0a8c7b46416dcabf1feffb736203c46;hb=d1dddde6d800834eb6b8c7626da4d251e7c74f08;hp=06fa0dfcf153b20e9e95344408b3bb74deb8916c;hpb=36c3495a3aea43e7dcda53eafadcc6592073b17e;p=lyx.git diff --git a/src/VCBackend.cpp b/src/VCBackend.cpp index 06fa0dfcf1..fbe367b5f0 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" @@ -43,7 +44,7 @@ int VCS::doVCCommandCall(string const & cmd, FileName const & path) LYXERR(Debug::LYXVC, "doVCCommandCall: " << cmd); Systemcall one; support::PathChanger p(path); - return one.startscript(Systemcall::Wait, cmd, string(), false); + return one.startscript(Systemcall::Wait, cmd, string(), string(), false); } @@ -494,6 +495,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 +566,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 +1122,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 +1788,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 +1848,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 +2239,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 +2256,7 @@ bool GIT::prepareFileRevisionEnabled() bool GIT::toggleReadOnlyEnabled() { - return false; + return true; }