RE: Checking branch for commit
On Friday, July 28, 2000 9:45 PM, Marc Poinot [SMTP:[EMAIL PROTECTED]] wrote: > > I have to check the commited branch, but the commitinfo > actually gives nothing else but the file name. > The loginfo has more infos, but it cannot make the commit > fail. Thus, I have modified the src/commit.c file with > these three lines: > Sorry if this is late, but there was a patch posted at one time to pass version information to commitinfo. This would allow you to determine that the commit was occuring on the branch. I can't find or remember the patch :(! *** Chris CameronOpen Telecommunications NZ Ltd Senior Solution Architect [EMAIL PROTECTED] P.O.Box 10-388 +64 4 495 8403 (DDI) The Terrace fax: +64 4 495 8419 Wellington cell: +64 21 650 680New Zealand Life, don't talk to me about life (Marvin - HHGTTG)
RE: Checking branch for commit
> From: Laird Nelson [mailto:[EMAIL PROTECTED]] > Marc Poinot wrote: > > On the server side ? > Yes; even in a pserver or rsh context. If your script is being called [] > semantics I can't recall at the moment). Here's an example: > > /ScopeTypes.java/1.1/Wed Jul 12 22:21:05 2000// Perhaps more pertinent to your question, if the file is on a branch named tagname, the line in ./CVS/Entries will look like: /ScopeTypes.java/1.1/Wed Jul 12 22:21:05 2000//Ttagname Cheers, Jerry
Re: Checking branch for commit
Marc Poinot wrote: > Laird Nelson wrote: > > Additionally, you can get the old version by having your commitinfo > > script look in ./CVS/Entries; the line with the filename in it will also > > have its old version. > On the server side ? Yes; even in a pserver or rsh context. If your script is being called in a pserver or rsh context: 1. Its current directory will be something like /tmp/cvs-serv2947 2. The current directory will always have a CVS directory in it 3. The CVS directory in it will always have at least an Entries file 4. The CVS/Entries file will always have at least the lines in it representing the files that are being committed 5. As part of a standard Entries format, each line will contain the relative filename, the "old" revision, and some datestamp (whose semantics I can't recall at the moment). Here's an example: /ScopeTypes.java/1.1/Wed Jul 12 22:21:05 2000// If the revision is "0", then the file is being cvs added. If the revision is negative, e.g. "-1.3", then the file is being cvs removed. If the revision is anything else, then the file is being committed normally. Cheers, Laird
Re: Checking branch for commit
Laird Nelson wrote: > > Marc Poinot wrote: > > The effect is that you can retrieve the old revision, the (possible) tag > > and the type of the file as an arg of the commitinfo called script. > > For tagging operations, you can always write a taginfo script instead. > Yep, that's done. But I had to check the branch tag to identify wehter my commit on an "allowed" branch or not. > Additionally, you can get the old version by having your commitinfo > script look in ./CVS/Entries; the line with the filename in it will also > have its old version. > On the server side ? Marcvs [alias That's what my server's doing when I get logfile_info struct ?]
Re: Checking branch for commit
Marc Poinot wrote: > The effect is that you can retrieve the old revision, the (possible) tag > and the type of the file as an arg of the commitinfo called script. For tagging operations, you can always write a taginfo script instead. Additionally, you can get the old version by having your commitinfo script look in ./CVS/Entries; the line with the filename in it will also have its old version. So no patches really needed. :-) Cheers, Laird