Alexandre Julliard : git-notify: Remove support for obsolete CIA notifications.
Alexandre Julliard
julliard at winehq.org
Mon Jul 11 15:52:59 CDT 2022
Module: tools
Branch: master
Commit: f3e6f9d6ee8857631f41360cc7bc803bab1b854c
URL: https://gitlab.winehq.org/winehq/tools/-/commit/f3e6f9d6ee8857631f41360cc7bc803bab1b854c
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Jul 11 13:08:35 2022 +0200
git-notify: Remove support for obsolete CIA notifications.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
git-notify | 66 --------------------------------------------------------------
1 file changed, 66 deletions(-)
diff --git a/git-notify b/git-notify
index 9918117c..91f29a65 100755
--- a/git-notify
+++ b/git-notify
@@ -14,7 +14,6 @@
#
# Usage: git-notify [options] [--] old-sha1 new-sha1 refname
#
-# -c name Send CIA notifications under specified project name
# -m addr Send mail notifications to specified address
# -n max Set max number of individual mails to send
# -r name Set the git repository name
@@ -41,9 +40,6 @@ sub get_repos_name();
# set this to something that takes "-s"
my $mailer = "/usr/bin/mail";
-# CIA notification address
-my $cia_address = "cia\@cia.vc";
-
# debug mode
my $debug = 0;
@@ -61,9 +57,6 @@ my $max_diff_size = git_config( "notify.maxdiff" ) || 10000;
# address for mail notices (can be set with -m option)
my $commitlist_address = git_config( "notify.mail" );
-# project name for CIA notices (can be set with -c option)
-my $cia_project_name = git_config( "notify.cia" );
-
# max number of individual notices before falling back to a single global notice (can be set with -n option)
my $max_individual_notices = git_config( "notify.maxnotices" ) || 100;
@@ -79,7 +72,6 @@ my @revlist_options;
sub usage()
{
print "Usage: $0 [options] [--] old-sha1 new-sha1 refname\n";
- print " -c name Send CIA notifications under specified project name\n";
print " -m addr Send mail notifications to specified address\n";
print " -n max Set max number of individual mails to send\n";
print " -r name Set the git repository name\n";
@@ -141,7 +133,6 @@ sub parse_options()
my $arg = shift @ARGV;
if ($arg eq '--') { last; }
- elsif ($arg eq '-c') { $cia_project_name = shift @ARGV; }
elsif ($arg eq '-m') { $commitlist_address = shift @ARGV; }
elsif ($arg eq '-n') { $max_individual_notices = shift @ARGV; }
elsif ($arg eq '-r') { $repos_name = shift @ARGV; }
@@ -296,62 +287,6 @@ sub send_commit_notice($$)
mail_notification($commitlist_address, $subject, "text/plain; charset=UTF-8", @notice);
}
-# send a commit notice to the CIA server
-sub send_cia_notice($$)
-{
- my ($ref,$commit) = @_;
- my %info = get_object_info($commit);
- my @cia_text = ();
-
- return if $info{"type"} ne "commit";
-
- push @cia_text,
- "<message>",
- " <generator>",
- " <name>git-notify script for CIA</name>",
- " </generator>",
- " <source>",
- " <project>" . xml_escape($cia_project_name) . "</project>",
- " <module>" . xml_escape($repos_name) . "</module>",
- " <branch>" . xml_escape($ref). "</branch>",
- " </source>",
- " <body>",
- " <commit>",
- " <revision>" . substr($commit,0,10) . "</revision>",
- " <author>" . xml_escape($info{"author"}) . "</author>",
- " <log>" . xml_escape(join "\n", @{$info{"log"}}) . "</log>",
- " <files>";
-
- open COMMIT, "-|" or exec "git", "diff-tree", "--name-status", "-r", "-M", $commit or die "cannot run git-diff-tree";
- while (<COMMIT>)
- {
- chomp;
- if (/^([AMD])\t(.*)$/)
- {
- my ($action, $file) = ($1, $2);
- my %actions = ( "A" => "add", "M" => "modify", "D" => "remove" );
- next unless defined $actions{$action};
- push @cia_text, " <file action=\"$actions{$action}\">" . xml_escape($file) . "</file>";
- }
- elsif (/^R\d+\t(.*)\t(.*)$/)
- {
- my ($old, $new) = ($1, $2);
- push @cia_text, " <file action=\"rename\" to=\"" . xml_escape($new) . "\">" . xml_escape($old) . "</file>";
- }
- }
- close COMMIT;
-
- push @cia_text,
- " </files>",
- $gitweb_url ? " <url>" . xml_escape("$gitweb_url/?a=commit;h=$commit") . "</url>" : "",
- " </commit>",
- " </body>",
- " <timestamp>" . $info{"author_date"} . "</timestamp>",
- "</message>";
-
- mail_notification($cia_address, "DeliverXML", "text/xml", @cia_text);
-}
-
# send a global commit notice when there are too many commits for individual mails
sub send_global_notice($$$)
{
@@ -406,7 +341,6 @@ sub send_all_notices($$$)
foreach my $commit (@commits)
{
send_commit_notice( $ref, $commit ) if $commitlist_address;
- send_cia_notice( $ref, $commit ) if $cia_project_name;
}
}
More information about the wine-cvs
mailing list