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

How to trim working copy tree?

From: Tim Hill <tim_at_realmsys.com>
Date: 2006-03-25 01:35:31 CET

I seem to have stumbled on a missing command in Subversion (or, of
course, my brain is just dead again!)...

Assume I have a repo with two folders: foo and foo/bar (that is, bar is
a child of foo). Now I do the following:

>>> svn checkout SOME-URL/foo -N

OK, so I now have foo in a working copy, but not bar (yet). If I now do
an "svn update" on foo, I'll get updates to foo but svn won't attempt to
also grab bar (which, I think, is correct).

OK, now let's add bar:

>>> cd foo
>>> svn update SOME-URL/foo/bar

This should add bar to the WC as a child of foo, which indeed it does.
So far, so good. From now on, svn update will update both foo and bar,
which is good :)

Now for the problem. Let's say I want to get rid of bar (from the WC
only, not the repo), so I'm only working with foo again and not its
child. How do I do this? It's not svn delete, since that deletes in the
repo. And it's *not* as simple as a regular folder delete, because foo
now "knows" about bar (in the .svn folder) and the next svn update will
fetch the contents again.

In other words, I want to get back to the state after the first command
above, with just the foo folder and no bar. But I don't see any way of
erasing foo's memory of bar from the WC, aside from dumping the whole WC
and starting from scratch.

Any comments? I keep hitting against this when fetching tags, and then
can't get rid of the older tags I didn't want.

--Tim

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Mar 25 01:36:24 2006

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