X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FVCBackend.cpp;h=0d96692328b871293101e6492b27c3985a6a6d54;hb=4056f0ddb150d0e5d60bc5941d51e365eed0ac86;hp=01ad8378e20c05eab595fed9d4b66f7bc6fa3342;hpb=e1ce2f92db49d50c688414a32944be8e718faa2e;p=lyx.git diff --git a/src/VCBackend.cpp b/src/VCBackend.cpp index 01ad8378e2..0d96692328 100644 --- a/src/VCBackend.cpp +++ b/src/VCBackend.cpp @@ -11,45 +11,26 @@ #include #include "VCBackend.h" -#include "debug.h" #include "Buffer.h" -#include "support/Path.h" +#include "support/debug.h" #include "support/filetools.h" #include "support/lstrings.h" +#include "support/Path.h" #include "support/Systemcall.h" #include #include - -namespace lyx { - -using support::addName; -using support::addPath; -using support::contains; -using support::FileName; -using support::onlyFilename; -using support::onlyPath; -using support::quoteName; -using support::rtrim; -using support::split; -using support::Systemcall; +using namespace std; +using namespace lyx::support; using boost::regex; using boost::regex_match; using boost::smatch; -#ifndef CXX_GLOBAL_CSTD -using std::asctime; -using std::gmtime; -#endif - -using std::endl; -using std::getline; -using std::string; -using std::ifstream; +namespace lyx { int VCS::doVCCommand(string const & cmd, FileName const & path) @@ -75,12 +56,12 @@ RCS::RCS(FileName const & m) } -FileName const RCS::find_file(FileName const & file) +FileName const RCS::findFile(FileName const & file) { // Check if *,v exists. FileName tmp(file.absFilename() + ",v"); LYXERR(Debug::LYXVC, "Checking if file is under rcs: " << tmp); - if (tmp.isReadable()) { + if (tmp.isReadableFile()) { LYXERR(Debug::LYXVC, "Yes " << file << " is under rcs."); return tmp; } @@ -88,7 +69,7 @@ FileName const RCS::find_file(FileName const & file) // Check if RCS/*,v exists. tmp = FileName(addName(addPath(onlyPath(file.absFilename()), "RCS"), file.absFilename()) + ",v"); LYXERR(Debug::LYXVC, "Checking if file is under rcs: " << tmp); - if (tmp.isReadable()) { + if (tmp.isReadableFile()) { LYXERR(Debug::LYXVC, "Yes " << file << " it is under rcs."); return tmp; } @@ -232,7 +213,7 @@ CVS::CVS(FileName const & m, FileName const & f) } -FileName const CVS::find_file(FileName const & file) +FileName const CVS::findFile(FileName const & file) { // First we look for the CVS/Entries in the same dir // where we have file. @@ -240,7 +221,7 @@ FileName const CVS::find_file(FileName const & file) string const tmpf = '/' + onlyFilename(file.absFilename()) + '/'; LYXERR(Debug::LYXVC, "LyXVC: checking in `" << dir << "' for `" << tmpf << '\''); - if (dir.isReadable()) { + if (dir.isReadableDirectory()) { // Ok we are at least in a CVS dir. Parse the CVS/Entries // and see if we can find this file. We do a fast and // dirty parse here.