It’s all in a day’s work

If only a day had 48 hours…
  • rss
  • Home
  • About DelGurth
  • About Wilco

SVN merge changes from a deleted branch

DelGurth | Thursday, March 27, 2008

Today I had a problem with a merge. I thought I had merged all changes from a branch into the trunk, so I deleted the branch. But somehow (probably forgetting to remove a --dry-run) not all got merged. So I had to merge the changes again. I thought I could do that with just a:

svn merge -r 3173:3246 $SVN/project/branches/MY_BRANCH .

Where 3173 is the revision in which the branch was created and 3246 is one revision before I deleted the branch.

But this gave me a svn error:

svn: '/svn/project/!svn/bc/3251/branches/MY_BRANCH' path not found

That 3251 is the HEAD revision number. So even though I’m specifying the revisions I want to merge, SVN first checks the given path using the HEAD revision. So in stead of the above command I had to specify the revision in the SVN URL as well:

svn merge -r 3173:3246 $SVN/project/branches/MY_BRANCH@3246 .

This worked perfectly. So if you know you have to specify the revision just before the deletion twice, it’s not that hard to merge changes from a deleted branch. I was already thinking about a checkout of the deleted branch and lots of copy’s. But fortunately for me that wasn’t necessary.

Comments
2 Comments »
Categories
SVN
Tags
branch, merge, SVN
Comments rss Comments rss
Trackback Trackback


Categories

  • Debian (7)
  • Debian/Ubuntu (7)
  • Dell D830 (2)
  • Development (1)
  • E65 (1)
  • Eclipse (4)
  • Etch (3)
  • Feisty (2)
  • General (6)
  • Hardy (3)
  • Internet Explorer (1)
  • Java (1)
  • JSP (1)
  • JSTL (1)
  • Lenny (1)
  • Misc (5)
  • Nokia (1)
  • one-liners (2)
  • Optimizing performance (1)
  • Packages (4)
  • Phones (2)
  • PHP (3)
  • Postfix (1)
  • Shell Scripting (1)
  • SQL Injection (1)
  • SVN (3)
  • Testing (3)
  • Ubuntu (9)
  • Ubuntu x86_64 (2)
  • VOIP (1)
  • Wordpress (7)

Friend blogs

  • AgileMore
  • Borselaer.org
  • Gerbrand on ICT
  • Schapendonk.org

Sites I like

  • Joel on Software
  • The Tom Kyte Blog
  • Windows Keyboard Shortcut of the Day

Archives

  • March 2009 (1)
  • February 2009 (1)
  • January 2009 (2)
  • December 2008 (1)
  • November 2008 (1)
  • October 2008 (4)
  • September 2008 (1)
  • August 2008 (6)
  • May 2008 (4)
  • April 2008 (1)
  • March 2008 (1)
  • February 2008 (2)
  • December 2007 (1)
  • November 2007 (3)
  • October 2007 (2)
  • September 2007 (3)
  • August 2007 (1)
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox