|
1 | 1 | : |
2 | | -# This utility is used to generate a compact list of changes for each |
3 | | -# release, bjm 2000-02-22 |
| 2 | +# This utility is used to generate a compact list of changes |
| 3 | +#for eachrelease, bjm 2000-02-22 |
4 | 4 |
|
5 | 5 | # Usage $0 file |
6 | 6 |
|
7 | | -# no branches: |
8 | | -# cvs log -d '>1999-06-14 00:00:00 GMT' . > log |
| 7 | +# no branches:# cvs log -d '>1999-06-14 00:00:00 GMT' . > log |
9 | 8 | # |
10 | 9 | # pre and post-branch logs: |
11 | | -# find . -name CVS -type d -exec touch'{}/Entries.Static' \; |
| 10 | +# find . -name CVS -type d -exec touch'{}/Entries.Static' \; |
12 | 11 | # cvs log -d'2000-05-08 00:00:00 GMT<2000-05-29 00:00:00 GMT' |
13 | 12 | # cvs log -d'>2000-05-29 00:00:00 GMT' -rREL7_0_PATCHES |
14 | 13 | # find . -name CVS -type d -exec rm '{}/Entries.Static' \; |
15 | 14 | # |
16 | 15 |
|
17 | 16 | cat "$@" | |
18 | 17 |
|
19 | | -# mark each line with a datetime and line number, for sorting and merging |
20 | | -# we don't print anything from the -- or == line and the date: |
| 18 | +# mark each line with a datetime and line number, for sorting and |
| 19 | +# merging we don't print anything from the -- or == line and the |
| 20 | +# date: |
21 | 21 |
|
22 | 22 | awk ' |
23 | 23 | $0 ~ /^Working file:/{workingfile = "/" $3} |
@@ -49,49 +49,73 @@ awk ' |
49 | 49 | if (workingfile != "" && skip == "N") |
50 | 50 | { |
51 | 51 | gsub(";", "", $5); |
52 | | -printf ("%s| %10d| %70s\n", datetime, NR-2,$5); |
53 | | -printf ("%s| %10d|%s\n", datetime, NR-1,workingfile); |
54 | | -printf ("%s| %10d|%s\n", datetime, NR,$0); |
55 | | -printf ("%s| %10d|%s\n", datetime, NR+1,""); |
| 52 | +printf ("%s| %10d|%s\n", datetime, NR-2,workingfile); |
| 53 | +printf ("%s| %10d|%s\n", datetime, NR-1,$0); |
| 54 | +/*printf ("%s| %10d|%s\n", datetime, NR,"");*/ |
| 55 | +printf ("%s| %10d| %70s\n", datetime, NR+1,$5); |
56 | 56 | } |
57 | 57 | } |
58 | 58 |
|
59 | | -$0 ~ /^====*$/{workingfile=""}' | |
| 59 | +$0 ~ /^====*$/{workingfile=""}' | |
60 | 60 |
|
61 | 61 | sort | cut -d'|' -f3 | cat | |
62 | 62 |
|
63 | 63 | # collect duplicate narratives |
64 | | -awk 'BEGIN{ slot = 0;} |
| 64 | +awk 'BEGIN{ slot = 0; oldslot=0; save_working = "";} |
65 | 65 | { |
| 66 | +/* filename */ |
| 67 | +/* We have a filename, so we look at the previous */ |
| 68 | +/* narrative to see if it is new narrative text.*/ |
| 69 | +/* */ |
| 70 | +/* If there are a different number of narrative */ |
| 71 | +/* lines, they can not possibly be the same. */ |
66 | 72 | if ($0 ~ /^\//) |
67 | 73 | { |
68 | 74 | if (slot != oldslot) |
69 | | -same =0; |
| 75 | +same ="N"; |
70 | 76 | else |
71 | 77 | { |
72 | | -same =1; |
| 78 | +same ="Y"; |
73 | 79 | for (i=1; i <= slot; i++) |
74 | 80 | { |
75 | 81 | if (oldnarr[i] != narr[i]) |
76 | | -same = 0; |
| 82 | +{ |
| 83 | +same = "N"; |
| 84 | +break; |
| 85 | +} |
77 | 86 | } |
78 | 87 | } |
79 | 88 |
|
80 | | -if (oldslot && !same) |
81 | | -for (i=1; i <= oldslot; i++) |
82 | | -print oldnarr[i]; |
83 | | -for (i=1; i <= slot; i++) |
84 | | -oldnarr[i] = narr[i]; |
85 | | -oldslot = slot; |
| 89 | +/* dump out the old narrative if it is new */ |
| 90 | +if (same == "N") |
| 91 | +{ |
| 92 | +if (oldslot) |
| 93 | +for (i=1; i <= oldslot; i++) |
| 94 | +print oldnarr[i]; |
| 95 | +/* save the current narrative */ |
| 96 | +for (i=1; i <= slot; i++) |
| 97 | +oldnarr[i] = narr[i]; |
| 98 | +oldslot = slot; |
| 99 | +} |
86 | 100 | slot = 0; |
| 101 | + |
| 102 | +/* dump out the previous filename */ |
87 | 103 | print save_working; |
| 104 | + |
| 105 | +/* store the current filename for later printing */ |
88 | 106 | save_working = $0; |
89 | | -} |
| 107 | +} |
90 | 108 | else if ($1 != "date:") |
| 109 | +{ |
| 110 | +/* accumulate narrative */ |
91 | 111 | narr[++slot] = $0; |
| 112 | +} |
92 | 113 | } |
93 | 114 | END{ |
| 115 | +/* dump out the last filename */ |
94 | 116 | print save_working; |
| 117 | + |
| 118 | +/* dump out the last narrative */ |
95 | 119 | for (i=1; i <= slot; i++) |
96 | 120 | print narr[i]; |
97 | 121 | }' |