]> git.lyx.org Git - features.git/blobdiff - src/VCBackend.cpp
InsetIndex: hide printTree behind a LYX_INSET_INDEX_DEBUG flag
[features.git] / src / VCBackend.cpp
index f8c24975d85c5975c7bdc236753e896a4cfb4da9..ca603c9e1f8ed89c1c3ea9cd35ed045815485c41 100644 (file)
@@ -61,7 +61,7 @@ int VCS::doVCCommand(string const & cmd, FileName const & path, bool reportError
        if (ret && reportError) {
                docstring rcsmsg;
                if (prefixIs(cmd, "ci "))
-                       rcsmsg = "\n" + _("Perhaps the RCS package is not installed on your system?");
+                       rcsmsg = "\n" + _("Check whether the GNU RCS package is installed on your system.");
                frontend::Alert::error(_("Revision control error."),
                        bformat(_("Some problem occurred while running the command:\n"
                                  "'%1$s'.") + rcsmsg,
@@ -107,7 +107,6 @@ bool VCS::makeRCSRevision(string const &version, string &revis) const
 
 FileName VCS::checkParentDirs(FileName const & start, std::string const & file)
 {
-       static FileName empty;
        FileName dirname = start.onlyPath();
        do {
                FileName tocheck = FileName(addPathName(dirname.absFileName(), file));
@@ -117,7 +116,7 @@ FileName VCS::checkParentDirs(FileName const & start, std::string const & file)
                // this construct because of #8295
                dirname = FileName(dirname.absFileName()).parentPath();
        } while (!dirname.empty());
-       return empty;
+       return FileName();
 }
 
 
@@ -162,8 +161,8 @@ bool RCS::retrieve(FileName const & file)
 {
        LYXERR(Debug::LYXVC, "LyXVC::RCS: retrieve.\n\t" << file);
        // The caller ensures that file does not exist, so no need to check that.
-       return doVCCommandCall("co -q -r " + quoteName(file.toFilesystemEncoding()),
-                              FileName()) == 0;
+       int const ret = doVCCommandCall("co -q -r " + quoteName(file.toFilesystemEncoding()));
+       return ret == 0;
 }
 
 
@@ -1189,12 +1188,8 @@ void SVN::scanMaster()
        // vcstatus code is somewhat superflous,
        // until we want to implement read-only toggle for svn.
        vcstatus_ = NOLOCKING;
-       if (checkLockMode()) {
-               if (isLocked())
-                       vcstatus_ = LOCKED;
-               else
-                       vcstatus_ = UNLOCKED;
-       }
+       if (checkLockMode())
+               vcstatus_ = isLocked() ? LOCKED : UNLOCKED;
 }