I'm relatively new to subversion, having started using it with version 1.6.2
just a few weeks ago. I have prior experience with CVS, Perforce, and a bit
with AccuRev. So I'm not new to SCM.
Today I tried using svn branches for the second time, and once again it
seems to be ending badly. Very frustrating. But maybe with some help I can
make things work.
I'm working on one part of our source tree, several directories below the
top. My desire is to do my development in a private branch so that I can do
frequent commits without messing up the trunk. Whenever I have code worth
sharing, I'll merge those changes into the trunk. Since I'm the only one
working on these files, the merges should be one-way and painless. I'd like
to continue working in the branch, merging back to trunk as needed.
So I created a branch of the tree, and then tried to "switch" my work
subdirectory to the branch. Apparently I got the switch syntax horribly
wrong, because it started checking out a whole new tree below my
subdirectory, and left my work area in a confused state when I interrupted
it with ^C. Now it claims some of my files have conflicts and "local edit,
incoming delete upon switch". It won't let me update because mysterious
subdirectories it somehow believes should be present are missing. Luckily I
backed up all modified files before trying the dangerous svn switch command,
so I'm now in the process of starting over with a clean checkout.
My first question is *why doesn't svn switch support the --dry-run option?
Is there something comparable?* *I now fear that command.*
My second question is *what exactly is the correct syntax for switching a
subdirectory to a branch?*
For the sake of argument, let's say the trunk path is
http://svn/svn/project/trunk, my branch is
http://svn/svn/project/branches/brett, and I'm working in the subdirectory
whose URL is http://svn/svn/project/trunk/a/b/mystuff
What I *tried, *while in the a/b/mystuff directory of my workarea, was "svn
switch ^/branches/brett"
Apparently that's wrong. Very, very wrong. I've been searching docs, and
it seems all the examples reference the top of tree.
My last question is *do I really need to delete and recreate my branch after
each merge to trunk?* This seems to be the prevailing wisdom on the
articles I've found, but I find it's often hard to tell whether or not svn
branching advice applies to svn 1.6 or only earlier versions with more
primitive branching support.
I really like the AccuRev concept of lightweight private branches so you can
do frequent private commits ("keep" in accurev) without breaking the trunk.
svn branches seem to be almost capable of this kind of usage model, but my
experience so far has been, uh, unsatisfactory.
All help and advice appreciated!
-Brett
--
Brett Coon - brett.coon@gmail.com - http://brettcoon.smugmug.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2369518
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-07-10 00:23:36 CEST