Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit93cf749

Browse files
committed
Update pgcvslog to fix problem with duplicate narratives.
1 parent3f8ea17 commit93cf749

File tree

1 file changed

+47
-23
lines changed

1 file changed

+47
-23
lines changed

‎src/tools/pgcvslog

Lines changed: 47 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
:
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
44

55
# Usage $0 file
66

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
98
#
109
# 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' \;
1211
# cvs log -d'2000-05-08 00:00:00 GMT<2000-05-29 00:00:00 GMT'
1312
# cvs log -d'>2000-05-29 00:00:00 GMT' -rREL7_0_PATCHES
1413
# find . -name CVS -type d -exec rm '{}/Entries.Static' \;
1514
#
1615

1716
cat "$@" |
1817

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:
2121

2222
awk '
2323
$0 ~ /^Working file:/{workingfile = "/" $3}
@@ -49,49 +49,73 @@ awk '
4949
if (workingfile != "" && skip == "N")
5050
{
5151
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);
5656
}
5757
}
5858

59-
$0 ~ /^====*$/{workingfile=""}' |
59+
$0 ~ /^====*$/{workingfile=""}' |
6060

6161
sort | cut -d'|' -f3 | cat |
6262

6363
# collect duplicate narratives
64-
awk 'BEGIN{ slot = 0;}
64+
awk 'BEGIN{ slot = 0; oldslot=0; save_working = "";}
6565
{
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. */
6672
if ($0 ~ /^\//)
6773
{
6874
if (slot != oldslot)
69-
same =0;
75+
same ="N";
7076
else
7177
{
72-
same =1;
78+
same ="Y";
7379
for (i=1; i <= slot; i++)
7480
{
7581
if (oldnarr[i] != narr[i])
76-
same = 0;
82+
{
83+
same = "N";
84+
break;
85+
}
7786
}
7887
}
7988

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+
}
86100
slot = 0;
101+
102+
/* dump out the previous filename */
87103
print save_working;
104+
105+
/* store the current filename for later printing */
88106
save_working = $0;
89-
}
107+
}
90108
else if ($1 != "date:")
109+
{
110+
/* accumulate narrative */
91111
narr[++slot] = $0;
112+
}
92113
}
93114
END{
115+
/* dump out the last filename */
94116
print save_working;
117+
118+
/* dump out the last narrative */
95119
for (i=1; i <= slot; i++)
96120
print narr[i];
97121
}'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp