Fri, 2 Feb 2024, /Johan Corveleyn/:
On Fri, Feb 2, 2024 at 10:18 AM Stanimir Stamenkov via users wrote:

* Tree conflicts flagged by svn merge cannot be automatically resolved yet. This will be addressed in a future release.

If I understand correctly, not much has changed related to merging with/into moved files.

Oh yes, a lot has changed since 1.8 (which is EOL for a long time already). Actually, the major improvement came client-side in version 1.10, with the interactive tree conflict resolver [1]...
[...]
- Despite this, the tree conflict resolver in 1.10+ is in most cases able to match deletes and adds-with-copyfrom to deduce they are probably a move, and uses this kind of information to make a good guess about what needs to go where. It seems to work out fine in practice in most cases.

[1] https://subversion.apache.org/docs/release-notes/1.10.html#conflict-resolver

Thank you for the references and additional info. I have to admit I'm using Subversion just when absolutely necessary, since quite some time now. And then I'm not the OP with the problem. In this regard I haven't tested extensively whether and how svn merge with moved files may have improved, but here's an example from ~1.5 year ago using Subversion 1.14:

https://issues.apache.org/jira/browse/DERBY-7144?focusedCommentId=17582731&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17582731

(there's a "svn-merge.log" link to an attachment with the full session)

The example performs a cherry-pick (back-port) merge:

    svn merge -c <rev> ^/<repo>/branches/<name>

It doesn't seem to notice the source has once been renamed from the target, and doesn't perform automatic merge. Maybe this one is specific to cherry-pick merges?

I've now tried simplified scenario described by the OP – it does appear to automatically merge updates to a moved file (this is a Windows Command Prompt):

    > svn info
    Path: .
    Working Copy Root Path: C:\...\svnwork
    URL: file:///C:/.../svnrepo/branches/feature-1
    Relative URL: ^/branches/feature-1
    Repository Root: file:///C:/.../svnrepo
    Repository UUID: 9f01a344-90b5-c945-b13b-67a67f39ca98
    Revision: 5
    Node Kind: directory
    Schedule: normal
    Last Changed Author: stanio
    Last Changed Rev: 4
    Last Changed Date: 2024-02-02 15:32:09 +0200 (пет, 02 фев 2024)

    > svn merge ^^/trunk
    --- Merging r3 through r5 into '.':
       C foo
    --- Recording mergeinfo for merge of r3 through r5 into '.':
     U   .
    Summary of conflicts:
      Tree conflicts: 1
    Searching tree conflict details for 'foo' in repository:
    Checking r4... done
    Tree conflict on 'foo':
Changes destined for a file arrived via the following revisions during merge of
    '^/trunk/foo:3-5':
     r2 by stanio, r5 by stanio
    No such file or directory was found in the merge target working copy.
    The file was moved to '^/branches/feature-1/fou' in r4 by stanio.
    Applying recommended resolution 'Apply to move destination':
    G    fou
    Tree conflict at 'foo' marked as resolved.
    Summary of conflicts:
      Tree conflicts: 0 remaining (and 1 already resolved)

--
Stanimir

Reply via email to