GNU bug report logs -
#72341
VC: CVS template lines not stripped when committing
Previous Next
Reported by: Christoph Badura <bad <at> bsd.de>
Date: Sun, 28 Jul 2024 16:36:02 UTC
Severity: normal
Tags: patch
Fixed in version 31.1
Done: Sean Whitton <spwhitton <at> spwhitton.name>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Sorry for the long delay.
I guess I better start with a short summary to spare you the trouble of
reading through the previous messages relating to this bug.
When "cvs commit [file...]" is invoked from the command line, cvs prepares
a temp file with a template of a commit message and invokes an editor on
it. The template commit message, by default, is like this:
CVS: ----------------------------------------------------------------------
CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS: test.txt
CVS: ----------------------------------------------------------------------
After saving the edited commit message and exiting the editor, cvs strips
lines beginning with 'CVS:' from the temp file. NB. this is the only
documentation for this feature. The CVS manual doesn't mention this.
When committing with "cvs commit -m 'Commit message.' [files...]" this
stripping is *not* performed.
The commit message template in the temp file is augmented with the
contents of the file 'CVS/Template', if it exists or a template received
from the CVS server..
I work on NetBSD where we make use of such a template.
'vc-cvs-checkin' emulates the first part of this (inserting the template
from the server/'CVS/Template file. However, it does not strip the lines
beginning with "CVS:" and uses the "cvs commit -m 'Commit message.'" method
to do the actual commit. That causes the "CVS:"-lines to end up in the
actual commit.
I have drafted a change that adds a function to the 'log-edit-done-hook'
that strips lines beginning with "CVS:" from the commit message if the
'log-edit-vc-backend' is "'CVS".
Because this hook function does its work only when the
'log-edit-vc-backend' is CVS and since this just makes 'vc-cvs-checkin'
behave like invking "cvs commit [files...]" from the command line I
consider this a change low risk and don't think that it would surprise
existing users. Therefore I think it is appropriate to enable this hook
by default.
It would be nice if this would end up in emacs-30.1.
I'd appreciate any review and guidance what is missing to make this
committable.
I guess I need to add an entry to the NEWS file.
--chris
[0001-VC-strip-CVS-template-lines-when-committing.patch (text/plain, attachment)]
This bug report was last modified 73 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.