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

Re: bug candidate: replacing symlink with other symlink turns to plain file on merge

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Sat, 06 Sep 2008 00:15:16 -0400

"David Glasser" <glasser_at_davidglasser.net> writes:
> On Fri, Sep 5, 2008 at 3:50 PM, Karl Fogel <kfogel_at_red-bean.com> wrote:
>> Wait, I think I've got it!
>> The problem is that the "svn:special" property is set to "link" on both
>> the old and new file, so it never appears as a prop diff -- nor should
>> it, since there's no difference.
> Really? I'd expect that for a 'R'eplaced file, property diffs should
> be based against the empty file, not against the deleted file.

(Bonus points to whoever supplies the appropriate Big Lebowski quote to
go along with the following...)

So, turns out the problem is not in the merge at all, but in the second
commit -- it never tacks on the "svn:special" property at all, even
though a symbolic link is being committed. Run this repro script and
the problem will be obvious:


SVN=`which svn`
SVNADMIN=`which svnadmin`


rm -rf repos wc

${SVNADMIN} create repos
${SVN} co ${URL}/ wc

cd wc

# Add two regular files in r1.
touch foo bar
${SVN} add foo bar
${SVN} ci -m "Add regular files foo, bar."
${SVN} up

# Add a symbolic link to foo in r2.
ln -s foo link
${SVN} add link
${SVN} ci -m "Add symbolic link to foo."
${SVN} up

# Change it to a symbolic link to bar in r3.
${SVN} rm link
ln -s bar link
${SVN} add link
${SVN} ci -m "Changed symbolic link to bar."
${SVN} up
LINK_URL=`${SVN} info link | grep "URL: " | cut -d " " -f2`
echo ""
echo "### But the svn:special prop didn't go into the repository in r3!"
echo "### Running 'svn plist -v ${LINK_URL}':"
echo ""
${SVN} plist -v ${LINK_URL}
echo ""
echo "### No output. Hmmm. Note that the property did make it into r2..."
echo "### Running 'svn plist -v ${LINK_URL}@2':"
echo ""
${SVN} plist -v ${LINK_URL}@2
echo ""
echo "### So the problem is with the replacing commit, not with the merge."

To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-09-06 06:16:14 CEST

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.