]> git.lyx.org Git - lyx.git/blobdiff - src/VCBackend.cpp
Routines for calculating numerical labels for BibTeX citations.
[lyx.git] / src / VCBackend.cpp
index 422483347c303bf234c1f5b8ced66a42290218bc..5d8e33d4eaeb0951c70c6e357e22e80456729b6f 100644 (file)
@@ -520,6 +520,8 @@ FileName const SVN::findFile(FileName const & file)
 void SVN::scanMaster()
 {
        locker_.clear();
+       // vcstatus code is somewhat superflous, until we want
+       // to implement read-only toggle for svn.
        vcstatus = NOLOCKING;
        if (checkLockMode()) {
                if (isLocked()) {
@@ -527,7 +529,7 @@ void SVN::scanMaster()
                        vcstatus = LOCKED;
                } else {
                        locker_ = "Unlocked";
-                       vcstatus = LOCKED;
+                       vcstatus = UNLOCKED;
                }
        }
 }
@@ -567,9 +569,8 @@ bool SVN::checkLockMode()
 
 bool SVN::isLocked() const
 {
-       //refresh file info
-       FileName file(file_.absFilename());
-       return !file.isReadOnly();
+       file_.refresh();
+       return !file_.isReadOnly();
 }
 
 
@@ -648,7 +649,7 @@ void SVN::fileLock(bool lock, FileName const & tmpf, string &status)
        if (!locked_mode_ || (isLocked() == lock))
                return;
 
-       string arg = lock ? "lock " : "unlock ";
+       string const arg = lock ? "lock " : "unlock ";
        doVCCommand("svn "+ arg + quoteName(onlyFilename(owner_->absFileName()))
                    + " > " + quoteName(tmpf.toFilesystemEncoding()),
                    FileName(owner_->filePath()));
@@ -693,7 +694,7 @@ string SVN::checkOut()
                frontend::Alert::error(_("Revision control error."),
                        bformat(_("Error when updating from repository.\n"
                                "You have to manually resolve the conflicts NOW!\n'%1$s'.\n\n"
-                               "After pressing OK, LyX will try to reopen resolved document."),
+                               "After pressing OK, LyX will try to reopen the resolved document."),
                        from_local8bit(res)));
 
        fileLock(true, tmpf, log);