if (good_suite_has_suitable_vsn(\&vsn_in_our_history)) {
chmod $publicmode, "." or die $!;
$pkg_secret = 0;
+ eval {
+ my $mirror_hook = "$distrodir/mirror-hook";
+ if (stat_exists $mirror_hook) {
+ my @mirror_cmd =
+ ($mirror_hook, $distrodir, "updated-hook", $pkg);
+ debugcmd " (mirror)",@mirror_cmd;
+ system @mirror_cmd and failedcmd @mirror_cmd;
+ }
+ };
+ if (length $@) {
+ chomp $@;
+ print STDERR "policy hook: warning:".
+ " failed to mirror publication of \`$pkg':".
+ " $@\n";
+ }
return 0;
}
if (deliberately('include-questionable-history')) {
return 0;
}
- die "\nPackage is in NEW and has not been accepted or rejected yet;".
- " use a --deliberately option to specify whether you are".
- " keeping or discarding the previously pushed history. ".
- " Please RTFM dgit(1).\n\n";
+ die <<END;
+
+Package is in NEW and has not been accepted or rejected yet.
+Unfortunately, we cannot determine automatically what should happen.
+You will have to pass either --deliberately-not-fast-forward or
+--deliberately-include-questionable-history to specify whether you are
+keeping or discarding the previously pushed history.
+
+The choice is important, to ensure that your git history is both
+suitable for public distribution and as useful as possible. Please
+see the descriptions of these options in dgit(1).
+
+END
}
sub action_push_confirm () {