]> git.lyx.org Git - lyx.git/blobdiff - src/LyXVC.cpp
comment
[lyx.git] / src / LyXVC.cpp
index 1e595894b829d4867710e4b89d4c3acf5bf9dc21..e156396fe2cba1c1cf7c86082dfe7e5fd5bee941 100644 (file)
 
 #include "LyXVC.h"
 #include "VCBackend.h"
-#include "support/debug.h"
 #include "Buffer.h"
-#include "support/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;
@@ -97,7 +96,8 @@ void LyXVC::registrer()
 
        // it is very likely here that the vcs is not created yet...
        if (!vcs) {
-               FileName const cvs_entries(makeAbsPath("CVS/Entries"));
+               //check in the root directory of the document
+               FileName const cvs_entries(onlyPath(filename.absFilename()) + "/CVS/Entries");
 
                if (cvs_entries.isReadableFile()) {
                        LYXERR(Debug::LYXVC, "LyXVC: registering "
@@ -217,7 +217,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();
@@ -228,4 +228,22 @@ string const LyXVC::getLogFile() const
 }
 
 
+bool LyXVC::checkOutEnabled()
+{
+       return vcs && vcs->checkOutEnabled();
+}
+
+
+bool LyXVC::checkInEnabled()
+{
+       return vcs && vcs->checkInEnabled();
+}
+
+
+bool LyXVC::undoLastEnabled()
+{
+       return vcs && vcs->undoLastEnabled();
+}
+
+
 } // namespace lyx