diff options
author | joe <joe@FreeBSD.org> | 2001-09-03 09:36:40 +0800 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2001-09-03 09:36:40 +0800 |
commit | 0f0d837272eeffd2e7edacc5431f8f46c55a6753 (patch) | |
tree | dcac578224ce4e8b6acde5f1f381d61df9d0c827 | |
parent | 215f26a518491bd8dbd3c273ffd740c5f4e3b837 (diff) | |
download | freebsd-ports-gnome-0f0d837272eeffd2e7edacc5431f8f46c55a6753.tar.gz freebsd-ports-gnome-0f0d837272eeffd2e7edacc5431f8f46c55a6753.tar.zst freebsd-ports-gnome-0f0d837272eeffd2e7edacc5431f8f46c55a6753.zip |
See whether a file is excluded from rcsid checking before even looking
in the file to see whether one is present.
-rwxr-xr-x | CVSROOT/commit_prep.pl | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/CVSROOT/commit_prep.pl b/CVSROOT/commit_prep.pl index 19ade513a9c8..dc9de784f590 100755 --- a/CVSROOT/commit_prep.pl +++ b/CVSROOT/commit_prep.pl @@ -112,6 +112,23 @@ sub check_version { # not present - either removed or let cvs deal with it. return 0 unless -f $filename; + # Only check this file if it doesn't match an exclusion. + my $exclude = $cvsroot . "/CVSROOT/exclude"; + my $path = $directory . "/" . $filename; + open(EX, "<$exclude") || die("cannot open $exclude: $!"); + while (<EX>) { + chomp; + my $ex_entry = $_; + + next if $ex_entry =~ /^#/; + + if ($path =~ /$ex_entry/) { + close(EX); + return(0); + } + } + close(EX); + # Search the file for a $$HEADER$. my $pos; my $line; @@ -123,25 +140,6 @@ sub check_version { } close FILE; - # A $HEADER wasn't found. Look in the exclude - # file to see whether this is ok. - if ($pos == -1) { - my $exclude = $cvsroot . "/CVSROOT/exclude"; - my $path = $directory . "/" . $filename; - open(EX, "<$exclude") || die("cannot open $exclude: $!"); - while (<EX>) { - chomp; - my $ex_entry = $_; - - next if $ex_entry =~ /^#/; - - if ($path =~ /$ex_entry/) { - close(EX); - return(0); - } - } - close(EX); - } if ($pos == -1) { printf($NoId, $filename); return(1); |