You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Chris Lambrou <Ch...@grantadesign.com> on 2006/08/08 16:03:59 UTC

Updating the working copy for a continuous build process

Hi,
 
My development team is currently in the process of migrating from CVS to
SVN, and I'm trying to update our continuous build script.  Currently,
at the start of the script, our project's trunk folder is deleted, and
an update is then performed in order to retrieve a pristine copy of the
latest repository version.  This generally takes a long time, and I
can't help thinking that an incremental update would be quicker.  To
achieve this, I assume that I need to carry out the following steps to
the working copy of the trunk folder:

(1)  delete any local files not subject to version control (erases any
intermediate and output files generated by the previous build)
(2)  svn revert - Revert any modified files to the local repository
version (ensures the subsequent update won't result in any conflicts)
(3)  svn update - Obtain any modifications since the last time the build
script ran

Steps (2) and (3) shouldn't be a problem to implement, but can anyone
please suggest how I might implement step (1)?

Thanks,

Chris



P.S.  Will step (2) discard my local changes completely, or will
Subversion rename any locally modified files before reverting?  If so, I
may have to swap steps (1) and (2).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Updating the working copy for a continuous build process

Posted by Adrian Howard <ad...@quietstars.com>.
On 8 Aug 2006, at 17:03, Chris Lambrou wrote:
[snip]
> (1)  delete any local files not subject to version control (erases any
> intermediate and output files generated by the previous build)
> (2)  svn revert - Revert any modified files to the local repository
> version (ensures the subsequent update won't result in any conflicts)
> (3)  svn update - Obtain any modifications since the last time the  
> build
> script ran
>
> Steps (2) and (3) shouldn't be a problem to implement, but can anyone
> please suggest how I might implement step (1)?

Maybe combine with rsync? You should be able to do something like  
(untested):

svn up ci-working-copy;
rsync -a --delete --exclude '.svn' --delete-excluded ci-working-copy  
ci-build-copy
<do build in ci-build-copy>

Since you never build in ci-working-copy you should never have to  
worry about reverting, and the rsync will handle the removal of build  
stuff, reverting changed files, etc.

?

Adrian

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Updating the working copy for a continuous build process

Posted by Mark Bardsley <ma...@6sigmadc.com>.

Chris Lambrou wrote:

>Hi,
> 
>My development team is currently in the process of migrating from CVS to
>SVN, and I'm trying to update our continuous build script.  Currently,
>at the start of the script, our project's trunk folder is deleted, and
>an update is then performed in order to retrieve a pristine copy of the
>latest repository version.  This generally takes a long time, and I
>can't help thinking that an incremental update would be quicker.  To
>achieve this, I assume that I need to carry out the following steps to
>the working copy of the trunk folder:
>
>(1)  delete any local files not subject to version control (erases any
>intermediate and output files generated by the previous build)
>  
>
All our build output goes into a single "build" directory, so we can 
remove this before the build starts. None of the build ouput is under 
version control.

>(2)  svn revert - Revert any modified files to the local repository
>version (ensures the subsequent update won't result in any conflicts)
>  
>
There are never any local modifications in our continuous build working 
copy (all we do is build there), so svn revert is unnecessary.

>(3)  svn update - Obtain any modifications since the last time the build
>script ran
>
>Steps (2) and (3) shouldn't be a problem to implement, but can anyone
>please suggest how I might implement step (1)?
>
>  
>
So things are very simple the way we work here:
1) Remove build directory
2) svn update
3) build

Of course, you may have other requirements which mean this wouldn't work 
for you ...

Regards,
Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org