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

How do a branch/switch a single file?

From: Brian Huddleston <brianh_at_huddleston.net>
Date: 2005-05-04 00:02:01 CEST

The svn book mentions:

"In other words, if a user knows that the branch-work only needs to happen
on a specific subdirectory, they use svn switch to move only that
subdirectory to the branch. (Or sometimes users will switch just a single
working file to the branch!) That way, they can continue to receive normal
"trunk" updates to most of their working copy, but the switched portions
will remain immune (unless someone commits a change to their branch). This
feature adds a whole new dimension to the concept of a "mixed working
 copy"-not only can working copies contain a mixture of working revisions,
but a mixture of repository locations as well."

I'm wondering exactly how you would go about switching a single file?

Assuming I have a working copy from svn+ssh://machine/trunk


And I want to "branch" b.txt to

The svn book seems to imply that I can branch only that single b.txt file
while keeping a.txt and c.txt on the trunk.

So the branching operation seems easy:

svn cp b.txt svn+ssh://machine/user/bhuddleston/workspace

But how do I "switch" only b.txt to

Basically the desired behavior is that when I run svn up, a.txt and b.txt
are updated from the trunk, but b.txt stays switched to the workspace dir.

I don't see the syntax in svn switch that allows you to specify a file
unless I am missing something.


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed May 4 00:04:28 2005

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.