How to revert a --record-only svn merge before a commit
Hi All We use SVN 1.6 How do we perform a svn merge "revert" of a revision number that is --record-only in linux shell before a svn commit ? We perform svn merge --record-only -c 1234 http://testsomething.com We like to revert that step. Thank you Sincerely
Re: How to revert a --record-only svn merge before a commit
On 29/10/13 05:38, Zk W wrote: Hi All We use SVN 1.6 How do we perform a svn merge "revert" of a revision number that is --record-only in linux shell before a svn commit ? We perform svn merge --record-only -c 1234 http://testsomething.com We like to revert that step. Thank you Sincerely That only changes the svn:mergeinfo property, so I would suggest editing it. Since you did not have a target in the command you showed us I guess it was the current directory (unless you simply omitted it for simplicity), which I hope is the root of your WC (it should always be the root of your WC, it makes things much easier). So, in the root of your WC run this command svn pe svn:mergeinfo . and delete the info for revision 1234 (which again I guess it's not the real one :-) Hope this helps. Giulio
Re: How to revert a --record-only svn merge before a commit
On 29.10.2013 10:10, Giulio Troccoli wrote: > > On 29/10/13 05:38, Zk W wrote: >> Hi All >> >> We use SVN 1.6 >> How do we perform a svn merge "revert" of a revision number that is >> --record-only in linux shell before a svn commit ? >> >> We perform >> svn merge --record-only -c 1234 http://testsomething.com >> >> We like to revert that step. >> >> Thank you >> Sincerely > > That only changes the svn:mergeinfo property, so I would suggest > editing it. Since you did not have a target in the command you showed > us I guess it was the current directory (unless you simply omitted it > for simplicity), which I hope is the root of your WC (it should always > be the root of your WC, it makes things much easier). So, in the root > of your WC run this command > > svn pe svn:mergeinfo . > > and delete the info for revision 1234 (which again I guess it's not > the real one :-) > > Hope this helps. Instead of editing mergeinfo, which is always a bad idea, just revert the directory changes: svn revert . This will revert the property changes on the repository, including svn:mergeinfo. -- Brane -- Branko Čibej | Director of Subversion WANdisco // Non-Stop Data e. br...@wandisco.com
Re: How to revert a --record-only svn merge before a commit
On Tue, Oct 29, 2013 at 09:10:45AM +, Giulio Troccoli wrote: > > On 29/10/13 05:38, Zk W wrote: > >Hi All > > > >We use SVN 1.6 > >How do we perform a svn merge "revert" of a revision number that is > >--record-only in linux shell before a svn commit ? > > > >We perform > >svn merge --record-only -c 1234 http://testsomething.com > > > >We like to revert that step. > > > >Thank you > >Sincerely > > That only changes the svn:mergeinfo property, so I would suggest editing it. > Since you did not have a target in the command you showed us I guess it was > the current directory (unless you simply omitted it for simplicity), which I > hope is the root of your WC (it should always be the root of your WC, it > makes things much easier). So, in the root of your WC run this command > > svn pe svn:mergeinfo . > > and delete the info for revision 1234 (which again I guess it's not the real > one :-) > > Hope this helps. > > Giulio I would advise against editing or deleting mergeinfo. Instead, run the same merge in reverse: svn merge --record-only -c -1234 http://testsomething.com Note the minus in front of 1234. This approach will also fix up subtree mergeinfo, if any.
Re: How to revert a --record-only svn merge before a commit
On 29/10/13 10:43, Stefan Sperling wrote: On Tue, Oct 29, 2013 at 09:10:45AM +, Giulio Troccoli wrote: On 29/10/13 05:38, Zk W wrote: Hi All We use SVN 1.6 How do we perform a svn merge "revert" of a revision number that is --record-only in linux shell before a svn commit ? We perform svn merge --record-only -c 1234 http://testsomething.com We like to revert that step. Thank you Sincerely That only changes the svn:mergeinfo property, so I would suggest editing it. Since you did not have a target in the command you showed us I guess it was the current directory (unless you simply omitted it for simplicity), which I hope is the root of your WC (it should always be the root of your WC, it makes things much easier). So, in the root of your WC run this command svn pe svn:mergeinfo . and delete the info for revision 1234 (which again I guess it's not the real one :-) Hope this helps. Giulio I would advise against editing or deleting mergeinfo. Instead, run the same merge in reverse: svn merge --record-only -c -1234 http://testsomething.com Note the minus in front of 1234. This approach will also fix up subtree mergeinfo, if any. Ah yes, of course. I didn't use the merge command because the OP said how to reverse before the commit and there could be other merges that he wants to keep. I didn't think of using --record-only with a reverse merge, but it make sense Giulio