diff --git a/src/LyXFunc.cpp b/src/LyXFunc.cpp index 2a8bcb3dbc..f69f5f8882 100644 --- a/src/LyXFunc.cpp +++ b/src/LyXFunc.cpp @@ -1061,8 +1061,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd) LASSERT(lyx_view_ && lyx_view_->buffer(), /**/); if (!ensureBufferClean(view())) break; - if (lyx_view_->buffer()->lyxvc().inUse() - && lyx_view_->buffer()->isReadonly()) { + if (lyx_view_->buffer()->lyxvc().inUse()) { lyx_view_->buffer()->lyxvc().checkOut(); reloadBuffer(); } diff --git a/src/VCBackend.cpp b/src/VCBackend.cpp index 829b291ca6..8b9b7a1ade 100644 --- a/src/VCBackend.cpp +++ b/src/VCBackend.cpp @@ -464,13 +464,14 @@ bool SVN::checkInEnabled() void SVN::checkOut() { - lyxerr << "Sorry not implemented." << endl; + doVCCommand("svn update " + quoteName(onlyFilename(owner_->absFileName())), + FileName(owner_->filePath())); } bool SVN::checkOutEnabled() { - return false; + return true; } diff --git a/src/VCBackend.h b/src/VCBackend.h index 402a723399..d44bb045f9 100644 --- a/src/VCBackend.h +++ b/src/VCBackend.h @@ -66,6 +66,7 @@ public: /// return the lock status of this file VCStatus status() const { return vcstatus; } /// do we need special handling for read-only toggling? + /// (also used for check-out operation) virtual bool toggleReadOnlyEnabled() = 0; protected: /// parse information from the version file