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

Re: How to update a single file to HEAD revision?

From: Ryan Schmidt <subversion-2006Q1_at_ryandesign.com>
Date: 2006-01-26 15:24:01 CET

Don't forgot to reply to the list so everyone can benefit from the
discussion.

On Jan 26, 2006, at 14:49, Ganssauge, Gottfried wrote:

>>> I SEE!!
>>> It does contain the contents of revision 9's file - revision 9 in
>>> directory /branches/BRANCH_1/x!
>>> This probably should be an FAQ!
>>
>> Which part should be a FAQ? I think we're still talking about
>> fundamental Subversion functionality here. If you have a
>> working copy of the repository path /foo/bar (or
>> /branches/branch_1 or whatever) at revision 10, and now you
>> issue "svn up" and the repository is currently at revision
>> 30, then you receive all the changes that were made in
>> /foo/bar (or /branches/branch_1 or whatever) between
>> revisions 10 and 30. You don't receive any changes that were
>> made to / spam/eggs/sausage/and/spam or /trunk or any other
>> path, because as far as the repository is concerned, that has
>> nothing to do with your working copy of /foo/bar, regardless
>> of whether one may have at some point in the past been
>> created by copying the other.
>
> Now that you mention it ...
>
> Maybe I'm the only one coming from a CVS background having a hard time
> with this concept, but I don't really think so.
> It's spelled out in various places but somehow it didn't sink into my
> mind.
> The similarity of subversion commands to CVS doesn't exactly help here
> ...
> So something like
> How do I upgrade a file in a branch to the latest trunk release?
> Don't use "svn upgrade", use "svn switch" ...
> could make it into the FAQs.

Define "upgrade".

If you're in a working copy of the branch, and you use "svn switch"
to change a file to the trunk, the file in the branch directory in
the repository has not been changed at all. You've merely constructed
a working copy part of which still points to the branch and part of
which now points to the trunk. If you change the switched file and
commit, the trunk's file will be changed, not the branch.

If what you actually want is that the version that's in the branch
receives changes that were made in the version that's in the trunk,
then what you want is to merge those changes into the branch. Merging
is described in the book:

http://svnbook.red-bean.com/en/1.1/ch04s03.html

I do recommend reading the entire book. It certainly helped me
understand things. (It was my introduction to version control
systems; I hadn't used one before.) If reading books onscreen is not
your thing, you can buy this and several other books in tree form
too. And there are certainly localized books available.... I think
this is the Germam one we have at work:

http://www.galileocomputing.de/katalog/buecher/titel/gp/titelID-929

I think (at least I hope) my coworkers found it helpful...

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jan 26 15:28:42 2006

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.