Fix RCS part of #6396. Btw revert is slightly broken now...

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36153 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2010-11-06 02:21:04 +00:00
parent de44d18b75
commit 69520456e0

View File

@ -195,9 +195,27 @@ bool RCS::checkInEnabled()
return owner_ && !owner_->isReadonly();
}
bool RCS::isCheckInWithConfirmation()
{
//FIXME diff
// FIXME one day common getDiff for all backends
// docstring diff;
// if (getDiff(file, diff) && diff.empty())
// return false;
FileName tmpf = FileName::tempName("lyxvcout");
if (tmpf.empty()) {
LYXERR(Debug::LYXVC, "Could not generate logfile " << tmpf);
return true;
}
doVCCommandCall("rcsdiff " + quoteName(owner_->absFileName())
+ " > " + quoteName(tmpf.toFilesystemEncoding()),
FileName(owner_->filePath()));
if (tmpf.fileContents("UTF-8").empty())
return false;
return true;
}