[packages/adapter: 365/631] - keep only cvs changelog

glen glen at pld-linux.org
Mon Sep 12 20:05:02 CEST 2016


commit 4b7a9b6b76f8cde3590d43449cafff6e043e536e
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Tue Mar 6 17:33:51 2007 +0000

    - keep only cvs changelog
    
    Changed files:
        adapter.awk -> 1.352

 adapter.awk | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index 2ba1ffd..3a2cb61 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -524,24 +524,27 @@ function b_makekey(a, b,	s) {
 	skip = 0
 	# There should be some CVS keywords on the first line of %changelog.
 	if (boc == 3) {
-		if ($0 !~ _cvsmailfeedback)
+		if ($0 !~ _cvsmailfeedback) {
 			print "* %{date} " _cvsmailfeedback > changelog_file
-		else
+		} else {
 			skip = 1
+		}
 		boc = 2
 	}
 	if (boc == 2 && !skip) {
 		if (!/All persons listed below/) {
 			printf "All persons listed below can be reached at " > changelog_file
 			print "<cvs_login>" _cvsmaildomain "\n" > changelog_file
-		} else
+		} else {
 			skip = 1
+		}
 		boc = 1
 	}
 	if (boc == 1 && !skip) {
 		if (!/^$/) {
-			if (!/\$.*Log:.*\$/)
+			if (!/\$.*Log:.*\$/) {
 				print "$" "Log:$" > changelog_file
+			}
 			boc = 0
 		}
 	}
@@ -555,11 +558,19 @@ function b_makekey(a, b,	s) {
 		boc = 3
 	}
 
-	sub(/[ \t]+$/, "")
-	if (!/^%[a-z]+$/ || /changelog/)
+	sub(/[ \t]+$/, "");
+	if (!/^%[a-z]+$/ || /changelog/) {
+		# stop changelog if "real" changelog starts
+		if (boc == 0 && /^\* /) {
+			boc = -1
+		}
+		if (boc == -1) {
+			next;
+		}
 		print > changelog_file
-	else
+	} else {
 		print
+	}
 	next
 }
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885



More information about the pld-cvs-commit mailing list