forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Brondsema <d...@brondsema.net>
Subject Re: [patch] faster, better copy-content
Date Thu, 24 Jul 2003 11:55:26 GMT
That's fine for now.  I would like to use <sync> for copy-content also, though.
 Can we change the structure in tmp/ to 

context/content/process
context/content/raw

IIRC, this is in alignment with the possible future directory structure. 
Nesting directories makes them difficult to work with, as is evidenced by my
attempt to use <sync>.

Also, the current src/ structure is flawed because of nesting.  copy-content
assumes that if there is a subdirectory called 'xdocs', it is
${project.xdocs-dir} and should be ignored.  What if I want a subdirectory
called 'xdocs' that is raw content?  Won't work; copy-content ignores it.  Or
what if I create a subdirectory called 'xml' and set ${project.xdocs-dir} to it?
 copy-content will erroneously include it as part of my content in addition to
copy-xdocs correctly copying it into the xdocs dir.

Therefore, I think content/process and content/raw should be siblings in the
tmp/ directory and in the src/ directory.  For now, I think it's possible to
implement this in the tmp/ directory.  In future releases, we can make it the
default for src/ if we want.

By the way, I chose the 'process' name instead of 'xdocs' since non-xml files
can be processed.  Anyone have an idea for a better name?  I'm not satisfied
that 'process' is the most intuitive.  Especially since you could put raw files
in the 'process' directory if you wanted to.

Quoting Juan Jose Pablos <cheche@che-che.com>:
> Dave,
> 
> Adding the patch on the copy-content adds a bug (people can run forrest 
> copy-content ).
> I know that this would be removed on the next version, so what about if 
> we only apply your patch on the copy-xdocs task only?
> 
> Cheers,
> Cheche
> 
> Dave Brondsema wrote:
> > Quoting Juan Jose Pablos <cheche@che-che.com>:
> > 
> > 
> >>Dave,
> >>
> >>
> >>>
> >>>Since 'xdocs' is a subdirectory of 'content', copy-content needs to
> execute
> >>
> >>before copy-xdocs otherwise the copy-content sync task will delete the
> >>'xdocs' dir.
> >>
> >>Ok, I will test this and apply soon, but then:
> >>
> >>
> >>    <target name="copy-content" if="real-content.present">
> >>..
> >>        <fileset dir="${project.real-content-dir}">
> >>          <exclude name="xdocs/**"/>
> >>        </fileset>
> >>
> >><exclude/> does not work?
> >>
> > 
> > 
> > That excludes 'xdocs' from the source.  If copy-xdocs already ran, the
> 'xdocs'
> > dir exists in the destination and is considered to be "hanging" by <sync>
> and is
> > deleted.
> > 
> > It could potentially get much worse if non-standard 'content' and 'xdocs'
> > locations are used.  If these directories weren't nested, writing the
> <sync>
> > tasks would be easier and they would be more efficient.
> > 
> 
> 
> 


-- 
Dave Brondsema
dave@brondsema.net
http://www.brondsema.net - personal
http://www.splike.com - programming

Mime
View raw message