bug-cvs
[Top][All Lists]
Advanced

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

Log message in commit to multiple directories


From: Andy Valencia
Subject: Log message in commit to multiple directories
Date: Mon, 06 Aug 2001 07:57:18 -0700

Hi, CVS hackers.

I ran into this with my port of CVS to VSTa (www.vsta.org), but it appears
to be a generic bug.

If you do a "cvs commit file1 subdir/file2", you will get prompted for the
log message on file1.  Then you will be re-prompted for subdir/file2, with
(correctly) the previous log message as the initial contents of the file.
If you just quit out of the editor (because you want to keep using the
existing message), the general edit routine will notice that the file wasn't
changed, will NULL out the string pointer, which the commit process will
then use as the commit message for this module (i.e., no log message).

I patched commit_fileproc() so the commit process routine will keep an old
copy, and fall back to it if the commit message gets NULL'ed.  But there's
probably a general problem in drawing a distinction between an untouched
file, and a file whose contents reflect previous input which thus should
always be used (unless its contents are removed by the edit session).  A new
flag to do_editor() perhaps?

I made a separate, and arguably more OS specific change to do_editor().  In
the check to see if a file changed, I added a check for change of size as
well as the st_mtime field.  This adds an extra level of defense against a
false indication of file "sameness".  The specific reason this edge
condition hit me is not of general concern, but it's a cheap check and may
be prudent on general principles.

Regards,
Andy Valencia
vandys@zendo.com



reply via email to

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