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

Case sensitivity problem using file: on Windows

    XMLWordPrintableJSON

Details

    Description

      Subversion performs a case-senstive comparison of the repository path 
      when determining if a file that is flagged as 'Copied' in the .svn/entries 
      file comes from the repository that a commit is being made to.
      
      In a mixed svn command line and TortoiseSVN environment it's possible 
      to get your working directory into a state where some files have got 
      correctly-cased pathnames, eg: "C:", whereas the 'copy_url' tags in the 
      status file have got names driven by what the user typed as the 
      repository name on the SVN CHECKOUT parameter line. Quite often this 
      will be lower case, eg "c:"
      
      When attempting to commit a working copy with such a mixed-case 
      problem, an error is generated along the lines of "file xxx comes from a 
      different repo".
      
      Once the working directory gets into this state either the merge must 
      be undone and then redone, or the 'entries' file in each .svn folder must 
      be edited to correct the case of the copied-from attributes of each 
      copied file.
      
      Here is a batch file to duplicate the problem:
      svnadmin create C:\svnrep
      mkdir c:\svnimport
      mkdir c:\svnimport\trunk\project
      echo "This is a file" > c:\svnimport\trunk\project\afile.txt
      svn import c:\svnimport file:///C:/svnrep -m "Initial import"
      svn copy file:///C:/svnrep/trunk file:///C:/svnrep/branch -m "Branched"
      mkdir c:\svnbranch
      svn co file:///C:/svnrep/branch c:\svnbranch
      echo "This is a new file for the branch" > c:\svnbranch\project\bfile.txt
      svn add c:\svnbranch\project\bfile.txt
      svn commit C:\svnbranch -m "Added new file to branch"
      mkdir c:\svntrunk
      rem *** If the following line uses the URL file:///C:/svnrep/trunk then 
      the commit will fail
      rem *** If it uses the URL file:///c:/svnrep/trunk then it will succeed.
      svn co file:///C:/svnrep/trunk c:\svntrunk
      svn merge -r 2:3 file:///c:/svnrep/branch c:\svntrunk
      svn commit c:\svntrunk -m "This commit will fail if the checkout used an 
      uppercase 'C:'"
      

      Original issue reported by stony

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              subversion-importer Subversion Importer
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: