________________________________
From: "Cooke, Mark" <mark.cooke_at_siemens.com>
To: ankush chadha <ankushchadha2003_at_yahoo.com>; users_at_subversion.apache.org
Sent: Thu, September 2, 2010 1:50:26 AM
Subject: RE: svn redo after reverse merge
> -----Original Message-----
> From: ankush chadha [mailto:ankushchadha2003_at_yahoo.com]
> Sent: 01 September 2010 17:16
> To: users_at_subversion.apache.org
> Subject: svn redo after reverse merge
>
> Hi All
>
> I am trying to do following operation
>
> file.txt has 100 revisions and located directly under
> svn://myrepo.org/trunk
>
> 1. svn co svn://myrepo.org/trunk/
>
> 2. Undoing few changes made to this file
> svn merge -c -100 svn://myrepo.org/trunk/
> svn merge -c -99 svn://myrepo.org/trunk/
> .....
> svn merge -c -90 svn://myrepo.org/trunk/
>
> 3. After resolving all the conflicts I do a commit (bulk)
> svn commit -m "Rolling back rev 100 to 90"
>
If you just want to go back to the file as it was in r90, why not just
get a copy of that revision and check it in again with a suitable
comment? Seems a lot less hassle to me (but maybe I am missing
something)...
AC- In my current case there are lots of files and folders, and there are lots
of folder structure changes. If it was just a bunch of files, then I would have
done what you recommended.
> 4. Now suppose for some reason I want revision 95 back in,
> the following command won't work
> svn merge -c 95 svn://myrepo.org/trunk/
> as according to SVN, revision 95 is already there
>
I'm not sure what you want to do here? Are you wanting to apply the {
r94 > r95 } patch to what is in effect r90? Or just revert to r95 (in
which case you could just get r95 and check it in again)?
AC - Reverting to r95 won't help as I just want the diff or the changes that
were made in r95.
I tried using the svn diff command, created patches and used the GNU patch
utility for windows to apply the patch back. But I don't think this approach
will add the merge history for r95 again.
> Whats the best way to put a change back which was already
> there but rolled back due to the reverse merge.
>
> One way to do is to perform commit after every single undo
> merge operation and rollback the reverse merge to bring the
> change back in. But I want to avoid this approach.
>
Can you clarify? It seems a slightly odd thing to be doing.
AC - Sure. Let me give a small example. Suppose there is a source folder that
contains around 50 modules. There were lot of changes made to this source folder
say around 20 new features. Once everything was checked in, we realized that for
the current release we just need feature A and B and rollback everything else.
We want all the merge history, any history. Ideally we should branch at an early
revision and then add feature A and B. But in my case I cannot create a branch
now. I hope this helps.
~ mark c
Received on 2010-09-02 15:47:12 CEST