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

WC-WC-copy of file external creates first-class file node

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: 1.7.0
    • Component/s: libsvn_wc
    • Labels:

      Description

      In 'svn copy <wc-path1> <wc-path2>', when <wc-path1> includes a readily
      checked-out file external, the copy will create an actual first-class node in
      <wc-path2>, copied from the external's source URL.
      
      In consequence, if the svn:externals definition for such file external is also
      within <wc-path1> (so that the svn:externals property is copied into <wc-path2>
      as well), a commit and subsequent checkout of wc-path2 has a collision between
      the first-class file node and the external definition.
      
      This problem was mentioned in issue #3589, but particularly, the issue seems to
      talk about a failing commit, as does its duplicate (#3878). Since I don't see a
      failing commit, I decided to open this distinct issue about the indesired
      first-class file node.
      
      Reproduce:
      
      [[[
      svnadmin create /tmp/repos
      svn co file:///tmp/repos /tmp/wc
      cd /tmp/wc
      
      echo a > a
      svn add a
      svn mkdir X 
      svn ci -mm
      svn up
      
      svn ps svn:externals "^/a xa" X
      svn ci -mm
      svn up
      
      svn cp X Y 
      svn ci -mm
      svn log -vl1 ^/
      
      svn co file:///tmp/repos /tmp/wc2
      ]]]
      
      With the result snippets:
      
      X/xa was a checked-out file external of ^/a, and was copied to Y/xa as a
      first-class file node:
      [[[
      ------------------------------------------------------------------------
      r3 | neels | 2011-09-02 04:00:08 +0200 (Fri, 02 Sep 2011) | 1 line
      Changed paths:
         A /Y (from /X:2)
         A /Y/xa (from /a:2)
      ]]]
      
      
      In a subsequent checkout, the two collide:
      [[[
      Fetching external item into '/tmp/wc2/Y/xa':
      svn: warning: W195017: The file external from 'file:///tmp/repos/a' cannot
      overwrite the existing versioned item at '/tmp/wc2/Y/xa'
      ]]]
      

      Original issue reported by neels

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: