#include "VCBackend.h"
#include "Buffer.h"
+#include "LyXFunc.h"
+#include "FuncRequest.h"
#include "frontends/alert.h"
+#include "frontends/Application.h"
#include "support/debug.h"
#include "support/filetools.h"
LYXERR(Debug::LYXVC, "doVCCommandCall: " << cmd);
Systemcall one;
support::PathChanger p(path);
- return one.startscript(Systemcall::Wait, cmd);
+ return one.startscript(Systemcall::Wait, cmd, false);
}
bool RCS::toggleReadOnlyEnabled()
{
- return true;
+ // This got broken somewhere along lfuns dispatch reorganization.
+ // reloadBuffer would be needed after this, but thats problematic
+ // since we are inside Buffer::dispatch.
+ // return true;
+ return false;
}
fileLock(false, tmpf, log);
tmpf.erase();
- return "SVN: " + log;
+ return log.empty() ? string() : "SVN: " + log;
}
+ " > " + quoteName(tmpf.toFilesystemEncoding()),
FileName(owner_->filePath()));
+ // Lock error messages go unfortunately on stderr and are unreachible this way.
ifstream ifs(tmpf.toFilesystemEncoding().c_str());
string line;
while (ifs) {
fileLock(true, tmpf, log);
tmpf.erase();
- return "SVN: " + log;
+ return log.empty() ? string() : "SVN: " + log;
}
"In case of file conflict version of the local directory files "
"will be preferred."
"\n\nContinue?"), file);
- int const ret = frontend::Alert::prompt(_("Changes detected"),
+ int ret = frontend::Alert::prompt(_("Changes detected"),
+ text, 0, 1, _("&Yes"), _("&No"), _("View &Log ..."));
+ if (ret == 2 ) {
+ dispatch(FuncRequest(LFUN_DIALOG_SHOW, "file " + tmpf.absFilename()));
+ ret = frontend::Alert::prompt(_("Changes detected"),
text, 0, 1, _("&Yes"), _("&No"));
- if (ret) {
+ hideDialogs("file", 0);
+ }
+ if (ret == 1 ) {
tmpf.erase();
return string();
}