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

1.8 bug(?): svn:mergeinfo set for tree-conflicted files in subdirs

From: Pete Harlan <pchpublic88_at_gmail.com>
Date: Wed, 11 Mar 2015 15:16:09 -0700


Subversion 1.8.11 behaves differently than 1.7.17 and 1.6.11, in that
it sets empty svn:mergeinfo properties for files within a
tree-conflicted directory during a merge. The effect is this:



Add empty dir/file.txt to trunk and independently to branch.
Merge trunk to branch; the resulting merge generates:

% svn propget -v svn:mergeinfo -R
Properties on '.':
Properties on 'dir/file.txt':


Expected result is that no svn:mergeinfo property would appear on
dir/file.txt. Is this a bug? A known bug?


Script to reproduce (run as "script.sh /path/to/svn"):

# Reproduce an issue in Subversion 1.8.11 where files in a tree
# conflict can have svn:mergeinfo properties added to them during a
# merge.
set -e


if [ $# != 1 ]; then
    echo "usage: $0 <path to svn>"

SVNADMIN="$(dirname $SVN)/svnadmin"


createAndCommitSubdirWithFile ()
    mkdir dir
    touch dir/file.txt
    $SVN add dir
    $SVN commit -m "$1"
    $SVN update # Update . to committed rev

# Create the repo and enter it.

# Create the trunk/branches structure
mkdir trunk
mkdir branches
$SVN add trunk branches
$SVN commit -m 'Create initial structure'

# Make a branch from the trunk.
$SVN copy ^/trunk ^/branches/branch -m 'Create branch from trunk'

# Commit a subdir with a file in it in the trunk and commit it.
$SVN switch --ignore-ancestry ^/trunk
createAndCommitSubdirWithFile 'Committed on trunk'

# Commit a subdir with a file in it in the branch and commit it.
$SVN switch ^/branches/branch
createAndCommitSubdirWithFile 'Committed on branch'

# Merge the trunk and display any svn:mergeinfo properties.
# (Remove --non-interactive if testing svn prior to 1.7)
$SVN merge --non-interactive ^/trunk || true
$SVN propget svn:mergeinfo -R . >actual.out

echo '. - /trunk:2-4' >expected.out

$SVN --version | head -1

if diff -q actual.out expected.out; then
    echo Success
    echo 'Test failed!'
    echo 'Expected output:'
    cat expected.out
    echo 'Actual output:'
    cat actual.out
    exit 1
Received on 2015-03-11 23:16:42 CET

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

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