Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
7d4dd3ab
Commit
7d4dd3ab
authored
17 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Have pgcvslog mark back-branch commits with "<back-patch>".
parent
27b89222
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/tools/pgcvslog
+71
-55
71 additions, 55 deletions
src/tools/pgcvslog
with
71 additions
and
55 deletions
src/tools/pgcvslog
+
71
−
55
View file @
7d4dd3ab
#!/bin/sh
#!/bin/sh
# $PostgreSQL: pgsql/src/tools/pgcvslog,v 1.3
3
2007/
01/3
1
2
2:
17
:03 momjian Exp $
# $PostgreSQL: pgsql/src/tools/pgcvslog,v 1.3
4
2007/
10/0
1
0
2:
59
:03 momjian Exp $
# This utility is used to generate a compact list of changes
# This utility is used to generate a compact list of changes
# for each release, bjm 2000-02-22
# for each release, bjm 2000-02-22
# Usage $0 file
# Usage: pgcvslog [-h]
# -h is HTML output
# All branches:
# All branches:
# cvs log -d'>1999-06-14 00:00:00 GMT' . > log
# cvs log -d'>1999-06-14 00:00:00 GMT' . > log
...
@@ -49,6 +50,7 @@ else cat
...
@@ -49,6 +50,7 @@ else cat
fi
|
fi
|
# mark each line with a datetime and line number, for sorting and merging
# 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:
# We don't print anything from the -- or == line and the date:
awk
' BEGIN {html="'
"
$HTML
"
'"; lineno = 0;}
awk
' BEGIN {html="'
"
$HTML
"
'"; lineno = 0;}
...
@@ -87,8 +89,8 @@ awk ' BEGIN {html="'"$HTML"'"; lineno = 0;}
...
@@ -87,8 +89,8 @@ awk ' BEGIN {html="'"$HTML"'"; lineno = 0;}
{
{
printf ("%s| %10d|", datetime, lineno++);
printf ("%s| %10d|", datetime, lineno++);
if (html != "Y")
if (html != "Y")
printf ("%s\n", workingfile);
printf ("%s
%s
\n", workingfile
, back_branch
);
else printf ("<SMALL><FONT COLOR=\"red\">%s</FONT></SMALL>\n", workingfile);
else printf ("<SMALL><FONT COLOR=\"red\">%s
%s
</FONT></SMALL>\n", workingfile
, back_branch
);
# output name of committer
# output name of committer
# remove semicolon from committers name
# remove semicolon from committers name
...
@@ -102,27 +104,39 @@ awk ' BEGIN {html="'"$HTML"'"; lineno = 0;}
...
@@ -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 */
/* clear working file */
$0 ~ /^====*$/ {workingfile=""}'
|
$0 ~ /^====*$/ {workingfile=""}'
|
sort
|
cut
-d
'|'
-f3
|
sort
|
cut
-d
'|'
-f3
|
# collect duplicate narratives
# 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
# We have a filename, so we look at the previous
# narrative to see if it is new narrative text.
# narrative to see if it is new narrative text.
if ($0 ~
/^\//
|| $0 ~
/>\//
)
if ($0 ~
"^/"
|| $0 ~
">/"
)
{
{
# If there are a different number of narrative
# If there are a different number of narrative
# lines, they can
not possibly be the same.
# lines, they cannot possibly be the same.
if (slot != oldslot)
if (
narr_
slot != old
narr_
slot)
same = "N";
same = "N";
else
else
{
{
same = "Y";
same = "Y";
for (i=1; i <= slot; i++)
for (i=1; i <=
narr_
slot; i++)
{
{
if (oldnarr[i] != narr[i])
if (oldnarr[i] != narr[i])
{
{
...
@@ -135,8 +149,8 @@ awk ' BEGIN { slot = 0; oldslot=0; save_working = ""; html="'"$HTML"'"}
...
@@ -135,8 +149,8 @@ awk ' BEGIN { slot = 0; oldslot=0; save_working = ""; html="'"$HTML"'"}
# dump out the old narrative if it is new
# dump out the old narrative if it is new
if (same == "N")
if (same == "N")
{
{
if (oldslot)
if (old
narr_
slot)
for (i=1; i <= oldslot; i++)
for (i=1; i <= old
narr_
slot; i++)
{
{
print oldnarr[i];
print oldnarr[i];
if (html == "Y" &&
if (html == "Y" &&
...
@@ -146,14 +160,15 @@ awk ' BEGIN { slot = 0; oldslot=0; save_working = ""; html="'"$HTML"'"}
...
@@ -146,14 +160,15 @@ awk ' BEGIN { slot = 0; oldslot=0; save_working = ""; html="'"$HTML"'"}
}
}
# save the current narrative
# save the current narrative
for (i=1; i <= slot; i++)
for (i=1; i <=
narr_
slot; i++)
oldnarr[i] = narr[i];
oldnarr[i] = narr[i];
oldslot = slot;
old
narr_
slot =
narr_
slot;
}
}
slot = 0;
narr_
slot = 0;
# dump out the previous filename
# dump out the previous filename
print save_working;
print save_working;
if (html == "Y")
if (html == "Y")
print "<BR>";
print "<BR>";
...
@@ -164,57 +179,58 @@ awk ' BEGIN { slot = 0; oldslot=0; save_working = ""; html="'"$HTML"'"}
...
@@ -164,57 +179,58 @@ awk ' BEGIN { slot = 0; oldslot=0; save_working = ""; html="'"$HTML"'"}
# we have a narrative line
# we have a narrative line
{
{
# accumulate narrative
# accumulate narrative
narr[++slot] = $0;
narr[++
narr_
slot] = $0;
}
}
}
}
END {
END \
# If there are a different number of narrative
{
# lines, they can not possibly be the same.
# If there are a different number of narrative
if (slot != oldslot)
# lines, they can not possibly be the same.
same = "N";
if (narr_slot != oldnarr_slot)
else
same = "N";
else
{
same = "Y";
for (i=1; i <= narr_slot; i++)
{
{
same = "Y";
if (oldnarr[i] != narr[i])
for (i=1; i <= slot; i++)
{
{
if (oldnarr[i] != narr[i])
same = "N";
{
break;
same = "N";
break;
}
}
}
}
}
}
# dump out the old narrative if it is new
# dump out the old narrative if it is new
if (same == "N")
if (same == "N")
{
{
if (oldslot)
if (old
narr_
slot)
for (i=1; i <= oldslot; i++)
for (i=1; i <= old
narr_
slot; i++)
{
{
print oldnarr[i];
print oldnarr[i];
if (html == "Y" &&
if (html == "Y" &&
oldnarr[i] != "<HR>" &&
oldnarr[i] != "<HR>" &&
oldnarr[i] !~ "^<DIV ")
oldnarr[i] !~ "^<DIV ")
print "<BR>";
print "<BR>";
}
}
}
}
# dump out the last filename
# dump out the last filename
print save_working;
print save_working;
if (html == "Y")
if (html == "Y")
print "<BR>";
print "<BR>";
# dump out the last narrative
# dump out the last narrative
for (i=1; i <= slot; i++)
for (i=1; i <=
narr_
slot; i++)
{
{
print narr[i];
print narr[i];
if (html == "Y" &&
if (html == "Y" &&
narr[i] != "<HR>" &&
narr[i] != "<HR>" &&
narr[i] !~ "^<DIV ")
narr[i] !~ "^<DIV ")
print "<BR>";
print "<BR>";
}
}
}'
|
}'
|
# add HTML wrapper
# add HTML wrapper
if
[
"
$HTML
"
=
"Y"
]
if
[
"
$HTML
"
=
"Y"
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment