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

inheritance can result in mergeinfo describing nonexistent sources

    XMLWordPrintableJSON

Details

    Description

      This issue was spun off of issue #3157 'Merging a change from a path's natural
      history creates self-referential mergeinfo'.
      
      The current mergeinfo inheritance design is simple: A path without explicit
      mergeinfo inherits the mergeinfo of its nearest parent with explicit mergeinfo,
      adjusted for the path difference between the two.  E.g.
      
        /branches/b1@100 has mergeinfo of '/trunk:50-73'
      
        /branches/b1/src/README@100 has no explicit mergeinfo,
        so it inherits '/trunk/src/README:50-73'
        (yes, we assume b1/src has no explicit mergeinfo either)
      
      This is fast and works fine in most cases, but when a merge is recording
      mergeinfo describing a merge on a path that has no explicit mergeinfo, it
      combines the path's inherited mergeinfo with the new mergeinfo describing the
      merge.  In this way, inherited mergeinfo is made explicit.
      
      A minor problem with this is that the inherited mergeinfo might be describe a
      merge source that doesn't exist.
      
      For example:
      
        A)  Assume an unremarkable (i.e. trunk, tags, branches setup)
            repository with no mergeinfo
      
        B)  Copy /trunk@100 to /branches/b1 in r101
      
        C)  In r102-300 assume various changes are made to both trunk
            and b1, including:
            In r152 a new path is added /trunk/src/NEW-README
            In r275 a change is made to /trunk/src/NEW-README
      
        D)  In r301 Merge ^/trunk branches/b1 -r100:200
            This results in the mergeinfo '/trunk:101-200' on branches/b1
      
        E)  Now merge ^/trunk/src/NEW-README branches/b1/src/NEW-README -c275
        
      In step 'E' the target has no mergeinfo of its own, but inherits some from the
      root of the branch.  When the merge records mergeinfo describing the merge it
      adds this inherited mergeinfo ('/trunk/src/NEW-README:101-200') to the mergeinfo
      describing the merge ('/trunk/src/NEW-README:275') and records it on the target.
       This results in the mergeinfo '/trunk/src/NEW-README:101-200,275' on
      branches/b1/src/NEW-README.
      
      There are two problem here, if we break the mergeinfo into three parts we see
      that only part of it is legitimate:
      
        1) '/trunk/src/NEW-README:101-151'
           This merge source doesn't exist!
      
        2) '/trunk/src/NEW-README:152'
           This merge source is self-referential!
         
        3) '/trunk/src/NEW-README:152-200,275'
           This is legitimate.
      
      This issue tracks the problem of nonexistent merge sources, the problem  of
      self-referential mergeinfo tracked in issue #3668.
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: