From: Vincent van Ravesteijn Date: Thu, 7 Jan 2010 17:02:02 +0000 (+0000) Subject: *VCBackend: Code simplification, constify, and adding an article. X-Git-Tag: 2.0.0~4536 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=fc91b00bc8509f771a18e113dff16a2069fa7ba3;p=features.git *VCBackend: Code simplification, constify, and adding an article. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32840 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/VCBackend.cpp b/src/VCBackend.cpp index 422483347c..b79f0e1461 100644 --- a/src/VCBackend.cpp +++ b/src/VCBackend.cpp @@ -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);