#include "LyXVC.h"
#include "VCBackend.h"
-#include "debug.h"
#include "Buffer.h"
-#include "gettext.h"
#include "frontends/alert.h"
+#include "support/debug.h"
#include "support/filetools.h"
+#include "support/gettext.h"
#include "support/lstrings.h"
-#include "support/lyxlib.h"
+using namespace std;
+using namespace lyx::support;
namespace lyx {
-using support::bformat;
-using support::FileName;
-using support::makeAbsPath;
-using support::tempName;
-
-using std::endl;
-using std::string;
-using std::pair;
-
namespace Alert = frontend::Alert;
{
FileName found_file;
// Check if file is under RCS
- if (!(found_file = RCS::find_file(fn)).empty()) {
+ if (!(found_file = RCS::findFile(fn)).empty()) {
vcs.reset(new RCS(found_file));
vcs->owner(owner_);
return true;
}
// Check if file is under CVS
- if (!(found_file = CVS::find_file(fn)).empty()) {
+ if (!(found_file = CVS::findFile(fn)).empty()) {
vcs.reset(new CVS(found_file, fn));
vcs->owner(owner_);
return true;
bool LyXVC::file_not_found_hook(FileName const & fn)
{
// Check if file is under RCS
- if (!RCS::find_file(fn).empty())
+ if (!RCS::findFile(fn).empty())
return true;
- if (!CVS::find_file(fn).empty())
+ if (!CVS::findFile(fn).empty())
return true;
return false;
}
FileName const filename = owner_->fileName();
// there must be a file to save
- if (!filename.isFileReadable()) {
+ if (!filename.isReadableFile()) {
Alert::error(_("Document not saved"),
_("You must save the document "
"before it can be registered."));
if (!vcs) {
FileName const cvs_entries(makeAbsPath("CVS/Entries"));
- if (cvs_entries.isFileReadable()) {
+ if (cvs_entries.isReadableFile()) {
LYXERR(Debug::LYXVC, "LyXVC: registering "
<< to_utf8(filename.displayName()) << " with CVS");
vcs.reset(new CVS(cvs_entries, filename));
if (!vcs)
return string();
- FileName const tmpf(tempName(FileName(), "lyxvclog"));
+ FileName const tmpf = FileName::tempName("lyxvclog");
if (tmpf.empty()) {
LYXERR(Debug::LYXVC, "Could not generate logfile " << tmpf);
return string();