info-cvs
[Top][All Lists]
Advanced

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

Re: How to echo log message if commitinfo rejects commit


From: Kaz Kylheku
Subject: Re: How to echo log message if commitinfo rejects commit
Date: Thu, 8 Jan 2004 08:27:26 -0800 (PST)

On Thu, 8 Jan 2004, Bil Kleb wrote:

> We just started using commitinfo to enforce rudimentary coding standards.
> So far, we appreciate the gentle reminders from the script it invokes.
> 
> But we have discovered one minor annoyance: When the proposed commit is
> rejected, the log message is lost -- unless the committer remembered to
> save a copy of their log entry beforehand.

You can use -m to specify a commit message on the command line, or -F
to have it come from a file. I think that smart users will soon learn
to do this after losing a few commit messages. ;)

Another solution is to use a GUI that persists the commit message
between invocations of the commit dialog box.

Similarlly, you can easily write a simple script wrapper around ``cvs
ci'' which brings up the editor over a fixed path, to create the effect
of a persistent commit message. That path can be handed to ``cvs ci''
via the -F parameter.

> After an hour of googling and reading the CVS manual, I am still not sure
> how I can gain access to the log message so that I can echo it's contents
> to standard output, allowing the user an opportunity to cut and paste the
> log message into their next commit attempt -- if they did not remember to
> save the original.

This seems like a klunky design anyway; the log message has to travel
to the server and back. What if it never makes the round trip because
of some network problem or a deliberate interruption of CVS?

A good solution would be one that persists the message even if the user
interrupts CVS with Ctrl-C.





reply via email to

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