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

Re: How to Switch, or Update, a file that exists only in a branch ?

From: Les Mikesell <lesmikesell_at_gmail.com>
Date: Fri, 20 Feb 2015 10:02:47 -0600

On Fri, Feb 20, 2015 at 9:26 AM, Kerry, Richard <richard.kerry_at_atos.net> wrote:
> >
> Also, to follow up points in Les' response:
>> If you put your documents in directories and branch the directory instead
>> of doing individual file operations, you'll have a place to switch to when
>> you want to access the contents of that branch directory.
> I understand this.

Then I don't understand where you are expecting to switch to if you
don't create a containing directory. CVS stores branch/tag/revision
info inside individual files so it was possible to apply those
concepts to a single file - but much harder to hold project
directories together. Subversion moves the whole concept of
branches and tags into the paths in the repository. If you don't have
a different path (which translates to a directory) you can't have a
branch - or a tag.

>> For source code work, this almost always makes sense.
> Indeed - that's what I do for source code, where the folder makes sense as
> the "unit of interest".
>> If you are working on some random collection of individual files with no
>> natural structure for branch copies it might not.
> That's pretty much the situation I have here.
> Either it's a folder of miscellaneous configuration files or documents.
> Sorry if that wasn't clear from my explanations (below).

And perhaps what I didn't make clear was that since you can't switch
to a branch without a path to give it a name you have to create one.
You can branch (copy) the entire directory if you want, copies are
cheap. Or you can create the new branch directory and copy one or a
few files into it - but you'll have to remember where you put things.
Under a single path, you can only have revisions, and while you can
check out or update to any older revision, when you commit under that
path it can only go in as a newer revision number so that's not a
great way to work with multiple revisions in parallel. You could
(svn) copy the document to a different name in the same directory -
and both will retain the previous history to that point, but then you
wouldn't 'switch' to go between them, you would just use their
different names for as long as they co-exist.

   Les Mikesell
Received on 2015-02-20 17:04:00 CET

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.