X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLyXVC.cpp;h=930680b33bd262373a3210c78f7b68a4a6e0df50;hb=3f7d2a66f522a45583e0a8b0ba734bb71f0ddde0;hp=8b9d7c608ea382b9969025b75b5bdbeb0cc6b9a9;hpb=e1ce2f92db49d50c688414a32944be8e718faa2e;p=lyx.git diff --git a/src/LyXVC.cpp b/src/LyXVC.cpp index 8b9d7c608e..930680b33b 100644 --- a/src/LyXVC.cpp +++ b/src/LyXVC.cpp @@ -17,28 +17,20 @@ #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; @@ -57,13 +49,13 @@ bool LyXVC::file_found_hook(FileName const & fn) { 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; @@ -76,9 +68,9 @@ bool LyXVC::file_found_hook(FileName const & fn) 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; } @@ -95,7 +87,7 @@ void LyXVC::registrer() 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.")); @@ -106,7 +98,7 @@ void LyXVC::registrer() 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)); @@ -224,7 +216,7 @@ string const LyXVC::getLogFile() const 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();