]> git.lyx.org Git - lyx.git/blobdiff - src/VCBackend.cpp
MSVC does not define WIN32 but _WIN32.
[lyx.git] / src / VCBackend.cpp
index 6e8b5655545e62e9c5e52989aaa6b0d74aa77a22..b9642666ebb88d6a2cb91c3865f5e0de3bcb5757 100644 (file)
@@ -80,7 +80,7 @@ FileName const RCS::findFile(FileName const & file)
        FileName tmp(file.absFilename() + ",v");
        LYXERR(Debug::LYXVC, "LyXVC: Checking if file is under rcs: " << tmp);
        if (tmp.isReadableFile()) {
-               LYXERR(Debug::LYXVC, "Yes " << file << " is under rcs.");
+               LYXERR(Debug::LYXVC, "Yes, " << file << " is under rcs.");
                return tmp;
        }
 
@@ -88,7 +88,7 @@ FileName const RCS::findFile(FileName const & file)
        tmp = FileName(addName(addPath(onlyPath(file.absFilename()), "RCS"), file.absFilename()) + ",v");
        LYXERR(Debug::LYXVC, "LyXVC: Checking if file is under rcs: " << tmp);
        if (tmp.isReadableFile()) {
-               LYXERR(Debug::LYXVC, "Yes " << file << " it is under rcs.");
+               LYXERR(Debug::LYXVC, "Yes, " << file << " is under rcs.");
                return tmp;
        }
 
@@ -356,7 +356,7 @@ string CVS::checkOut()
        // cvs update or perhaps for cvs this should be a noop
        // we need to detect conflict (eg "C" in output)
        // before we can do this.
-       lyxerr << "Sorry not implemented." << endl;
+       lyxerr << "Sorry, not implemented." << endl;
        return string();
 }
 
@@ -389,7 +389,7 @@ void CVS::undoLast()
        // merge the current with the previous version
        // in a reverse patch kind of way, so that the
        // result is to revert the last changes.
-       lyxerr << "Sorry not implemented." << endl;
+       lyxerr << "Sorry, not implemented." << endl;
 }
 
 
@@ -455,10 +455,17 @@ FileName const SVN::findFile(FileName const & file)
 
 void SVN::scanMaster()
 {
-       // if we want some locking under svn
-       // we need different infrastructure around
-       locker_ = "Unlocked";
-       vcstatus = UNLOCKED;
+       locker_.clear();
+       vcstatus = NOLOCKING;
+       if (checkLockMode()) {
+               if (isLocked()) {
+                       locker_ = "Locked";
+                       vcstatus = LOCKED;
+               } else {
+                       locker_ = "Unlocked";
+                       vcstatus = LOCKED;
+               }
+       }
 }
 
 
@@ -494,7 +501,7 @@ bool SVN::checkLockMode()
 }
 
 
-bool SVN::isLocked()
+bool SVN::isLocked() const
 {
        //refresh file info
        FileName file(file_.absFilename());
@@ -526,7 +533,7 @@ string SVN::checkIn(string const & msg)
        string res = scanLogFile(tmpf, log);
        if (!res.empty())
                frontend::Alert::error(_("Revision control error."),
-                               _("Error when commiting to repository.\n"
+                               _("Error when committing to repository.\n"
                                "You have to manually resolve the problem.\n"
                                "After pressing OK, LyX will reopen the document."));
        else
@@ -589,8 +596,9 @@ void SVN::fileLock(bool lock, FileName const & tmpf, string &status)
        if (!isLocked() && lock)
                frontend::Alert::error(_("Revision control error."),
                        _("Error when acquiring write lock.\n"
-                       "Most probably some other user edit the current document now!\n"
-                       "Check also the access to the repository."));
+                       "Most probably another user is editing\n"
+                       "the current document now!\n"
+                       "Also check the access to the repository."));
        if (isLocked() && !lock)
                frontend::Alert::error(_("Revision control error."),
                        _("Error when releasing write lock.\n"
@@ -652,7 +660,7 @@ void SVN::undoLast()
        // merge the current with the previous version
        // in a reverse patch kind of way, so that the
        // result is to revert the last changes.
-       lyxerr << "Sorry not implemented." << endl;
+       lyxerr << "Sorry, not implemented." << endl;
 }