[Top][All Lists]
[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 E. Hamilton |
Subject: |
Re: How to get the branch name into the commitlog and email message |
Date: |
Mon, 28 Nov 2005 10:27:54 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 |
Cloud Burst wrote:
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.
Well, I'd classify this as as new feature request, and no, it's not in
the most recent stable version. There are still very good reasons that
upgrade to the most recent stable version as Mark suggested.
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.
Sure it does. It has to, since in commits are actually done on the
server. In CVS client/server mode the files (and their CVS admin files)
are copied to a temporary directory on the server. I wrote a quick and
dirty loginfo script that shows that what Mark suggested works. (Parsing
the output of 'cvs status' is left as an exercise for the student. ;) )
loginfo:
ALL ${CVSROOT}/CVSROOT/loginfo.sh %{sVv}
loginfo.sh:
#!/bin/bash
msg=$(cat)
echo $msg
echo '####'
ls CVS
echo '####'
dir=
for i in $*
do
test -z "$dir" && { dir=$i ; continue; }
file=$(echo $i | cut -f1 -d,)
v1=$(echo $i | cut -f2 -d,)
v2=$(echo $i | cut -f3 -d,)
cvs -Q -n status ${file}
done
This script produces this output:
sahp6613% cvs commit -m 'Test commit'
cvs commit: Examining .
Checking in playdoh.dat;
/cvsroot/playground/playdoh/playdoh.dat,v <-- playdoh.dat
new revision: 1.15.4.1; previous revision: 1.15
done
Checking in test.dat;
/cvsroot/playground/playdoh/test.dat,v <-- test.dat
new revision: 2.3.2.1; previous revision: 2.3
done
Update of /cvsroot/playground/playdoh In directory
sais133:/tmp/cvs-serv29341 Modified Files: Tag: test_tag_branch2
playdoh.dat Added Files: Tag: test_tag_branch2 test.dat Log Message:
Test commit to branch
####
Entries
Entries.Log
Repository
Tag
####
===================================================================
File: test.dat Status: Up-to-date
Working revision: 2.3.2.1 Mon Nov 28 17:22:25 2005
Repository revision: 2.3.2.1 /cvsroot/playground/playdoh/test.dat,v
Sticky Tag: test_tag_branch2 (branch: 2.3.2)
===================================================================
File: playdoh.dat Status: Up-to-date
Working revision: 1.15.4.1 Mon Nov 28 17:22:25 2005
Repository revision: 1.15.4.1
/cvsroot/playground/playdoh/playdoh.dat,v
Sticky Tag: test_tag_branch2 (branch: 1.15.4)
Sticky Options: -kv
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.
In my test the Tag file was present on the server. See the ls() output
above.
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.
--
----------------
Mark E. Hamilton
Orion International Technologies, Inc.
Sandia National Laboratory, NM.
505-844-7666
- How to get the branch name into the commitlog and email message, Cloud Burst, 2005/11/28
- Re: How to get the branch name into the commitlog and email message, Mark D. Baushke, 2005/11/28
- Message not available
- Re: How to get the branch name into the commitlog and email message, Cloud Burst, 2005/11/28
- Re: How to get the branch name into the commitlog and email message,
Mark E. Hamilton <=
- Re: How to get the branch name into the commitlog and email message, Mark D. Baushke, 2005/11/28
- Re: How to get the branch name into the commitlog and email message, Russ Sherk, 2005/11/28
- Re: How to get the branch name into the commitlog and email message, Larry Jones, 2005/11/28
- Re: How to get the branch name into the commitlog and email message, Russ Sherk, 2005/11/28
- Re: How to get the branch name into the commitlog and email message, Jim Hyslop, 2005/11/28
- Re: How to get the branch name into the commitlog and email message, Spiro Trikaliotis, 2005/11/29
- Re: How to get the branch name into the commitlog and email message, Russ Sherk, 2005/11/29
- test please delete, Farshad Mahjoubi, 2005/11/29
- Message not available
- Re: How to get the branch name into the commitlog and email message, Cloud Burst, 2005/11/29
- Re: How to get the branch name into the commitlog and email message, Spiro Trikaliotis, 2005/11/29