Hi,

I'm trying to write an Ant target that will delete all files under a given
directory that are not under Perforce version control.  My plan was to use
'p4 have' to create an exclude list which I could then pass to the <delete>
task.  

On my win2k box, 'p4 have' will return output that looks like

  //project/version/foo.java#1 - d:\project\build\foo.java

which I can pipe through sed to get just

 d:\project\build\foo.java

So I tried this in my ant task:

 <exec executable = "p4" outputproperty = "shipFilesPerfoce">
    <arg line = "have ship\... | sed -e 's/.*\#.*- //' "/>
 </exec>

but exec is stripping the quotes from my sed command, at least that's how it
looks with ant -v, and I'm getting back the output of p4 have unfiltered.
And since <delete> doesn't support a <mapper> (I wonder why that is?), I
can't figure out how to filter the output from inside Ant.

Even if I could get the above to work, I'm not sure how I'd get the contents
of 'shipFilesPerforce' into a form that excludes will take.

As you can see, I'm quite lost. Can anyone suggest a sane way to approach
this problem?

Thanks.

-- Steve __

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to