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

Re: Pre and post bugfix tagging and mixed rev working copies

From: Michael Mason <mgm_at_eskimoman.net>
Date: 2004-12-01 18:38:07 CET

On Wed, 1 Dec 2004 kfogel@collab.net wrote:

> I think this is a bug in Subversion, really. Why is it unwilling to tag
> (copy) a mixed-revision working copy to the repository? We explicitly
> designed that feature into Subversion, it's not like it's a surprise.
> In fact, it's supposed to even be able to copy locally modified files,
> when you do a wc-to-repos copy.
>
> Can you make a short reproduction script that demonstrates the problem?

I'll do that, will attach in another mail.

> Personally, I did wonder why you bothered to make the first tag at all
> -- and why you did it from your client side! After all, that was a
> fresh checkout. So you might as well make the tag by doing a
> URL-to-URL copy. Same result, *much* faster.
>
> But wait, there's more: then you did multiple checkins on your tag.
> So it wasn't really a tag. You should have called it a branch
> instead. Then the bugfix would simply be "all the changes committed
> on the branch, that is, the total diff on the branch". You could use
> 'svn merge' to put those changes onto the release branch, or any other
> place, when ready.
>
> That IMHO would be the more Subversion-y way to do things.

I realised this morning that a branch-per-bugfix style is much more the
way this is done in Subversion. Here's what I wrote down:

# start working on a bug fix
svn copy -m "start bugfix branch" \
   svn://myserver/myproj/branches/RB-1.0 \
   svn://myserver/myproj/bugfixes/BUG-123
svn copy -m "tag start of fix" \
   svn://myserver/myproj/bugfixes/BUG-123 \
   svn://myserver/myproj/bugfixes/BUG-123-START
# check out code to work on bug
svn checkout svn://myserver/myproj/bugfixes/BUG-123 bug-123
# fix, doing multiple commits
# we're done fixing, now mark the end of the bugfix
svn copy -m "tag end of fix" \
   svn://myserver/myproj/bugfixes/BUG-123 \
   svn://olio/sesame/bugfixes/BUG-123-FINISH
# Merge the bugfix into release 1.0's branch
cd rb-1.0
svn update
svn merge \
   svn://olio/sesame/bugfixes/BUG-123-START \
   svn://olio/sesame/bugfixes/BUG-123-FINISH .
# Same merge operation to put the fix on the trunk and other branches

Couple of points here -- if I just create a bugfix branch, do I need to
tag the start of it for later merging? This is easier than using something
like svn log --stop-on-copy to figure out where the branch started.

Thanks for the help!

Mike.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Dec 1 18:40:25 2004

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.