]> git.lyx.org Git - features.git/commitdiff
Implement checkout for svn.
authorPavel Sanda <sanda@lyx.org>
Tue, 22 Jul 2008 09:00:41 +0000 (09:00 +0000)
committerPavel Sanda <sanda@lyx.org>
Tue, 22 Jul 2008 09:00:41 +0000 (09:00 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25788 a592a061-630c-0410-9148-cb99ea01b6c8

src/LyXFunc.cpp
src/VCBackend.cpp
src/VCBackend.h

index 2a8bcb3dbc119fe593c647d25585946dad6cb354..f69f5f88826ff0803202e9d6c55137e3a02f8992 100644 (file)
@@ -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();
                        }
index 829b291ca6124e252dfbf0496540bb8ba43dc627..8b9b7a1adebc42ae3f4013706b2dc9f8355ff407 100644 (file)
@@ -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;
 }
 
 
index 402a723399aa84de3608cc479e6c89dd4a732fcf..d44bb045f99fbfd2e6ce1c31536578c19efef462 100644 (file)
@@ -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