Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-3975

adds with explicit mergeinfo don't get mergeinfo describing merge which added them

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.x
    • 1.7.0
    • libsvn_client
    • None

    Description

      When a subtree is added by a merge, if the incoming subtree has its own explicit
      mergeinfo, we currently don't update that mergeinfo to describe the merge. 
      Worst case this causes spurious merge conflicts in subsequent merges, best case
      it results in wasted time on noop editor drives (with the attendant merge
      notifications which are possibly confusing since there may be no local
      modifications post-merge).
      
      We can see this in our own repository on the
      ^/subversion/branches/gpg-agent-password-store branch in r1139384 'Sync the
      gpg-agent-password-store branch with trunk'.
      
      In that sync merge, the subtree
      gpg-agent-password-store/subversion/libsvn_subr/svn_temp_serializer.c is added:
      
      c:\SVN\sandbox\merge-mem-use\gpg-agent-password-store>svn log
      ^^/subversion/branches/gpg-agent-password-store@1139384 -r1139384 -v
      ------------------------------------------------------------------------
      r1139384 | stsp | 2011-06-24 12:51:56 -0400 (Fri, 24 Jun 2011) | 2 lines
      Changed paths:
         M /subversion/branches/gpg-agent-password-store
      <SNIP>
         A
      /subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/svn_temp_serializer.c
      (from /subversion/trunk/subversion/libsvn_subr/svn_temp_serializer.c:1139365)
      <SNIP>
         M /subversion/branches/gpg-agent-password-store/win-tests.py
      
      Sync the gpg-agent-password-store branch with trunk.
      
      ------------------------------------------------------------------------
      
      In r1139384 the root mergeinfo is updated as expected for /trunk, catching up
      from the last sync merge:
      
      C:\SVN\sandbox\merge-mem-use\gpg-agent-password-store>svn diff --depth empty
      ^^/subversion/branches/gpg-agent-password-store@1139384 -r1139383:1139384
      Index: .
      ===================================================================
      --- .   (revision 1139383)
      +++ .   (revision 1139384)
      
      Property changes on: .
      ___________________________________________________________________
      Modified: svn:mergeinfo
         Merged /subversion/branches/integrate-io-improvements:r1068684-1072297
         Merged /subversion/trunk:r1041571-1139365
         Merged /subversion/branches/integrate-txdelta-caching:r1072541-1078213
         Merged /subversion/branches/integrate-stream-api-extensions:r1068695-1072516
         Merged /subversion/branches/diff-optimizations:r1031270-1037352
         Merged
      /subversion/branches/performance:r979193,980118,981087,981090,981189,981194,981287,981684,981827,982043,983398,983406,983430,983474,983488,983490,9837
      60,983770,984973,985487-985488,985493,985497,985514,985601,985603,985695,986465,986485,986491-986492,986517,986521,986605,986608,986817,986832,987865,987868-987
      869,987872,987886-987887,988319,988898,990330,990533,990535-990537,990541,990568,990572,990574-990575,990600,990759,992899,992904,992911,993127,993141,994956,99
      5478,998012,998858,999098,1001417,1004291,1022668,1022670,1022676,1022715,1022719,1025672,1027193,1027203,1027206,1027214,1027227,1028077,1028107,1028111,102835
      4,1029043,1029054-1029055,1029062-1029063,1029078,1029080,1029093,1029111,1029151,1029158,1029229-1029230,1029232,1029336,1029339-1029340,1029342,1029344,103082
      7,1031203,1031235,1032285,1032333,1033040,1033057,1033294,1035869,1035882,1039511,1043705,1053735,1056015,1066452,1067683,1067697-1078365
         Merged /subversion/branches/diff-optimizations-bytes:r1037353-1067789
         Merged /subversion/branches/integrate-partial-getter:r1072558-1076552
         Merged /subversion/branches/integrate-compression-level:r1068651-1072287
         Merged /subversion/branches/integrate-readline-speedup:r1072553-1072555
         Merged /subversion/branches/uris-as-urls:r1060426-1064427
         Merged /subversion/branches/integrate-cache-membuffer:r998649-998852
         Merged /subversion/branches/integrate-cache-item-serialization:r1068724-1068739
         Merged /subversion/branches/integrate-is-cachable:r1072568-1074082
      
      But the mergeinfo on the newly added svn_temp_serializer.c subtree is not
      updated to describe the merge and only has the mergeinfo from its copy source:
      
      C:\SVN\sandbox\merge-mem-use\gpg-agent-password-store>svn pg svn:mergeinfo
      ^^/subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/svn_temp_serializer.c@1139384
      /subversion/trunk/subversion/libsvn_subr/svn_temp_serializer.c:1067687-1072301
      
      c:\SVN\sandbox\merge-mem-use\gpg-agent-password-store>svn pg svn:mergeinfo -v
      ^^/subversion/trunk/subversion/libsvn_subr/svn_temp_serializer.c@1139365
      Properties on
      'http://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_subr/svn_temp_serializer.c':
        svn:mergeinfo
          /subversion/trunk/subversion/libsvn_subr/svn_temp_serializer.c:1067687-1072301
      
      This is a problem because subsequent sync merges will detect what it thinks are
      operative revisions on svn_temp_serializer.c and try to merge them, possibly
      resulting in conflicts.  We can see this if we repeat the sync merge of r1139384
      (We'll confine the merge target to libsvn_subr to keep things simple, but the
      same thing happens if targeting the root of the branch):
      
      >svn info
      Path: .
      Working Copy Root Path: C:\SVN\sandbox\merge-mem-use\gpg-agent-password-store
      URL: http://svn.apache.org/repos/asf/subversion/branches/gpg-agent-password-store
      Repository Root: http://svn.apache.org/repos/asf
      Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
      Revision: 1139384
      Node Kind: directory
      Schedule: normal
      Last Changed Author: stsp
      Last Changed Rev: 1139384
      Last Changed Date: 2011-06-24 12:51:56 -0400 (Fri, 24 Jun 2011)
      
      >svn merge ^^/subversion/trunk/subversion/libsvn_subr subversion\libsvn_subr.
      -r1041570:1139365 --accept postpone
      --- Merging r1054579 into 'subversion\libsvn_subr\adler32.c':
      U    subversion\libsvn_subr\adler32.c
      --- Merging r1067680 into 'subversion\libsvn_subr\adler32.c':
      U    subversion\libsvn_subr\adler32.c
      --- Merging r1067800 into 'subversion\libsvn_subr\adler32.c':
       G   subversion\libsvn_subr\adler32.c
      --- Merging r1078256 into 'subversion\libsvn_subr\svn_temp_serializer.c':
      C    subversion\libsvn_subr\svn_temp_serializer.c
      --- Recording mergeinfo for merge of r1041571 through r1078256 into
      'subversion\libsvn_subr':
       G   subversion\libsvn_subr
      --- Recording mergeinfo for merge of r1041571 through r1078256 into
      'subversion\libsvn_subr\adler32.c':
       U   subversion\libsvn_subr\adler32.c
      Summary of conflicts:
        Text conflicts: 1
      ..\..\..\subversion\svn\util.c:913: (apr_err=155015)
      ..\..\..\subversion\libsvn_client\merge.c:10998: (apr_err=155015)
      ..\..\..\subversion\libsvn_client\merge.c:10952: (apr_err=155015)
      ..\..\..\subversion\libsvn_client\merge.c:10952: (apr_err=155015)
      ..\..\..\subversion\libsvn_client\merge.c:10922: (apr_err=155015)
      ..\..\..\subversion\libsvn_client\merge.c:8933: (apr_err=155015)
      ..\..\..\subversion\libsvn_client\merge.c:4773: (apr_err=155015)
      svn: E155015: One or more conflicts were produced while merging r1078255:1078256
      into
      'C:\SVN\sandbox\merge-mem-use\gpg-agent-password-store\subversion\libsvn_subr' --
      resolve all conflicts and rerun the merge to apply the remaining
      unmerged revisions
      
      >svn st
       M      subversion\libsvn_subr
      ?       subversion\libsvn_subr\svn_temp_serializer.c.merge-right.r1078256
      C       subversion\libsvn_subr\svn_temp_serializer.c
      ?       subversion\libsvn_subr\svn_temp_serializer.c.working
      ?       subversion\libsvn_subr\svn_temp_serializer.c.merge-left.r1078255
       M      subversion\libsvn_subr\adler32.c
      Summary of conflicts:
        Text conflicts: 1
      

      Attachments

        Activity

          People

            pburba Paul Burba
            pburba Paul Burba
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: