bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cvs add -m in client/server


From: Larry Jones
Subject: Re: cvs add -m in client/server
Date: Fri, 27 Sep 2002 17:15:29 -0400 (EDT)

Dimitrie O. Paun writes:
> 
> It looks like cvs add -m drops the file description when working
> in client/server mode.

Yep, it's listed in the BUGS file.

> Ir is important that I get this feature working again, but before
> I start hacking away, I would like to ask a few questions of the
> ones in the know:
>   1. Has this been fixed already?
>   2. Is there a patch floating around?
>   3. How hard would it be to fix it?
>   4. What would it entail? (incompatible protocol, etc.)
>   5. Where should I start?

As far as I know, no one has ever considered this important enough to
even start looking into it.  The workaround is to use "cvs admin -t" to
set the message after committing the file for the first time.  If you're
determined to fix it, it's going to be a bit tricky.  Here's the scoop:

Nothing happens in the repository when you add a file; the repository
isn't updated until you commit it.  If there's a descriptive message,
it's stored in a ,t file in the CVS subdirectory of the current working
directory.  When you commit the file, CVS looks for the CVS/file,t file
and uses it for the message.  This all works fine in local mode.

The problem comes in client/server mode.  When you do the add, it's the
*server* that creates the ,t file, not the client.  Unfortunately,
nothing ever happens to the ,t file on the server and it's deleted when
the server cleans up its temp directory at the end of the command.  To
fix this, you'll have to figure out a way to get the client to remember
the add message (you could still use the ,t file) and then send it to
the server when the file is committed.  Unfortunately, there's nothing
in the current client/server protocol to do that; you'll either need to
extend the protocol (ensuring that it remains backward compatible so
that old clients still work with new servers and new clients still work
with old servers) or kludge something up like sending an add command for
each new file with a message in addition to the commit (and note that
the existing client always sends just a single command, so multiple
commands may not actually work correctly in the server).

-Larry Jones

Philistines. -- Calvin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]