ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Medcraft <>
Subject Problem with Perforce P4Change task (and solution)
Date Fri, 04 Jun 2004 13:07:54 GMT


I had a problem with the <p4change/> task where an extraneous number was
appended to the change number, e.g. the next change number in sequence 
should have been 19344 but the ${p4.change} property was set to 193441.

This was because we are using P4DTI to integrate Perforce with Bugzilla.
With this, any Bugzilla jobs assigned to a matched Perforce user are
automatically closed on a p4 submit unless they are set to "ignore".

The perforce server was returning "Change 19355 created fixing 1
job(s)." and the P4Change taskdef then gets rid of all non-numeric

line = util.substitute("s/[^0-9]//g", line); 
int changenumber = Integer.parseInt(line);

P4DTI adds lines to the change list after Description like this:

	bug1234 # Summary of bug
	bug1235 # Summary of another bug

I've added the following to P4Change.getEmptyChangeList() to remove the
P4DTI lines from the change list so that it doesn't mark any bugs as

} else if (util.match("/Jobs:/", line) 
	|| (util.match("/bug/", line) && util.match("/ # /", line))) {
	line = "";		    

Another option would be to have a Perforce user specified in the build
file that does not have a Bugzilla account and thus doesn't get any
"Jobs" lines in its change lists.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message