]> git.lyx.org Git - features.git/commitdiff
*VCBackend: Code simplification, constify, and adding an article.
authorVincent van Ravesteijn <vfr@lyx.org>
Thu, 7 Jan 2010 17:02:02 +0000 (17:02 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Thu, 7 Jan 2010 17:02:02 +0000 (17:02 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32840 a592a061-630c-0410-9148-cb99ea01b6c8

src/VCBackend.cpp

index 422483347c303bf234c1f5b8ced66a42290218bc..b79f0e14610edc09ddcefdc478d585433b171003 100644 (file)
@@ -567,9 +567,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 +647,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 +692,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);