subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Schmidt <>
Subject Re: Chkeckout only a portion of a repoistory
Date Wed, 11 May 2011 10:32:40 GMT
On May 10, 2011, at 20:22, Gavin Beau Baumanis wrote:

> We have a web application that uses Jenkins CI for keeping our staging server up to date
via svn update.
> Due to not thinking abut it  properly in the beginning,
> The staging site is actually a working copy of the entire repo (branches and tags included)
> We however, only require the trunk.
> Is there a way, so that I can remove the branches and tags from a working copy, leaving
the trunk in place AND
> not have any subsequent updates replace the now missing directories and still have a
clean WC?
> My initial thought is no,
> And it is relatively easy to just blow-away the entire WC and just checkout the trunk
> But it will cause some downtime that I'd like to avoid if possible.

Before Subversion 1.7, this is very easy, since each subdirectory of a working copy is itself
a complete self-contained working copy.

Let's say your working copy is at /path/to/wc (it contains directories trunk, branches, tags)
and you (or this Jenkins thing) are currently updating it by running "svn up /path/to/wc".
So instead just run (or tell Jenkins to run) "svn up /path/to/wc/trunk". Voila, you're only
updating the trunk. You can now remove (using your normal OS commands, not svn commands) the
branches and tags directories to save space. You can even remove the hidden /path/to/wc/.svn
directory, and then /path/to/wc will not even be a working copy anymore, it'll just be a regular
directory (/path/to/wc/trunk will be the remaining working copy).

As of Subversion 1.7, working copy metadata will be consolidated in the root of the working
copy, so this kind of working copy dissection will no longer be as straightforward to do.

View raw message