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

RE: Branch/switch/merge question

From: Bob Archer <Bob.Archer_at_amsi.com>
Date: Tue, 26 Nov 2013 17:18:00 +0000

> I've read the visual guide, the subversion book, I've used subversion for
> years, but never really collaborated much with other people on actual
> software source code the way it's intended to be used, until recently.† So it's
> only recently that I'm making use of branch/merge, and I'd like to get the
> advice of you more experienced svn users, about my usage pattern.
> In particular, I branch (and switch) from /trunk to /branches/eharvey.† I then
> make a few commits.† I switch back to /trunk, and merge from the branch.† I
> commit to trunk.† (I'm always at a loss for comment, because I'm just
> committing things that have already been commented.† But that's a side
> note.)† I then switch back to /branches/eharvey, and merge from /trunk.
> So here's my question:† Even if I'm the only person who committed
> anything...† I was fully committed on /branches/eharvey, I then became fully
> committed on /trunk, and when I merge back into /branches/eharvey,
> suddenly I'm not fully committed.† My latest status (check for modifications)
> shows the child subfolder as "modified," and when I diff it, it's the
> svn:mergeinfo property that's different.† It shows that I merged /trunk into
> /branches/eharvey, even though there were no changes from trunk to
> merge in.

Are you using svn 1.8?

If not, are you doing reintegration merge when merging your branch back in to the trunk?

> So, most importantly, am I using svn branch/switch/merge in the way that it's
> intended to be used?
> Is this the normal, expected, and desired behavior, and I should just get used
> to it?
> Should my usage pattern be different somehow?

Generally, there isn't a reason to branch as a matter of course. It's not wrong per say... but I'd rather see all the work just done in trunk. Branches would be used for larger features that multiple people might collaborate on, or take longer than a day or so.

Although, having each developer work only on a branch does facilitate code reviews. You do your work on a branch, someone reviews it, once ok'ed it gets merged to branch.

Also, I suggest people avoid using switch. It is too easy to forget which svn path you are currently pointing to and commit something to the wrong path. Also, svn switch doesn't handle non-versioned stuff as well as say GIT does. I'd much rather see our devs check out trunk and branch to separate local working copies.

Received on 2013-11-26 18:18:54 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.