You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/11/27 12:52:46 UTC
svn commit: r1546002 [33/39] - in /subversion/branches/verify-keep-going: ./
build/ build/ac-macros/ build/generator/ build/generator/swig/
build/generator/templates/ build/win32/ contrib/client-side/emacs/
contrib/server-side/ contrib/server-side/svnc...
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/davautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/davautocheck.sh?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/davautocheck.sh (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/davautocheck.sh Wed Nov 27 11:52:35 2013
@@ -27,7 +27,7 @@
# testing are:
# - Subversion built using --enable-shared --enable-dso --with-apxs options,
# - Working Apache 2 HTTPD Server with the apxs program reachable through
-# PATH or specified via the APXS environment variable,
+# PATH or specified via the APXS Makefile variable or environment variable,
# - Modules dav_module and log_config_module compiled as DSO or built into
# Apache HTTPD Server executable.
# The basic intension of this script is to be able to perform "make check"
@@ -79,12 +79,14 @@
# environment.
#
# Passing --no-tests as argv[1] will have the script start a server
-# but not run any tests.
+# but not run any tests. Passing --gdb will do the same, and in addition
+# spawn gdb in the foreground attached to the running server.
PYTHON=${PYTHON:-python}
SCRIPTDIR=$(dirname $0)
SCRIPT=$(basename $0)
+STOPSCRIPT=$SCRIPTDIR/.$SCRIPT.stop
trap stop_httpd_and_die HUP TERM INT
@@ -113,13 +115,17 @@ query() {
read -n 1 -t 32
else
#
- prog=$(cat) <<'EOF'
+ prog="
import select as s
import sys
+import tty, termios
+tty.setcbreak(sys.stdin.fileno(), termios.TCSANOW)
if s.select([sys.stdin.fileno()], [], [], 32)[0]:
sys.stdout.write(sys.stdin.read(1))
-EOF
- REPLY=`stty cbreak; $PYTHON -c "$prog" "$@"; stty -cbreak`
+"
+ stty_state=`stty -g`
+ REPLY=`$PYTHON -u -c "$prog" "$@"`
+ stty $stty_state
fi
echo
[ "${REPLY:-$2}" = 'y' ]
@@ -157,8 +163,20 @@ get_prog_name() {
}
# Don't assume sbin is in the PATH.
+# ### Presumably this is used to locate /usr/sbin/apxs or /usr/sbin/apache2
PATH="$PATH:/usr/sbin:/usr/local/sbin"
+# Find the source and build directories. The build dir can be found if it is
+# the current working dir or the source dir.
+ABS_SRCDIR=$(cd ${SCRIPTDIR}/../../../; pwd)
+if [ -x subversion/svn/svn ]; then
+ ABS_BUILDDIR=$(pwd)
+elif [ -x $ABS_SRCDIR/subversion/svn/svn ]; then
+ ABS_BUILDDIR=$ABS_SRCDIR
+else
+ fail "Run this script from the root of Subversion's build tree!"
+fi
+
# Remove any proxy environmental variables that affect wget or curl.
# We don't need a proxy to connect to localhost and having the proxy
# environmental variables set breaks the Apache configuration file
@@ -169,10 +187,18 @@ unset http_proxy
unset HTTPS_PROXY
# Pick up value from environment or PATH (also try apxs2 - for Debian)
-[ ${APXS:+set} ] \
- || APXS=$(which apxs) \
- || APXS=$(which apxs2) \
- || fail "neither apxs or apxs2 found - required to run davautocheck"
+if [ ${APXS:+set} ]; then
+ :
+elif APXS=$(grep '^APXS' $ABS_BUILDDIR/Makefile | sed 's/^APXS *= *//') && \
+ [ -n "$APXS" ]; then
+ :
+elif APXS=$(which apxs); then
+ :
+elif APXS=$(which apxs2); then
+ :
+else
+ fail "neither apxs or apxs2 found - required to run davautocheck"
+fi
[ -x $APXS ] || fail "Can't execute apxs executable $APXS"
@@ -195,17 +221,6 @@ if [ ${CACHE_REVPROPS:+set} ]; then
CACHE_REVPROPS_SETTING=on
fi
-# Find the source and build directories. The build dir can be found if it is
-# the current working dir or the source dir.
-ABS_SRCDIR=$(cd ${SCRIPTDIR}/../../../; pwd)
-if [ -x subversion/svn/svn ]; then
- ABS_BUILDDIR=$(pwd)
-elif [ -x $ABS_SRCDIR/subversion/svn/svn ]; then
- ABS_BUILDDIR=$ABS_SRCDIR
-else
- fail "Run this script from the root of Subversion's build tree!"
-fi
-
if [ ${MODULE_PATH:+set} ]; then
MOD_DAV_SVN="$MODULE_PATH/mod_dav_svn.so"
MOD_AUTHZ_SVN="$MODULE_PATH/mod_authz_svn.so"
@@ -300,17 +315,16 @@ if [ ${USE_SSL:+set} ]; then
|| fail "SSL module not found"
fi
-random_port() {
- if [ -n "$BASH_VERSION" ]; then
- echo $(($RANDOM+1024))
- else
- $PYTHON -c 'import random; print random.randint(1024, 2**16-1)'
- fi
-}
+# Stop any previous instances, os we can re-use the port.
+if [ -x $STOPSCRIPT ]; then $STOPSCRIPT ; sleep 1; fi
-HTTPD_PORT=$(random_port)
-while netstat -an | grep $HTTPD_PORT | grep 'LISTEN'; do
- HTTPD_PORT=$(random_port)
+HTTPD_PORT=3691
+while netstat -an | grep $HTTPD_PORT | grep 'LISTEN' >/dev/null; do
+ HTTPD_PORT=$(( HTTPD_PORT + 1 ))
+ if [ $HTTPD_PORT -eq 65536 ]; then
+ # Most likely the loop condition is true regardless of $HTTPD_PORT
+ fail "netstat claims you have no free ports for httpd to listen on."
+ fi
done
HTTPD_ROOT="$ABS_BUILDDIR/subversion/tests/cmdline/httpd-$(date '+%Y%m%d-%H%M%S')"
HTTPD_CFG="$HTTPD_ROOT/cfg"
@@ -415,9 +429,17 @@ User $(id -un)
Group $(id -gn)
__EOF__
else
+HTTPD_LOCK="$HTTPD_ROOT/lock"
+mkdir "$HTTPD_LOCK" \
+ || fail "couldn't create lock directory '$HTTPD_LOCK'"
cat >> "$HTTPD_CFG" <<__EOF__
-# TODO: maybe uncomment this for prefork,worker MPMs only?
-# Mutex file:lock mpm-accept
+# worker and prefork MUST have a mpm-accept lockfile in 2.3.0+
+<IfModule worker.c>
+ Mutex "file:$HTTPD_LOCK" mpm-accept
+</IfModule>
+<IfModule prefork.c>
+ Mutex "file:$HTTPD_LOCK" mpm-accept
+</IfModule>
__EOF__
fi
@@ -433,10 +455,10 @@ cat >> "$HTTPD_CFG" <<__EOF__
Listen $HTTPD_PORT
ServerName localhost
PidFile "$HTTPD_PID"
-LogFormat "%h %l %u %t \"%r\" %>s %b" common
+LogFormat "%h %l %u %t \"%r\" %>s %b \"%f\"" common
CustomLog "$HTTPD_ACCESS_LOG" common
ErrorLog "$HTTPD_ERROR_LOG"
-LogLevel Debug
+LogLevel debug
ServerRoot "$HTTPD_ROOT"
DocumentRoot "$HTTPD_ROOT"
ScoreBoardFile "$HTTPD_ROOT/run"
@@ -492,6 +514,20 @@ RedirectMatch ^/svn-test-work/
__EOF__
START="$HTTPD -f $HTTPD_CFG"
+printf \
+'#!/bin/sh
+if [ -d "%s" ]; then
+ printf "Stopping previous HTTPD instance..."
+ if %s -k stop; then
+ # httpd had no output; echo a newline.
+ echo ""
+ elif [ -s "%s" ]; then
+ # httpd would have printed an error terminated by a newline.
+ kill -9 "`cat %s`"
+ fi
+fi
+' >$STOPSCRIPT "$HTTPD_ROOT" "$START" "$HTTPD_PID" "$HTTPD_PID"
+chmod +x $STOPSCRIPT
$START -t \
|| fail "Configuration file didn't pass the check, most likely modules couldn't be loaded"
@@ -528,10 +564,17 @@ rm "$HTTPD_CFG-copy"
say "HTTPD is good"
if [ $# -eq 1 ] && [ "x$1" = 'x--no-tests' ]; then
- echo "http://localhost:$HTTPD_PORT"
+ echo "http://localhost:$HTTPD_PORT/svn-test-work/repositories"
exit
fi
+if [ $# -eq 1 ] && [ "x$1" = 'x--gdb' ]; then
+ echo "http://localhost:$HTTPD_PORT/svn-test-work/repositories"
+ $STOPSCRIPT && gdb -silent -ex r -args $START -X
+ exit
+fi
+
+
if type time > /dev/null; then
TIME_CMD=time
else
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/diff_tests.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/diff_tests.py Wed Nov 27 11:52:35 2013
@@ -2752,6 +2752,20 @@ def basic_diff_summarize(sbox):
svntest.actions.run_and_verify_diff_summarize(expected_reverse_diff,
wc_dir, '-c-3')
+ # Get the differences between a deep newly added dir Issue(4421)
+ expected_diff = svntest.wc.State(wc_dir, {
+ 'Q/R' : Item(status='A '),
+ 'Q/R/newfile' : Item(status='A '),
+ })
+ expected_reverse_diff = svntest.wc.State(wc_dir, {
+ 'Q/R' : Item(status='D '),
+ 'Q/R/newfile' : Item(status='D '),
+ })
+ svntest.actions.run_and_verify_diff_summarize(expected_diff,
+ p('Q/R'), '-c3')
+ svntest.actions.run_and_verify_diff_summarize(expected_reverse_diff,
+ p('Q/R'), '-c-3')
+
#----------------------------------------------------------------------
def diff_weird_author(sbox):
"diff with svn:author that has < in it"
@@ -4580,6 +4594,80 @@ def diff_missing_tree_conflict_victim(sb
expected_output = [ ]
svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff', wc_dir)
+@Issue(4396)
+def diff_local_missing_obstruction(sbox):
+ "diff local missing and obstructed files"
+
+ sbox.build(read_only=True)
+ wc_dir = sbox.wc_dir
+
+ os.unlink(sbox.ospath('iota'))
+ os.unlink(sbox.ospath('A/mu'))
+ os.mkdir(sbox.ospath('A/mu'))
+
+ # Expect no output for missing and obstructed files
+ expected_output = [
+ ]
+ svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff', wc_dir)
+
+ sbox.simple_propset('K', 'V', 'iota', 'A/mu')
+ sbox.simple_append('IotA', 'Content')
+
+ # But do expect a proper property diff
+ expected_output = [
+ 'Index: %s\n' % (sbox.path('A/mu'),),
+ '===================================================================\n',
+ '--- %s\t(revision 1)\n' % (sbox.path('A/mu'),),
+ '+++ %s\t(working copy)\n' % (sbox.path('A/mu'),),
+ '\n',
+ 'Property changes on: %s\n' % (sbox.path('A/mu'),),
+ '___________________________________________________________________\n',
+ 'Added: K\n',
+ '## -0,0 +1 ##\n',
+ '+V\n',
+ '\ No newline at end of property\n',
+ 'Index: %s\n' % (sbox.path('iota'),),
+ '===================================================================\n',
+ '--- %s\t(revision 1)\n' % (sbox.path('iota'),),
+ '+++ %s\t(working copy)\n' % (sbox.path('iota'),),
+ '\n',
+ 'Property changes on: %s\n' % (sbox.path('iota'),),
+ '___________________________________________________________________\n',
+ 'Added: K\n',
+ '## -0,0 +1 ##\n',
+ '+V\n',
+ '\ No newline at end of property\n',
+ ]
+ svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff', wc_dir)
+
+ # Create an external. This produces an error in 1.8.0.
+ sbox.simple_propset('svn:externals', 'AA/BB ' + sbox.repo_url + '/A', '.')
+ sbox.simple_update()
+
+ svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [],
+ 'diff', wc_dir)
+
+
+@Issue(4444)
+def diff_move_inside_copy(sbox):
+ "diff copied-along child that contains a moved file"
+ sbox.build(read_only=True)
+ wc_dir = sbox.wc_dir
+
+ d_path = 'A/D'
+ d_copy = 'A/D-copy'
+ h_path = 'A/D-copy/H'
+ chi_path = '%s/chi' % h_path
+ chi_moved = '%s/chi-moved' % h_path
+
+ sbox.simple_copy(d_path, d_copy)
+ sbox.simple_move(chi_path, chi_moved)
+ sbox.simple_append(chi_moved, 'a new line')
+
+ # Bug: Diffing the copied-along parent directory asserts
+ svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [],
+ 'diff', sbox.ospath(h_path))
+
########################################################################
#Run the tests
@@ -4660,6 +4748,8 @@ test_list = [ None,
diff_dir_replaced_by_dir,
diff_repos_empty_file_addition,
diff_missing_tree_conflict_victim,
+ diff_local_missing_obstruction,
+ diff_move_inside_copy,
]
if __name__ == '__main__':
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/entries-dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/entries-dump.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/entries-dump.c (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/entries-dump.c Wed Nov 27 11:52:35 2013
@@ -105,7 +105,7 @@ entries_dump(const char *dir_path, svn_w
SVN_ERR(svn_wc__read_entries_old(&entries, dir_abspath, pool, pool));
lockfile_path = svn_dirent_join_many(pool, dir_path,
svn_wc_get_adm_dir(pool),
- "lock", NULL);
+ "lock", SVN_VA_NULL);
SVN_ERR(svn_io_check_path(lockfile_path, &kind, pool));
locked = (kind == svn_node_file);
}
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/externals_tests.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/externals_tests.py Wed Nov 27 11:52:35 2013
@@ -3226,6 +3226,126 @@ def update_dir_external_shallow(sbox):
'--set-depth=infinity',
sbox.ospath('A/B/E'))
+@Issue(4411)
+@XFail()
+def switch_parent_relative_file_external(sbox):
+ "switch parent-relative file external"
+
+ sbox.build()
+
+ # Create a parent-relative file external in r2
+ sbox.simple_propset('svn:externals', '../D/gamma gamma-ext', 'A/B')
+ sbox.simple_commit()
+ sbox.simple_update()
+
+ # Create a branch that contains the file external
+ sbox.simple_copy('A', 'A_copy')
+ sbox.simple_commit()
+ sbox.simple_update()
+
+ # Check out A/B_copy to a new working copy
+ branch_wc = sbox.add_wc_path("branch")
+ branch_url = sbox.repo_url + '/A_copy'
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'checkout', branch_url,
+ branch_wc)
+
+ # Rename the branch
+ sbox.simple_move('A_copy', 'A_copy2')
+ sbox.simple_commit()
+
+ # Switch the branch working copy to the new branch URL
+ new_branch_url = sbox.repo_url + '/A_copy2'
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'switch', new_branch_url,
+ branch_wc)
+
+ # Bug: The branch working copy can no longer be updated.
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'update', branch_wc)
+
+@Issue(4420)
+def file_external_unversioned_obstruction(sbox):
+ """file externals unversioned obstruction"""
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ expected_output = verify.RegexOutput('r2 committed .*')
+ svntest.actions.run_and_verify_svnmucc(None, expected_output, [],
+ '-U', sbox.repo_url, '-m', 'r2: set external',
+ 'propset', 'svn:externals', '^/A/mu mu-ext', 'A')
+
+ sbox.simple_append('A/mu-ext', 'unversioned obstruction')
+
+ # Update reports a tree-conflict but status doesn't show any such
+ # conflict. I'm no sure whether this is correct.
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A' : Item(status=' U'),
+ 'A/mu-ext' : Item(status=' ', treeconflict='A'),
+ })
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.add({
+ 'A/mu-ext' : Item('unversioned obstruction'),
+ })
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
+ expected_status.add({
+ 'A/mu-ext' : Item(status='M ', wc_rev='2', switched='X'),
+ })
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output, expected_disk,
+ expected_status)
+
+@Issue(4001)
+@XFail()
+def file_external_versioned_obstruction(sbox):
+ """file externals versioned obstruction"""
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ expected_output = verify.RegexOutput('r2 committed .*')
+ svntest.actions.run_and_verify_svnmucc(None, expected_output, [],
+ '-U', sbox.repo_url, '-m', 'r2: set external',
+ 'propset', 'svn:externals', '^/A/mu mu-ext', 'A')
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A' : Item(status=' U'),
+ 'A/mu-ext' : Item(status='A '),
+ })
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.add({
+ 'A/mu-ext' : Item('This is the file \'mu\'.\n'),
+ })
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
+ expected_status.add({
+ 'A/mu-ext' : Item(status=' ', wc_rev='2', switched='X'),
+ })
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output, expected_disk,
+ expected_status)
+
+ # Update skips adding the versioned node because of the file
+ # external obstruction then when the external is deleted the
+ # versioned node is missing from disk and wc.db. Not really sure
+ # what should happen, perhaps a not-present node?
+ expected_output = verify.RegexOutput('r3 committed .*')
+ svntest.actions.run_and_verify_svnmucc(None, expected_output, [],
+ '-U', sbox.repo_url, '-m', 'r3: copy file',
+ 'cp', 'head', 'A/mu', 'A/mu-ext',
+ 'propdel', 'svn:externals', 'A')
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A' : Item(status=' U'),
+ 'A/mu-ext' : Item(verb='Removed external', prev_verb='Skipped'),
+ })
+ expected_disk.tweak('A/mu-ext', content='This is the file \'mu\'.\n')
+ expected_status.tweak(wc_rev=3)
+ expected_status.tweak('A/mu-ext', switched=None)
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output, expected_disk,
+ expected_status)
+
########################################################################
# Run the tests
@@ -3279,6 +3399,9 @@ test_list = [ None,
move_with_file_externals,
pinned_externals,
update_dir_external_shallow,
+ switch_parent_relative_file_external,
+ file_external_unversioned_obstruction,
+ file_external_versioned_obstruction,
]
if __name__ == '__main__':
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/getopt_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/getopt_tests.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/getopt_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/getopt_tests.py Wed Nov 27 11:52:35 2013
@@ -72,6 +72,7 @@ del_lines_res = [
re.compile(r"\* ra_(neon|local|svn|serf) :"),
re.compile(r" - handles '(https?|file|svn)' scheme"),
re.compile(r" - with Cyrus SASL authentication"),
+ re.compile(r" - using serf \d+\.\d+\.\d+"),
re.compile(r"\* fs_(base|fs) :"),
]
@@ -89,13 +90,6 @@ rep_lines_res = [
# In 'svn --version --quiet', we print only the version
# number in a single line.
(re.compile(r'^\d+\.\d+\.\d+(-[a-zA-Z0-9]+)?$'), 'X.Y.Z\n'),
- # 'svn --help' has a line with the version number.
- # It can vary, for example:
- # "Subversion command-line client, version 1.1.0."
- # "Subversion command-line client, version 1.1.0-dev."
- (re.compile(r'Subversion command-line client, '
- 'version \d+\.\d+\.\d+(.|-[a-zA-Z0-9]+\.)$'),
- 'Subversion command-line client, version X.Y.Z.'),
]
# This is a trigger pattern that selects the secondary set of
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout Wed Nov 27 11:52:35 2013
@@ -1,5 +1,5 @@
usage: svn <subcommand> [options] [args]
-Subversion command-line client, version X.Y.Z.
+Subversion command-line client.
Type 'svn help <subcommand>' for help on a specific subcommand.
Type 'svn --version' to see the program version and RA modules
or 'svn --version --quiet' to see just the version number.
@@ -45,6 +45,7 @@ Available subcommands:
unlock
update (up)
upgrade
+ youngest
Subversion is a tool for version control.
For additional information, see http://subversion.apache.org/
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout Wed Nov 27 11:52:35 2013
@@ -95,6 +95,8 @@ Valid options:
--with-all-revprops : retrieve all revision properties
--with-no-revprops : retrieve no revision properties
--with-revprop ARG : retrieve revision property ARG
+ --auto-moves : attempt to interpret matching unique DEL+ADD
+ pairs as moves
--depth ARG : limit operation by depth ARG ('empty', 'files',
'immediates', or 'infinity')
--diff : produce diff output
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout Wed Nov 27 11:52:35 2013
@@ -1,5 +1,5 @@
usage: svn <subcommand> [options] [args]
-Subversion command-line client, version X.Y.Z.
+Subversion command-line client.
Type 'svn help <subcommand>' for help on a specific subcommand.
Type 'svn --version' to see the program version and RA modules
or 'svn --version --quiet' to see just the version number.
@@ -45,6 +45,7 @@ Available subcommands:
unlock
update (up)
upgrade
+ youngest
Subversion is a tool for version control.
For additional information, see http://subversion.apache.org/
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/info_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/info_tests.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/info_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/info_tests.py Wed Nov 27 11:52:35 2013
@@ -526,6 +526,11 @@ def binary_tree_conflict(sbox):
}]
svntest.actions.run_and_verify_info(expected_info, iota)
+ expected_info = [{
+ 'Path' : '%s' % re.escape(wc_dir),
+ }]
+ svntest.actions.run_and_verify_info(expected_info, wc_dir)
+
def relpath_escaping(sbox):
"relpath escaping should be usable as-is"
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/lock_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/lock_tests.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/lock_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/lock_tests.py Wed Nov 27 11:52:35 2013
@@ -1889,6 +1889,36 @@ def drop_locks_on_parent_deletion(sbox):
None,
wc_dir)
+
+def copy_with_lock(sbox):
+ """copy with lock on source"""
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ lock_url = sbox.repo_url + '/A/B/E/alpha'
+
+ svntest.actions.run_and_validate_lock(lock_url, svntest.main.wc_author)
+ sbox.simple_copy('A/B/E', 'A/B/E2')
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/B/E2' : Item(verb='Adding'),
+ })
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_status.tweak('A/B/E/alpha', writelocked='O')
+ expected_status.add({
+ 'A/B/E2' : Item(status=' ', wc_rev=2),
+ 'A/B/E2/alpha' : Item(status=' ', wc_rev=2),
+ 'A/B/E2/beta' : Item(status=' ', wc_rev=2),
+ })
+
+ # This is really a regression test for httpd: 2.2.25 and 2.4.6 have
+ # a bug that causes mod_dav to check for locks on the copy source
+ # and so the commit fails.
+ svntest.actions.run_and_verify_commit(wc_dir,
+ expected_output,
+ expected_status,
+ None,
+ wc_dir)
########################################################################
# Run the tests
@@ -1943,6 +1973,7 @@ test_list = [ None,
lock_unlock_deleted,
commit_stolen_lock,
drop_locks_on_parent_deletion,
+ copy_with_lock,
]
if __name__ == '__main__':
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/log_tests.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/log_tests.py Wed Nov 27 11:52:35 2013
@@ -32,6 +32,7 @@ import svntest
from svntest import wc
from svntest.main import server_has_mergeinfo
+from svntest.main import server_has_auto_move
from svntest.main import SVN_PROP_MERGEINFO
from svntest.mergetrees import set_up_branch
from diff_tests import make_diff_header, make_no_diff_deleted_header
@@ -407,7 +408,6 @@ def merge_history_repos(sbox):
# Restore working directory
os.chdir(was_cwd)
-
# For errors seen while parsing log data.
class SVNLogParseError(Exception):
pass
@@ -2184,6 +2184,7 @@ def log_diff(sbox):
compare_diff_output(r9diff, log_chain[1]['diff_lines'])
compare_diff_output(r8diff, log_chain[2]['diff_lines'])
+@Skip(svntest.main.is_fs_type_fsx)
def log_xml_old(sbox):
"log --xml shows kind for old style repository"
@@ -2264,7 +2265,6 @@ def log_diff_moved(sbox):
compare_diff_output(r3diff, log_chain[0]['diff_lines'])
compare_diff_output(r2diff, log_chain[1]['diff_lines'])
- # XFAIL mu3 not found at revisions 0 and 1
exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
'log', '--diff',
mu3_at_3)
@@ -2360,13 +2360,9 @@ def merge_sensitive_log_with_search(sbox
}
check_merge_results(log_chain, expected_merges)
-#----------------------------------------------------------------------
-# Test for issue #4355 'svn_client_log5 broken with multiple revisions
-# which span a rename'.
-@Issue(4355)
-@SkipUnless(server_has_mergeinfo)
-def log_multiple_revs_spanning_rename(sbox):
- "log for multiple revs which span a rename"
+# Helper function for a few tests
+def create_renaming_history_repos(sbox):
+ "create a repository containing renames and a suitable working copy"
sbox.build()
wc_dir = sbox.wc_dir
@@ -2374,7 +2370,6 @@ def log_multiple_revs_spanning_rename(sb
msg_file=os.path.abspath(msg_file)
mu_path1 = os.path.join(wc_dir, 'A', 'mu')
mu_path2 = os.path.join(wc_dir, 'trunk', 'mu')
- trunk_path = os.path.join(wc_dir, 'trunk')
# r2 - Change a file.
msg=""" Log message for revision 2
@@ -2399,6 +2394,27 @@ def log_multiple_revs_spanning_rename(sb
svntest.main.run_svn(None, 'ci', '-F', msg_file, wc_dir)
svntest.main.run_svn(None, 'up', wc_dir)
+ # r5 - Cyclic exchange.
+ svntest.main.run_svn(None, 'up', wc_dir)
+ sbox.simple_move(os.path.join('trunk', 'D'), os.path.join('trunk', 'X'))
+ sbox.simple_move(os.path.join('trunk', 'C'), os.path.join('trunk', 'D'))
+ sbox.simple_move(os.path.join('trunk', 'X'), os.path.join('trunk', 'C'))
+ svntest.main.run_svn(None, 'ci', '-m', "Log message for revision 5",
+ wc_dir)
+
+
+#----------------------------------------------------------------------
+# Test for issue #4355 'svn_client_log5 broken with multiple revisions
+# which span a rename'.
+@Issue(4355)
+@SkipUnless(server_has_mergeinfo)
+def log_multiple_revs_spanning_rename(sbox):
+ "log for multiple revs which span a rename"
+
+ trunk_path = sbox.ospath('trunk')
+
+ create_renaming_history_repos(sbox)
+
# Check that log can handle a revision range that spans a rename.
exit_code, output, err = svntest.actions.run_and_verify_svn(
None, None, [], 'log', '-r2:4', sbox.repo_url + '/trunk/mu')
@@ -2439,6 +2455,8 @@ def log_multiple_revs_spanning_rename(sb
log_chain = parse_log_output(output)
check_log_chain(log_chain, [2,3,1])
+ mu_path2 = sbox.ospath('trunk/mu')
+
# Should work with a WC target too.
exit_code, output, err = svntest.actions.run_and_verify_svn(
None, None, [], 'log', '-c2,3,1', mu_path2)
@@ -2488,6 +2506,54 @@ def log_multiple_revs_spanning_rename(sb
log_chain = parse_log_output(output)
check_log_chain(log_chain, [1,4])
+#----------------------------------------------------------------------
+def verify_move_log(sbox, flag, has_moves):
+ "result checker for log_auto_move"
+
+ trunk_path = os.path.join(sbox.wc_dir, 'trunk')
+
+ exit_code, output, err = svntest.actions.run_and_verify_svn(
+ None, None, [], 'log', '-r3', '-v', trunk_path, flag)
+ log_chain = parse_log_output(output)
+ check_log_chain(log_chain, [3], [2])
+
+ paths = log_chain[0]['paths']
+ if paths[0][0] != 'D' or paths[0][1] != '/A':
+ raise SVNLogParseError("Deletion of '/A' expected, %s of %s found" % paths[0])
+ if has_moves:
+ if paths[1][0] != 'V' or paths[1][1] != '/trunk (from /A:2)':
+ raise SVNLogParseError("Move of '/A' to '/trunk' expected, %s of %s found" % paths[1])
+ else:
+ if paths[1][0] != 'A' or paths[1][1] != '/trunk (from /A:2)':
+ raise SVNLogParseError("Addition of '/A' to '/trunk' expected, %s of %s found" % paths[1])
+
+ exit_code, output, err = svntest.actions.run_and_verify_svn(
+ None, None, [], 'log', '-r5', '-v', trunk_path, flag)
+ log_chain = parse_log_output(output)
+ check_log_chain(log_chain, [5], [2])
+
+ paths = log_chain[0]['paths']
+ if has_moves:
+ if paths[0][0] != 'E' or paths[0][1] != '/trunk/C (from /trunk/D:4)':
+ raise SVNLogParseError("Replacing move of '/trunk/C' with '/trunk/D' expected, %s of %s found" % paths[0])
+ if paths[1][0] != 'E' or paths[1][1] != '/trunk/D (from /trunk/C:4)':
+ raise SVNLogParseError("Replacing move of '/trunk/D' with '/trunk/C' expected, %s of %s found" % paths[1])
+ else:
+ if paths[0][0] != 'R' or paths[0][1] != '/trunk/C (from /trunk/D:4)':
+ raise SVNLogParseError("Replace of '/trunk/C' with '/trunk/D' expected, %s of %s found" % paths[0])
+ if paths[1][0] != 'R' or paths[1][1] != '/trunk/D (from /trunk/C:4)':
+ raise SVNLogParseError("Replace of '/trunk/D' with '/trunk/C' expected, %s of %s found" % paths[1])
+
+@Issue(4355)
+def log_auto_move(sbox):
+ "test --auto-moves flag"
+
+ create_renaming_history_repos(sbox)
+ verify_move_log(sbox, '--auto-moves', server_has_auto_move())
+ verify_move_log(sbox, '-v', 0)
+
+
+
########################################################################
# Run the tests
@@ -2534,6 +2600,7 @@ test_list = [ None,
log_search,
merge_sensitive_log_with_search,
log_multiple_revs_spanning_rename,
+ log_auto_move,
]
if __name__ == '__main__':
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/merge_tests.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/merge_tests.py Wed Nov 27 11:52:35 2013
@@ -656,7 +656,7 @@ def simple_property_merges(sbox):
'E/alpha.prej'
: Item(error_message('foo', 'foo_val', 'mod_foo')),
'E/beta.prej'
- : Item(error_message('foo', 'foo?\\129val', 'mod?\\129foo')),
+ : Item(error_message('foo', 'foo?\\81val', 'mod?\\81foo')),
})
expected_disk.tweak('E', 'E/alpha', props={'bar' : 'bar_val'})
expected_disk.tweak('E/beta', props={'bar' : 'bar\201val'})
@@ -1977,7 +1977,7 @@ def merge_binary_with_common_ancestry(sb
# Commit the second branch
expected_output = wc.State(wc_dir, {
'L' : Item(verb='Adding'),
- 'L/theta' : Item(verb='Adding (bin)'),
+ 'L/theta' : Item(verb='Replacing'),
})
expected_status.add({
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/mergeinfo_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/mergeinfo_tests.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/mergeinfo_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/mergeinfo_tests.py Wed Nov 27 11:52:35 2013
@@ -803,6 +803,20 @@ def mergeinfo_log(sbox):
'--log', sbox.repo_url + '/A',
sbox.ospath('A2'))
+@SkipUnless(server_has_mergeinfo)
+@Issue(4301)
+def mergeinfo_local_move(sbox):
+ "'mergeinfo' on a locally moved path"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ sbox.simple_move('A', 'A2')
+ svntest.actions.run_and_verify_svn(None,
+ None, [],
+ 'mergeinfo', sbox.repo_url + '/A',
+ sbox.ospath('A2'))
+
########################################################################
# Run the tests
@@ -822,6 +836,7 @@ test_list = [ None,
natural_history_is_not_eligible_nor_merged,
noninheritable_mergeinfo_not_always_eligible,
mergeinfo_log,
+ mergeinfo_local_move,
]
if __name__ == '__main__':
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/move_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/move_tests.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/move_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/move_tests.py Wed Nov 27 11:52:35 2013
@@ -1338,6 +1338,221 @@ def nested_replaces(sbox):
svntest.main.run_svn(None, 'update', '-r1', wc_dir)
svntest.actions.run_and_verify_status(wc_dir, r1_status)
+def setup_move_many(sbox):
+ "helper function which creates a wc with node A/A/A which is moved 3 times"
+
+ sbox.simple_rm('A', 'iota')
+ sbox.simple_mkdir('A',
+ 'A/A',
+ 'A/A/A',
+ 'A/A/A/A',
+ 'B',
+ 'B/A',
+ 'B/A/A',
+ 'B/A/A/A',
+ 'C',
+ 'C/A',
+ 'C/A/A',
+ 'C/A/A/A')
+ sbox.simple_commit()
+ sbox.simple_update()
+
+ sbox.simple_move('A/A/A', 'AAA_1')
+
+ sbox.simple_rm('A')
+ sbox.simple_move('B', 'A')
+
+ sbox.simple_move('A/A/A', 'AAA_2')
+
+ sbox.simple_rm('A/A')
+ sbox.simple_move('C/A', 'A/A')
+
+ sbox.simple_move('A/A/A', 'AAA_3')
+
+def move_many_status(wc_dir):
+ "obtain standard status after setup_move_many"
+
+ return svntest.wc.State(wc_dir, {
+ '' : Item(status=' ', wc_rev='2'),
+
+ 'AAA_1' : Item(status='A ', copied='+', moved_from='A/A/A', wc_rev='-'),
+ 'AAA_1/A' : Item(status=' ', copied='+', wc_rev='-'),
+
+ 'AAA_2' : Item(status='A ', copied='+', moved_from='A/A/A', wc_rev='-'),
+ 'AAA_2/A' : Item(status=' ', copied='+', wc_rev='-'),
+
+ 'AAA_3' : Item(status='A ', copied='+', moved_from='A/A/A', wc_rev='-'),
+ 'AAA_3/A' : Item(status=' ', copied='+', wc_rev='-'),
+
+ 'A' : Item(status='R ', copied='+', moved_from='B', wc_rev='-'),
+ 'A/A' : Item(status='R ', copied='+', moved_from='C/A', wc_rev='-'),
+ 'A/A/A' : Item(status='D ', copied='+', wc_rev='-', moved_to='AAA_3'),
+ 'A/A/A/A' : Item(status='D ', copied='+', wc_rev='-'),
+
+ 'B' : Item(status='D ', wc_rev='2', moved_to='A'),
+ 'B/A' : Item(status='D ', wc_rev='2'),
+ 'B/A/A' : Item(status='D ', wc_rev='2'),
+ 'B/A/A/A' : Item(status='D ', wc_rev='2'),
+
+ 'C' : Item(status=' ', wc_rev='2'),
+ 'C/A' : Item(status='D ', wc_rev='2', moved_to='A/A'),
+ 'C/A/A' : Item(status='D ', wc_rev='2'),
+ 'C/A/A/A' : Item(status='D ', wc_rev='2'),
+ })
+
+def move_many_update_delete(sbox):
+ "move many and delete-on-update"
+
+ sbox.build()
+ setup_move_many(sbox)
+
+ wc_dir = sbox.wc_dir
+
+ # Verify start situation
+ expected_status = move_many_status(wc_dir)
+ svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+ # And now create a tree conflict
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'rm', sbox.repo_url + '/B',
+ '-m', '')
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'B' : Item(status=' ', treeconflict='C'),
+ })
+
+
+ expected_status.tweak('', 'C', 'C/A', 'C/A/A', 'C/A/A/A', wc_rev='3')
+ expected_status.tweak('A', moved_from=None)
+ expected_status.remove('B/A', 'B/A/A', 'B/A/A/A')
+ expected_status.tweak('B', status='! ', treeconflict='C', wc_rev=None, moved_to=None)
+
+ svntest.actions.run_and_verify_update(wc_dir, expected_output, None,
+ expected_status)
+
+ # Would be nice if we could run the resolver as a separate step,
+ # but 'svn resolve' just fails for any value but working
+
+def move_many_update_add(sbox):
+ "move many and add-on-update"
+
+ sbox.build()
+ setup_move_many(sbox)
+
+ wc_dir = sbox.wc_dir
+
+ # Verify start situation
+ expected_status = move_many_status(wc_dir)
+ #svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+ # And now create a tree conflict
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'mkdir', sbox.repo_url + '/B/A/A/BB',
+ '-m', '')
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'B' : Item(status=' ', treeconflict='C'),
+ 'B/A' : Item(status=' ', treeconflict='U'),
+ 'B/A/A' : Item(status=' ', treeconflict='U'),
+ 'B/A/A/BB' : Item(status=' ', treeconflict='A'),
+ # And while resolving
+ 'A/A' : Item(status=' ', treeconflict='C')
+ })
+
+ expected_status.tweak('',
+ 'B', 'B/A', 'B/A/A', 'B/A/A/A',
+ 'C', 'C/A', 'C/A/A', 'C/A/A/A',
+ wc_rev='3')
+
+ expected_status.tweak('A/A', treeconflict='C')
+ expected_status.add({
+ 'A/A/A/BB' : Item(status='D ', copied='+', wc_rev='-'),
+ 'B/A/A/BB' : Item(status='D ', wc_rev='3'),
+ })
+
+ svntest.actions.run_and_verify_update(wc_dir, expected_output, None,
+ expected_status,
+ None, None, None,
+ None, None, None,
+ wc_dir, '--accept', 'mine-conflict')
+
+ # And another one
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'mkdir', sbox.repo_url + '/C/A/A/BB',
+ '-m', '')
+
+ expected_status.tweak('',
+ 'B', 'B/A', 'B/A/A', 'B/A/A/A',
+ 'C', 'C/A', 'C/A/A', 'C/A/A/A',
+ 'B/A/A/BB',
+ wc_rev='4')
+
+ expected_status.add({
+ 'C/A/A/BB' : Item(status='D ', wc_rev='4'),
+ })
+
+ expected_status.tweak('A/A/A', treeconflict='C')
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/A/A' : Item(status=' ', treeconflict='C'),
+ 'C/A' : Item(status=' ', treeconflict='C'),
+ 'C/A/A' : Item(status=' ', treeconflict='U'),
+ 'C/A/A/BB' : Item(status=' ', treeconflict='A'),
+ })
+
+ # This currently triggers an assertion failure
+ svntest.actions.run_and_verify_update(wc_dir, expected_output, None,
+ expected_status,
+ None, None, None,
+ None, None, None,
+ wc_dir, '--accept', 'mine-conflict')
+
+@Issue(4437)
+def move_del_moved(sbox):
+ "delete moved node, still a move"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ sbox.simple_mkdir('A/NEW')
+ sbox.simple_move('A/mu', 'A/NEW/mu')
+ sbox.simple_rm('A/NEW/mu')
+
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_status.tweak('A/mu', status='D ')
+ expected_status.add({
+ 'A/NEW' : Item(status='A ', wc_rev='-')
+ })
+
+ # A/mu still reports that it is moved to A/NEW/mu, while it is already
+ # deleted there.
+ svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+def copy_move_commit(sbox):
+ "copy, move and commit"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ #repro
+ # Prepare
+ # - Create folder aaa
+ # - Add file bbb.sql
+ # create table bbb (Id int not null)
+ # - Commit
+ # Repro Issue 2
+ # - Copy folder aaa under same parent folder (i.e. as a sibling). (using Ctrl drag/drop).
+ # Creates Copy of aaa
+ # - Rename Copy of aaa to eee
+ # - Commit
+ # Get error need to update
+ # - Update
+ # - Commit
+ # Get error need to update
+
+ sbox.simple_copy('A/D/G', 'A/D/GG')
+ sbox.simple_move('A/D/GG', 'A/D/GG-moved')
+ sbox.simple_commit('A/D/GG-moved')
+
#######################################################################
# Run the tests
@@ -1350,6 +1565,10 @@ test_list = [ None,
property_merge,
move_missing,
nested_replaces,
+ move_many_update_delete,
+ move_many_update_add,
+ move_del_moved,
+ copy_move_commit,
]
if __name__ == '__main__':
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/prop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/prop_tests.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/prop_tests.py Wed Nov 27 11:52:35 2013
@@ -910,7 +910,7 @@ def prop_value_conversions(sbox):
svntest.actions.set_prop('some-prop', 'bar\n', iota_path)
# NOTE: When writing out multi-line prop values in svn:* props, the
- # client converts to local encoding and local eoln style.
+ # client converts to local encoding and local eol style.
# Therefore, the expected output must contain the right kind of eoln
# strings. That's why we use os.linesep in the tests below, not just
# plain '\n'. The _last_ \n is also from the client, but it's not
@@ -2612,6 +2612,38 @@ def peg_rev_base_working(sbox):
'propget', '--strict', 'ordinal',
sbox.ospath('iota') + '@BASE')
+@Issue(4415)
+@XFail(svntest.main.is_ra_type_dav)
+def xml_unsafe_author(sbox):
+ "svn:author with XML unsafe chars"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ svntest.actions.enable_revprop_changes(sbox.repo_dir)
+
+ # client sends svn:author (via PROPPATCH for DAV)
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'propset', '--revprop', '-r', '1',
+ 'svn:author', 'foo\bbar', wc_dir)
+
+ # mod_dav_svn sends svn:author (via REPORT for DAV)
+ sbox.simple_update(revision=0)
+ sbox.simple_update(revision=1)
+ expected_info = [{
+ 'Path' : re.escape(wc_dir),
+ 'Repository Root' : sbox.repo_url,
+ 'Repository UUID' : svntest.actions.get_wc_uuid(wc_dir),
+ 'Last Changed Author' : 'foo\bbar',
+ }]
+ svntest.actions.run_and_verify_info(expected_info, wc_dir)
+
+ # mod_dav_svn sends svn:author (via PROPFIND for DAV)
+ svntest.actions.run_and_verify_svn(None, ['foo\bbar'], [],
+ 'propget', '--revprop', '-r', '1',
+ 'svn:author', '--strict', wc_dir)
+
+
########################################################################
# Run the tests
@@ -2657,6 +2689,7 @@ test_list = [ None,
inheritable_ignores,
almost_known_prop_names,
peg_rev_base_working,
+ xml_unsafe_author,
]
if __name__ == '__main__':
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/redirect_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/redirect_tests.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/redirect_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/redirect_tests.py Wed Nov 27 11:52:35 2013
@@ -140,6 +140,44 @@ def redirected_update(sbox):
verify_url(wc_dir, sbox.repo_url)
#----------------------------------------------------------------------
+@SkipUnless(svntest.main.is_ra_type_dav)
+def redirected_nonroot_update(sbox):
+ "redirected update of non-repos-root wc"
+
+ sbox.build(create_wc=False)
+ wc_dir = sbox.wc_dir
+ checkout_url = sbox.repo_url + '/A'
+ relocate_url = sbox.redirected_root_url() + '/A'
+
+ # Checkout a subdir of the repository root.
+ exit_code, out, err = svntest.main.run_svn(None, 'co',
+ checkout_url, wc_dir)
+ if err:
+ raise svntest.Failure
+
+ # Relocate (by cheating) the working copy to the redirect URL. When
+ # we then update, we'll expect to find ourselves automagically back
+ # to the original URL. (This is because we can't easily introduce a
+ # redirect to the Apache configuration from the test suite here.)
+ svntest.actions.no_relocate_validation()
+ exit_code, out, err = svntest.main.run_svn(None, 'sw', '--relocate',
+ checkout_url, relocate_url,
+ wc_dir)
+ svntest.actions.do_relocate_validation()
+
+ # Now update the working copy.
+ exit_code, out, err = svntest.main.run_svn(None, 'up', wc_dir)
+ if err:
+ raise svntest.Failure
+ if not re.match("^Updating '.*':", out[0]):
+ raise svntest.Failure
+ if not redirect_regex.match(out[1]):
+ raise svntest.Failure
+
+ # Verify that we have the expected URL.
+ verify_url(wc_dir, checkout_url)
+
+#----------------------------------------------------------------------
########################################################################
# Run the tests
@@ -149,6 +187,7 @@ test_list = [ None,
temporary_redirect,
redirected_checkout,
redirected_update,
+ redirected_nonroot_update,
]
if __name__ == '__main__':
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/revert_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/revert_tests.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/revert_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/revert_tests.py Wed Nov 27 11:52:35 2013
@@ -1644,6 +1644,8 @@ def revert_obstructing_wc(sbox):
'revert', '-R', wc_dir)
+
+
########################################################################
# Run the tests
@@ -1683,7 +1685,7 @@ test_list = [ None,
revert_no_text_change_conflict_recursive,
revert_with_unversioned_targets,
revert_nonexistent,
- revert_obstructing_wc
+ revert_obstructing_wc,
]
if __name__ == '__main__':
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/stat_tests.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/stat_tests.py Wed Nov 27 11:52:35 2013
@@ -2092,6 +2092,122 @@ def move_update_timestamps(sbox):
# beta is modified so timestamp is removed
no_text_timestamp(sbox.ospath('A/B/E2/beta'))
+@Issue(4398)
+def status_path_handling(sbox):
+ "relative/absolute path handling"
+
+ sbox.build(read_only=True)
+
+ # target is a relative path to a subdir
+ wc_dir = sbox.wc_dir
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+ # target is an absolute path to a subdir
+ cwd = os.getcwd()
+ abs_wc_dir = os.path.join(cwd, wc_dir)
+ expected_status = svntest.actions.get_virginal_state(abs_wc_dir, 1)
+ svntest.actions.run_and_verify_status(abs_wc_dir, expected_status)
+
+ # target is an absolute path to a parent dir
+ os.chdir(sbox.ospath('A/B'))
+ expected_status = svntest.actions.get_virginal_state(abs_wc_dir, 1)
+ svntest.actions.run_and_verify_status(abs_wc_dir, expected_status)
+
+ # target is a relative path to a parent dir
+ rel_wc_dir = os.path.join('..', '..')
+ expected_status = svntest.actions.get_virginal_state(rel_wc_dir, 1)
+ svntest.actions.run_and_verify_status(rel_wc_dir, expected_status)
+
+def status_move_missing_direct(sbox):
+ "move information when status is called directly"
+
+ sbox.build()
+ sbox.simple_copy('A', 'Z')
+ sbox.simple_commit('')
+ sbox.simple_update('')
+
+ sbox.simple_move('Z', 'ZZ')
+ sbox.simple_move('A', 'Z')
+ sbox.simple_move('Z/B', 'ZB')
+ sbox.simple_mkdir('Z/B')
+ sbox.simple_move('ZB/E', 'Z/B/E')
+
+ # Somehow 'svn status' now shows different output for 'ZB/E'
+ # when called directly and via an ancestor, as this handles
+ # multi-layer in a different way
+
+ # Note that the status output may change over different Subversion revisions,
+ # but the status on a node should be identical anyway 'svn status' is called
+ # on it.
+
+ expected_output = [
+ 'A + %s\n' % sbox.ospath('ZB'),
+ ' > moved from %s\n' % os.path.join('..', 'Z', 'B'),
+ 'D + %s\n' % sbox.ospath('ZB/E'),
+ ' > moved to %s\n' % os.path.join('..', 'Z', 'B', 'E'),
+ ]
+ svntest.actions.run_and_verify_svn(None, expected_output, [], 'status',
+ sbox.ospath('ZB'), '--depth', 'immediates')
+
+ # And calling svn status on just 'ZB/E' should have the same result for this node
+ # except that we calculate the relative path from a different base
+ expected_output = [
+ 'D + %s\n' % sbox.ospath('ZB/E'),
+ ' > moved to %s\n' % os.path.join('..', '..', 'Z', 'B', 'E'),
+ ]
+ svntest.actions.run_and_verify_svn(None, expected_output, [], 'status',
+ sbox.ospath('ZB/E'), '--depth', 'empty')
+
+def status_move_missing_direct_base(sbox):
+ "move when status is called directly with base"
+
+ sbox.build()
+ sbox.simple_copy('A', 'Z')
+ sbox.simple_mkdir('Q')
+ sbox.simple_mkdir('Q/ZB')
+ sbox.simple_mkdir('Q/ZB/E')
+ sbox.simple_commit('')
+ sbox.simple_update('')
+
+ sbox.simple_rm('Q')
+ sbox.simple_mkdir('Q')
+
+ sbox.simple_move('Z', 'ZZ')
+ sbox.simple_move('A', 'Z')
+ sbox.simple_move('Z/B', 'Q/ZB')
+ sbox.simple_mkdir('Z/B')
+ sbox.simple_move('Q/ZB/E', 'Z/B/E')
+
+ # Somehow 'svn status' now shows different output for 'Q/ZB/E'
+ # when called directly and via an ancestor, as this handles
+ # multi-layer in a different way
+
+ # Note that the status output may change over different Subversion revisions,
+ # but the status on a node should be identical anyway 'svn status' is called
+ # on it.
+
+ # This test had a different result as status_move_missing_direct at the time of
+ # writing this test.
+
+ expected_output = [
+ 'A + %s\n' % sbox.ospath('Q/ZB'),
+ ' > moved from %s\n' % os.path.join('..', '..', 'Z', 'B'),
+ 'D + %s\n' % sbox.ospath('Q/ZB/E'),
+ ' > moved to %s\n' % os.path.join('..', '..', 'Z', 'B', 'E'),
+ ]
+ svntest.actions.run_and_verify_svn(None, expected_output, [], 'status',
+ sbox.ospath('Q/ZB'), '--depth', 'immediates')
+
+ # And calling svn status on just 'ZB/E' should have the same result for this node,
+ # except that the moved_to information is calculated from the node itself
+ expected_output = [
+ 'D + %s\n' % sbox.ospath('Q/ZB/E'),
+ ' > moved to %s\n' % os.path.join('..', '..', '..', 'Z', 'B', 'E'),
+ ]
+ svntest.actions.run_and_verify_svn(None, expected_output, [], 'status',
+ sbox.ospath('Q/ZB/E'), '--depth', 'empty')
+
########################################################################
# Run the tests
@@ -2139,6 +2255,9 @@ test_list = [ None,
status_unversioned_dir,
status_case_changed,
move_update_timestamps,
+ status_path_handling,
+ status_move_missing_direct,
+ status_move_missing_direct_base,
]
if __name__ == '__main__':
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/svnadmin_tests.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/svnadmin_tests.py Wed Nov 27 11:52:35 2013
@@ -61,8 +61,7 @@ def check_hotcopy_bdb(src, dst):
if origerr or backerr or origout != backout:
raise svntest.Failure
-def check_hotcopy_fsfs(src, dst):
- "Verify that the SRC FSFS repository has been correctly copied to DST."
+def check_hotcopy_fsfs_fsx(src, dst):
# Walk the source and compare all files to the destination
for src_dirpath, src_dirs, src_files in os.walk(src):
# Verify that the current directory exists in the destination
@@ -146,6 +145,14 @@ def check_hotcopy_fsfs(src, dst):
f1.close()
f2.close()
+def check_hotcopy_fsfs(src, dst):
+ "Verify that the SRC FSFS repository has been correctly copied to DST."
+ check_hotcopy_fsfs_fsx(src, dst)
+
+def check_hotcopy_fsx(src, dst):
+ "Verify that the SRC FSX repository has been correctly copied to DST."
+ check_hotcopy_fsfs_fsx(src, dst)
+
#----------------------------------------------------------------------
# How we currently test 'svnadmin' --
@@ -238,6 +245,27 @@ def load_dumpstream(sbox, dump, *varargs
return load_and_verify_dumpstream(sbox, None, None, None, False, dump,
*varargs)
+def set_changed_path_list(filename, changes):
+ """ Replace the changed paths list in the file given by FILENAME
+ with the text CHANGES."""
+
+ # read full file
+ fp = open(filename, 'r+b')
+ contents = fp.read()
+
+ # replace the changed paths list
+ length = len(contents)
+ header = contents[contents.rfind('\n', length - 64, length - 1):]
+ body_len = long(header.split(' ')[1])
+
+ contents = contents[:body_len] + changes + header
+
+ # set new contents
+ fp.seek(0)
+ fp.write(contents)
+ fp.truncate()
+ fp.close()
+
######################################################################
# Tests
@@ -457,8 +485,10 @@ def hotcopy_dot(sbox):
if svntest.main.is_fs_type_fsfs():
check_hotcopy_fsfs(sbox.repo_dir, backup_dir)
- else:
+ if svntest.main.is_fs_type_bdb():
check_hotcopy_bdb(sbox.repo_dir, backup_dir)
+ if svntest.main.is_fs_type_fsx():
+ check_hotcopy_fsx(sbox.repo_dir, backup_dir)
#----------------------------------------------------------------------
@@ -549,9 +579,17 @@ def verify_windows_paths_in_repos(sbox):
if errput:
raise SVNUnexpectedStderr(errput)
- # unfortunately, FSFS needs to do more checks than BDB resulting in
- # different progress output
- if svntest.main.is_fs_type_fsfs():
+ # unfortunately, some backends needs to do more checks than other
+ # resulting in different progress output
+ if svntest.main.is_fs_type_fsx():
+ svntest.verify.compare_and_display_lines(
+ "Error while running 'svnadmin verify'.",
+ 'STDERR', ["* Verifying metadata at revision 0 ...\n",
+ "* Verifying repository metadata ...\n",
+ "* Verified revision 0.\n",
+ "* Verified revision 1.\n",
+ "* Verified revision 2.\n"], output)
+ elif svntest.main.is_fs_type_fsfs():
svntest.verify.compare_and_display_lines(
"Error while running 'svnadmin verify'.",
'STDERR', ["* Verifying repository metadata ...\n",
@@ -1468,8 +1506,8 @@ def verify_non_utf8_paths(sbox):
expected_stderr = [
"* Dumped revision 0.\n",
"WARNING 0x0002: E160005: "
- "While validating fspath '?\\230': "
- "Path '?\\230' is not in UTF-8"
+ "While validating fspath '?\\E6': "
+ "Path '?\\E6' is not in UTF-8"
"\n",
"* Dumped revision 1.\n",
]
@@ -1618,7 +1656,7 @@ def hotcopy_incremental_packed(sbox):
cwd = os.getcwd()
# Configure two files per shard to trigger packing
format_file = open(os.path.join(sbox.repo_dir, 'db', 'format'), 'wb')
- format_file.write("4\nlayout sharded 2\n")
+ format_file.write("6\nlayout sharded 2\n")
format_file.close()
# Pack revisions 0 and 1.
@@ -1856,7 +1894,7 @@ def verify_keep_going(sbox):
".*Verified revision 0.",
".*Verified revision 1.",
".*Error verifying revision 2.",
- ".*Verified revision 3.*",
+ ".*Error verifying revision 3.",
".*",
".*Summary.*",
".*E160004:.*"])
@@ -1890,6 +1928,170 @@ def verify_keep_going(sbox):
None, errput, None, "svnadmin: E165011:.*"):
raise svntest.Failure
+@SkipUnless(svntest.main.is_fs_type_fsfs)
+def verify_invalid_path_changes(sbox):
+ "detect invalid changed path list entries"
+
+ sbox.build(create_wc = False)
+ repo_url = sbox.repo_url
+
+ # Create a number of revisions each adding a single path
+ for r in range(2,20):
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'mkdir', '-m', 'log_msg',
+ sbox.repo_url + '/B' + str(r))
+
+ # modify every other revision to make sure that errors are not simply
+ # "carried over" but that all corrupts we get detected independently
+
+ # add existing node
+ set_changed_path_list(fsfs_file(sbox.repo_dir, 'revs', '2'),
+ "_0.0.t1-1 add-dir false false /A\n\n")
+
+ # add into non-existent parent
+ set_changed_path_list(fsfs_file(sbox.repo_dir, 'revs', '4'),
+ "_0.0.t3-2 add-dir false false /C/X\n\n")
+
+ # del non-existent node
+ set_changed_path_list(fsfs_file(sbox.repo_dir, 'revs', '6'),
+ "_0.0.t5-2 delete-dir false false /C\n\n")
+
+ # del existent node of the wrong kind
+ # THIS WILL NOT BE DETECTED
+ # since dump mechanism and file don't care about the types of deleted nodes
+ set_changed_path_list(fsfs_file(sbox.repo_dir, 'revs', '8'),
+ "_0.0.t7-2 delete-file false false /B3\n\n")
+
+ # copy from non-existent node
+ set_changed_path_list(fsfs_file(sbox.repo_dir, 'revs', '10'),
+ "_0.0.t9-2 add-dir false false /B10\n"
+ "6 /B8\n")
+
+ # copy from existing node of the wrong kind
+ set_changed_path_list(fsfs_file(sbox.repo_dir, 'revs', '12'),
+ "_0.0.t11-2 add-file false false /B12\n"
+ "9 /B8\n")
+
+ # modify non-existent node
+ set_changed_path_list(fsfs_file(sbox.repo_dir, 'revs', '14'),
+ "_0.0.t13-2 modify-file false false /A/D/H/foo\n\n")
+
+ # modify existent node of the wrong kind
+ set_changed_path_list(fsfs_file(sbox.repo_dir, 'revs', '16'),
+ "_0.0.t15-2 modify-file false false /B12\n\n")
+
+ # replace non-existent node
+ set_changed_path_list(fsfs_file(sbox.repo_dir, 'revs', '18'),
+ "_0.0.t17-2 replace-file false false /A/D/H/foo\n\n")
+
+ # find corruptions
+ exit_code, output, errput = svntest.main.run_svnadmin("verify",
+ "--keep-going",
+ sbox.repo_dir)
+
+ exp_out = svntest.verify.RegexListOutput([".*Verifying repository metadata",
+ ".*Verified revision 0.",
+ ".*Verified revision 1.",
+ ".*Error verifying revision 2.",
+ ".*Verified revision 3.",
+ ".*Error verifying revision 4.",
+ ".*Verified revision 5.",
+ ".*Error verifying revision 6.",
+ ".*Verified revision 7.",
+ ".*Verified revision 8.",
+ ".*Verified revision 9.",
+ ".*Error verifying revision 10.",
+ ".*Verified revision 11.",
+ ".*Error verifying revision 12.",
+ ".*Verified revision 13.",
+ ".*Error verifying revision 14.",
+ ".*Verified revision 15.",
+ ".*Error verifying revision 16.",
+ ".*Verified revision 17.",
+ ".*Error verifying revision 18.",
+ ".*Verified revision 19."])
+
+ exp_err = svntest.verify.RegexListOutput(["svnadmin: E160020:.*",
+ "svnadmin: E165011:.*"], False)
+
+
+ if svntest.verify.verify_outputs("Unexpected error while running 'svnadmin verify'.",
+ output, errput, exp_out, exp_err):
+ raise svntest.Failure
+
+ exit_code, output, errput = svntest.main.run_svnadmin("verify",
+ sbox.repo_dir)
+
+ exp_out = svntest.verify.RegexListOutput([".*Verifying repository metadata",
+ ".*Verified revision 0.",
+ ".*Verified revision 1.",
+ ".*Error verifying revision 2."])
+
+ if svntest.verify.verify_outputs("Unexpected error while running 'svnadmin verify'.",
+ output, errput, exp_out, exp_err):
+ raise svntest.Failure
+
+
+ exit_code, output, errput = svntest.main.run_svnadmin("verify",
+ "--quiet",
+ sbox.repo_dir)
+
+ if svntest.verify.verify_outputs("Output of 'svnadmin verify' is unexpected.",
+ None, errput, None, "svnadmin: E165011:.*"):
+ raise svntest.Failure
+
+
+def verify_denormalized_names(sbox):
+ "detect denormalized names and name collisions"
+
+ sbox.build(create_wc = False)
+ svntest.main.safe_rmtree(sbox.repo_dir, True)
+ svntest.main.create_repos(sbox.repo_dir)
+
+ dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]),
+ 'svnadmin_tests_data',
+ 'normalization_check.dump')
+ load_dumpstream(sbox, open(dumpfile_location).read())
+
+ exit_code, output, errput = svntest.main.run_svnadmin(
+ "verify", "--check-ucs-normalization", sbox.repo_dir)
+
+ expected_output_regex_list = [
+ ".*Verified revision 0.",
+ # A/{Eacute}
+ "WARNING 0x0003: Denormalized directory name 'A/.*'",
+ # A/{icircumflex}{odiaeresis}ta
+ "WARNING 0x0003: Denormalized file name 'A/.*ta'",
+ ".*Verified revision 1.",
+ ".*Verified revision 2.",
+ ".*Verified revision 3.",
+ # A/{Eacute}/{aring}lpha
+ "WARNING 0x0003: Denormalized file name 'A/.*/.*lpha'",
+ "WARNING 0x0004: Duplicate representation of path 'A/.*/.*lpha'",
+ ".*Verified revision 4.",
+ ".*Verified revision 5.",
+ # Q/{aring}lpha
+ "WARNING 0x0005: Denormalized path '/Q/.*lpha'"
+ # A/{Eacute}
+ " in svn:mergeinfo property of 'A/.*'",
+ # Q/{aring}lpha
+ "WARNING 0x0006: Duplicate representation of path '/Q/.*lpha'"
+ # A/{Eacute}
+ " in svn:mergeinfo property of 'A/.*'",
+ ".*Verified revision 6."]
+
+ # The BDB backend doesn't do global metadata verification.
+ if not svntest.main.is_fs_type_bdb():
+ expected_output_regex_list.insert(0, ".*Verifying repository metadata")
+
+ exp_out = svntest.verify.RegexListOutput(expected_output_regex_list)
+
+ if svntest.verify.verify_outputs(
+ "Unexpected error while running 'svnadmin verify'.",
+ output, errput, exp_out, None):
+ raise svntest.Failure
+
+
########################################################################
# Run the tests
@@ -1927,6 +2129,8 @@ test_list = [ None,
mergeinfo_race,
recover_old,
verify_keep_going,
+ verify_invalid_path_changes,
+ verify_denormalized_names,
]
if __name__ == '__main__':
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/svntest/actions.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/svntest/actions.py Wed Nov 27 11:52:35 2013
@@ -1916,11 +1916,11 @@ def get_virginal_state(wc_dir, rev):
return state
# Cheap administrative directory locking
-def lock_admin_dir(wc_dir, recursive=False):
+def lock_admin_dir(wc_dir, recursive=False, work_queue=False):
"Lock a SVN administrative directory"
db, root_path, relpath = wc.open_wc_db(wc_dir)
- svntest.main.run_wc_lock_tester(recursive, wc_dir)
+ svntest.main.run_wc_lock_tester(recursive, wc_dir, work_queue)
def set_incomplete(wc_dir, revision):
"Make wc_dir incomplete at revision"
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/svntest/main.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/svntest/main.py Wed Nov 27 11:52:35 2013
@@ -800,9 +800,11 @@ def run_atomic_ra_revprop_change(url, re
url, revision, propname, skel,
want_error and 1 or 0, default_config_dir)
-def run_wc_lock_tester(recursive, path):
+def run_wc_lock_tester(recursive, path, work_queue=False):
"Run the wc-lock obtainer tool, returning its exit code, stdout and stderr"
- if recursive:
+ if work_queue:
+ option = "-w"
+ elif recursive:
option = "-r"
else:
option = "-1"
@@ -1328,6 +1330,9 @@ def is_fs_type_fsfs():
# This assumes that fsfs is the default fs implementation.
return options.fs_type == 'fsfs' or options.fs_type is None
+def is_fs_type_fsx():
+ return options.fs_type == 'fsx'
+
def is_fs_type_bdb():
return options.fs_type == 'bdb'
@@ -1376,6 +1381,9 @@ def server_has_atomic_revprop():
def server_has_reverse_get_file_revs():
return options.server_minor_version >= 8
+def server_has_auto_move():
+ return options.server_minor_version >= 9
+
def is_plaintext_password_storage_disabled():
try:
predicate = re.compile("^WARNING: Plaintext password storage is enabled!")
@@ -1751,7 +1759,7 @@ def _create_parser():
parser.add_option('--url', action='store',
help='Base url to the repos (e.g. svn://localhost)')
parser.add_option('--fs-type', action='store',
- help='Subversion file system type (fsfs or bdb)')
+ help='Subversion file system type (fsfs, bdb or fsx)')
parser.add_option('--cleanup', action='store_true',
help='Whether to clean up')
parser.add_option('--enable-sasl', action='store_true',
@@ -2024,7 +2032,7 @@ def execute_tests(test_list, serial_only
# it to a number if possible
for testnum in list(range(1, len(test_list))):
test_case = TestRunner(test_list[testnum], testnum)
- if test_case.get_function_name() == str(arg):
+ if test_case.get_function_name() == str(arg).rstrip(','):
testnums.append(testnum)
appended = True
break
@@ -2137,7 +2145,11 @@ def execute_tests(test_list, serial_only
# Remove all scratchwork: the 'pristine' repository, greek tree, etc.
# This ensures that an 'import' will happen the next time we run.
if not options.is_child_process and not options.keep_local_tmp:
- safe_rmtree(temp_dir, 1)
+ try:
+ safe_rmtree(temp_dir, 1)
+ except:
+ logger.error("ERROR: cleanup of '%s' directory failed." % temp_dir)
+ exit_code = 1
# Cleanup after ourselves.
svntest.sandbox.cleanup_deferred_test_paths()
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/switch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/switch_tests.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/switch_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/switch_tests.py Wed Nov 27 11:52:35 2013
@@ -1041,7 +1041,7 @@ def switch_change_repos_root(sbox):
# Test 1: A switch that changes to a non-existing repo shouldn't work.
expected_err = ".*Unable to open repository.*|.*Could not open.*|"\
- ".*No repository found.*"
+ ".*Could not find.*|.*No repository found.*"
svntest.actions.run_and_verify_svn(None, None,
expected_err,
'switch', '--ignore-ancestry',
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/tree_conflict_tests.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/tree_conflict_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/tree_conflict_tests.py Wed Nov 27 11:52:35 2013
@@ -1455,6 +1455,67 @@ def update_dir_with_not_present(sbox):
run_and_verify_svn(None, None, [],
'ci', '-m', '', wc_dir)
+@XFail()
+def update_delete_mixed_rev(sbox):
+ "update that deletes mixed-rev"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ sbox.simple_move('A/B/E/alpha', 'A/B/E/alpha2')
+ sbox.simple_commit()
+ sbox.simple_update()
+ sbox.simple_rm('A/B')
+ sbox.simple_commit()
+ sbox.simple_update(revision=1)
+ sbox.simple_update(target='A/B/E', revision=2)
+ sbox.simple_mkdir('A/B/E2')
+
+ # Update raises a tree conflict on A/B due to local mod A/B/E2
+ expected_output = wc.State(wc_dir, {
+ 'A/B' : Item(status=' ', treeconflict='C'),
+ })
+ expected_disk = main.greek_state.copy()
+ expected_disk.add({
+ 'A/B/E2' : Item(),
+ 'A/B/E/alpha2' : Item(contents='This is the file \'alpha\'.\n'),
+ })
+ expected_disk.remove('A/B/E/alpha')
+ expected_status = get_virginal_state(wc_dir, 3)
+ expected_status.remove('A/B/E/alpha')
+ expected_status.add({
+ 'A/B/E2' : Item(status='A ', wc_rev='-'),
+ 'A/B/E/alpha2' : Item(status=' ', copied='+', wc_rev='-'),
+ })
+ expected_status.tweak('A/B',
+ status='A ', copied='+', treeconflict='C', wc_rev='-')
+ expected_status.tweak('A/B/F', 'A/B/E', 'A/B/E/beta', 'A/B/lambda',
+ copied='+', wc_rev='-')
+ run_and_verify_update(wc_dir,
+ expected_output, expected_disk, expected_status,
+ None, None, None, None, None, 1,
+ wc_dir)
+
+ # Resolving to working state should give a mixed-revision copy that
+ # gets committed as multiple copies
+ run_and_verify_resolved([sbox.ospath('A/B')], sbox.ospath('A/B'))
+ expected_output = wc.State(wc_dir, {
+ 'A/B' : Item(verb='Adding'),
+ 'A/B/E' : Item(verb='Replacing'),
+ 'A/B/E2' : Item(verb='Adding'),
+ })
+ expected_status.tweak('A/B', 'A/B/E', 'A/B/E2', 'A/B/F', 'A/B/E/alpha2',
+ 'A/B/E/beta', 'A/B/lambda',
+ status=' ', wc_rev=4, copied=None, treeconflict=None)
+ run_and_verify_commit(wc_dir,
+ expected_output, expected_status, None,
+ wc_dir)
+
+ expected_info = {
+ 'Name': 'alpha2',
+ 'Node Kind': 'file',
+ }
+ run_and_verify_info([expected_info], sbox.repo_url + '/A/B/E/alpha2')
+
#######################################################################
# Run the tests
@@ -1485,6 +1546,7 @@ test_list = [ None,
at_directory_external,
actual_only_node_behaviour,
update_dir_with_not_present,
+ update_delete_mixed_rev,
]
if __name__ == '__main__':
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/upgrade_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/upgrade_tests.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/upgrade_tests.py Wed Nov 27 11:52:35 2013
@@ -430,7 +430,10 @@ def basic_upgrade_1_0(sbox):
url = sbox.repo_url
- xml_entries_relocate(sbox.wc_dir, 'file:///1.0.0/repos', url)
+ # This is non-canonical by the rules of svn_uri_canonicalize, it gets
+ # written into the entries file and upgrade has to canonicalize.
+ non_canonical_url = url[:-1] + '%%%02x' % ord(url[-1])
+ xml_entries_relocate(sbox.wc_dir, 'file:///1.0.0/repos', non_canonical_url)
# Attempt to use the working copy, this should give an error
expected_stderr = wc_is_too_old_regex
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/wc_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/wc_tests.py?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/wc_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/wc_tests.py Wed Nov 27 11:52:35 2013
@@ -339,6 +339,24 @@ def cleanup_dir_external(sbox):
[], "cleanup", '--include-externals',
sbox.ospath(""))
+@Issue(4390)
+def checkout_within_locked_wc(sbox):
+ """checkout within a locked working copy"""
+
+ sbox.build(read_only = True)
+
+ # lock working copy and create outstanding work queue items
+ svntest.actions.lock_admin_dir(sbox.ospath(""), True, True)
+ expected_output = [
+ "A %s\n" % sbox.ospath("nested-wc/alpha"),
+ "A %s\n" % sbox.ospath("nested-wc/beta"),
+ "Checked out revision 1.\n"
+ ]
+ svntest.actions.run_and_verify_svn(None, UnorderedOutput(expected_output),
+ [], "checkout", sbox.repo_url + '/A/B/E',
+ sbox.ospath("nested-wc"))
+
+
########################################################################
# Run the tests
@@ -361,6 +379,7 @@ test_list = [ None,
cleanup_unversioned_items,
cleanup_unversioned_items_in_locked_wc,
cleanup_dir_external,
+ checkout_within_locked_wc,
]
if __name__ == '__main__':
Propchange: subversion/branches/verify-keep-going/subversion/tests/libsvn_client/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 27 11:52:35 2013
@@ -1,9 +1,3 @@
.libs
client-test
*.lo
-test-patch*
-test-wc*
-test-copy-crash
-test-youngest-common-ancestor
-foreign-copy1
-foreign-copy2
Modified: subversion/branches/verify-keep-going/subversion/tests/libsvn_client/client-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/libsvn_client/client-test.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/libsvn_client/client-test.c (original)
+++ subversion/branches/verify-keep-going/subversion/tests/libsvn_client/client-test.c Wed Nov 27 11:52:35 2013
@@ -57,7 +57,8 @@ create_greek_repos(const char **repos_ur
svn_fs_root_t *txn_root;
/* Create a filesytem and repository. */
- SVN_ERR(svn_test__create_repos(&repos, name, opts, pool));
+ SVN_ERR(svn_test__create_repos(
+ &repos, svn_test_data_path(name, pool), opts, pool));
/* Prepare and commit a txn containing the Greek tree. */
SVN_ERR(svn_fs_begin_txn2(&txn, svn_repos_fs(repos), 0 /* rev */,
@@ -67,7 +68,8 @@ create_greek_repos(const char **repos_ur
SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &committed_rev, txn, pool));
SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(committed_rev));
- SVN_ERR(svn_uri_get_file_url_from_dirent(repos_url, name, pool));
+ SVN_ERR(svn_uri_get_file_url_from_dirent(
+ repos_url, svn_test_data_path(name, pool), pool));
return SVN_NO_ERROR;
}
@@ -331,7 +333,6 @@ test_patch(const svn_test_opts_t *opts,
{
const char *repos_url;
const char *wc_path;
- const char *cwd;
svn_opt_revision_t rev;
svn_opt_revision_t peg_rev;
svn_client_ctx_t *ctx;
@@ -370,12 +371,11 @@ test_patch(const svn_test_opts_t *opts,
SVN_ERR(create_greek_repos(&repos_url, "test-patch-repos", opts, pool));
/* Check out the HEAD revision */
- SVN_ERR(svn_dirent_get_absolute(&cwd, "", pool));
/* Put wc inside an unversioned directory. Checking out a 1.7 wc
directly inside a 1.6 wc doesn't work reliably, an intervening
unversioned directory prevents the problems. */
- wc_path = svn_dirent_join(cwd, "test-patch", pool);
+ wc_path = svn_test_data_path("test-patch", pool);
SVN_ERR(svn_io_make_dir_recursively(wc_path, pool));
svn_test_add_dir_cleanup(wc_path);
@@ -389,8 +389,9 @@ test_patch(const svn_test_opts_t *opts,
TRUE, FALSE, ctx, pool));
/* Create the patch file. */
- patch_file_path = svn_dirent_join_many(pool, cwd,
- "test-patch", "test-patch.diff", NULL);
+ patch_file_path = svn_dirent_join_many(
+ pool, svn_test_data_path("test-patch", pool),
+ "test-patch.diff", SVN_VA_NULL);
SVN_ERR(svn_io_file_open(&patch_file, patch_file_path,
(APR_READ | APR_WRITE | APR_CREATE | APR_TRUNCATE),
APR_OS_DEFAULT, pool));
@@ -445,7 +446,7 @@ test_wc_add_scenarios(const svn_test_opt
SVN_ERR(create_greek_repos(&repos_url, "test-wc-add-repos", opts, pool));
committed_rev = 1;
- SVN_ERR(svn_dirent_get_absolute(&wc_path, "test-wc-add", pool));
+ wc_path = svn_test_data_path("test-wc-add", pool);
/* Remove old test data from the previous run */
SVN_ERR(svn_io_remove_dir2(wc_path, TRUE, NULL, NULL, pool));
@@ -598,7 +599,7 @@ test_16k_add(const svn_test_opts_t *opts
svn_opt_revision_t rev;
svn_client_ctx_t *ctx;
const char *repos_url;
- const char *cwd, *wc_path;
+ const char *wc_path;
svn_opt_revision_t peg_rev;
apr_array_header_t *targets;
apr_pool_t *iterpool = svn_pool_create(pool);
@@ -608,12 +609,11 @@ test_16k_add(const svn_test_opts_t *opts
SVN_ERR(create_greek_repos(&repos_url, "test-16k-repos", opts, pool));
/* Check out the HEAD revision */
- SVN_ERR(svn_dirent_get_absolute(&cwd, "", pool));
/* Put wc inside an unversioned directory. Checking out a 1.7 wc
directly inside a 1.6 wc doesn't work reliably, an intervening
unversioned directory prevents the problems. */
- wc_path = svn_dirent_join(cwd, "test-16k", pool);
+ wc_path = svn_test_data_path("test-16k", pool);
SVN_ERR(svn_io_make_dir_recursively(wc_path, pool));
svn_test_add_dir_cleanup(wc_path);
@@ -735,7 +735,7 @@ test_foreign_repos_copy(const svn_test_o
SVN_ERR(create_greek_repos(&repos_url, "foreign-copy1", opts, pool));
SVN_ERR(create_greek_repos(&repos2_url, "foreign-copy2", opts, pool));
- SVN_ERR(svn_dirent_get_absolute(&wc_path, "test-wc-add", pool));
+ wc_path = svn_test_data_path("test-foreign-repos-copy", pool);
wc_path = svn_dirent_join(wc_path, "foreign-wc", pool);
@@ -771,6 +771,9 @@ test_foreign_repos_copy(const svn_test_o
/* ========================================================================== */
+
+int svn_test_max_threads = 3;
+
struct svn_test_descriptor_t test_funcs[] =
{
SVN_TEST_NULL,
@@ -778,13 +781,13 @@ struct svn_test_descriptor_t test_funcs[
"test svn_client__elide_mergeinfo_catalog"),
SVN_TEST_PASS2(test_args_to_target_array,
"test svn_client_args_to_target_array"),
- SVN_TEST_OPTS_PASS(test_patch, "test svn_client_patch"),
SVN_TEST_OPTS_PASS(test_wc_add_scenarios, "test svn_wc_add3 scenarios"),
+ SVN_TEST_OPTS_PASS(test_foreign_repos_copy, "test foreign repository copy"),
+ SVN_TEST_OPTS_PASS(test_patch, "test svn_client_patch"),
SVN_TEST_OPTS_PASS(test_copy_crash, "test a crash in svn_client_copy5"),
#ifdef TEST16K_ADD
SVN_TEST_OPTS_PASS(test_16k_add, "test adding 16k files"),
#endif
SVN_TEST_OPTS_PASS(test_youngest_common_ancestor, "test youngest_common_ancestor"),
- SVN_TEST_OPTS_PASS(test_foreign_repos_copy, "test foreign repository copy"),
SVN_TEST_NULL
};
Modified: subversion/branches/verify-keep-going/subversion/tests/libsvn_delta/random-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/libsvn_delta/random-test.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/libsvn_delta/random-test.c (original)
+++ subversion/branches/verify-keep-going/subversion/tests/libsvn_delta/random-test.c Wed Nov 27 11:52:35 2013
@@ -109,12 +109,9 @@ open_tempfile(const char *name_template,
{
apr_status_t apr_err;
apr_file_t *fp = NULL;
- char *templ;
-
- if (!name_template)
- templ = apr_pstrdup(pool, "tempfile_XXXXXX");
- else
- templ = apr_pstrdup(pool, name_template);
+ char *templ = (char *)apr_pstrdup(
+ pool, svn_test_data_path(
+ name_template ? name_template : "tempfile_XXXXXX", pool));
apr_err = apr_file_mktemp(&fp, templ, 0, pool);
assert(apr_err == 0);
@@ -515,6 +512,8 @@ random_combine_test(apr_pool_t *pool)
/* The test table. */
+int svn_test_max_threads = 1;
+
struct svn_test_descriptor_t test_funcs[] =
{
SVN_TEST_NULL,
Modified: subversion/branches/verify-keep-going/subversion/tests/libsvn_delta/window-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/libsvn_delta/window-test.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/libsvn_delta/window-test.c (original)
+++ subversion/branches/verify-keep-going/subversion/tests/libsvn_delta/window-test.c Wed Nov 27 11:52:35 2013
@@ -100,6 +100,8 @@ stream_window_test(apr_pool_t *pool)
/* The test table. */
+int svn_test_max_threads = 1;
+
struct svn_test_descriptor_t test_funcs[] =
{
SVN_TEST_NULL,
Propchange: subversion/branches/verify-keep-going/subversion/tests/libsvn_diff/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 27 11:52:35 2013
@@ -8,9 +8,3 @@ parse-diff-test
*~
.*~
*.exe
-B*
-T*
-combined
-modified1
-modified2
-original