void LyXVC::toggleReadOnly()
{
+ if (!vcs->toggleReadOnlyEnabled())
+ return;
+
switch (vcs->status()) {
case VCS::UNLOCKED:
LYXERR(Debug::LYXVC, "LyXVC: toggle to locked");
}
+bool RCS::toggleReadOnlyEnabled()
+{
+ return true;
+}
+
+
/////////////////////////////////////////////////////////////////////
//
// CVS
FileName(owner_->filePath()));
}
+bool CVS::toggleReadOnlyEnabled()
+{
+ return false;
+}
/////////////////////////////////////////////////////////////////////
//
void SVN::checkOut()
{
- // svn update or perhaps for svn this should be a noop
- // we need to detect conflict (eg "C" in output)
- // before we can do this.
lyxerr << "Sorry not implemented." << endl;
}
}
+bool SVN::toggleReadOnlyEnabled()
+{
+ return false;
+}
+
} // namespace lyx
Buffer * owner() const { return owner_; }
/// return the lock status of this file
VCStatus status() const { return vcstatus; }
+ /// do we need special handling for read-only toggling?
+ virtual bool toggleReadOnlyEnabled() = 0;
protected:
/// parse information from the version file
virtual void scanMaster() = 0;
return "RCS: " + version_;
}
+ virtual bool toggleReadOnlyEnabled();
+
protected:
virtual void scanMaster();
};
return "CVS: " + version_;
}
+ virtual bool toggleReadOnlyEnabled();
+
protected:
virtual void scanMaster();
return "SVN: " + version_;
}
+ virtual bool toggleReadOnlyEnabled();
+
protected:
virtual void scanMaster();