From: Michael Smith Date: Tue, 20 Sep 2005 05:42:26 +0000 (+0000) Subject: Made some minor changes to get deal with a couple corner cases. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f36ab40ebc7a4abe2fb5f6f43bab5b61b3cda11f;p=docbook-dsssl Made some minor changes to get deal with a couple corner cases. If somebody (say, Mike) checks in the VERSION file twice with the same change description, it's possible for the merged changelog to end with up something like: * VERSION, VERSION: Version 1.69.1 released. The existing version of mergechangelogs got confused by that, so I added a regex match to catch instances like that. Also, in running the snapshot builds, with the way I have the snapshot build currently set up, it's useful for the build to just automatically assume we are at version X.XX.1 if the previous version was X.XX.0. ---------------------------------------------------------------------- --- diff --git a/cvstools/mergechangelogs b/cvstools/mergechangelogs index 52e455c51..12f5d5048 100755 --- a/cvstools/mergechangelogs +++ b/cvstools/mergechangelogs @@ -42,6 +42,10 @@ while () { $date = $1 if /^(\d+-\d+-\d+)/; $found = 1 if /^\s+\* \S+: Version $version\s+/; $found = 1 if /^\s+\* \S+: Version $version\s*$/; + # following match needed because Changelog might have + # "* VERSION, VERSION: Version 1.69.1 released." (if same + # change description was entered twice). -Mike + $found = 1 if /^\s+\* [^:]+: Version $version\s+/; last if $found; } @@ -150,7 +154,10 @@ sub last_version { my $minor = $3; if ($minor == 0) { - die "Can\'t calculate preceding from $version.\n"; + # do the following in order to get useful merged changelog + # for snapshot builds --Mike + $middle--; + $minor++; } else { $minor--; }