info-cvs
[Top][All Lists]
Advanced

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

Re: How to get the branch name into the commitlog and email message


From: Mark D. Baushke
Subject: Re: How to get the branch name into the commitlog and email message
Date: Mon, 28 Nov 2005 09:49:09 -0800

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Cloud Burst <address@hidden> writes:

Your e-mail address bounces with:

<address@hidden>
    (reason: 550 unknown user <address@hidden>)

This is anti-social and this is the last reply to that e-mail address I
will be giving to this address (or even posts that I will see as strike
two means it will be in my kill file) unless this message goes through
without error.

If you must give a fake address, please do not abuse the Shine Inc of
Trenton NJ postmaster. Doing so may also be construed as identity theft.

There are plenty of 'free' e-mail accounts you can get to post your
questions even if you choose to throw it away due to spam.

> On Sun, 27 Nov 2005 23:49:41 -0800, "Mark D. Baushke" <address@hidden> wrote:
> 
> >-----BEGIN PGP SIGNED MESSAGE-----
> >Hash: SHA1
> >
> >Cloud Burst <address@hidden> writes:
> >
> >> Running CVS 1.11.2 and a log_accum script from way before that.  
> >
> >That is an ancient version of cvs. You should consider an upgrade to
> >something newer without the bugs and security holes it has.
> 
> Yep.  But are you telling me my desire is so uncommon that it's not 
> a standard part of CVS yet?  Or are you saying a newer version of 
> CVS would have it?  Sounds like you're saying a newer version would 
> not fix my problem.  

I am suggesting you have more problems than just the one you are
attempting to resolve.

> >> I'm trying to get the branch name into the commitlog and the email 
> >> that goes out, but I'll be damned if I can see how it's done.  
> >
> >You may find doing a 'cvs -Q -n status' command on the files of interest
> >and parsing the output to be the most 'portable' solution.
> 
> Can't do this.  I'm running client/server and the server doesn't have 
> any files checked out.  I had a hack all figured out (look for CVS/Tag 
> file and read its contents) but I found out that won't work either.  

If you are doing a 'cvs commit' then either you are :local: in which
case there is a fully populated CVS directory which 'cvs' is able to
read, or you are remote in which case the client/server has put you into
a directory which contains a CVS directory along with a new file to be
committed and 'cvs' is still able to read it.

You may either trust that I am telling you the truth (most of my
log_accum equivalents use the 'cvs -Q -n status' trick to include the
branch information as a part of the log message), or you may ignore my
advice.

If you feel you do not wish to use 'cvs -Q -n status' on the filename
but must instead try to peer into the CVS directory yourself, then you
will find that CVS/Entries and/or CVS/Entries.Log and/or
CVS/Entries.Static should exist and the branch information you wish will
be of the form

   /file/ver/timestamp/options/tag_or_date

where tag_or_date will be '' for the main trunk and a branch-name tag
will be of the form Tbranch-name

However, you should NOT assume that this will be the format forever, so
it really is better for you to use 'cvs -Q -n status filename' to get the
branch information you want for now.

> >> The log_accum script was hacked a little (a long while ago) to get 
> >> the email From set correctly and the subject line looking right, 
> >> but not very much else, since it was checked in, anyway.  
> >> 
> >> Also, in the loginfo file at the end of the line that calls the 
> >> log_accum script is 
> >> 
> >>   ${Vvts} 
> >
> >Well, first, it would be %{Vvs} for cvs 1.11.x the loginfo file
> >(the %t is not a supported format string for loginfo).
> >
> >Although, I suppose if you have local hacks to the cvs sources, you
> >might have defined %t switch to be the tagname. The %V is the old
> >version number and %v is the new version number and %s is the filename.
> >
> >> Anybody know what this does or is supposed to do?  I don't think 
> >> it does very much.  
> >
> >With a ${Vvts} it would try to expand an environment variable and
> >probably do nothing but expand to '' as an argument to your script.
> >
> ># You may specify a format string as part of the
> ># filter.  The string is composed of a `%' followed
> ># by a single format character, or followed by a set of format
> ># characters surrounded by `{' and `}' as separators.  The format
> ># characters are:
> >#
> >#   s = file name
> >#   V = old version number (pre-checkin)
> >#   v = new version number (post-checkin)
> >#
> ># For example:
> >#DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog
> ># or
> >#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog
> 
> Thanks again.  I already found that documentaton in the meantime.  Now 
> I think I may have to customize cvs if there isn't a reasonable script 
> based solution.  

There is a resaonable script based solution, but you do not appear to
believe me that it works.

        Good luck,
        -- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFDi0MVCg7APGsDnFERAv0oAKDvpverj0at18DDJNcOCNBYgXuclwCeL8Ba
wh/h5OheUJWHugENEDkFAdk=
=4f+5
-----END PGP SIGNATURE-----




reply via email to

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