Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN merge previous revision into working copy

If

  • I'm working on an SVN branch at revision 5.
  • I make a change, commit to create revisions r6.
  • Revert back to r5 as r6 introduced problems, and commit, creating r7
  • Continue working on r7, eventually committing changes up to r10

How do I merge the changes made in r6 back into my working copy?

I've tried

svn merge -r5:6 .

and

svn merge -r5:HEAD .

Both of which seem to do nothing. What am I doing wrong?

like image 794
user1692222 Avatar asked Sep 23 '12 12:09

user1692222


People also ask

How do I merge previous revisions in svn?

If you are using a relatively recent svn release, you can use: svn merge -c -6 . (or the specific file(s) you would like to revert, rather than '.

What is a sync merge?

It's in your best interest to replicate those changes to your own branch, just to make sure they mesh well with your changes. This is done by performing a sync merge—a merge operation designed to bring your branch up to date with any changes made to its ancestral parent branch since your branch was created.

What is svn reverse merge?

Reverse merge In SVN SVN will keep common file contents in working copy from the specific revision of file and HEAD revision of working copy. if it is folder level. In SVN reverse merge, if not file found in the specific revision, it keeps the working copy as it is.


1 Answers

Try this:

svn merge --ignore-ancestry -r5:6 .

or using newer syntax:

svn merge --ignore-ancestry -c6 .

b.t.w.: I recommend to always specify what files you want to work with instead of "."

like image 64
Midis Avatar answered Nov 03 '22 21:11

Midis