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

svn diff after file svn copy returns an empty diff

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • all
    • unscheduled
    • libsvn_wc
    • None
    • Linux

    Description

      If I copy a file from one directory to another where it does not exist, and then 
      use svn diff on the file, then I get an empty diff. I would expect to get a diff with 
      all the file contents. Here's a script that demonstrates the problem: 
       
      #!/bin/sh 
       
      REPOS=repo 
      REPOS_URL=file://`pwd`/repo 
      WC=wc 
       
      echo "creating repository" 
      svnadmin create ${REPOS} 
      svn co ${REPOS_URL} ${WC} > /dev/null 
       
      echo "creating the src_dir" 
      svn mkdir ${WC}/src_dir > /dev/null 
      echo foo > ${WC}/src_dir/foo 
      svn add ${WC}/src_dir/foo > /dev/null 
      svn ci -m "Creating the src_dir." ${WC} > /dev/null 
       
      echo "creating the dest_dir" 
      svn mkdir ${WC}/dest_dir > /dev/null 
      svn ci -m "Creating the dest_dir" ${WC} > /dev/null 
      svn up ${WC} > /dev/null 
       
      echo "copying the file" 
      svn copy ${WC}/src_dir/foo ${WC}/dest_dir 
       
      echo "comparing the file" 
      (cd ${WC}/dest_dir ; svn diff foo )
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              shlomif Shlomi Fish
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: