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

Re: How do I update a missing directory?

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-07-10 22:09:42 CEST

On Jul 10, 2007, at 10:50, Emin.shopper Martinian.shopper wrote:

> On 7/10/07, Andy Levy wrote:
>> On 7/10/07, Emin.shopper Martinian.shopper wrote:
>> > How do I update a missing directory? For example, assume that my
>> working
>> > copy has a directory foo with sub-directories A and B. I have
>> deleted foo/B
>> > using rm -r so that when I update foo, I don't have to wait for
>> all the
>> > updates to B. Now that I want to get updates to be, I'd like to
>> get foo/B
>> > back. Unfortunately, svn update foo/B says something like "At
>> revision 1500"
>> > but doesn't actually do anything. Also, "svn revert -R B" says
>> "Skipped 'B'.
>> Have you tried svn up foo?
> I don't want to do that because there is also another directory foo/
> C that I have removed with rm -r and I don't want to update right
> now (because it is big).

Then I think you're stuck. "svn up foo" is the answer.

You are not meant to be "rm -rf"ing directories like that.

There is a non-recursive checkout option -N which you could have used
initially to create your working copy and omit the large directories
B and C. You would have done "svn checkout -N url://to/repo/foo" and
then "svn up foo/A" (and similarly for any other directories you did
want). When you wanted B to show up, you would run "svn up foo/B".
Non-recursive checkouts are a bit broken still, but I believe they're
being fixed. "Sparse directories" is the name of the feature. That's
a good search string for the mailing lists if you want more info.

Another option you could have explored initially is checking out the
entire large working copy, then switching those directories you don't
want to an empty directory. First, make an empty directory in the
repo. You only need to do this once per repo:

svn mkdir url://to/repo/empty -m "make empty directory"


svn co url://to/repo/foo
svn switch url://to/repo/empty foo/B
svn switch url://to/repo/empty foo/C

Yes, this will download all of B and C initially, but as soon as you
switch them to the empty directory, the disk space is reclaimed, and
subsequent "svn update"s will not attempt to redownload them, until
you switch them back to their original URLs.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jul 10 22:09:48 2007

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.