4 $ENV{'P4PORT'} ||= 'bactrian:1667';
5 $ENV{'P4CLIENT'} ||= 'ni-s';
6 open(FILE,$file) || die "Cannot open $file:$!";
9 if (/^(From|Subject|Date|Message-ID):(.*)$/i)
14 my @results = `patch @ARGV <$file 2>&1`;
17 warn "$code from patch\n";
20 if (/[Pp]atching\s+file\s*(\S+)/)
25 my @have = `p4 have @edit`;
29 System("p4 edit @edit");
30 open(PIPE,"|p4 change -i") || die "Cannot open pipe to p4:$!";
31 print PIPE "Change: new\n";
32 print PIPE "Description:\n";
33 foreach my $key (qw(Subject From Date Message-Id))
35 if (exists $meta{lc($key)})
37 print PIPE "\t$key: ",$meta{lc($key)},"\n";
38 print "$key: ",$meta{lc($key)},"\n";
41 print PIPE "Files:\n";
55 System("p4 refresh @edit");
61 my $cmd = join(' ',@_);