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

Re: Subversion svn client doesn't show branch when checking in

From: Kris Deugau <kdeugau_at_vianet.ca>
Date: 2006-03-01 18:35:30 CET

Ryan Schmidt wrote:
> Subversion does branching completely differently than CVS. Have you
> read the book? A branch in Subversion is absolutely nothing more than a
> plain directory. Whatever directory you checked out from (or
> subsequently switched to) is the one you're committing to.

Well, yes. But what did I check out?

I can't comment on the CVS-vs-SVN differences with any authority as I've
never used CVS. But I too have trouble remembering which branch I'm
committing to sometimes - some indication on commit would make accurate
log messages easier to construct.

As for workarounds, there are a few workflow habits I try to use that
may help the OP.

-> Know what part of the code you're working on, or where you checked
out from. Unfortunately, if you regularly switch from one code segment
to another by svn switch (or the CVS equivalent - if any), this isn't
easy. (I have trouble with this on a small scale sometimes - never mind
what I can imagine might happen with a much larger project! But I also
have my development environment for one project set up so that this is
easier; I have separate checkouts for /trunk, /branches/stable (where I
keep the latest *production* code), and a third working copy for merging
or work on a feature branch. The last is the most difficult to remember
because the repo path associated with it changes where the other two don't.)

-> Run "svn info" before every commit. That will tell you the
repository path to the current directory. (Or whatever directory you
specified, if any.) You can then add that path to your commit message.

Personally, I include the "root" path of the code branch I'm working on
as the first line of all of my log messages - for instance, any changes
on the trunk have "/trunk" as the first line of the commit message; any
changes to a feature branch will have "/branches/<feature>", commits to
the stable production code will have "/branches/stable". This includes
changes that are deep in the tree! You may want to include more of the
path if it's a big tree.

If nothing else, that makes "svn log <repo>" a little clearer on where
work was done for any given commit.


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Mar 1 19:07:43 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.