Bug Link:

Patch Link:


When performing a merge where some paths are missing due to ‘delete’, then empty merginfo is set on the skipped paths (it works correctly in case of files). If the skipped paths have had mergeinfo, then setting empty mergeinfo is incorrect.

How it is diagnosed:

discussion / dump

For example, we have the branch ‘A_COPY’.

>svn st -v A_COPY
                  8        7 pburba       A_COPY
                  8        2 jrandom      A_COPY\mu
                  8        2 jrandom      A_COPY\B
                  8        2 jrandom      A_COPY\B\lambda
                  8        2 jrandom      A_COPY\B\E
                  8        2 jrandom      A_COPY\B\E\alpha
                  8        2 jrandom      A_COPY\B\E\beta
                  8        2 jrandom      A_COPY\B\F
                  8        2 jrandom      A_COPY\C
                  8        7 pburba       A_COPY\D
                  8        2 jrandom      A_COPY\D\gamma
                  8        7 pburba       A_COPY\D\G
                  8        7 pburba       A_COPY\D\G\rho
                  8        2 jrandom      A_COPY\D\G\pi
                  8        2 jrandom      A_COPY\D\G\tau
                  8        2 jrandom      A_COPY\D\H
                  8        2 jrandom      A_COPY\D\H\chi
                  8        2 jrandom      A_COPY\D\H\omega
                  8        2 jrandom      A_COPY\D\H\psi

There is the mergeinfo of branch.

 >svn pl -vR A_COPY
 Properties on 'A_COPY':

1. Delete a file, then the status turns to ‘missing’.

>del A_COPY\D\G\rho

 >svn st A_COPY
 !       A_COPY\D\G\rho

2. Merge the changes of trunk to the branch. The trunk contains the changes of the missing file of the branch.

>svn merge ^^/A A_COPY
 --- Merging r2 through r3 into 'A_COPY':
 U    A_COPY\D\H\psi
 --- Merging r5 through r8 into 'A_COPY':
 U    A_COPY\B\E\beta
 Skipped missing target: 'A_COPY\D\G\rho'
 U    A_COPY\D\H\omega
 Summary of conflicts:
   Skipped paths: 1

 >svn st A_COPY
  M      A_COPY
 M       A_COPY\B\E\beta
  !M      A_COPY\D\G\rho
  M       A_COPY\D\H\omega
 M       A_COPY\D\H\psi

3. The missing file has empty mergeinfo, but it should have '/A/D/G/rho:4':
  >svn pl -vR A_COPY
 Properties on 'A_COPY':
 Properties on 'A_COPY\D\G\rho':

Root Cause:


In case of the missing path, do not record the mergeinfo.


The patch is :

--- subversion/trunk/subversion/libsvn_client/merge.c        2009/11/30 18:00:57        885520

+++ subversion/trunk/subversion/libsvn_client/merge.c        2009/11/30 18:05:47        885521

@@ -6945,11 +6945,18 @@ record_mergeinfo_for_dir_merge(const svn

           /* If we are here we know we will be recording some mergeinfo, but

              before we do set override mergeinfo on skipped paths so they

              don't incorrectly inherit the mergeinfo we are about to set.

-             We only need to do this once. */

+             We only need to do this once.  If we are dealing with a subtree

+             (i.e. i != 0) that was skipped then don't record mergeinfo on

+             it.  The earlier call to record_skips will already have taken

+             care of this. */

           if (i == 0)



                                  is_rollback, notify_b, merge_b, iterpool));

/* if the path is missing, then do not record the mergeinfo  */

+          else if (notify_b->skipped_abspaths

+                   && apr_hash_get(notify_b->skipped_abspaths, child->abspath,

+                                   APR_HASH_KEY_STRING))

+            continue;




Failure symptom category

additional behavior/unnecessary computation

Is there any log message?


Can ErrLog help?