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

'annotate -g' confused about source of some merged changes

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.5.x
    • Fix Version/s: 1.10-consider
    • Component/s: unknown
    • Labels:
      None

      Description

      $ svn --version
      svn, version 1.5.0 (r31699)
         compiled Jun 25 2008, 09:40:45
      ...
      
      #get things set up
      $ ./create-repos.sh
      $ cd wc
      $ sn up
      $ cd trunk/foo/
      
      #my test file has four lines:
      $ cat foo-msg.txt 
      b1
      b3
      b5
      b6
      
      #the last two were added in a recent revision, r14:
      $ svn annotate foo-msg.txt 
           6   mmchenry b1
          10   mmchenry b3
          14   mmchenry b5
          14   mmchenry b6
      
      #and r14 was a merge of two revisions on a branch:
      $ svn log -r 14 -g -v foo-msg.txt
      ------------------------------------------------------------------------
      r14 | mmchenry | 2008-06-25 15:40:06 -0400 (Wed, 25 Jun 2008) | 1 line
      Changed paths:
         M /trunk
         M /trunk/foo/foo-msg.txt
      
      merging changes from branches/2007-Q4
      ------------------------------------------------------------------------
      r13 | mmchenry | 2008-06-25 15:40:03 -0400 (Wed, 25 Jun 2008) | 1 line
      Changed paths:
         M /branches/2007-Q4/foo/foo-msg.txt
      Merged via: r14
      
      branch change 6
      ------------------------------------------------------------------------
      r12 | mmchenry | 2008-06-25 15:40:02 -0400 (Wed, 25 Jun 2008) | 1 line
      Changed paths:
         M /branches/2007-Q4/foo/foo-msg.txt
      Merged via: r14
      
      branch change 5
      ------------------------------------------------------------------------
      
      #so those last two lines should be annotated as coming from some
      #combination of r12 and r13, but no:
      $ svn annotate -g foo-msg.txt 
      G      5   mmchenry b1
      G      8   mmchenry b3
      G     12   mmchenry b5
             2   mmchenry b6
      
      #what happened in r2?
      $ svn log -vg -r 2 foo-msg.txt 
      ------------------------------------------------------------------------
      r2 | mmchenry | 2008-06-25 15:39:45 -0400 (Wed, 25 Jun 2008) | 1 line
      Changed paths:
         A /trunk/foo
         A /trunk/foo/baz-msg.txt
         A /trunk/foo/foo-msg.txt
         A /trunk/message.txt
      
      adding initial files
      ------------------------------------------------------------------------
      
      #the file was added, and it was empty at that point, so it couldn't be the
      source of the 4th line:
      $ svn cat -r 2 foo-msg.txt | wc
             0       0       0
      
      #diff seems to say the right thing:
      $ svn diff -c 14 foo-msg.txt 
      Index: foo-msg.txt
      ===================================================================
      --- foo-msg.txt (revision 13)
      +++ foo-msg.txt (revision 14)
      @@ -1,2 +1,4 @@
       b1
       b3
      +b5
      +b6
      

        Attachments

        1. 4_test_2.log
          7 kB
          Subversion Importer
        2. 3_test_1.log
          4 kB
          Subversion Importer
        3. 2_merge_annotate_log_bug.py
          5 kB
          Subversion Importer
        4. 1_create-repos.sh
          2 kB
          Matt McHenry

          Activity

            People

            • Assignee:
              lgo Lieven Govaerts
              Reporter:
              jerith Matt McHenry
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: