Ran a test that puts a file external inside an unversioned subdir. As soon
as I have such a file external, running 'svn cleanup' (even though there's
nothing to clean up) fails:

[[[
svn: E155016: database inconsistency at local_relpath='X/UNV/xb' verifying
expression 'have_a_parent_row'
]]]

So we should fix, or enforce in 1.7.x that file externals can only be
created directly in versioned directories. Because if user has an
unversioned path between WC and file external, 'svn cleanup' always fails.

Reproduction:
[[[
echo a > a
svn add a
svn ci -mm

svn ps svn:externals "^/a UNVER/a" .
svn up

svn cleanup
]]]

It doesn't matter if UNVER exists prior to the update or not.

(also attached)

~Neels
#!/usr/bin/env bash

## TO MAKE THIS RUN YOUR CUSTOM COMPILED SVN, two simple options:
## 1. Adjust your PATH to point at your custom installed location:
##      export PATH="$HOME/prefix/svn_trunk/bin:$PATH"
## OR
## 2. Uncomment the four lines below to use aliases into your
##    built source tree. The next line is the only line you should
##    need to adjust.
# SVNDIR=/path/to/built_subversion_source_tree
# function svn() { "$SVNDIR/subversion/svn/svn" "$@"; }
# function svnserve() { "$SVNDIR/subversion/svnserve/svnserve" "$@"; }
# function svnadmin() { "$SVNDIR/subversion/svnadmin/svnadmin" "$@"; }

set -e

svn --version
BASE="$(mktemp -d "/tmp/$(basename "$0").XXX")"
echo "BASE = $BASE"
REPOS="$BASE/repos"
WC="$BASE/wc"
URL="file://$REPOS"
svnadmin create "$REPOS"

svn co -q "$URL" "$WC"

set +e
set -x
cd "$WC"

## ACTUAL TEST

echo a > a
svn add a
svn ci -mm

#mkdir UNVER
svn ps svn:externals "^/a UNVER/a" .
svn up

svn cleanup

## END
set +x
echo "BASE = $BASE"

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to