[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Prevent PROD tags on code that does not have QA tag?
From: |
Miller Dale C Contr AFWA/SDHS |
Subject: |
RE: Prevent PROD tags on code that does not have QA tag? |
Date: |
Mon, 26 Apr 2004 09:23:31 -0500 |
Phillip wrote:
-----Original Message-----
From: address@hidden [mailto:address@hidden
Sent: Friday, April 23, 2004 11:27 AM
To: info cvs
Subject: Prevent PROD tags on code that does not have QA tag?
I need to prevent the case where I am applying a QA or PROD tag to a file
where the tagging operation would cause the QA or PROD tag to fall upon a
revision number that is lower than the current pre-tagged state. Make
sense?
I would very much appreciate a pointers on how to resolve these holes in
our curent process.
Thanks.
Phillip Rhodes
------------------------------------
In the system that I use, I use tags to distribute files to different
processors. The following is extracted from a "shovel.plx" program that I
have written that checks if the tag is not a HEAD revision. The program
does a "cvs export -r tag module" to a temporary work area and then
processes the files from the exported area. I do a "rlog -h" of the file
and examine the head: and tag information. I check if the tag is not the
head revision. If it is not, I can omit the file, include the file, and
also display the rlog information. You might get some ideas from this
portion of code. Hopefully the word wrap does not cause too much confusion.
if ($tag ne "HEAD") {
# check each file to see if the head version in the repository
# is the same version as the one being shoveled -- if not print a
warning
# and pause until given the okay to move on
my $mismatch = 0; # counter
foreach (@files) {
chomp;
@rlog = `rlog -h ${cvsroot}/${_},v`; # use rcs rlog command
#print "@rlog\n";
my @head_line = grep /^\s*head: /, @rlog; # extract the
"head: 1.xx" line
my @tag_line = grep /^\s*$tag: /, @rlog; # extract the "
tag: 1.xx" line
my $head_version = $head_line[0]; # move to a scaler
my $tag_version = $tag_line[0]; # move to a scaler
chomp $head_version;
chomp $tag_version;
$head_version =~ s/^\s*head: (\S*)/$1/; # extract version
number of head
$tag_version =~ s/^\s*\S*: (\S*)/$1/; # extract version
number of tag
#print "$head_version $tag_version\n";
if ("$head_version" ne "$tag_version") {
$mismatch++;
system("tput smso"); # turn on reverse video
print "WARNING $_ is not the head version\n";
system("tput rmso"); # turn off reverse video
while (1 == 1) { #forever loop - last is used to break
out of loop
print "Enter \"include\", \"omit\", or \"details\" for
more details\n";
chomp($reply = <STDIN>);
$reply =~ s/^\s*(.*?)\s*$/$1/; # trim white space
if ($reply eq "details") {
print "@rlog\n";
next;
} elsif ($reply eq "omit") {
unlink("$_");
$mismatch--;
$files_changed++; #need to update @files later
before install or verify
last;
} elsif ($reply eq "include") {
last;
} else {
next;
}
}
}
}
if ($mismatch > 0) { # if any mismatch files were included
while (1 == 1) { #forever loop - will exit using exit or last
print "Enter \"go\" to continue or \"stop\" to abort\n";
chomp($reply = <STDIN>);
$reply =~ s/^\s*(.*?)\s*$/$1/; # trim white space
if ($reply eq "stop") {
print "shovel process aborted\n";
clean_tmp();
exit 1;
} elsif ($reply eq "go") {
last;
} else {
next;
}
}
}
}