On Monday 25 March 2002 5:08 pm, Lars Gullik Bjønnes wrote: > John Levon <[EMAIL PROTECTED]> writes: > | On Mon, Mar 25, 2002 at 05:02:49PM +0000, Angus Leeming wrote: > >> Ah, Ok. So I'd have to first set up a repository? Well I'll try. Why > >> doesn't LyX do that for me? > > What should be done in register is to check if the currenct dir is a > CVS dir (i.e. that CVS/Entries exist), and if so a CVS should be > instatiated instead of a RCS. > > Then vcs->registrer will do the right thing.
Like this? 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()); + static string const cvs_entries = "CVS/Entries"; + + if (IsFileReadable(cvs_entries)) { + vcs = new CVS(cvs_entries, owner_->fileName()); + } else { + vcs = new RCS(owner_->fileName()); + } + vcs->owner(owner_); }