#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;
namespace lyx {
-using support::bformat;
-using support::FileName;
-using support::makeAbsPath;
-using support::tempName;
-
namespace Alert = frontend::Alert;
// 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 "
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();
}
+bool LyXVC::checkOutEnabled()
+{
+ return vcs && vcs->checkOutEnabled();
+}
+
+
+bool LyXVC::checkInEnabled()
+{
+ return vcs && vcs->checkInEnabled();
+}
+
+
+bool LyXVC::undoLastEnabled()
+{
+ return vcs && vcs->undoLastEnabled();
+}
+
+
} // namespace lyx