subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Corveleyn <jcor...@gmail.com>
Subject Re: Question regarding reverse merge of added file
Date Wed, 10 Jan 2018 14:14:21 GMT
On Mon, Jan 8, 2018 at 2:24 PM, Max Bernhardt <Max.Bernhardt@gmx.eu> wrote:
> 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).
>
> The situation is as follows:
>     /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
> to run the reverse merge on the baseline:
>
>     svn log -v db/data_update.sql
>         r378753 | maxbernhardt | 2018-01-04 15:06:11 +0100 (Do, 04 Jan 2018)
> | 7 lines
>         Changed paths:
>             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 .
>         --- Reverse-merging r374494 into '.':
>             C update_data.sql
>         --- Recording mergeinfo for reverse merge of r374494 into '.':
>             G .
>        Summary of conflicts:
>            Tree conflicts: 1
>
>    svn st
>        M db
>             C db/data_update.sql
>             > local edit, incoming delete upon merge
>        Summary of conflicts:
>            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

Mime
View raw message