Hi,
The existing Ant Pvcs task provides Get functionality. I have added support for Versioning and Promotion. I have also added additional Get functionality.
The classes are as follows:
PvcsListTask.java, superclass that generates a list of archives/workfiles for the specified project(s), and calls processList() implemented by subclasses.
PvcsGet.java, subclass of PvcsListTask for performing get's from the repository. This class and the superclass take a lot of their code from the existing Pvcs.java, and support all the existing functionality (although some of the argument names have been changed).
PvcsVersion.java, subclass of PvcsListTask for assigning version labels to the repository.
PvcsPromote.java, subclass of PvcsListTask for promoting from the specified promotion group.
All the options for these tasks are in the attached documentation, but basically you can now do things like the following:
- Get from Development Promotion Group
- Build
- Promote Development Promotion Group (to SystemTest)
- Promote SystemTest Promotion Group (to Production)
- Assign version label to Production Promotion Group (e.g. release 1.4)
obviously with some testing inbetween :)
I decided to replace Pvcs.java because I felt it would be confusing to maintain this as the Get task when there were tasks called PvcsPromote etc., and also because I renamed some of the arguments (e.g. label becomes revision now that both revisions and versions are supported). I do not know whether this is the correct way to do things, and whether Pvcs.java should be deprecated, removed or delegate to PvcsGet.
I've tested with JDK 1.3.0 on Solaris and JDKs 1.3.0 & 1.1.8 on Win2K.
As this is my first Ant development I'd appreciate feedback on how this can be improved (and on what I've done wrong). I've only implemented the PVCS features that are useful to me, but there's quite a bit more that could be added. Also, I'm not 100% sure if this is how I should be posting this message!
Also attaching an example of some of the tests I've done (tests.xml).
Regards,
Andrew
<<attachment: tasks.zip>>
