namespace lyx {
-int VCS::doVCCommandCall(string const & cmd, FileName const & path){
+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);
}
+
int VCS::doVCCommand(string const & cmd, FileName const & path)
{
if (owner_)
return ret ? string() : "RCS: Proceeded";
}
+
bool RCS::checkInEnabled()
{
return owner_ && !owner_->isReadonly();
}
+
string RCS::checkOut()
{
owner_->markClean();
}
-string RCS::repoSynchro()
+string RCS::repoUpdate()
{
lyxerr << "Sorry, not implemented." << endl;
return string();
}
-bool RCS::repoSynchroEnabled()
+bool RCS::repoUpdateEnabled()
{
return false;
}
}
-string CVS::repoSynchro()
+string CVS::repoUpdate()
{
lyxerr << "Sorry, not implemented." << endl;
return string();
}
-bool CVS::repoSynchroEnabled()
+bool CVS::repoUpdateEnabled()
{
return false;
}
FileName(owner_->filePath()));
}
+
bool CVS::toggleReadOnlyEnabled()
{
return false;
}
-string SVN::repoSynchro()
+string SVN::repoUpdate()
{
FileName tmpf = FileName::tempName("lyxvcout");
if (tmpf.empty()) {
if (!res.empty()) {
LYXERR(Debug::LYXVC, "Diff detected:\n" << res);
docstring const file = from_utf8(owner_->filePath());
- docstring text = bformat(_("There were detected changes"
- "in the working directory.\n"
- "Synchronizing with repository will discard "
- "any uncommitted changes in the directory:\n%1$s"
+ docstring text = bformat(_("There were detected changes "
+ "in the working directory:\n%1$s\n\n"
+ "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"),
text, 0, 1, _("&Yes"), _("&No"));
}
}
- doVCCommand("svn revert -R " + quoteName(owner_->filePath())
- + " > " + quoteName(tmpf.toFilesystemEncoding()),
- FileName(owner_->filePath()));
- res = "Revert log:\n" + tmpf.fileContents("UTF-8");
- doVCCommand("svn update " + quoteName(owner_->filePath())
+ // Reverting looks too harsh, see bug #6255.
+ // doVCCommand("svn revert -R " + quoteName(owner_->filePath())
+ // + " > " + quoteName(tmpf.toFilesystemEncoding()),
+ // FileName(owner_->filePath()));
+ // res = "Revert log:\n" + tmpf.fileContents("UTF-8");
+ doVCCommand("svn update --accept mine-full " + quoteName(owner_->filePath())
+ " > " + quoteName(tmpf.toFilesystemEncoding()),
FileName(owner_->filePath()));
res += "Update log:\n" + tmpf.fileContents("UTF-8");
}
-bool SVN::repoSynchroEnabled()
+bool SVN::repoUpdateEnabled()
{
return true;
}
return true;
}
+
void SVN::revert()
{
// Reverts to the version in CVS repository and