[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Bug merging a symlink that used to be a file

From: Angela Marie Thomas <athomas_at_barracudanetworks.com>
Date: 2006-09-15 06:38:40 CEST

I found a bug when merging a symlink that used to be a file. The
scenario is as follows:
  branch regular file from trunk
  edit file on branch and commit
  remove file on trunk and commit
  add file back to trunk as symlink and commit
  merge branch to trunk
  get error
    svn: '.svn/tmp/tempfile.3.tmp' has unsupported special file type 'content'
    ['content' is the first word in the original trunk revision of the file]
  get error that working copy locked
  run 'svn cleanup'
  get same "unsupported special file type" error again

In our real-life scenario, the merge aborts when it gets to that file so
you don't get the option of dealing with that conflict in any graceful way.

This bug looks similar to the problem reported in bug 2530, but that bug
generated a different error message and is not reproducible in 1.4.0.
My bug was found in 1.1.3 and still exists in 1.4.0. The script to
reproduce my bug is below. It's a modified version of the script
submitted for bug 2530. A typescript session of the below is also available
at http://paste.lisp.org/display/26072.

I don't know what the right thing is for Subversion to do with this type
of conflict. However, the merge should not abort and the working copy
should not get wedged.


--cut here--

#!/bin/sh -ex

svnadmin create merge-bug-repo
svn mkdir "$repo/trunk" -m 'create directory tree'
svn mkdir "$repo/branches" -m 'create directory tree'

svn co "$repo/trunk" merge-bug-wc
cd merge-bug-wc
echo 'content' > file
svn add file
svn ci -m 'added file as a regular file'

svn cp "$repo/trunk" "$repo/branches/branch" \
        -m 'branched while file is still regular'
svn update
branchrev=$(svn info | grep ^Revision | awk ' { print $2 } ')

svn rm file
svn ci -m 'removed file in preparation of replacement with symlink'
echo blah > target
ln -s target file
svn add target file
svn ci -m 're-added file as a symlink (and its target too)'

svn switch "$repo/branches/branch"
echo 'replace file content' > file
svn ci -m "commit file change"

svn switch "$repo/trunk"
svn merge -r "$branchrev:HEAD" "$repo/branches/branch"

svn up
svn cleanup

Barracuda Networks makes the best spam firewalls and web filters. www.barracudanetworks.com

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 19 00:06:47 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.