ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <DDevie...@lgc.com>
Subject RE: Getting root directory from Perforce client spec
Date Fri, 25 Feb 2005 21:16:32 GMT
> From: Suzanne Dorman [mailto:suzanne.dorman@segllc.us]
> 
> I'm converting my build from VSS to Perforce.  I have already
discovered
> that Perforce uses the client spec to identify the local workspace
(i.e.
> what local directory the files will be written to).
> 
> But now I need to know the name of that directory to proceed with my
> build.
> I can get the root from the client spec via the p4 client command but
I
> don't know how to get that information into Ant.  If I use <exec> to
run
> the
> command, the output will go to a file but then what?  I'm on Windows
so I
> don't see how I can do a grep or sed to get the contents of the
string.
> 
> I can't be the only person having this problem with Perforce, right?
Or
> am
> I way off base here?
> 
> Also, I'm sorry if this has already been answered but for some odd
reason,
> I
> can't do a search on 'p4' in this user list.  It strips 'p4' off of my
> search criteria.
> 
> Thanks in advance for any help.

<exec> has an outputproperty attribute, no?

If you need to do some processing on the output to get what you want,
then you could use the <redirector> stuff, with filters (I just knows
this exists now, I've never used it), but it may not be in a released
version. An approach you can do now is <exec> to a file. Then <loadfile>
it with a <filterchain>. You should be able to get what you want in a
cross-platform manner, using the appropriate filters. --DD

PS: Of course, another approach is to create a small task or a <script>
or <scriptdef>, but using a real programming language.

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


Mime
View raw message