--- cvs2cl.orig Thu May 2 19:49:18 2002
+++ cvs2cl Thu May 2 19:52:21 2002
@@ -138,6 +138,9 @@
# Show tags (symbolic names) in output?
my $Show_Tags = 0;
+# Show tags separately in output?
+my $Show_Tag_Dates = 0;
+
# Show branches by symbolic name in output?
my $Show_Branches = 0;
@@ -241,6 +244,8 @@
my $msg_txt;
my $detected_file_separator;
+ my %tag_date_printed;
+
# Might be adding to an existing ChangeLog
my $accumulation_date = &maybe_grab_accumulation_date ();
if ($accumulation_date) {
@@ -719,7 +724,50 @@
foreach my $time (sort {$main::b <=> $main::a} (keys %changelog))
{
+ # Set up the date/author line.
+ # kff todo: do some more XML munging here, on the header
+ # part of the entry:
+ my ($ignore,$min,$hour,$mday,$mon,$year,$wday)
+ = $UTC_Times ? gmtime($time) : localtime($time);
+
+ # XML output includes everything else, we might as well make
+ # it always include Day Of Week too, for consistency.
+ if ($Show_Day_Of_Week or $XML_Output) {
+ $wday = ("Sunday", "Monday", "Tuesday", "Wednesday",
+ "Thursday", "Friday", "Saturday")[$wday];
+ $wday = ($XML_Output) ? "${wday}\n" : " $wday";
+ }
+ else {
+ $wday = "";
+ }
+
my $authorhash = $changelog{$time};
+ if ($Show_Tag_Dates) {
+ my %tags;
+ while (my ($author,$mesghash) = each %$authorhash) {
+ while (my ($msg,$qunk) = each %$mesghash) {
+ foreach my $qunkref2 (@$qunk) {
+ if (defined ($$qunkref2{'tags'})) {
+ foreach my $tag (@{$$qunkref2{'tags'}}) {
+ $tags{$tag} = 1;
+ }
+ }
+ }
+ }
+ }
+ foreach my $tag (keys %tags) {
+ if (!defined $tag_date_printed{$tag}) {
+ $tag_date_printed{$tag} = $time;
+ if ($XML_Output) {
+ # NOT YET DONE
+ }
+ else {
+ printf LOG_OUT ("%4u-%02u-%02u${wday} %02u:%02u tag %s\n\n",
+ $year+1900, $mon+1, $mday, $hour, $min, $tag);
+ }
+ }
+ }
+ }
while (my ($author,$mesghash) = each %$authorhash)
{
# If XML, escape in outer loop to avoid compound quoting:
@@ -734,23 +782,6 @@
my $body; # see below
my $wholething; # $header_line + $body
- # Set up the date/author line.
- # kff todo: do some more XML munging here, on the header
- # part of the entry:
- my ($ignore,$min,$hour,$mday,$mon,$year,$wday)
- = $UTC_Times ? gmtime($time) : localtime($time);
-
- # XML output includes everything else, we might as well make
- # it always include Day Of Week too, for consistency.
- if ($Show_Day_Of_Week or $XML_Output) {
- $wday = ("Sunday", "Monday", "Tuesday", "Wednesday",
- "Thursday", "Friday", "Saturday")[$wday];
- $wday = ($XML_Output) ? "${wday}\n" : " $wday";
- }
- else {
- $wday = "";
- }
-
if ($XML_Output) {
$header_line =
sprintf ("%4u-%02u-%02u\n"
@@ -1580,6 +1611,9 @@
elsif ($arg =~ /^-t$|^--tags$/) {
$Show_Tags = 1;
}
+ elsif ($arg =~ /^-T$|^--tagdates$/) {
+ $Show_Tag_Dates = 1;
+ }
elsif ($arg =~ /^-b$|^--branches$/) {
$Show_Branches = 1;
}
@@ -1730,6 +1764,7 @@
-r, --revisions Show revision numbers in output
-b, --branches Show branch names in revisions when possible
-t, --tags Show tags (symbolic names) in output
+ -T, --tagdates Show tags in output on their first occurance
--stdin Read from stdin, don't run cvs log
--stdout Output to stdout not to ChangeLog
-d, --distributed Put ChangeLogs in subdirs