<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Commiting to a new branch with Subversion</title>
	<atom:link href="http://www.blizzo.com/commiting-to-a-new-branch-with-subversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blizzo.com/commiting-to-a-new-branch-with-subversion/</link>
	<description>Randomness for you since 1976</description>
	<pubDate>Wed, 07 Jan 2009 04:53:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: F. Morgan Whitney</title>
		<link>http://www.blizzo.com/commiting-to-a-new-branch-with-subversion/#comment-3213</link>
		<dc:creator>F. Morgan Whitney</dc:creator>
		<pubDate>Wed, 03 Sep 2008 18:50:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.blizzo.com/?p=171#comment-3213</guid>
		<description>In case anyone is keeping score, this totally didn't work. Do what John said :)</description>
		<content:encoded><![CDATA[<p>In case anyone is keeping score, this totally didn&#8217;t work. Do what John said <img src='http://www.blizzo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Williams</title>
		<link>http://www.blizzo.com/commiting-to-a-new-branch-with-subversion/#comment-2985</link>
		<dc:creator>Peter Williams</dc:creator>
		<pubDate>Mon, 25 Aug 2008 16:31:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.blizzo.com/?p=171#comment-2985</guid>
		<description>If you want to do feature branching like this you should definitely consider switching to Git, Mercurial or Bazaar.  They make this sort of thing dead simple.  Oh, and they make just about everything else about source control easier too.</description>
		<content:encoded><![CDATA[<p>If you want to do feature branching like this you should definitely consider switching to Git, Mercurial or Bazaar.  They make this sort of thing dead simple.  Oh, and they make just about everything else about source control easier too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: F. Morgan Whitney</title>
		<link>http://www.blizzo.com/commiting-to-a-new-branch-with-subversion/#comment-2860</link>
		<dc:creator>F. Morgan Whitney</dc:creator>
		<pubDate>Fri, 22 Aug 2008 14:20:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.blizzo.com/?p=171#comment-2860</guid>
		<description>My svn copy actually seemed to copy form the trunk in the repo and not my checked out copy, as non of the new or modified files appeared in the new branch, so I wonder if . or the trunk URL really matters.  I did use a URL for the branch in my actual implementation.

Another tip for anyone who stumbles across this,  to find the revision number from when you created your branch, you can use:

svn log --stop-on-copy

This article has a fairly straight forward step by step for merging your branches into your trunk:

http://www.sepcot.com/blog/2007/04/SVN-Merge-Branch-Trunk</description>
		<content:encoded><![CDATA[<p>My svn copy actually seemed to copy form the trunk in the repo and not my checked out copy, as non of the new or modified files appeared in the new branch, so I wonder if . or the trunk URL really matters.  I did use a URL for the branch in my actual implementation.</p>
<p>Another tip for anyone who stumbles across this,  to find the revision number from when you created your branch, you can use:</p>
<p>svn log &#8211;stop-on-copy</p>
<p>This article has a fairly straight forward step by step for merging your branches into your trunk:</p>
<p><a href="http://www.sepcot.com/blog/2007/04/SVN-Merge-Branch-Trunk" rel="nofollow">http://www.sepcot.com/blog/2007/04/SVN-Merge-Branch-Trunk</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.blizzo.com/commiting-to-a-new-branch-with-subversion/#comment-2848</link>
		<dc:creator>John</dc:creator>
		<pubDate>Thu, 21 Aug 2008 23:40:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.blizzo.com/?p=171#comment-2848</guid>
		<description>This is reasonably close, but not quite right..  Also, instead of doing an svn cp on your local working copy you're better off doing it against the server.  The form of the command is the same, but you're using urls for the source and endpoint.

It should look something like:
1. Create your branch with: svn cp http://server/project/trunk http://server/project/branches/branch_o_doom -m "Creating my branch to take over the world"
2. Move your working copy to the branch: svn switch http://server/project/branches/branch_o_doom
3. Do your work.. update from the repo, modify files, add files, check in, etc as usual

Now for merging your branch back to trunk you need to figure out what file range needs to be merged, then merge it back.  Svn won't do merges on the server itself (for good reason) so you usually do this against another local working copy.
1. Find out the revision range on the branch: svn log --stop-on-copy http://server/project/branches/branch_o_doom
It'll give you a log of all the commits on the branch, stopping on the initial copy that created it.  Note that revision number.

2. Checkout trunk (or cd to it, whatever):  svn co http://server/project/trunk

3. Merge it! (this is against a checkout of trunk): svn merge -r 7424:HEAD http://server/project/branches/branch_o_doom

4. Sanity check what it did.

5. Commit it back to trunk (note that its good form to notate the rev range you're merging): svn ci -m "Merging branch_o_doom to trunk r7424:r:7535"</description>
		<content:encoded><![CDATA[<p>This is reasonably close, but not quite right..  Also, instead of doing an svn cp on your local working copy you&#8217;re better off doing it against the server.  The form of the command is the same, but you&#8217;re using urls for the source and endpoint.</p>
<p>It should look something like:<br />
1. Create your branch with: svn cp <a href="http://server/project/trunk" rel="nofollow">http://server/project/trunk</a> <a href="http://server/project/branches/branch_o_doom" rel="nofollow">http://server/project/branches/branch_o_doom</a> -m &#8220;Creating my branch to take over the world&#8221;<br />
2. Move your working copy to the branch: svn switch <a href="http://server/project/branches/branch_o_doom" rel="nofollow">http://server/project/branches/branch_o_doom</a><br />
3. Do your work.. update from the repo, modify files, add files, check in, etc as usual</p>
<p>Now for merging your branch back to trunk you need to figure out what file range needs to be merged, then merge it back.  Svn won&#8217;t do merges on the server itself (for good reason) so you usually do this against another local working copy.<br />
1. Find out the revision range on the branch: svn log &#8211;stop-on-copy <a href="http://server/project/branches/branch_o_doom" rel="nofollow">http://server/project/branches/branch_o_doom</a><br />
It&#8217;ll give you a log of all the commits on the branch, stopping on the initial copy that created it.  Note that revision number.</p>
<p>2. Checkout trunk (or cd to it, whatever):  svn co <a href="http://server/project/trunk" rel="nofollow">http://server/project/trunk</a></p>
<p>3. Merge it! (this is against a checkout of trunk): svn merge -r 7424:HEAD <a href="http://server/project/branches/branch_o_doom" rel="nofollow">http://server/project/branches/branch_o_doom</a></p>
<p>4. Sanity check what it did.</p>
<p>5. Commit it back to trunk (note that its good form to notate the rev range you&#8217;re merging): svn ci -m &#8220;Merging branch_o_doom to trunk r7424:r:7535&#8243;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
