You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Wadsworth, Eric (Contractor)" <wa...@fhu.disa.mil> on 2004/07/06 17:36:04 UTC

How to undo a merge / conflict?

There is probably a simple answer, I'm just not seeing it.

I edit a file, then update, and a merge or conflict happens. Now I want to
get my file back to it's pristine state before I did the update, showing
just my edits. What's the command? How about under TortoiseSVN? The
TortoiseSVN right-click menu only offers "revert" which says it will throw
away all my changes.

****
**** --- Eric Wadsworth, 520-533-2749
****

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to undo a merge / conflict?

Posted by Paul Libbrecht <pa...@activemath.org>.
Le 6-Jul-04, à 21:17 Uhr, Michael W Thelen a écrit :
> * Wadsworth, Eric (Contractor) <wa...@fhu.disa.mil> [2004-07-06 
> 13:13]:
>> There is probably a simple answer, I'm just not seeing it.
>> I edit a file, then update, and a merge or conflict happens. Now I 
>> want to
>> get my file back to it's pristine state before I did the update, 
>> showing
>> just my edits. What's the command? How about under TortoiseSVN? The
>> TortoiseSVN right-click menu only offers "revert" which says it will 
>> throw
>> away all my changes.
> Look for a file called <file>.mine, where <file> is the name of the 
> file
> you were editing.  That will contain a copy of the file with your local
> edits before you ran the update.  You can just rename <file>.mine to
> <file> and then run "svn resolved <file>" to throw away the changes
> caused by the update.

I would believe it would make sense, especially in the view of such 
tool as graphical SVN browsers, to consider having commands about such.
Something like:
- deconflict file
- resign file
(maybe the first works)

paul

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: How to undo a merge / conflict?

Posted by Michael W Thelen <th...@cs.utah.edu>.
* Wadsworth, Eric (Contractor) <wa...@fhu.disa.mil> [2004-07-06 13:13]:
> There is probably a simple answer, I'm just not seeing it.
> 
> I edit a file, then update, and a merge or conflict happens. Now I want to
> get my file back to it's pristine state before I did the update, showing
> just my edits. What's the command? How about under TortoiseSVN? The
> TortoiseSVN right-click menu only offers "revert" which says it will throw
> away all my changes.

Look for a file called <file>.mine, where <file> is the name of the file
you were editing.  That will contain a copy of the file with your local
edits before you ran the update.  You can just rename <file>.mine to
<file> and then run "svn resolved <file>" to throw away the changes
caused by the update.

-- Mike

-- 
Michael W. Thelen
It is a painful thing
To look at your own trouble and know
That you yourself and no one else has made it
                -- Sophocles, "Ajax"

Re: How to undo a merge / conflict?

Posted by Tristan Seligmann <tr...@quotemaster.co.za>.
On Tue, Jul 06, 2004 at 02:19:25PM -0500, Ben Collins-Sussman wrote:
> It depends on the state of your file.
> 
> * If your locally modified file received a clean merge ('svn status'
> reports it as just 'M'), then just 'svn up -rX' where X is the old
> version of the file.  Your local mods will be preserved, whether
> back-dating or up-dating.

Not necessarily. If you made changes to r100, and someone else comitted
the same changes (or a subset thereof) in r101, then updating to r101
and then back to r100 will leave you with a working copy that does not
contain those changes or subset of changes. The same applies to
switching between branches, etc.
-- 
Tristan Seligmann
Developer / Network Administrator

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to undo a merge / conflict?

Posted by Ben Collins-Sussman <su...@collab.net>.
On Tue, 2004-07-06 at 12:36, Wadsworth, Eric (Contractor) wrote:
> There is probably a simple answer, I'm just not seeing it.
> 
> I edit a file, then update, and a merge or conflict happens. Now I want to
> get my file back to it's pristine state before I did the update, showing
> just my edits. What's the command? How about under TortoiseSVN? The
> TortoiseSVN right-click menu only offers "revert" which says it will throw
> away all my changes.

It depends on the state of your file.

* If your locally modified file received a clean merge ('svn status'
reports it as just 'M'), then just 'svn up -rX' where X is the old
version of the file.  Your local mods will be preserved, whether
back-dating or up-dating.

* If your locally modified file is in a state of conflict, then you've
probably got conflict markers mixed in with your changes.  You don't
have to resolve the conflicts by hand.  Remember that you also have 3
fulltexts sitting in your working copy.  Just copy the '.mine' file on
top of your working file.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org