[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Checking out parts of a repository

From: David Weintraub <qazwart_at_gmail.com>
Date: Wed, 13 Aug 2008 11:32:18 -0400

Thanks for the question and answer. I was about to ask this very same
question. I am working on both the trunk and one branch of a module,
and I was interested in having the trunk and the branch in the same
Subversion work area. I couldn't checkout everything because that
would include all branches and tags, but using:

$ svn co -N http://subversion/dev/modules/adapter

wasn't working because it didn't checkout anything since there were no
files to checkout.

However, the --depth parameter worked like a charm. I first checkedout
the module:

$ svn co --depth=immediates http://subversion/dev/modules/adapter
A adapter/trunk
A adapter/branches
A adapter/tags
Checked out revision 18852.

That got the trunk, branches and tags directory with no files in them.
I then did this:

$ cd trunk
$ svn update --depth=infinity

That checked out the entire trunk. I had to use --depth=infinity, or
otherwise the update didn't add any files to the workspace. This is
expected behavior. Otherwise, if I did an update from the "adapter"
directory, it would add all branches and tags to my working directory.

I then cd to the branches directory and did this:

$ cd ../branches
$ svn update ADAPTER-1.4

By just specifying the branch I needed, I did not need to add the
--depth parameter.

Now, I have the adapter module checked out in trunk and in the
ADAPTER-1.4 branch in the same workspace.

If I change the build.xml file in both trunk and ADAPTER-1.4, I get
the following report

cd ../../adapter
$ svn status
M trunk\build.xml
M branches\ADAPTER-1.4\build.xml

So, Subversion is able to find all the changes in the trunk and
branch. "The "svn commit" and "svn update" commands also seem to be
able to pick up all the changes in both trunk and branch. The only
issue was doing an "svn info":

$ svn info
Path: .
URL: http://subversion/dev/modules/adapter
Repository Root: http://subversion/dev
Repository UUID: cb0c1f1c-73bb-4771-bfa1-579f06a7769d
Revision: 18852
Node Kind: directory
Schedule: normal
Depth: immediates
Last Changed Author: svnant
Last Changed Rev: 18852
Last Changed Date: 2008-08-13 10:44:10 -0400 (Wed, 13 Aug 2008)

$ cd branches
$ svn info
Path: .
URL: http://subversion/dev/modules/adapter/branches
Repository Root: http://subversion/dev
Repository UUID: cb0c1f1c-73bb-4771-bfa1-579f06a7769d
Revision: 18852
Node Kind: directory
Schedule: normal
Depth: empty
Last Changed Author: dweintraub
Last Changed Rev: 18850
Last Changed Date: 2008-08-13 10:37:51 -0400 (Wed, 13 Aug 2008)

Notice the "Depth" reported is still set to "immediates" and "empty"
even though that's not quite true anymore.

--
David Weintraub
qazwart_at_gmail.com
On Wed, Aug 13, 2008 at 10:35 AM, Benjamin Smith-Mannschott
<bsmith.occs_at_gmail.com> wrote:
>
> On Aug 13, 2008, at 16:18, Robert Jones wrote:
>
>> Is it possible to check out several parts of repository, but still handle
>> them as a single checkout, eg
>>
>> top/dir1/...
>> top/dir2/...
>> top/dir3/...
>> top/dir4/...
>>
>> Now, all of these are big, and I know my changes will only affect dirs 2 &
>> 4,
>> but these changes are linked, so I do want to commit my changes as a
>> single commit.
>>
>> I know I could descend into dir2 and pull out part of the repository, and
>> the same in dir4, but then at the 'top' level there would be no connection
>> between them.
>>
>> So, can I be at the 'top' level, and just checkout dirs 2 & 4, and then
>> subsequently
>> commit changes in both dirs in one commit?
>>
>> - Rob.
>
> Sparse checkouts (new in 1.5), perhaps?
>
> http://subversion.tigris.org/svn_1.5_releasenotes.html#sparse-checkouts
>
> http://svnbook.red-bean.com/nightly/en/svn.advanced.sparsedirs.html
>
> // Ben
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: users-help_at_subversion.tigris.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-08-13 17:32:52 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.