cvs - checking out select files and directories

3 messages Options
Embed this post
Permalink
Lidia Marchioni

cvs - checking out select files and directories

Reply Threaded More More options
Print post
Permalink
Hi all

I would like to use hudson's cvs functionality, however, I need to be
able to check out specific files and directories rather than modules.  
Is it possible?  Right now, I'm getting the following error:

cvs server: cannot find module `appserver-sqe/pe/config.properties,appserver-sqe/pe/build.xml,appserver-sqe/pe/build-config,...

We are using targets in bootstrap.xml to check out parts of the
workspace we need using ant, and in hudson it's done in a shell script.  
I wanted to replace this approach with just cvs, but other than checking
out the entire workspace, I don't see a way of doing this in hudson.

Thanks
Lidia


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

David Weintraub

Re: cvs - checking out select files and directories

Reply Threaded More More options
Print post
Permalink
In CVS, a "module" is just a directory, so you can specify each directory to checkout (of course the checkout is recursive, so all subdirectories are also checked out too).

Are you literally picking out a file here and a file there to checkout? Is it because it takes too long to do a clean checkout in CVS, or your repository isn't laid out too cleanly, and you literally only want a file here and there?

I suspect since this isn't a standard way to use CVS, Hudson cannot do it. You will have to do the checkout as part of your build.xml. This isn't really a big issue since many continuous build products like CruiseControl expect the checkout to be part of your build script. Besides, you already stated that's the way you do it anyway.

The problem is that when Hudson detects a change, it automatically assumes you want a checkout. You can get around this by not having Hudson poll your revision control system. Instead, you do this via a Windows schedule task or a Unix/Linix cronjob. When your schedule task/cronjob detects a need for a new build, it uses "wget" to hit the Hudson build URL to fire off the build.

By the way, why use a shell script to do the checkout when they're already part of your Ant targets? You can specify an additional build step in order to hit multiple Ant files. The first build step is hitting the checkout targets in bootstrap.xml, the second step is actually executing the build in your build.xml.

On Tue, Nov 3, 2009 at 1:36 PM, Lidia Marchioni <[hidden email]> wrote:
Hi all

I would like to use hudson's cvs functionality, however, I need to be able to check out specific files and directories rather than modules.  Is it possible?  Right now, I'm getting the following error:

cvs server: cannot find module `appserver-sqe/pe/config.properties,appserver-sqe/pe/build.xml,appserver-sqe/pe/build-config,...

We are using targets in bootstrap.xml to check out parts of the workspace we need using ant, and in hudson it's done in a shell script.  I wanted to replace this approach with just cvs, but other than checking out the entire workspace, I don't see a way of doing this in hudson.

Thanks
Lidia


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




--
David Weintraub
[hidden email]
Lidia Marchioni

Re: cvs - checking out select files and directories

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Hi David

Thanks for input.  Answers/comments below...

David Weintraub wrote:
In CVS, a "module" is just a directory, so you can specify each directory to checkout (of course the checkout is recursive, so all subdirectories are also checked out too).

Are you literally picking out a file here and a file there to checkout? Is it because it takes too long to do a clean checkout in CVS, or your repository isn't laid out too cleanly, and you literally only want a file here and there?
The repository is not laid out well, and I need to get some files from the top level, apart from modules.

What we do currently, is wipe out the entire workspace for each run and checkout clean.  I was hoping to be able to relay on hudson doing cvs updates instead.  If that's not possible with our layout of the workspace, then I'll stick with having checkout as part of shell script execution, since it does the rest of the job anyhow...  I have better control over the environment when I execute everything from one shell script.  I'm not sure what I would be getting by splitting our tasks into separate build steps, calling ant multiple times directly from hudson.

Thanks
Lidia

I suspect since this isn't a standard way to use CVS, Hudson cannot do it. You will have to do the checkout as part of your build.xml. This isn't really a big issue since many continuous build products like CruiseControl expect the checkout to be part of your build script. Besides, you already stated that's the way you do it anyway.

The problem is that when Hudson detects a change, it automatically assumes you want a checkout. You can get around this by not having Hudson poll your revision control system. Instead, you do this via a Windows schedule task or a Unix/Linix cronjob. When your schedule task/cronjob detects a need for a new build, it uses "wget" to hit the Hudson build URL to fire off the build.

By the way, why use a shell script to do the checkout when they're already part of your Ant targets? You can specify an additional build step in order to hit multiple Ant files. The first build step is hitting the checkout targets in bootstrap.xml, the second step is actually executing the build in your build.xml.

On Tue, Nov 3, 2009 at 1:36 PM, Lidia Marchioni <[hidden email]> wrote:
Hi all

I would like to use hudson's cvs functionality, however, I need to be able to check out specific files and directories rather than modules.  Is it possible?  Right now, I'm getting the following error:

cvs server: cannot find module `appserver-sqe/pe/config.properties,appserver-sqe/pe/build.xml,appserver-sqe/pe/build-config,...

We are using targets in bootstrap.xml to check out parts of the workspace we need using ant, and in hudson it's done in a shell script.  I wanted to replace this approach with just cvs, but other than checking out the entire workspace, I don't see a way of doing this in hudson.

Thanks
Lidia


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




--
David Weintraub
[hidden email]