Discussion:
Question regarding reverse merge of added file
Max Bernhardt
2018-01-08 13:24:29 UTC
Permalink
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi all,</div> <div>&nbsp;</div> <div>We&#39;ve just upgraded our subversion server from 1.4.6 to 1.9.7 and now I&#39;m getting a strange merge conflict, when I&#39;m trying to do a reverse merge on a baseline (trunk).</div> <div>&nbsp;</div> <div>The situation is as follows:</div> <div>&nbsp;&nbsp;&nbsp; /project/branches/it/33931/db/data_update.sql&nbsp;&nbsp;&nbsp;&nbsp; &lt;- Branch created from /project/branches/releases/23 in r374471, File added in revision r374494</div> <div>&nbsp;&nbsp;&nbsp; /project/branches/releases/23/db/data_update.sql &lt;- File added via merge of r374471- 374494 of /project/branches/it/33931</div> <div>&nbsp;</div> <div>Now I&#39;ve found out that this merge was wrong and want to reverse it. I tried to run the reverse merge on the baseline:</div> <div>&nbsp;</div> <div>&nbsp;&nbsp;&nbsp; svn log -v db/data_update.sql</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; r378753 &#124; maxbernhardt &#124; 2018-01-04 15:06:11 +0100 (Do, 04 Jan 2018) &#124; 7 lines</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Changed paths:</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; M /project/branches/releases/23/db</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A / project/branches/releases/23/db/data_upgrade.sql (from /project/branches/it/33931/db/data_upgrade.sql:374494)</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Prodbuild: Committing svn://pbsvn/project/branches/it/33931</div> <div>&nbsp;</div> <div>&nbsp;&nbsp;&nbsp; svn info</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Path: .</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Working Copy Root Path: /home/cmi/wc/project/23</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; URL: svn://pbsvn/project/branches/releases/23</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Repository Root: svn://pbsvn Revision: 379041</div> <div>&nbsp;</div> <div>&nbsp;&nbsp;&nbsp; svn merge -c-374494 svn://pbsvn/project/branches/releases/23 .</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --- Reverse-merging r374494 into &#39;.&#39;:</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C update_data.sql</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --- Recording mergeinfo for reverse merge of r374494 into &#39;.&#39;:</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; G .</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Summary of conflicts:</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tree conflicts: 1</div> <div>&nbsp;</div> <div>&nbsp;&nbsp; svn st</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; M db</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C db/data_update.sql</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; local edit, incoming delete upon merge</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Summary of conflicts:</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tree conflicts: 1</div> <div>&nbsp;</div> <div>&nbsp;&nbsp;&nbsp; svn diff db/data_update.sql</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Returns nothing, so there are no local changes as far as we know&gt;</div>

<div>&nbsp;</div>

<div>Since a tree conflict can only be resolved to the state of the working copy and the file still exists in the working copy of the baseline,</div>

<div>how can I do a reverse merge to remove the file from the baseline without creating a tree conflict ?</div>

<div>&nbsp;</div>

<div>I know, I can remove the file manually by running &quot;svn rm&quot;, but if there are more complicated merges in the future,</div>

<div>this can only be seen as a workaround.</div>

<div>&nbsp;</div>

<div>Can you please explicitly cc me, because I&#39;m not subscribed to mailing list ?</div>

<div>&nbsp;</div>

<div>Cheers Max</div>

<div>&nbsp;</div></div></body></html>
Johan Corveleyn
2018-01-10 14:14:21 UTC
Permalink
Post by Max Bernhardt
Hi all,
We've just upgraded our subversion server from 1.4.6 to 1.9.7 and now I'm
getting a strange merge conflict, when I'm trying to do a reverse merge on a
baseline (trunk).
/project/branches/it/33931/db/data_update.sql <- Branch created from
/project/branches/releases/23 in r374471, File added in revision r374494
/project/branches/releases/23/db/data_update.sql <- File added via merge
of r374471- 374494 of /project/branches/it/33931
Now I've found out that this merge was wrong and want to reverse it. I tried
svn log -v db/data_update.sql
r378753 | maxbernhardt | 2018-01-04 15:06:11 +0100 (Do, 04 Jan 2018)
| 7 lines
M /project/branches/releases/23/db
A / project/branches/releases/23/db/data_upgrade.sql (from
/project/branches/it/33931/db/data_upgrade.sql:374494)
Prodbuild: Committing svn://pbsvn/project/branches/it/33931
svn info
Path: .
Working Copy Root Path: /home/cmi/wc/project/23
URL: svn://pbsvn/project/branches/releases/23
Repository Root: svn://pbsvn Revision: 379041
svn merge -c-374494 svn://pbsvn/project/branches/releases/23 .
C update_data.sql
G .
Tree conflicts: 1
svn st
M db
C db/data_update.sql
Post by Max Bernhardt
local edit, incoming delete upon merge
Tree conflicts: 1
svn diff db/data_update.sql
<Returns nothing, so there are no local changes as far as we know>
Since a tree conflict can only be resolved to the state of the working copy
and the file still exists in the working copy of the baseline,
how can I do a reverse merge to remove the file from the baseline without
creating a tree conflict ?
I know, I can remove the file manually by running "svn rm", but if there are
more complicated merges in the future,
this can only be seen as a workaround.
Can you please explicitly cc me, because I'm not subscribed to mailing list
?
Hm, that's pretty strange. I don't know where the "local edit" comes
from either.
Is your client also version 1.9.7?

Regardless of the underlying cause of the spurious "local edit", the
upcoming version 1.10 should improve this situation by offering much
more powerful "tree conflict resolution" options (some of which will
be executed automatically). See [1].

Now, in your case the easiest way to resolve this conflict manually is
running "svn revert db/data_update.sql" in your conflicted working
copy. That will throw away the (spurious) local modification, and by
that automatically resolve the tree conflict.

[1] http://subversion.apache.org/docs/release-notes/1.10.html#conflict-resolver
--
Johan
Johan Corveleyn
2018-01-11 15:10:50 UTC
Permalink
Hi Johan,
thanks for the reply. Sorry for the personal mail, but since I'm not
subscribed, this is the only way I know of to respond.
No our client was still version 1.7.8, so this might have caused the
problem.
The revert was the first thing I tried, but after that the file was still
available in my working copy, so I had to remove it
manually by running svn rm.
Since 1.10 will have more & better capabilities of resolving tree conflicts,
I can live with the manual workaround until then.
Again, thanks for the reply
Max
Hi Max,

Okay, thanks for letting me know. Using a 1.7.x client could indeed
have been the underlying cause of the problem to start with. Best to
upgrade your client to the most recent version (i.e. 1.9.7 at this
time).

You could have put the users@ list in cc of your mail to me, but no
problem. I've put users@ in cc again, for completeness of the
archives.

Cheers,
--
Johan
Continue reading on narkive:
Loading...