X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2FLyXVC.cpp;h=cb2c5488f210b66fe3c7ce0cf71d3bc88c13efdb;hb=c7d29be153debac82e3d2e8865fcc849f0a5f40d;hp=b28139fb61c08d124220acde13dd986f42c324f7;hpb=ca8709aaf5f5f14aae1978403e13aac3a93506aa;p=lyx.git diff --git a/src/LyXVC.cpp b/src/LyXVC.cpp index b28139fb61..cb2c5488f2 100644 --- a/src/LyXVC.cpp +++ b/src/LyXVC.cpp @@ -41,6 +41,17 @@ LyXVC::LyXVC() } +docstring LyXVC::vcstatus() const +{ + if (!vcs) + return docstring(); + if (locking()) + return bformat(_("%1$s lock"), from_ascii(vcs->vcname())); + else + return from_ascii(vcs->vcname()); +} + + bool LyXVC::fileInVC(FileName const & fn) { if (!RCS::findFile(fn).empty()) @@ -251,7 +262,7 @@ string LyXVC::checkOut() if (!vcs) return string(); //RCS allows checkOut only in ReadOnly mode - if (vcs->toggleReadOnlyEnabled() && !owner_->isReadonly()) + if (vcs->toggleReadOnlyEnabled() && !owner_->hasReadonlyFlag()) return string(); LYXERR(Debug::LYXVC, "LyXVC: checkOut"); @@ -324,7 +335,7 @@ string LyXVC::toggleReadOnly() } case VCS::NOLOCKING: Buffer * b = vcs->owner(); - bool const newstate = !b->isReadonly(); + bool const newstate = !b->hasReadonlyFlag(); string result = "LyXVC: toggle to "; result += (newstate ? "readonly" : "readwrite"); LYXERR(Debug::LYXVC, result); @@ -436,8 +447,8 @@ bool LyXVC::repoUpdateEnabled() const { return vcs && vcs->repoUpdateEnabled(); } - - + + bool LyXVC::prepareFileRevision(string const & rev, std::string & f) { return vcs && vcs->prepareFileRevision(rev, f);