Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
7d4dd3ab
Commit
7d4dd3ab
authored
Oct 01, 2007
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Have pgcvslog mark back-branch commits with "<back-patch>".
parent
27b89222
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
55 deletions
+71
-55
src/tools/pgcvslog
src/tools/pgcvslog
+71
-55
No files found.
src/tools/pgcvslog
View file @
7d4dd3ab
#!/bin/sh
# $PostgreSQL: pgsql/src/tools/pgcvslog,v 1.3
3 2007/01/31 22:17
:03 momjian Exp $
# $PostgreSQL: pgsql/src/tools/pgcvslog,v 1.3
4 2007/10/01 02:59
:03 momjian Exp $
# This utility is used to generate a compact list of changes
# for each release, bjm 2000-02-22
# Usage $0 file
# Usage: pgcvslog [-h]
# -h is HTML output
# All branches:
# cvs log -d'>1999-06-14 00:00:00 GMT' . > log
...
...
@@ -49,6 +50,7 @@ else cat
fi
|
# mark each line with a datetime and line number, for sorting and merging
# we are just pre-processing the file at this point
# We don't print anything from the -- or == line and the date:
awk
' BEGIN {html="'
"
$HTML
"
'"; lineno = 0;}
...
...
@@ -87,8 +89,8 @@ awk ' BEGIN {html="'"$HTML"'"; lineno = 0;}
{
printf ("%s| %10d|", datetime, lineno++);
if (html != "Y")
printf ("%s
\n", workingfile
);
else printf ("<SMALL><FONT COLOR=\"red\">%s
</FONT></SMALL>\n", workingfile
);
printf ("%s
%s\n", workingfile, back_branch
);
else printf ("<SMALL><FONT COLOR=\"red\">%s
%s</FONT></SMALL>\n", workingfile, back_branch
);
# output name of committer
# remove semicolon from committers name
...
...
@@ -102,27 +104,39 @@ awk ' BEGIN {html="'"$HTML"'"; lineno = 0;}
}
}
# mark back branches
$1 == "revision" \
{
if ($2 ~ /\..*\./ && del == "Y")
back_branch=" <back-patch>"
else back_branch = ""
}
/* clear working file */
$0 ~ /^====*$/ {workingfile=""}'
|
sort
|
cut
-d
'|'
-f3
|
# collect duplicate narratives
# print file names as we get them, then print narrative when a new
# narrative appears
# have to save two narratives to compare them
awk
' BEGIN { slot = 0; oldslot=0; save_working = ""; html="'
"
$HTML
"
'"}
awk
' BEGIN { narr_slot = 0; oldnarr_slot=0; save_working = "";
html="'
"
$HTML
"
'"}
{
# We have a filename, so we look at the previous
# narrative to see if it is new narrative text.
if ($0 ~
/^\// || $0 ~ />\//
)
if ($0 ~
"^/" || $0 ~ ">/"
)
{
# If there are a different number of narrative
# lines, they can
not possibly be the same.
if (
slot != old
slot)
# lines, they cannot possibly be the same.
if (
narr_slot != oldnarr_
slot)
same = "N";
else
{
same = "Y";
for (i=1; i <= slot; i++)
for (i=1; i <=
narr_
slot; i++)
{
if (oldnarr[i] != narr[i])
{
...
...
@@ -135,8 +149,8 @@ awk ' BEGIN { slot = 0; oldslot=0; save_working = ""; html="'"$HTML"'"}
# dump out the old narrative if it is new
if (same == "N")
{
if (oldslot)
for (i=1; i <= oldslot; i++)
if (old
narr_
slot)
for (i=1; i <= old
narr_
slot; i++)
{
print oldnarr[i];
if (html == "Y" &&
...
...
@@ -146,14 +160,15 @@ awk ' BEGIN { slot = 0; oldslot=0; save_working = ""; html="'"$HTML"'"}
}
# save the current narrative
for (i=1; i <= slot; i++)
for (i=1; i <=
narr_
slot; i++)
oldnarr[i] = narr[i];
old
slot =
slot;
old
narr_slot = narr_
slot;
}
slot = 0;
narr_
slot = 0;
# dump out the previous filename
print save_working;
if (html == "Y")
print "<BR>";
...
...
@@ -164,57 +179,58 @@ awk ' BEGIN { slot = 0; oldslot=0; save_working = ""; html="'"$HTML"'"}
# we have a narrative line
{
# accumulate narrative
narr[++slot] = $0;
narr[++
narr_
slot] = $0;
}
}
END {
# If there are a different number of narrative
# lines, they can not possibly be the same.
if (slot != oldslot)
same = "N";
else
END \
{
# If there are a different number of narrative
# lines, they can not possibly be the same.
if (narr_slot != oldnarr_slot)
same = "N";
else
{
same = "Y";
for (i=1; i <= narr_slot; i++)
{
same = "Y";
for (i=1; i <= slot; i++)
if (oldnarr[i] != narr[i])
{
if (oldnarr[i] != narr[i])
{
same = "N";
break;
}
same = "N";
break;
}
}
}
# dump out the old narrative if it is new
if (same == "N")
{
if (old
slot)
for (i=1; i <= old
slot; i++)
{
print oldnarr[i];
if (html == "Y" &&
oldnarr[i] != "<HR>" &&
oldnarr[i] !~ "^<DIV ")
print "<BR>";
}
}
# dump out the old narrative if it is new
if (same == "N")
{
if (oldnarr_
slot)
for (i=1; i <= oldnarr_
slot; i++)
{
print oldnarr[i];
if (html == "Y" &&
oldnarr[i] != "<HR>" &&
oldnarr[i] !~ "^<DIV ")
print "<BR>";
}
}
# dump out the last filename
print save_working;
# dump out the last filename
print save_working;
if (html == "Y")
print "<BR>";
if (html == "Y")
print "<BR>";
# dump out the last narrative
for (i=1; i <=
slot; i++)
{
print narr[i];
if (html == "Y" &&
narr[i] != "<HR>" &&
narr[i] !~ "^<DIV ")
print "<BR>";
}
}'
|
# dump out the last narrative
for (i=1; i <= narr_
slot; i++)
{
print narr[i];
if (html == "Y" &&
narr[i] != "<HR>" &&
narr[i] !~ "^<DIV ")
print "<BR>";
}
}'
|
# add HTML wrapper
if
[
"
$HTML
"
=
"Y"
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment