string LyXVC::checkIn()
{
LYXERR(Debug::LYXVC, "LyXVC: checkIn");
+ if (!vcs)
+ return string();
docstring empty(_("(no log message)"));
docstring response;
string log;
string LyXVC::checkOut()
{
+ if (!vcs)
+ return string();
//RCS allows checkOut only in ReadOnly mode
if (vcs->toggleReadOnlyEnabled() && !owner_->isReadonly())
return string();
string LyXVC::repoUpdate()
{
LYXERR(Debug::LYXVC, "LyXVC: repoUpdate");
+ if (!vcs)
+ return string();
return vcs->repoUpdate();
}
string LyXVC::lockingToggle()
{
LYXERR(Debug::LYXVC, "LyXVC: toggle locking property");
+ if (!vcs)
+ return string();
return vcs->lockingToggle();
}
bool LyXVC::revert()
{
LYXERR(Debug::LYXVC, "LyXVC: revert");
+ if (!vcs)
+ return false;
docstring const file = owner_->fileName().displayName(20);
docstring text = bformat(_("Reverting to the stored version of the "
void LyXVC::undoLast()
{
+ if (!vcs)
+ return;
vcs->undoLast();
}
void LyXVC::toggleReadOnly()
{
+ if (!vcs)
+ return;
if (!vcs->toggleReadOnlyEnabled())
return;
string const LyXVC::versionString() const
{
+ if (!vcs)
+ return string();
return vcs->versionString();
}
bool LyXVC::locking() const
{
+ if (!vcs)
+ return false;
return vcs->status() != VCS::NOLOCKING;
}