Ian
Martin Aliger wrote:
Hi all,
Here are patches to enable all stuff we discussed. I haven't any test cases and docs are missing in most places as well. If you like the patch I'll add that!.
Now script like this:
<fileset id="1"> <includes name="1"/> <includes name="3"/> </fileset>
<fileset id="1" mode="replace"> <includes name="2"/> <includes name="4"/> </fileset>
<fileset id="1" mode="append"> <includes name="1"/> <includes name="5"/> </fileset>
will define fileset with id "1" with items 2,4,1,5 (in order). Merged items are in AsIs field of original fileset so merges with different basedirs/excludes/whatever should work.
Script also enable to (re)define types in <if> and <foreach> subtasks. Executing tasks/types in project level, target level and container level is unified to new function in Project.cs (ExecuteNode) [cleaning of code]
Currently no more types that FileSet support merge but enable that is straighforward. Just override method MergeWith (defined in BaseType). Base method just throws BuildException.
Martin
----- Original Message ----- From: "Ian MacLean" <[EMAIL PROTECTED]>
To: "Jaroslaw Kowalski" <[EMAIL PROTECTED]>
Cc: "Martin Aliger" <[EMAIL PROTECTED]>; "! nant"
<[EMAIL PROTECTED]>
Sent: Monday, January 05, 2004 2:04 PM
Subject: Re: [nant-dev] filesets
re-define f1 fileset -->The method Martin proposed has been discussed before. It would be tidier from a user point of view to allow adding to filesets without a seperate task - maybe using the mode attribute on the fileset itself
<fileset id="f1" basedir="c:\temp\foo" mode="append | replace" > <!--
the raw xml of the old "f1" fileset with that of the new definition and<includes name="item1"/> <includes name="item2"/> </fileset>
Martin - how does your implementation perform the merging ? Do you merge
instantiate a new fileset instance based on that ?
Ideally this would work for all "dataTypes" - not just filesets. If itsdoable for filesets doing it for all datatypes won't be much more work.
Ian"add"
Jaroslaw Kowalski wrote:
How about a <modify-fileset> task? Like this:
<modify-fileset id="f1" mode="add | delete | replace"> <fileset> </fileset> </modify>
It would take either "replace" the f1 with the contents of <fileset>,
IBM'snew items or "delete" matching items.
Jarek
----- Original Message ----- From: "Martin Aliger" <[EMAIL PROTECTED]>
To: "! nant" <[EMAIL PROTECTED]>
Sent: Monday, January 05, 2004 12:13 PM
Subject: [nant-dev] filesets
Hi all,fileset
this snippet: <if test="${1==1}"> <fileset id="f1" basedir="c:\temp\foo"> <includes name="item3"/> </fileset> </if> is currently not possible because type definitions are allowed only at project or task level. Is it intended or should we allow this as well?
I'm working on extension that will allow this: <fileset id="f1" basedir="c:\temp\foo"> <!-- define f1 fileset --> <includes name="item1"/> <includes name="item2"/> </fileset>
<if test="${1==1}"> <fileset id="f1" basedir="c:\temp\foo"> <!-- extend existing f1
with new item --> <includes name="item3"/> <includesFileset refid="f1"/> </fileset> </if>
that means - extending existing filesets. Use in the foreach is also possible... What do you think about that?
Martin
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for
admin.Free Linux Tutorials. Learn everything from the bash shell to sys
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers
------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers
-- Ian MacLean, Developer, ActiveState, a division of Sophos http://www.ActiveState.com
------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers
--
Ian MacLean, Developer, ActiveState, a division of Sophos
http://www.ActiveState.com
------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers
