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
20dfd50c
Commit
20dfd50c
authored
Jan 13, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More cleanup.
parent
160675ec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
30 deletions
+28
-30
src/tools/pgcvslog
src/tools/pgcvslog
+28
-30
No files found.
src/tools/pgcvslog
View file @
20dfd50c
...
@@ -15,62 +15,58 @@
...
@@ -15,62 +15,58 @@
cat "$@" |
cat "$@" |
# mark each line with a datetime and line number, for sorting and
# mark each line with a datetime and line number, for sorting and merging
# merging we don't print anything from the -- or == line and the
# We don't print anything from the -- or == line and the date:
# date:
awk '
awk '
# store working directory
$0 ~ /^Working file:/ {workingfile = "/" $3}
$0 ~ /^Working file:/ {workingfile = "/" $3}
($0 ~ /^====*$/ || $0 ~ /^----*$/)
&& skip == "N"
\
($0 ~ /^====*$/ || $0 ~ /^----*$/) \
{
{
/* print blank line separating entries */
# print blank line to separate entries
if (datetime != "")
if (datetime != "")
{
{
printf ("%s| %10d|%s\n", datetime, NR, "");
printf ("%s| %10d|%s\n", datetime, NR, "");
printf ("%s| %10d|%s\n", datetime, NR, "---");
printf ("%s| %10d|%s\n", datetime, NR, "---");
/* printf ("%s| %10d|%s\n", datetime, NR+1, "");*/
}
}
}
$0 ~ /^====*$/ || $0 ~ /^----*$/ \
{
datetime="";
datetime="";
skip="N";
}
}
datetime != "" && skip == "N" \
# if we have a saved datetime, print filename, date line, and committer
{printf ("%s| %10d| %s\n", datetime, NR, $0);}
datetime != ""
{printf ("%s| %10d| %s\n", datetime, NR, $0);}
$1 == "date:" \
$1 == "date:" \
{
{
/* get entry date */
# get entry date
datetime=$2"-"$3
datetime=$2"-"$3
if (workingfile != ""
&& skip == "N"
)
if (workingfile != "")
{
{
# remove semicolon from committer's name
gsub(";", "", $5);
gsub(";", "", $5);
printf ("%s| %10d|%s\n", datetime, NR-2, workingfile);
printf ("%s| %10d|%s\n", datetime, NR-2, workingfile);
printf ("%s| %10d|%s\n", datetime, NR-1, $0);
printf ("%s| %10d|%s\n", datetime, NR-1, $0);
/* printf ("%s| %10d|%s\n", datetime, NR, "");*/
# output name of committer
printf ("%s| %10d| %70s\n", datetime, NR+1, $5);
printf ("%s| %10d| %70s\n", datetime, NR+1, $5);
}
}
}
}
/* clear working file */
$0 ~ /^====*$/ {workingfile=""}' |
$0 ~ /^====*$/ {workingfile=""}' |
sort | cut -d'|' -f3 | cat |
sort | cut -d'|' -f3 | cat |
# collect duplicate narratives
# collect duplicate narratives
awk ' BEGIN { slot = 0; oldslot=0; save_working = ""; }
awk ' BEGIN { slot = 0; oldslot=0; save_working = ""; }
{
{
/* filename */
# 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 there are a different number of narrative */
/* lines, they can not possibly be the same. */
if ($0 ~ /^\//)
if ($0 ~ /^\//)
{
{
# If there are a different number of narrative
# lines, they can not possibly be the same.
if (slot != oldslot)
if (slot != oldslot)
same = "N";
same = "N";
else
else
...
@@ -86,36 +82,38 @@ awk ' BEGIN { slot = 0; oldslot=0; save_working = ""; }
...
@@ -86,36 +82,38 @@ awk ' BEGIN { slot = 0; oldslot=0; save_working = ""; }
}
}
}
}
/* 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 (oldslot)
for (i=1; i <= oldslot; i++)
for (i=1; i <= oldslot; i++)
print oldnarr[i];
print oldnarr[i];
/* save the current narrative */
# save the current narrative
for (i=1; i <= slot; i++)
for (i=1; i <= slot; i++)
oldnarr[i] = narr[i];
oldnarr[i] = narr[i];
oldslot = slot;
oldslot = slot;
}
}
slot = 0;
slot = 0;
/* dump out the previous filename */
# dump out the previous filename
print save_working;
print save_working;
/* store the current filename for later printing */
# store the current filename for later printing
save_working = $0;
save_working = $0;
}
}
# we have a narrative line
else if ($1 != "date:")
else if ($1 != "date:")
{
{
/* accumulate narrative */
# accumulate narrative
narr[++slot] = $0;
narr[++slot] = $0;
}
}
}
}
END {
END {
/* dump out the last filename */
# dump out the last filename
print save_working;
print save_working;
/* dump out the last narrative */
# dump out the last narrative
for (i=1; i <= slot; i++)
for (i=1; i <= slot; i++)
print narr[i];
print narr[i];
}'
}'
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