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

diff -cN shows wrong line changed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • trunk
    • 1.8.0
    • libsvn_diff
    • None

    Description

      "svn diff -cN URL" can show the wrong diff. It marks an unchanged line as added
      and doesn't show an added line.
      
      $ svn cat -r341
      http://libslax.googlecode.com/svn/trunk/doc/oxtradoc/rfc2629-to-html.slax > f.341
      $ svn cat -r342
      http://libslax.googlecode.com/svn/trunk/doc/oxtradoc/rfc2629-to-html.slax > f.342
      $ svnadmin create repo
      $ svnmucc -mm put f.341 file://`pwd`/repo/f
      $ svnmucc -mm put f.342 file://`pwd`/repo/f
      
      $ diff -u f.34?
      --- f.341	2012-12-07 09:31:29.121339881 +0000
      +++ f.342	2012-12-07 09:31:36.749340307 +0000
      @@ -2696,6 +2696,7 @@
       table.full {
         border-style: outset;
         border-width: 1px;
      +  margin-left: 3em;
         background-color: lightyellow;
         padding: .25em;
         -moz-box-shadow:    0 0 4px #000000;
      
      $ svn diff -c2 file://`pwd`/repo/f
      Index: f
      ===================================================================
      --- f	(revision 1)
      +++ f	(revision 2)
      @@ -2696,6 +2696,7 @@
         vertical-align: top;
       }
       table.full {
      +  border-style: outset;
         border-style: outset;
         border-width: 1px;
         background-color: lightyellow;
      
      Subversion 1.6 shows the correct diff:
      
      $ svn1.6 diff -c2 file://`pwd`/repo/f
      Index: f
      ===================================================================
      --- f	(revision 1)
      +++ f	(revision 2)
      @@ -2698,6 +2698,7 @@
       table.full {
         border-style: outset;
         border-width: 1px;
      +  margin-left: 3em;
         background-color: lightyellow;
         padding: .25em;
         -moz-box-shadow:    0 0 4px #000000;
      

      Attachments

        1. 3_issue4270-trunk.patch
          0.4 kB
          Subversion Importer
        2. 2_f.342
          171 kB
          Philip Martin
        3. 1_f.341
          171 kB
          Philip Martin

        Activity

          People

            Unassigned Unassigned
            philipm Philip Martin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: