ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clifton C. Craig" <...@icsaward.com>
Subject Re: Help! P4Change.execute hangs the process
Date Fri, 05 Mar 2004 20:05:18 GMT
I've revised the code to call the perform method on the task instead of 
the execute method. I even set the owning target to my custom task's 
owning target. Nothing is working. I've tried both creating the task 
directly and asking the project to create the task for me. See below:
        if(checkout)
        {

            P4Change change = new P4Change();
//            P4Change change = (P4Change) 
getProject().createTask("p4change");
            change.setProject(getProject());
            change.setOwningTarget(getOwningTarget());
            change.setDescription("Auto source update for version 
strings.");
            change.perform();
        }

What gives? What am I missing? Help!

Clifton C. Craig, Software Engineer
Intelligent Computer Systems -  A Division of GBG
2101 Embassy Drive
Lancaster, PA  17603

Phone:  717-295-7977 ext. 621
Fax:  717-295-7683
ccc@icsaward.com
ccraig@gbg.com 



Clifton C. Craig wrote:

> I'm using Ant 1.6.0 and I'm trying to automate a checkout by creating 
> an instance of the p4change task within another task. I instantiate it 
> by calling Project.createTask("p4change") and set a description via 
> the setDescription method. I then call execute and it causes the 
> process to hang. I'm missing something that the Ant runtime must do 
> when invoking the task because if I code it manually into a build file 
> it works just fine. I don't see what I'm missing but it's gotta be 
> something. I don't see any addiitional attributes that need setting; 
> nothing that sticks out at least. My 1st inclination was to call 
> setProject on P4Change assuming that the tasks project had not been 
> set properly. That didn't help. Niether did setting the view to my 
> depot base folder. I know what's happening. The process is blocking 
> for input on the getEmptyChangelist() method. What is the difference 
> between the way my task creates p4change and the way the Ant runtime 
> creates and uses p4change? This is a snippet of my code:
>        if(checkout)
>        {
>            P4Change change = (P4Change) 
> getProject().createTask("p4change");
>            change.setProject(getProject());
>            change.setDescription("Auto source update.");
>            change.execute();
>        }
>
> The checkout variable is an attribute passed into my custom task that 
> controls conditional checkout. This same concept works with other 
> Perforce tasks. I've tried it with p4edit, p4add, and p4reopen. I use 
> all of them the same way from within my custom task. The only task 
> that I can't seem to use is p4change. What am I missing? Help!
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message