[p4] Ant and p4.change property not getting set

Branko Peteh branko at sidestep.com
Tue Jul 25 09:43:14 PDT 2006

Problem solved!

Posting the solution here, so that may be some day it will help someone,
should they find themselves in the same situation.

The problem was that the client was being set via the property file, and
there was a trailing blank at the end. Once I ran ant with -debug and
-verbose, I saw the blank:

 [p4change] Executing 'p4' with arguments:
 [p4change] '-pperforceHost'
 [p4change] '-uperforceUser'
 [p4change] '-cperforceClient '
                             ^<-- offending blank!!!
 [p4change] 'change'

To me this is still a problem, as there is no message, or exception or
anything -- just silent ignoring of the problem, but that's another topic!

Thanks to all who offered their help!

-----Original Message-----
From: Niggemyer, Kendall [mailto:bniggemyer at sabercorp.com] 
Sent: Tuesday, July 25, 2006 6:44 AM
To: Branko Peteh; perforce-user at perforce.com
Subject: RE: [p4] Ant and p4.change property not getting set

Haven't checked on the status of this bug for a few years so I guess if you
are hitting it then it must still be around.  What version of ANT are you

What I do is when I get the value for ${p4.change} I write it out to a file.
When I need the value again I read it back in.  Hackey, but it works.

-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Branko Peteh
Sent: Monday, July 24, 2006 8:17 PM
To: perforce-user at perforce.com
Subject: [p4] Ant and p4.change property not getting set


I'm running into the same problem, as posted few years ago:


According to the ant manual for perforce tasks, the p4change command for
requesting new changelists is supposed to set ${p4.change} property, which is
to be used in subsequent perforce tasks (p4edit, and p4submit). The problem
is that the property is not getting set and the subsequent p4 command, p4edit
in my case fails with:

[p4edit] error: Invalid changelist number '${p4.change}'.

Does anyone know what is wrong and what to do about it?

Many thanks,

perforce-user mailing list  -  perforce-user at perforce.com

More information about the perforce-user mailing list