Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git2cl.pl « scripts - github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e2ff3edd0190b86e893d7a6cd0cbf51db3444190 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#! /usr/bin/perl -w
#
# Copyright 2005-2019 The Mumble Developers. All rights reserved.
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.

use warnings;
use strict;
use XML::Simple;
use Data::Dumper;
use Date::Parse;
use Text::Wrap qw(wrap fill);

open(LOG, "git log origin/master --date=short --pretty=format:'%h%x00%an%x00%ae%x00%ad%x00%s'|");
my %dates;
my %authors;
my $lsub = '';
while(<LOG>) {
  chomp();
  my ($hash,$author,$email,$date,$subject) = split(/\0/,$_);
  
  if ($author eq "Thorvald Natvig") {
    # Because someone forgets to set their git username on every platform...
    $email = 'slicer@users.sourceforge.net';
  }

  if ($subject =~ s/\s*\[([\w-]+)\]\s*$//) {
    $author = $1;
    $email = lc "$1\@users.sourceforge.net";
  }

  if (! exists($authors{$email})) {
    $authors{$email}=$author;
  }

  next if ($subject =~ /^Merge branch 'master/);
  next if ($subject =~ /^Indent and submodule update/);
  next if ($subject =~ /^Indent, changelog and submodule update/);
  next if ($subject =~ /^Indent, changelog, submodule and language update/);
  next if ($subject =~ /^Indent run/);
  next if ($subject =~ /^\*\*\* empty log message/);
  next if ($subject =~ /^git-svn-id: http/);
  next if ($subject =~ /^TEST/);
  next if ($subject =~ /^Merge pull request/);
  next if ($subject eq $lsub);
  $lsub = $subject;
  my $entry = wrap("    $hash  ", "             ", $subject);
  if (! exists($dates{$date})) {
    $dates{$date} = {};
  }
  if (! exists($dates{$date}{$email})) {
    $dates{$date}{$email} = ();
  }
  push @{$dates{$date}{$email}},$entry;
}
close(LOG);
open(C, ">CHANGES");
foreach my $date (reverse sort keys %dates) {
  print C $date."\n";
  my $h = $dates{$date};
  my $first = 1;
  foreach my $author (sort keys %$h) {
    print C "  ".$authors{$author}." <$author>\n";
    print C join("\n", @{$dates{$date}{$author}});
    print C "\n\n";
  }
}
close(C);