info-cvs
[Top][All Lists]
Advanced

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

Re: Command-line multi-line messages for commit


From: Stephen Biggs
Subject: Re: Command-line multi-line messages for commit
Date: 08 Jun 2003 10:46:45 +0300

On Wed, 2003-06-04 at 02:44, Eric Siegerman wrote:
> On Tue, Jun 03, 2003 at 12:46:42PM +0300, Stephen Biggs wrote:
> > I got it to work using another way which actually works better if you
> > don't want to be so interactive (one press of the enter key instead of
> > 3):
> > 
> > $ cvs ci -m "line 1"'$\n'"line 2"'$\n'"line 3"
> 
> Yikes!  Non-interactive it may be, but pretty painful!  How about
> writing a wrapper shell script?  You would invoke it as:
>    cvs-wrapper -m 'message\ncontaining\nmultiple lines' other-args
> 
> It would have to do something like:
>   - extract (and remove) the -m and its value from the command line
>   - turn the "\n"s into newlines (and any other transformations
>     you like)
>   - export CVSEDITOR=`which cat` into the environment
>   - go:
>       echo $transformed_log_message | cvs $other_args
> 
> --
--snip signature--

Actually, your method sounds to me much more painful because I have to
learn how to use sed to do this and run and test the wrapper script over
and over again until I debug it due to my limited expertise in coding
shell scripts, living with bogus messages in a junk repository until I
get it right.  My way is quicker and much simpler for me as long as I
remember to put the quotes right.

E.g., I actually meant to say:
cvs ci -m "line 1"$'\n'"line 2"$'\n'"line 3"
... note the change in the position of the single quote and the "$".





reply via email to

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