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

Problems with file and directory renames

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • all
    • 0.31
    • unknown
    • None
    • Windows 2000

    Description

      If I run the following commands at the root of a drive:
          @echo on
          svnadmin create repos
          mkdir workingdir
          cd workingdir
          svn co file:///repos .
          svn mkdir dir1
          svn -m "1" commit
          cd dir1
          svn mkdir dir2
          svn -m "2" commit
          cd dir2
          echo line1 > file1
          svn add file1
          svn -m "3" commit
          echo line2 >> file1
          svn -m "4" commit
          svn mv file1 mvfile1
          svn -m "5" commit
          echo line3 >> mvfile1
          svn -m "6" commit
          cd ..
          cd ..
          svn mv dir1 mvdir1
          svn -m "7" commit
      
          svn update
      
          svn -m "7" commit
      
          cd mvdir1
          cd dir2
          svn diff -rHEAD:PREV mvfile1
      
          echo line4 >> mvfile1
          svn -m "8" commit
          svn diff -rHEAD:PREV mvfile1
      
          svn log file:///repos/mvdir1/dir2/mvfile1
          svnlook tree file:///repos/mvdir1/dir2/mvfile1
      
      I get the following response:
      
      	svnadmin create repos
      	mkdir workingdir
      	cdd workingdir
      	svn co file:///repos .
      	Checked out revision 0.
      	svn mkdir dir1
      	A         dir1
      	svn -m "1" commit
      	Adding         dir1
      
      	Committed revision 1.
      	cdd dir1
      	svn mkdir dir2
      	A         dir2
      	svn -m "2" commit
      	Adding         dir1/dir2
      
      	Committed revision 2.
      	cdd dir2
      	echo line1 > file1
      	svn add file1
      	A         file1
      	svn -m "3" commit
      	Adding         dir2/file1
      	Transmitting file data .
      	Committed revision 3.
      	echo line2 >> file1
      	svn -m "4" commit
      	Sending        dir2/file1
      	Transmitting file data .
      	Committed revision 4.
      	svn mv file1 mvfile1
      	A         mvfile1
      	D         file1
      	svn -m "5" commit
      	Deleting       dir2/file1
      	Adding         dir2/mvfile1
      
      	Committed revision 5.
      	echo line3 >> mvfile1
      	svn -m "6" commit
      	Sending        dir2/mvfile1
      	Transmitting file data .
      	Committed revision 6.
      	cdd ..
      	cdd ..
      	svn mv dir1 mvdir1
      	A         mvdir1
      	D         dir1/dir2/mvfile1
      	D         dir1/dir2
      	D         dir1
      	svn -m "7" commit
      	svn: Transaction is out of date
      	svn: Commit failed (details follow):
      	svn: out of date: `dir1' in txn `7'
      	Deleting       dir1
      	svn update
      	At revision 6.
      	svn -m "7" commit
      	Deleting       dir1
      	Adding         mvdir1
      	Adding         mvdir1/dir2
      
      	Committed revision 7.
      	cdd mvdir1
      	cdd dir2
      	svn diff -rHEAD:PREV mvfile1
      	svn: Filesystem has no item
      	svn: file not found: revision `6', path `/mvdir1/dir2'
      	echo line4 >> mvfile1
      	svn -m "8" commit
      	Sending        dir2/mvfile1
      	Transmitting file data .
      	Committed revision 8.
      	svn diff -rHEAD:PREV mvfile1
      	Index: mvfile1
      ======================================================
      =============
      --- mvfile1	(revision 8)
      	+++ mvfile1	(revision 7)
      	@@ -1,4 +1,3 @@
      	 line1
      	 line2
      	 line3
      	-line4
      	svn log file:///repos/mvdir1/dir2/mvfile1
      	------------------------------------------------------------
      ------------
      	rev 8:  MAHAE | 2002-11-14 09:53:16 +0100 (Thu, 14 Nov 
      2002) | 1 line
      
      	8
      	------------------------------------------------------------
      ------------
      	rev 6:  MAHAE | 2002-11-14 09:53:08 +0100 (Thu, 14 Nov 
      2002) | 1 line
      
      	6
      	------------------------------------------------------------
      ------------
      	rev 5:  MAHAE | 2002-11-14 09:53:06 +0100 (Thu, 14 Nov 
      2002) | 1 line
      
      	5
      	------------------------------------------------------------
      ------------
      	rev 4:  MAHAE | 2002-11-14 09:53:03 +0100 (Thu, 14 Nov 
      2002) | 1 line
      
      	4
      	------------------------------------------------------------
      ------------
      	rev 3:  MAHAE | 2002-11-14 09:53:01 +0100 (Thu, 14 Nov 
      2002) | 1 line
      
      	3
      	------------------------------------------------------------
      ------------
      	svnlook tree file:///repos/mvdir1/dir2/mvfile1
      	svn: Unsupported repository version
      	svn: Expected version '1' of repository; found no version at all; 
      is `file:///repos/mvdir1/dir2/mvfile1' a valid repository path?
      	svn: The filename, directory name, or volume label syntax is 
      incorrect.  
      	svn: svn_io_file_open: can't open 
      `file:///repos/mvdir1/dir2/mvfile1/format'
      
      This output shows 3 errors:
      
      - The first commit after the directory move is failing. After doing an svn 
      update is succeeds.
      - The first difference is failing because it cannot find the previous 
      revision (or do I have to give another command to compare the HEAD 
      with the PREV)
      - the snvlook tree command is returning an error (although the svn log 
      succeeds on the same url)
      

      Original issue reported by mahae

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: