KBEC-00131 - Perforce postp Matcher

Perforce Matcher

 push (@::gMatchers,
{
id => "p4checkout",
pattern => q{ - added as },
action => q{incValueWithString("summary", "Synched 0 files" );},
},
{
id => "p4NoClobber",
pattern => q{Can.t clobber},
action => q{incValue("warnings"); diagnostic ("P4 Sync", "warning");},
},
{
id => "p4makedir",
pattern => q{Creating},
action => q{incValueWithString("summary", "0 checkout dirs" );},
},
{
id => "p4delclient",
pattern => q{Client.*.deleted},
action => q{incValueWithString("summary", "0 client deleted" );},
},

);

sub incValueWithString($;$$) {
my ($name, $patternString, $increment) = @_;

$increment = 1 unless defined($increment);

my $localString = (defined $::gProperties{$name}) ? $::gProperties{$name} :
$patternString;

$localString =~ /([KBEC-00131 - Perforce postp Matcher^\d]*)(\d+)(.*)/;
my $leading = $1;
my $numeric = $2;
my $trailing = $3;

$numeric += $increment;
$localString = $leading . $numeric . $trailing;

setProperty ($name, $localString);
}
Have more questions? Submit a request

Comments

Powered by Zendesk