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

RE: Switching a Single Working File to Another Branch

From: Pang, Stephen <spang_at_boh.com>
Date: 2005-09-16 21:43:06 CEST

Thank you for your response. I was able to switch the file to another
directory using the format of the command you provided. Based on the
documentation I have (Version Control with Subversion For Subversion 1.1
(book compiled from Revision 1337)) I wasn't adding the file name at the
end...I only had it in the URL. Adding the file name at the end allowed
me to switch the file.

The reason we are switching files is because we are using Visual Studio
.net and the directory under SubVersion control contains both project
and component files. Each developer may have their on version of the
project file but will use the same component files. What we have done
is to have a directory for the component files (which would also include
some version of the project files) and a separate directory for each
developer. The developer would initially check in the directory with
the component files, then switch the project file to their own
directory.

Assuming the project and component files cannot be put into separate
directories is there an easier way to manage this? Can the switching be
automated depending on the repository or directory being checked in?

Please let me know if this should be submitted as separate question.

Thank you very much for providing me with the information for the switch
command.

-----Original Message-----
From: Ben Collins-Sussman [mailto:sussman@collab.net]
Sent: Friday, September 16, 2005 2:43 AM
To: Pang, Stephen
Cc: users@subversion.tigris.org
Subject: Re: Switching a Single Working File to Another Branch

On Sep 15, 2005, at 7:49 PM, Pang, Stephen wrote:

> I am trying to switch certain files (not the entire directory)
> within my
> working copy
> to another branch but seem to only be able to switch directories. I
> have tried to put
> the file name after the directory but receive an error "svn: Cannot
> replace a directory from within".
> If I leave off the file name, the entire directory is switched.
>
> Can someone tell me what I am missing?

Can you actually show us a transcript? All you need to do is run:

   $ svn switch http://host/repos/branches/branch1/file1 file1

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Sep 16 21:44:59 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.