Actually, I just realized that this might have some undesirable
effects.  Since all the files are removed from the workspace, CC.NET
might show that all the files in the workspace were changed.  Instead
of doing this, you might want to do this in the regular <tasks>
section.  You would want to do 2 separate syncs .... the first to
remove the files and the second to get the latest revisions:

   p4 -c {workspace} -u {user} -P {password} sync //{workspace}/...#0
   p4 -c {workspace} -u {user} -P {password} sync //{workspace}/...

By doing this, the CC.NET dashboard will show the correct set of
modified files and you'll accomplish what you want.


On Dec 14, 10:29 am, kowrip <[email protected]> wrote:
> You can use an exec task in the pre-build stage to do this.  It's
> simple to do.  Just do a command such as:
>
>    p4 -c {workspace} sync //{workspace}/...#0
>
> If the username and password are not set in the env or in the
> registry, then you can specify them on the command line:
>
>    p4 -c {workspace} -u {user} -P {password} sync //{workspace}/...#0
>
> On Dec 13, 6:53 am, JamesQu <[email protected]> wrote:
>
>
>
> > Whether cruisecontrol support to exec some p4 operations before build?
>
> > For example, I want to "remove all files from workspace" and "get the
> > latest" before build.
>
> > Thanks a lot for your help.

Reply via email to