You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by ep...@mailblocks.com on 2005/08/16 19:25:41 UTC

Dependencies in reverse?

I'm trying to write a target that will update files from a version 
control system called "Razor", which is SCCS-based.  I have one 
directory, some-path/SCCS, which is a tree of version control files, 
and one directory other-path/src, which contains the corresponding 
source files.  What I would like to do is update the files in src 
(using the Razor program) whenever the file in SCCS is newer.  The 
filenames under the two trees are the same except that the SCCS files 
start with s., so I need to do some kind of mapping.   Three 
complicating factors are:
      1) I want to update (check out) newly introduced files that exist 
only in SCCS
     2) I want to skip directories that don't exist in src
      3) The file name that I give to the razor command needs to be the 
src filename (without the s.)

I've been playing with this for a bit, and it looks like I should be 
able to get the list of newer files using the "depend" selector.  
However, I think that like will give me the list of newer files in the 
SCCS directory, and in order to run the "razor" command, I need the 
list of corresponding files under the src directory.

Is there some way to use a mapper to translate one list of files into 
another?

And, how would I generate a list that skips over the directories that 
don't exist under src?

(Should I just give up and write a perl script?)

Thanks!
       --Paul

----------------------------------------------
Mailblocks - A Better Way to Do Email
http://about.mailblocks.com/info


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


RE: Dependencies in reverse?

Posted by Dominique Devienne <dd...@gmail.com>.
> From: eph1v3t8-antu9688@mailblocks.com [mailto:eph1v3t8-
> 
> Is there some way to use a mapper to translate one list of files into
> another?
> 
> And, how would I generate a list that skips over the directories that
> don't exist under src?
> 
> (Should I just give up and write a perl script?)

Perhaps, if you already know Perl well. I would myself write a custom
selector (or task) in either Java code directly, or as a <script> in
JavaScript. It may be possible to coerce existing Ant tasks to achieve your
goal, but I suspect it would be difficult and ugly.

Better to design a custom fit solution IMHO. In Perl (you could <exec> it
;-) or in Ant. It's not difficult to extend Ant. Just give it a try. --DD

PS: In Ant 1.7 (CVS HEAD), you can directly script custom selectors.
    Prior to that (1.6.x), you can only script tasks. (AFAIK)


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