[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18954: 24.4; vc-log Summary: header is included in the log message
From: |
Ivan Shmakov |
Subject: |
bug#18954: 24.4; vc-log Summary: header is included in the log message |
Date: |
Wed, 05 Nov 2014 17:24:04 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
>>>>> Ed Avis <eda@waniasset.com> writes:
> I use vc-mode to edit and commit files in an svn repository. On
> running vc-next-action on a modified file, a log message buffer
> appears containing the text Summary: and a blank line. Typing in
> this buffer adds more text after Summary:. On committing with C-c
> C-c, the literal text Summary: is included as part of the svn log
> message, as you can see afterwards by running 'svn log'.
> Please see <http://emacs.stackexchange.com/questions/2717/> where
> forum user Stefan indicated that this was a bug (presumably, the
> Summary: header should be stripped out when sending the text to svn)
> and asked to report it.
This pseudo-header (along with an optional Author:) is added by
the log-edit-insert-message-template command, itself called from
log-edit-hook. Thus, as a work-around (which I happen to use
myself), it’s possible to simply remove the function from the
hook, like:
(eval-after-load 'log-edit
'(remove-hook 'log-edit-hook 'log-edit-insert-message-template))
A quick scan through vc/*.el suggest that the Summary: header is
only recognized by vc-arch.el (which, however, doesn’t seem to
take care of Author:), while only vc-git.el seems to recognize
Author: (and doesn’t seem to care about Summary: in turn.)
If so, this bug actually affects most of the VCS supported by
the Emacs VC facility, and not just Subversion.
I believe this behavior is highly inconsistent, and would rather
suggest either of the following options.
• Amend the log-edit-insert-message-template function to only
generate the template if /either/ explicitly requested by the
user (as in: via a yes-maybe-no variable setting, or by
running it interactively) /or/ when the headers in question
are known to be recognized by the target VCS.
• Remove the function from the hook’s default value.
Also to note that log-edit-insert-cvs-rcstemplate apparently
relies on the existence of CVS/Root to decide if its respective
template should be added. My guess is that it should instead
check the VCS chosen by the user (as in: vc-switch-backend) for
the fileset in question.
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A