Register file with CVS if it's in a CVS directory.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3834 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-03-26 12:11:43 +00:00
parent ddabf92e20
commit 93fb0890fa
2 changed files with 22 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2002-03-26 Lars Gullik Bjønnes <larsbj@birdstep.com>
* lyxvc.C (registrer): register the file with CVS if it's in a CVS
directory.
2002-03-25 Lars Gullik Bjønnes <larsbj@birdstep.com>
* lyxvc.C: reorder includes.

View File

@ -76,10 +76,24 @@ void LyXVC::buffer(Buffer * buf)
void LyXVC::registrer()
{
// it is very likely here that the vcs is not created yet...
// so... we use RCS as default, later this should perhaps be
// a lyxrc option.
if (!vcs) {
vcs = new RCS(owner_->fileName());
string const cvs_entries = "CVS/Entries";
if (IsFileReadable(cvs_entries)) {
lyxerr[Debug::LYXVC]
<< "LyXVC: registering "
<< MakeDisplayPath(owner_->fileName())
<< " with CVS" << endl;
vcs = new CVS(cvs_entries, owner_->fileName());
} else {
lyxerr[Debug::LYXVC]
<< "LyXVC: registering "
<< MakeDisplayPath(owner_->fileName())
<< " with RCS" << endl;
vcs = new RCS(owner_->fileName());
}
vcs->owner(owner_);
}