#include <config.h>
#include "VCBackend.h"
-#include "debug.h"
+#include "support/debug.h"
#include "Buffer.h"
#include "support/Path.h"
#include <fstream>
-
-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)
}
-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;
}
// 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;
}
}
-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.
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.