]> git.lyx.org Git - lyx.git/blobdiff - src/LyXVC.cpp
Andre's s/getTextClass/textClass/ cleanup.
[lyx.git] / src / LyXVC.cpp
index 8b9d7c608ea382b9969025b75b5bdbeb0cc6b9a9..930680b33bd262373a3210c78f7b68a4a6e0df50 100644 (file)
 
 #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();