[BACK]Return to developers.pl CVS log [TXT][DIR] Up to [Development] / xfs-cmds / xfsmisc

File: [Development] / xfs-cmds / xfsmisc / Attic / developers.pl (download)

Revision 1.14, Mon Feb 12 14:36:20 2007 UTC (10 years, 8 months ago) by tes.longdrop.melbourne.sgi.com
Branch: MAIN
Changes since 1.13: +9 -0 lines

Another round of script changes for the push of xfs changes into mainline
git tree for 2.6.21-rc1. In particular use quilt to handle the patches
for p_mod2git (generated by p_rdiff -M) to make life easier when we need
to do a manual fixup. modlist_apply now knows about quilt patches and will
reuse them if it finds them so that we can start and stop without hassles.
Also have made the output of modlist_sort2 a lot briefer and less scary and
removed the final "order" field. Have introduced "DONE" and "SKIP" final fields
in the modlist file so that we can handle restarts of modlist_apply simply when
the patch doesn't apply as it should. Will update the web page about this.
Also added git-create-email2 which does not use a commitset to do its work but
instead uses HEAD and a given prior-commitid or FETCH_HEAD, to use for its commit
range. The commitset idea was becoming a nuisance for me and errorprone.
Merge of master-melb:xfs-cmds:28080a by kenmcd.

  Add 4 more developers to the list.

package developers;
use strict;

# Username to real name mapping for people who are to blame^W^W
# checking XFS mods into the xfs-kern/xfs-cmds/dmapi ptools trees.
my %names = (
	'arunr',	'Arun Ramakrishnan',
	'alkirkco',	'Mandy Kirkconnell',
	'bobo',		'Bob Kierski',
	'bnaujok',	'Barry Naujok',
	'cattelan',	'Russell Cattelan',
	'chatz',	'David Chatterton',
	'donaldd',	'Donald Douwsma',
	'dgc',		'David Chinner',
	'ebiederm',	'Eric W. Biederman',
	'gdc',		'David Chinner',
	'felixb',	'Felix Blyakher',
	'gnb',		'Greg Banks',
	'gwehrman',	'Geoffrey Wehrman',
	'kjamieson',	'Kevin Jamieson',
	'lachlan',      'Lachlan McIlroy',
	'hch',		'Christoph Hellwig',
	'olaf',		'Olaf Weber',
	'overby',	'Glen Overby',
	'nathans',	'Nathan Scott',
	'nscott',	'Nathan Scott',
	'ralf',		'Ralf Baechle',
	'tes',		'Tim Shimmin',
	'wkendall',	'Bill Kendall',
	'yingping',	'Yingping Lu',
	'vapo',		'Vlad Apostolov',
	'sandeen',	'Eric Sandeen',
	'sjv',		'Sam Vaughan',
	'stripathi',	'Shailendra Tripathi',
	't-nagano',	'Takenori Nagano',
	'torvalds',	'Linus Torvalds',
	'michal.k.k.piotrowski', 'Michal Piotrowski',

);

# Foreign domains = non-sgi
# all other names are assume to be @sgi
my %domains = (
	'cattelan',	'thebarn.com',
	'sandeen',	'sandeen.net',
	'nscott',	'aconex.com',
	'stripathi',	'agami.com',
	't-nagano',	'ah.jp.nec.com',
	'torvalds',	'linux-foundation.org',
	'michal.k.k.piotrowski', 'gmail.com',
	'hch',		'infradead.org',
	'kjamieson', 	'bycast.com',
	'ebiederm',	'xmission.com',
	'ralf', 	'linux-mips.org',
);

sub developer_check {
	my $username = shift @_;
	if (!defined($names{$username})) {
		die "unknown developer: $username";
	}
}

sub developer_name {
	my $username = shift @_;
	developer_check($username);
	$names{$username};
}

sub developer_email {
	my $username = shift @_;
	my $domain = $domains{$username};
	developer_check($username);
	$username . "@" . ($domain ? $domain : 'sgi.com');
}

sub developer {
	my $username = shift @_;
	my $email = developer_email($username);
	$names{$username} . ' <' . $email . '>';
}

#
# Usage:
# &developers::reviewers($treedir, $modid);
#
sub reviewers() {
	my $treedir = shift @_;
	my $modid = shift @_;
	my $rev;
	my @revs;
	my $rev_line;
	my $revsign;
	my %reviewers;

	my $cwd = $ENV{'PWD'};
	chdir $treedir;
	open MODINFO, "p_modinfo -b -H Inspected $modid |" or die "modinfo";
	while ($rev_line = <MODINFO>) {
		# space or comma delimited per line
		chomp($rev_line);
		@revs = split(/[ ,]+/, $rev_line);
		foreach $rev (@revs) {
			$rev =~ s/([-.0-9a-z_A-Z]+).*$/$1/;
			$revsign = &developers::developer($rev);
			$reviewers{$rev} = $revsign;	
		}
	}
	close MODINFO;

	chdir $cwd;
	%reviewers;
}

#
# Usage:
# &developers::author($treedir, $modid);
#
sub author()
{
	my $treedir = shift @_;
	my $modid = shift @_;
	my $author;

	my $cwd = $ENV{'PWD'};
	chdir $treedir;
	open MODINFO, "p_modinfo -b -H Author $modid |" or die "modinfo";
	$author = <MODINFO>;
	close MODINFO;
	chdir $cwd;

	# extract the username
	chomp($author);
	$author =~ s/([-.0-9a-z_A-Z]+).*$/$1/;

	$author;
}

1;