+03 Nov 2004 Aron Griffis <agriffis@gentoo.org>
+ * abort when there are unresolved files (files that aren't under
+ revision control) just like repoman
+ * auto-add to cvs when a new ChangeLog is created
+
15 Sep 2004 Aron Griffis <agriffis@gentoo.org>
* fix the wrapping to fit in 80 columns properly. It was
previously possible to get lines with 81 chars. Thanks to
-Package : echangelog
-Version : 0.2.0
-Author : See AUTHORS
+Most of the documentation is contained in the man-page, which you can
+read directly (using GNU man) by doing
-MOTIVATION
+ man ./echangelog.1
-Update the ChangeLog for an ebuild.
+To rebuild the man-page from pod source, do
-MECHANICS
+ pod2man --name=echangelog --center='Gentoolkit' \
+ echangelog.pod echangelog.1
-N/A
-
-IMPROVEMENTS
-
-- Should rewrite to Python, and use Portage directly to select candidate
- ebuild catalogs.
-- Should check the well-formedness of the current ChangeLog.
-
-For improvements, send a mail to agriffis@gentoo.org or make out a bug at
-bugs.gentoo.org.
+03 Nov 2004 agriffis
# Global variables
my (@files) = ();
my (@ebuilds) = ();
+my (@unknown) = ();
my ($input, $editor, $entry, $user, $date, $text, $version, $year);
my (%versions) = ();
my (%actions) = ();
$text =~ s/<CATEGORY>/$category/;
$text =~ s/<PACKAGE_NAME>/$package_name/;
# Okay, now we have a starter ChangeLog to work with.
- # The entry will be added just like with any other ChangeLog.
+ # The text will be added just like with any other ChangeLog below.
+ # Add the new ChangeLog to cvs before continuing.
+ system("cvs add ChangeLog");
} else {
die "This should be run in a directory with ebuilds...\n";
}
open C, 'cvs -n up 2>&1 |' or die "Can't run cvs -n up: $!\n";
while (<C>) {
/ChangeLog/ and next;
+ /^\? (\S+)/ and push @unknown, $1;
/^([ARMC]) (\S+)/ or next;
push @files, $2;
($actions{$2} = $1) =~ tr/ARMC/+-/d;
}
+if (@unknown) {
+ print STDERR <<EOT;
+Cvs reports the following unknown files. Please use "cvs add" before
+running echangelog, or remove the files in question.
+EOT
+ print STDERR "? ", join("\n ?", @unknown), "\n";
+ exit 1;
+}
# Forget ebuilds that only have changed copyrights, unless that's all
# the changed files we have