Lars Gullik Bjønnes wrote:
Stephan Witt <[EMAIL PROTECTED]> writes:

| Dear LyX-Developers,

| recently I started to check BRANCH_1_3_X for productive work.
| I'm very pleased with the features and stability of it.

| We're using CVS at our site for managing revision control
| of our documents. So I had a look in src/vc-backend.C to
| see if I can make a working implementation of CVS::checkOut().

| The attached patch contains two things:
| 1) the mentioned functionality of CVS checkOut

I am not sure this is a good idea.

But, this is the only sensible operation for the menu item "Versionskontrolle => Zur Bearbeitung auschecken".

Perhaps the association of that menu item with CVS::checkOut()
is misleading. It should be renamed to CVS::edit() perhaps.
But that was not my primary goal.

Do you actually use "cvs edit" when
editing a file?

Yes.

Why not "cvs checkout" btw?

I cannot see how this should work. I want to make a writable copy of a file inside a checkout I already did before. We usually do a read-only checkout to be 1) sure not to modify a file by accident 2) be able to see who is editing a file with "cvs editors"

And how should I checkout a file with LyX?
The file is not present at this time. So it is not open and the
menu item "Versionskontrolle" is disabled.

And do you actually use it?

Yes.

| 2) a change in filename quoting

Does this fix a problem?

Yes. If one has a filename like 'file$patch1.lyx' the vc-backend fails to process this one. It makes a system call like 'cvs log "file$patch1.lyx"' for example. The shell tries to expand the environment variable patch1 and replaces this with nothing. So you get 'cvs log "file.lyx"' after all.

The patched version uses QuoteName() and produces
cvs log 'file$patch1.lyx'
when the OS is Unix.

Even in 1.4 I would be wary of changing this at this stage, unless it
fixes a real experienced problem.

| @@ -327,7 +326,10 @@ void CVS::checkIn(string const & msg)
|  void CVS::checkOut()
|  {
|       // cvs update or perhaps for cvs this should be a noop
| -     lyxerr << "Sorry not implemented." << endl;
| +     doVCCommand("cvs -q edit "
| +                 + QuoteName(OnlyFilename(owner_->fileName())),
| +                 owner_->filePath());
| +     reload();
|  }


Regards,

Stephan




Reply via email to