You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/01/25 18:24:04 UTC
svn commit: r1063367 [1/3] - in /subversion/branches/ignore-mergeinfo-log:
./ build/ build/ac-macros/ build/generator/ subversion/include/
subversion/include/private/ subversion/libsvn_client/
subversion/libsvn_delta/ subversion/libsvn_fs_base/ subvers...
Author: hwright
Date: Tue Jan 25 17:24:01 2011
New Revision: 1063367
URL: http://svn.apache.org/viewvc?rev=1063367&view=rev
Log:
On the ignore-mergeinfo-log branch:
Bring up-to-date with trunk.
Added:
subversion/branches/ignore-mergeinfo-log/subversion/include/private/svn_fspath.h
- copied unchanged from r1063360, subversion/trunk/subversion/include/private/svn_fspath.h
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc_db_pristine.c
- copied unchanged from r1063360, subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c
Modified:
subversion/branches/ignore-mergeinfo-log/ (props changed)
subversion/branches/ignore-mergeinfo-log/INSTALL
subversion/branches/ignore-mergeinfo-log/build.conf
subversion/branches/ignore-mergeinfo-log/build/ac-macros/neon.m4
subversion/branches/ignore-mergeinfo-log/build/generator/gen_win.py
subversion/branches/ignore-mergeinfo-log/build/run_tests.py
subversion/branches/ignore-mergeinfo-log/configure.ac
subversion/branches/ignore-mergeinfo-log/subversion/include/private/svn_adler32.h (props changed)
subversion/branches/ignore-mergeinfo-log/subversion/include/private/svn_ra_private.h
subversion/branches/ignore-mergeinfo-log/subversion/include/private/svn_repos_private.h
subversion/branches/ignore-mergeinfo-log/subversion/include/svn_dirent_uri.h
subversion/branches/ignore-mergeinfo-log/subversion/include/svn_repos.h
subversion/branches/ignore-mergeinfo-log/subversion/include/svn_subst.h
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/copy.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/delete.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/list.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/locking_commands.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/merge.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/mergeinfo.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_delta/path_driver.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_base/dag.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_base/tree.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/dag.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/fs_fs.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/lock.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/tree.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra/ra_loader.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_local/ra_plugin.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_neon/fetch.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/commit.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/merge.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/options.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/property.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/ra_serf.h
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/serf.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/update.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/util.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/authz.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/hooks.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/reporter.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/repos.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/adler32.c (props changed)
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/deprecated.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/dirent_uri.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/mergeinfo.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/path.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/sqlite.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/subst.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/relocate.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/status.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/upgrade.c
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc-metadata.sql
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc-queries.sql
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc.h
subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/wc_db.c
subversion/branches/ignore-mergeinfo-log/subversion/mod_authz_svn/mod_authz_svn.c
subversion/branches/ignore-mergeinfo-log/subversion/mod_dav_svn/reports/update.c
subversion/branches/ignore-mergeinfo-log/subversion/svn/lock-cmd.c
subversion/branches/ignore-mergeinfo-log/subversion/svn/propset-cmd.c
subversion/branches/ignore-mergeinfo-log/subversion/svn/util.c
subversion/branches/ignore-mergeinfo-log/subversion/svnadmin/main.c
subversion/branches/ignore-mergeinfo-log/subversion/svnlook/main.c
subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/davautocheck.sh
subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/merge_tests.py
subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/svntest/main.py
subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/switch_tests.py
subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_subr/dirent_uri-test.c
subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_subr/subst_translate-test.c
subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_wc/db-test.c
subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_wc/entries-compat.c
subversion/branches/ignore-mergeinfo-log/subversion/tests/svn_test.h
subversion/branches/ignore-mergeinfo-log/subversion/tests/svn_test_main.c
subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svnbuild.sh
subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svncheck-bindings.sh
subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svncheck.sh
subversion/branches/ignore-mergeinfo-log/tools/buildbot/slaves/svn-openbsd-i386/svnclean.sh
subversion/branches/ignore-mergeinfo-log/tools/client-side/svnmucc/svnmucc.c
subversion/branches/ignore-mergeinfo-log/tools/dev/unix-build/Makefile.svn
subversion/branches/ignore-mergeinfo-log/tools/po/l10n-report.py
subversion/branches/ignore-mergeinfo-log/win-tests.py
Propchange: subversion/branches/ignore-mergeinfo-log/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 25 17:24:01 2011
@@ -40,4 +40,4 @@
/subversion/branches/tc_url_rev:874351-874483
/subversion/branches/tree-conflicts:868291-873154
/subversion/branches/tree-conflicts-notify:873926-874008
-/subversion/trunk:1054732-1058220
+/subversion/trunk:1054732-1063360
Modified: subversion/branches/ignore-mergeinfo-log/INSTALL
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/INSTALL?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/INSTALL (original)
+++ subversion/branches/ignore-mergeinfo-log/INSTALL Tue Jan 25 17:24:01 2011
@@ -504,8 +504,8 @@ I. INTRODUCTION
13. SQLite (REQUIRED)
- Subversion (starting with version 1.6) requires SQLite version
- 3.4.0 or above, and you can meet this dependency several ways:
+ Subversion 1.7 requires SQLite version 3.6.18 or above. You can meet
+ this dependency several ways:
* Use an SQLite amalgamation file.
* Specify an SQLite installation to use.
* Let Subversion find an installed SQLite.
Modified: subversion/branches/ignore-mergeinfo-log/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/build.conf?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/build.conf (original)
+++ subversion/branches/ignore-mergeinfo-log/build.conf Tue Jan 25 17:24:01 2011
@@ -325,7 +325,7 @@ msvc-export =
svn_sorts.h svn_string.h svn_subst.h svn_time.h svn_types.h svn_user.h
svn_utf.h svn_version.h svn_xml.h
private\svn_atomic.h private\svn_cache.h private\svn_cmdline_private.h
- private\svn_debug.h
+ private\svn_debug.h private\svn_fspath.h
private\svn_log.h private\svn_mergeinfo_private.h
private\svn_opt_private.h private\svn_skel.h private\svn_sqlite.h
private\svn_utf_private.h private\svn_eol_private.h
Modified: subversion/branches/ignore-mergeinfo-log/build/ac-macros/neon.m4
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/build/ac-macros/neon.m4?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/build/ac-macros/neon.m4 (original)
+++ subversion/branches/ignore-mergeinfo-log/build/ac-macros/neon.m4 Tue Jan 25 17:24:01 2011
@@ -61,6 +61,10 @@ AC_DEFUN(SVN_LIB_NEON,
fi
SVN_NEON_CONFIG()
+ ],
+ [
+ AC_PATH_PROG(neon_config, neon-config)
+ SVN_NEON_CONFIG()
])
AC_SUBST(SVN_NEON_INCLUDES)
Modified: subversion/branches/ignore-mergeinfo-log/build/generator/gen_win.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/build/generator/gen_win.py?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/build/generator/gen_win.py (original)
+++ subversion/branches/ignore-mergeinfo-log/build/generator/gen_win.py Tue Jan 25 17:24:01 2011
@@ -1544,8 +1544,9 @@ class WinGeneratorBase(GeneratorBase):
msg = 'Found SQLite version %s\n'
major, minor, patch = version
- if major < 3 or (major == 3 and minor < 4):
- sys.stderr.write("ERROR: SQLite 3.4.0 or higher is required "
+ if major < 3 or (major == 3 and minor < 6) \
+ or (major == 3 and minor == 6 and patch < 18):
+ sys.stderr.write("ERROR: SQLite 3.6.18 or higher is required "
"(%s found)\n" % self.sqlite_version);
sys.exit(1)
else:
Modified: subversion/branches/ignore-mergeinfo-log/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/build/run_tests.py?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/build/run_tests.py (original)
+++ subversion/branches/ignore-mergeinfo-log/build/run_tests.py Tue Jan 25 17:24:01 2011
@@ -79,7 +79,7 @@ class TestHarness:
server_minor_version=None, verbose=None,
cleanup=None, enable_sasl=None, parallel=None, config_file=None,
fsfs_sharding=None, fsfs_packing=None,
- list_tests=None, svn_bin=None):
+ list_tests=None, svn_bin=None, mode_filter=None):
'''Construct a TestHarness instance.
ABS_SRCDIR and ABS_BUILDDIR are the source and build directories.
@@ -91,6 +91,8 @@ class TestHarness:
HTTP_LIBRARY is the HTTP library for DAV-based communications.
SERVER_MINOR_VERSION is the minor version of the server being tested.
SVN_BIN is the path where the svn binaries are installed.
+ mode_filter restricts the TestHarness to tests with the expected mode
+ XFail, Skip, Pass, or All tests (default).
'''
self.srcdir = abs_srcdir
self.builddir = abs_builddir
@@ -113,6 +115,7 @@ class TestHarness:
self.config_file = os.path.abspath(config_file)
self.list_tests = list_tests
self.svn_bin = svn_bin
+ self.mode_filter = mode_filter
self.log = None
if not sys.stdout.isatty() or sys.platform == 'win32':
TextColors.disable()
@@ -151,16 +154,26 @@ class TestHarness:
sys.stdout.write('%s\n [[%s'
% (x[:wip], x[wip + len(wimptag):]))
- passed = [x for x in log_lines if x[:6] == 'PASS: ']
+ if self.list_tests:
+ passed = [x for x in log_lines if x[8:13] == ' ']
+ else:
+ passed = [x for x in log_lines if x[:6] == 'PASS: ']
- skipped = [x for x in log_lines if x[:6] == 'SKIP: ']
- if skipped:
+ if self.list_tests:
+ skipped = [x for x in log_lines if x[8:12] == 'SKIP']
+ else:
+ skipped = [x for x in log_lines if x[:6] == 'SKIP: ']
+
+ if skipped and not self.list_tests:
print('At least one test was SKIPPED, checking ' + self.logfile)
for x in skipped:
sys.stdout.write(x)
- xfailed = [x for x in log_lines if x[:6] == 'XFAIL:']
- if xfailed:
+ if self.list_tests:
+ xfailed = [x for x in log_lines if x[8:13] == 'XFAIL']
+ else:
+ xfailed = [x for x in log_lines if x[:6] == 'XFAIL:']
+ if xfailed and not self.list_tests:
print('At least one test XFAILED, checking ' + self.logfile)
for x in xfailed:
printxfail(x)
@@ -178,21 +191,40 @@ class TestHarness:
sys.stdout.write(x)
# Print summaries, from least interesting to most interesting.
- print('Summary of test results:')
+ if self.list_tests:
+ print('Summary of test listing:')
+ else:
+ print('Summary of test results:')
if passed:
- print(' %d test%s PASSED'
- % (len(passed), 's'*min(len(passed) - 1, 1)))
+ if self.list_tests:
+ print(' %d test%s are set to PASS'
+ % (len(passed), 's'*min(len(passed) - 1, 1)))
+ else:
+ print(' %d test%s PASSED'
+ % (len(passed), 's'*min(len(passed) - 1, 1)))
if skipped:
- print(' %d test%s SKIPPED'
- % (len(skipped), 's'*min(len(skipped) - 1, 1)))
+ if self.list_tests:
+ print(' %d test%s are set as SKIP'
+ % (len(skipped), 's'*min(len(skipped) - 1, 1)))
+ else:
+ print(' %d test%s SKIPPED'
+ % (len(skipped), 's'*min(len(skipped) - 1, 1)))
if xfailed:
passwimp = [x for x in xfailed if 0 <= x.find(wimptag)]
if passwimp:
- print(' %d test%s XFAILED (%d WORK-IN-PROGRESS)'
- % (len(xfailed), 's'*min(len(xfailed) - 1, 1), len(passwimp)))
+ if self.list_tests:
+ print(' %d test%s are set to XFAIL (%d WORK-IN-PROGRESS)'
+ % (len(xfailed), 's'*min(len(xfailed) - 1, 1), len(passwimp)))
+ else:
+ print(' %d test%s XFAILED (%d WORK-IN-PROGRESS)'
+ % (len(xfailed), 's'*min(len(xfailed) - 1, 1), len(passwimp)))
else:
- print(' %d test%s XFAILED'
- % (len(xfailed), 's'*min(len(xfailed) - 1, 1)))
+ if self.list_tests:
+ print(' %d test%s are set as XFAIL'
+ % (len(xfailed), 's'*min(len(xfailed) - 1, 1)))
+ else:
+ print(' %d test%s XFAILED'
+ % (len(xfailed), 's'*min(len(xfailed) - 1, 1)))
if xpassed:
failwimp = [x for x in xpassed if 0 <= x.find(wimptag)]
if failwimp:
@@ -245,8 +277,9 @@ class TestHarness:
'Run a c test, escaping parameters as required.'
progdir, progbase = os.path.split(prog)
- sys.stdout.write('.' * dot_count)
- sys.stdout.flush()
+ if not self.list_tests:
+ sys.stdout.write('.' * dot_count)
+ sys.stdout.flush()
if os.access(progbase, os.X_OK):
progname = './' + progbase
@@ -265,18 +298,12 @@ class TestHarness:
cmdline.append('--cleanup')
if self.fs_type is not None:
cmdline.append('--fs-type=' + self.fs_type)
- if self.http_library is not None:
- cmdline.append('--http-library=' + self.http_library)
if self.server_minor_version is not None:
cmdline.append('--server-minor-version=' + self.server_minor_version)
if self.list_tests is not None:
cmdline.append('--list')
- if self.svn_bin is not None:
- cmdline.append('--bin=' + self.svn_bin)
- if self.fsfs_sharding is not None:
- cmdline.append('--fsfs-sharding=%d' % self.fsfs_sharding)
- if self.fsfs_packing is not None:
- cmdline.append('--fsfs-packing')
+ if self.mode_filter is not None:
+ cmdline.append('--mode-filter=' + self.mode_filter)
if test_nums:
test_nums = test_nums.split(',')
@@ -328,6 +355,8 @@ class TestHarness:
svntest.main.options.fsfs_sharding = self.fsfs_sharding
if self.fsfs_packing is not None:
svntest.main.options.fsfs_packing = self.fsfs_packing
+ if self.mode_filter is not None:
+ svntest.main.options.mode_filter = self.mode_filter
svntest.main.options.srcdir = self.srcdir
@@ -356,10 +385,16 @@ class TestHarness:
# run the tests
svntest.testcase.TextColors.disable()
+
+ if self.list_tests:
+ prog_f = None
+ else:
+ prog_f = progress_func
+
failed = svntest.main.execute_tests(prog_mod.test_list,
serial_only=serial_only,
test_name=progbase,
- progress_func=progress_func)
+ progress_func=prog_f)
# restore some values
sys.path = old_path
@@ -389,13 +424,20 @@ class TestHarness:
if self.log:
# Using write here because we don't want even a trailing space
test_info = '%s [%d/%d]' % (progbase, test_nr + 1, total_tests)
- sys.stdout.write('Running tests in %s' % (test_info, ))
+ if self.list_tests:
+ sys.stdout.write('Listing tests in %s' % (test_info, ))
+ else:
+ sys.stdout.write('Running tests in %s' % (test_info, ))
sys.stdout.flush()
else:
# ### Hack for --log-to-stdout to work (but not print any dots).
test_info = ''
- log.write('START: %s\n' % progbase)
+ if self.list_tests:
+ log.write('LISTING: %s\n' % progbase)
+ else:
+ log.write('START: %s\n' % progbase)
+
log.flush()
start_time = datetime.now()
@@ -427,18 +469,24 @@ class TestHarness:
else:
log.write('FAIL: %s: Unknown test failure.\n' % progbase)
- # Log the elapsed time.
- elapsed_time = str(datetime.now() - start_time)
- log.write('END: %s\n' % progbase)
- log.write('ELAPSED: %s %s\n' % (progbase, elapsed_time))
+ if not self.list_tests:
+ # Log the elapsed time.
+ elapsed_time = str(datetime.now() - start_time)
+ log.write('END: %s\n' % progbase)
+ log.write('ELAPSED: %s %s\n' % (progbase, elapsed_time))
+
log.write('\n')
- # If we printed a "Running all tests in ..." line, add the test result.
+ # If we are only listing the tests just add a newline, otherwise if
+ # we printed a "Running all tests in ..." line, add the test result.
if self.log:
- if failed:
- print(TextColors.FAILURE + 'FAILURE' + TextColors.ENDC)
+ if self.list_tests:
+ print ''
else:
- print(TextColors.SUCCESS + 'success' + TextColors.ENDC)
+ if failed:
+ print(TextColors.FAILURE + 'FAILURE' + TextColors.ENDC)
+ else:
+ print(TextColors.SUCCESS + 'success' + TextColors.ENDC)
return failed
Modified: subversion/branches/ignore-mergeinfo-log/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/configure.ac?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/configure.ac (original)
+++ subversion/branches/ignore-mergeinfo-log/configure.ac Tue Jan 25 17:24:01 2011
@@ -152,7 +152,7 @@ dnl Find Apache with a recent-enough mag
SVN_FIND_APACHE(20020903)
dnl Search for SQLite
-SQLITE_MINIMUM_VER="3.4.0"
+SQLITE_MINIMUM_VER="3.6.18"
SQLITE_RECOMMENDED_VER="3.7.2"
SQLITE_URL="http://www.sqlite.org/sqlite-amalgamation-${SQLITE_RECOMMENDED_VER}.tar.gz"
SVN_LIB_SQLITE(${SQLITE_MINIMUM_VER}, ${SQLITE_RECOMMENDED_VER},
Propchange: subversion/branches/ignore-mergeinfo-log/subversion/include/private/svn_adler32.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 25 17:24:01 2011
@@ -40,4 +40,4 @@
/subversion/branches/tc_url_rev/subversion/libsvn_diff/diff.h:874351-874483
/subversion/branches/tree-conflicts/subversion/libsvn_diff/diff.h:868291-873154
/subversion/branches/tree-conflicts-notify/subversion/libsvn_diff/diff.h:873926-874008
-/subversion/trunk/subversion/include/private/svn_adler32.h:1054732-1058220
+/subversion/trunk/subversion/include/private/svn_adler32.h:1054732-1063360
Modified: subversion/branches/ignore-mergeinfo-log/subversion/include/private/svn_ra_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/include/private/svn_ra_private.h?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/include/private/svn_ra_private.h (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/include/private/svn_ra_private.h Tue Jan 25 17:24:01 2011
@@ -102,6 +102,11 @@ typedef svn_error_t *(*svn_ra__lock_retr
* Use @a cancel_func and @a cancel_baton to check for early
* cancellation.
*
+ * @note If the server does not support #SVN_RA_CAPABILITY_ATOMIC_REVPROPS
+ * (i.e., is a pre-1.7 server), then this function makes a "best effort"
+ * attempt to obtain the lock, but is susceptible to a race condition; see
+ * issue #3546.
+ *
* @since New in 1.7.
*/
svn_error_t *
Modified: subversion/branches/ignore-mergeinfo-log/subversion/include/private/svn_repos_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/include/private/svn_repos_private.h?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/include/private/svn_repos_private.h (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/include/private/svn_repos_private.h Tue Jan 25 17:24:01 2011
@@ -69,6 +69,24 @@ svn_repos__obliterate_path_rev(svn_repos
const char *path,
apr_pool_t *pool);
+/** Return the path to @a repos's pre-obliterate hook, allocated in
+ * @a pool.
+ *
+ * @since New in 1.7.
+ */
+const char *
+svn_repos__pre_obliterate_hook(svn_repos_t *repos,
+ apr_pool_t *pool);
+
+/** Return the path to @a repos's post-obliterate hook, allocated in
+ * @a pool.
+ *
+ * @since New in 1.7.
+ */
+const char *
+svn_repos__post_obliterate_hook(svn_repos_t *repos,
+ apr_pool_t *pool);
+
/** Validate that property @a name is valid for use in a Subversion
* repository; return @c SVN_ERR_REPOS_BAD_ARGS if it isn't. For some
Modified: subversion/branches/ignore-mergeinfo-log/subversion/include/svn_dirent_uri.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/include/svn_dirent_uri.h?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/include/svn_dirent_uri.h (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/include/svn_dirent_uri.h Tue Jan 25 17:24:01 2011
@@ -25,30 +25,32 @@
*
* This library makes a clear distinction between several path formats:
*
- * - a dirent is a path on (local) disc or a UNC path (Windows) in either
- * relative or absolute format
- * Examples: "/foo/bar", "X:/temp", "//server/share" and on Windows "A:/"
- * But not: "http://server"
- *
- * - a URI is an absolute path that starts with a '/' or a schema definition.
- * Examples: "/", "/foo", "http://server", "svn+ssh://user@host:123/file"
- * But not: "file", "dir/file", "A:/dir"
- * ### Currently the URI implementation still allows relpaths as valid
- * uris, but this will change soon.
- *
- * - a relative path (relpath) is an unrooted path that can be joined to
- * any other relative path, uri or dirent. A relative path is never
- * rooted/prefixed by a '/'.
- * Examples: "file", "dir/file", "dir/subdir/../file"
- * But not: "/file", "http://server/file"
- *
- * - a Subversion filesystem path (fspath), otherwise known as a path
- * within a repository, is a path relative to the root of the repository
- * filesystem, that starts with a slash ("/"). The rules for a fspath
- * are the same as for a relpath except for the leading '/'. A fspath
- * never ends with '/' except when the whole path is just '/'.
- *
- * The fspath API is private.
+ * - a dirent is a path on (local) disc or a UNC path (Windows) in
+ * either relative or absolute format.
+ * Examples:
+ * "/foo/bar", "X:/temp", "//server/share", "A:/" (Windows only)
+ * But not:
+ * "http://server"
+ *
+ * - a uri, for our purposes, is a percent-encoded, absolute path
+ * (URI) that starts with a schema definition. In practice, these
+ * tend to look like URLs, but never carry query strings.
+ * Examples:
+ * "http://server", "file:///path/to/repos",
+ * "svn+ssh://user@host:123/My%20Stuff/file.doc"
+ * But not:
+ * "file", "dir/file", "A:/dir", "/My%20Stuff/file.doc"
+ * ### Currently the uri implementation still allows relative URIs
+ * ### (carrying both relative and absolute path data) as valid
+ * ### uris, but this will change soon.
+ *
+ * - a relative path (relpath) is an unrooted path that can be joined
+ * to any other relative path, uri or dirent. A relative path is
+ * never rooted/prefixed by a '/'.
+ * Examples:
+ * "file", "dir/file", "dir/subdir/../file"
+ * But not:
+ * "/file", "http://server/file"
*
* This distinction is needed because on Windows we have to handle some
* dirents and URIs differently. Since it's not possible to determine from
@@ -68,7 +70,14 @@
* - @c svn_relpath_local_style()
* - @c svn_uri_canonicalize()
* - @c svn_uri_is_canonical()
- * - @c svn_fspath__is_canonical()
+ *
+ * The Subversion codebase also recognizes another class of path. A
+ * Subversion filesystem path (fspath) -- otherwise known as a path
+ * within a repository -- is a path relative to the root of the
+ * repository filesystem, that starts with a slash ("/"). The rules
+ * for a fspath are the same as for a relpath except for the leading
+ * '/'. A fspath never ends with '/' except when the whole path is
+ * just '/'. The fspath API is private (see private/svn_fspath.h).
*
* Code that works with a path-in-repository should use, in order of
* preference: a relpath (preferred), or a fspath (widely used by legacy
@@ -820,119 +829,6 @@ svn_uri_get_file_url_from_dirent(const c
const char *dirent,
apr_pool_t *pool);
-
-/** Return TRUE iff @a fspath is canonical.
- * @a fspath need not be canonical, of course.
- *
- * @since New in 1.7.
- */
-svn_boolean_t
-svn_fspath__is_canonical(const char *fspath);
-
-
-/** Return the dirname of @a fspath, defined as the path with its basename
- * removed. If @a fspath is "/", return "/".
- *
- * Allocate the result in @a pool.
- *
- * @since New in 1.7.
- */
-const char *
-svn_fspath__dirname(const char *fspath,
- apr_pool_t *pool);
-
-/** Return the last component of @a fspath. The returned value will have no
- * slashes in it. If @a fspath is "/", return "".
- *
- * If @a pool is NULL, return a pointer to within @a fspath, else allocate
- * the result in @a pool.
- *
- * @since New in 1.7.
- */
-const char *
-svn_fspath__basename(const char *fspath,
- apr_pool_t *pool);
-
-/** Divide the canonical @a fspath into @a *dirpath and @a
- * *base_name, allocated in @a pool.
- *
- * If @a dirpath or @a base_name is NULL, then don't set that one.
- *
- * Either @a dirpath or @a base_name may be @a fspath's own address, but they
- * may not both be the same address, or the results are undefined.
- *
- * If @a fspath has two or more components, the separator between @a dirpath
- * and @a base_name is not included in either of the new names.
- *
- * @since New in 1.7.
- */
-void
-svn_fspath__split(const char **dirpath,
- const char **base_name,
- const char *fspath,
- apr_pool_t *result_pool);
-
-/** Return the fspath composed of @a fspath with @a relpath appended.
- * Allocate the result in @a result_pool.
- *
- * @since New in 1.7.
- */
-char *
-svn_fspath__join(const char *fspath,
- const char *relpath,
- apr_pool_t *result_pool);
-
-
-/** Test if @a child_fspath is a child of @a parent_fspath. If not, return
- * NULL. If so, return the relpath which, if joined to @a parent_fspath,
- * would yield @a child_fspath.
- *
- * If @a child_fspath is the same as @a parent_fspath, it is not considered
- * a child, so the result is NULL; an empty string is never returned.
- *
- * If @a pool is NULL, a pointer into @a child_fspath will be returned to
- * identify the remainder fspath.
- *
- * @since New in 1.7.
- */
-const char *
-svn_fspath__is_child(const char *parent_fspath,
- const char *child_fspath,
- apr_pool_t *pool);
-
-/** Return the relative path part of @a child_fspath that is below
- * @a parent_fspath, or just "" if @a parent_fspath is equal to
- * @a child_fspath. If @a child_fspath is not below @a parent_fspath,
- * return @a child_fspath.
- *
- * ### Returning the child in the no-match case is a bad idea.
- *
- * @since New in 1.7.
- */
-const char *
-svn_fspath__skip_ancestor(const char *parent_fspath,
- const char *child_fspath);
-
-/** Return TRUE if @a parent_fspath is an ancestor of @a child_fspath or
- * the fspaths are equal, and FALSE otherwise.
- *
- * @since New in 1.7.
- */
-svn_boolean_t
-svn_fspath__is_ancestor(const char *parent_fspath,
- const char *child_fspath);
-
-/** Return the longest common path shared by two fspaths, @a fspath1 and
- * @a fspath2. If there's no common ancestor, return "/".
- *
- * @since New in 1.7.
- */
-char *
-svn_fspath__get_longest_ancestor(const char *fspath1,
- const char *fspath2,
- apr_pool_t *result_pool);
-
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/ignore-mergeinfo-log/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/include/svn_repos.h?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/include/svn_repos.h (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/include/svn_repos.h Tue Jan 25 17:24:01 2011
@@ -671,24 +671,6 @@ const char *
svn_repos_post_revprop_change_hook(svn_repos_t *repos,
apr_pool_t *pool);
-/** Return the path to @a repos's pre-obliterate hook, allocated in
- * @a pool.
- *
- * @since New in 1.7.
- */
-const char *
-svn_repos_pre_obliterate_hook(svn_repos_t *repos,
- apr_pool_t *pool);
-
-/** Return the path to @a repos's post-obliterate hook, allocated in
- * @a pool.
- *
- * @since New in 1.7.
- */
-const char *
-svn_repos_post_obliterate_hook(svn_repos_t *repos,
- apr_pool_t *pool);
-
/** @defgroup svn_repos_lock_hooks Paths to lock hooks
* @{
Modified: subversion/branches/ignore-mergeinfo-log/subversion/include/svn_subst.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/include/svn_subst.h?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/include/svn_subst.h (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/include/svn_subst.h Tue Jan 25 17:24:01 2011
@@ -615,8 +615,10 @@ svn_error_t *svn_subst_translate_string(
* *translated_line_endings to @c TRUE if at least one line ending was
* changed to LF, or to @c FALSE otherwise.
*
- * Recognized line endings are LF, CR, CRLF. If @a value has inconsistent
- * line endings, return @c SVN_ERR_IO_INCONSISTENT_EOL.
+ * If @a value has an inconsistent line ending style, then: if @a repair
+ * is @c FALSE, return @c SVN_ERR_IO_INCONSISTENT_EOL, else if @a repair is
+ * @c TRUE, convert any line ending in @a value to "\n" in
+ * @a *new_value. Recognized line endings are: "\n", "\r", and "\r\n".
*
* Set @a *new_value to the translated string, allocated in @a result_pool.
*
@@ -630,6 +632,7 @@ svn_subst_translate_string2(svn_string_t
svn_boolean_t *translated_line_endings,
const svn_string_t *value,
const char *encoding,
+ svn_boolean_t repair,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/copy.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/copy.c Tue Jan 25 17:24:01 2011
@@ -340,11 +340,18 @@ do_wc_to_wc_moves_with_locks2(void *bato
scratch_pool);
SVN_ERR(svn_wc_copy3(b->ctx->wc_ctx, b->pair->src_abspath_or_url,
- dst_abspath, FALSE /* metadata_only */,
+ dst_abspath, TRUE /* metadata_only */,
b->ctx->cancel_func, b->ctx->cancel_baton,
b->ctx->notify_func2, b->ctx->notify_baton2,
scratch_pool));
+ /* Should we be using a workqueue for this move? It's not clear.
+ What should happen if the copy above is interrupted? The user
+ may want to abort the move and a workqueue might interfere with
+ that. */
+ SVN_ERR(svn_io_file_rename(b->pair->src_abspath_or_url, dst_abspath,
+ scratch_pool));
+
SVN_ERR(svn_wc_delete4(b->ctx->wc_ctx, b->pair->src_abspath_or_url,
FALSE, FALSE,
b->ctx->cancel_func, b->ctx->cancel_baton,
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/delete.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/delete.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/delete.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/delete.c Tue Jan 25 17:24:01 2011
@@ -158,7 +158,7 @@ delete_urls(const apr_array_header_t *pa
/* Condense our list of deletion targets. */
SVN_ERR(svn_uri_condense_targets(&common, &targets, paths, TRUE,
- pool, pool));
+ pool, subpool));
if (! targets->nelts)
{
const char *bname;
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/list.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/list.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/list.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/list.c Tue Jan 25 17:24:01 2011
@@ -31,6 +31,7 @@
#include "client.h"
+#include "private/svn_fspath.h"
#include "svn_private_config.h"
/* Get the directory entries of DIR at REV (relative to the root of
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/locking_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/locking_commands.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/locking_commands.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/locking_commands.c Tue Jan 25 17:24:01 2011
@@ -175,13 +175,13 @@ organize_lock_targets(const char **commo
svn_boolean_t do_lock,
svn_boolean_t force,
svn_client_ctx_t *ctx,
- apr_pool_t *pool)
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
int i;
- apr_array_header_t *rel_targets = apr_array_make(pool, 1,
+ apr_array_header_t *rel_targets = apr_array_make(result_pool, 1,
sizeof(const char *));
- apr_hash_t *rel_targets_ret = apr_hash_make(pool);
- apr_pool_t *subpool = svn_pool_create(pool);
+ apr_hash_t *rel_targets_ret = apr_hash_make(result_pool);
svn_boolean_t url_mode;
SVN_ERR(svn_client__assert_homogeneous_target_type(targets));
@@ -192,10 +192,12 @@ organize_lock_targets(const char **commo
/* Get the common parent and all paths */
if (url_mode)
SVN_ERR(svn_uri_condense_targets(common_parent_url, &rel_targets,
- targets, TRUE, pool, pool));
+ targets, TRUE, result_pool,
+ scratch_pool));
else
SVN_ERR(svn_dirent_condense_targets(common_parent_url, &rel_targets,
- targets, TRUE, pool, pool));
+ targets, TRUE, result_pool,
+ scratch_pool));
/* svn_uri_condense_targets and svn_dirent_condense_targets leaves
URLs/paths empty if TARGETS only had 1 member, so we special case
@@ -204,9 +206,9 @@ organize_lock_targets(const char **commo
{
const char *parent, *base;
if (url_mode)
- svn_uri_split(&parent, &base, *common_parent_url, pool);
+ svn_uri_split(&parent, &base, *common_parent_url, result_pool);
else
- svn_dirent_split(&parent, &base, *common_parent_url, pool);
+ svn_dirent_split(&parent, &base, *common_parent_url, result_pool);
*common_parent_url = parent;
APR_ARRAY_PUSH(rel_targets, const char *) = base;
@@ -220,14 +222,15 @@ organize_lock_targets(const char **commo
if (url_mode)
{
svn_revnum_t *invalid_revnum;
- invalid_revnum = apr_palloc(pool, sizeof(*invalid_revnum));
+ invalid_revnum = apr_palloc(result_pool, sizeof(*invalid_revnum));
*invalid_revnum = SVN_INVALID_REVNUM;
*base_dir = NULL;
for (i = 0; i < rel_targets->nelts; i++)
{
const char *target = APR_ARRAY_IDX(rel_targets, i, const char *);
- apr_hash_set(rel_targets_ret, svn_path_uri_decode(target, pool),
+ apr_hash_set(rel_targets_ret,
+ svn_path_uri_decode(target, result_pool),
APR_HASH_KEY_STRING,
do_lock ? (const void *) invalid_revnum
: (const void *) "");
@@ -237,9 +240,10 @@ organize_lock_targets(const char **commo
else /* common parent is a local path */
{
apr_array_header_t *rel_urls;
- apr_array_header_t *urls = apr_array_make(pool, 1,
+ apr_array_header_t *urls = apr_array_make(scratch_pool, 1,
sizeof(const char *));
- apr_hash_t *urls_hash = apr_hash_make(pool);
+ apr_hash_t *urls_hash = apr_hash_make(scratch_pool);
+ apr_pool_t *iterpool = svn_pool_create(scratch_pool);
const char *common_url;
*base_dir = *common_parent_url;
@@ -251,31 +255,31 @@ organize_lock_targets(const char **commo
const char *local_abspath;
const char *url;
- svn_pool_clear(subpool);
+ svn_pool_clear(iterpool);
- local_abspath = svn_dirent_join(*common_parent_url, target, subpool);
+ local_abspath = svn_dirent_join(*common_parent_url, target, iterpool);
SVN_ERR(svn_wc__node_get_url(&url, ctx->wc_ctx, local_abspath,
- pool, subpool));
+ scratch_pool, iterpool));
if (! url)
return svn_error_createf(SVN_ERR_ENTRY_MISSING_URL, NULL,
_("'%s' has no URL"),
- svn_dirent_local_style(target, pool));
+ svn_dirent_local_style(target, iterpool));
APR_ARRAY_PUSH(urls, const char *) = url;
}
/* Condense our absolute urls and get the relative urls. */
SVN_ERR(svn_uri_condense_targets(&common_url, &rel_urls, urls,
- FALSE, pool, pool));
+ FALSE, result_pool, scratch_pool));
/* svn_uri_condense_targets leaves URLs empty if TARGETS only
had 1 member, so we special case that (again). */
if (apr_is_empty_array(rel_urls))
{
- const char *base_name = svn_uri_basename(common_url, pool);
- common_url = svn_uri_dirname(common_url, pool);
+ const char *base_name = svn_uri_basename(common_url, scratch_pool);
+ common_url = svn_uri_dirname(common_url, result_pool);
APR_ARRAY_PUSH(rel_urls, const char *) = base_name;
}
@@ -292,22 +296,22 @@ organize_lock_targets(const char **commo
const char *target = APR_ARRAY_IDX(rel_targets, i, const char *);
const char *url = APR_ARRAY_IDX(rel_urls, i, const char *);
const char *abs_path;
- const char *decoded_url = svn_path_uri_decode(url, pool);
+ const char *decoded_url = svn_path_uri_decode(url, scratch_pool);
- svn_pool_clear(subpool);
+ svn_pool_clear(iterpool);
apr_hash_set(urls_hash, decoded_url,
APR_HASH_KEY_STRING,
- apr_pstrdup(pool, target));
+ apr_pstrdup(scratch_pool, target));
- abs_path = svn_dirent_join(*common_parent_url, target, subpool);
+ abs_path = svn_dirent_join(*common_parent_url, target, iterpool);
if (do_lock) /* Lock. */
{
svn_revnum_t *revnum;
- revnum = apr_palloc(pool, sizeof(* revnum));
+ revnum = apr_palloc(result_pool, sizeof(* revnum));
SVN_ERR(svn_wc__node_get_base_rev(revnum, ctx->wc_ctx,
- abs_path, subpool));
+ abs_path, result_pool));
apr_hash_set(rel_targets_ret, decoded_url,
APR_HASH_KEY_STRING, revnum);
}
@@ -320,7 +324,8 @@ organize_lock_targets(const char **commo
SVN_ERR(svn_wc__node_get_lock_info(&lock_token, NULL, NULL,
NULL, ctx->wc_ctx,
- abs_path, pool, subpool));
+ abs_path, result_pool,
+ iterpool));
if (! lock_token)
return svn_error_createf
(SVN_ERR_CLIENT_MISSING_LOCK_TOKEN, NULL,
@@ -341,10 +346,10 @@ organize_lock_targets(const char **commo
*rel_fs_paths_p = urls_hash;
*common_parent_url = common_url;
+ svn_pool_destroy(iterpool);
}
*rel_targets_p = rel_targets_ret;
- svn_pool_destroy(subpool);
return SVN_NO_ERROR;
}
@@ -408,7 +413,7 @@ svn_client_lock(const apr_array_header_t
SVN_ERR(organize_lock_targets(&common_parent_url, &base_dir, &path_revs,
&urls_to_paths, targets, TRUE, steal_lock,
- ctx, pool));
+ ctx, pool, pool));
/* Open an RA session to the common parent of TARGETS. */
if (base_dir)
@@ -448,7 +453,7 @@ svn_client_unlock(const apr_array_header
SVN_ERR(organize_lock_targets(&common_parent_url, &base_dir, &path_tokens,
&urls_to_paths, targets, FALSE, break_lock,
- ctx, pool));
+ ctx, pool, pool));
/* Open an RA session. */
if (base_dir)
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/merge.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/merge.c Tue Jan 25 17:24:01 2011
@@ -54,6 +54,7 @@
#include "private/svn_wc_private.h"
#include "private/svn_mergeinfo_private.h"
+#include "private/svn_fspath.h"
#include "svn_private_config.h"
@@ -529,7 +530,9 @@ make_tree_conflict(svn_wc_conflict_descr
}
/* Record a tree conflict in the WC, unless this is a dry run or a record-
- * only merge.
+ * only merge, or if a tree conflict is already flagged for the VICTIM_PATH.
+ * (The latter can happen if a merge-tracking-aware merge is doing multiple
+ * editor drives because of a gap in the range of eligible revisions.)
*
* The tree conflict, with its victim specified by VICTIM_PATH, is
* assumed to have happened during a merge using merge baton MERGE_B.
@@ -546,16 +549,25 @@ tree_conflict(merge_cmd_baton_t *merge_b
svn_wc_conflict_action_t action,
svn_wc_conflict_reason_t reason)
{
+ const svn_wc_conflict_description2_t *existing_conflict;
svn_wc_conflict_description2_t *conflict;
if (merge_b->record_only || merge_b->dry_run)
return SVN_NO_ERROR;
- SVN_ERR(make_tree_conflict(&conflict, merge_b, victim_abspath,
- node_kind, action, reason));
+ SVN_ERR(svn_wc__get_tree_conflict(&existing_conflict, merge_b->ctx->wc_ctx,
+ victim_abspath, merge_b->pool,
+ merge_b->pool));
+ if (existing_conflict == NULL)
+ {
+ /* There is no existing tree conflict so it is safe to add one. */
+ SVN_ERR(make_tree_conflict(&conflict, merge_b, victim_abspath,
+ node_kind, action, reason));
+ SVN_ERR(svn_wc__add_tree_conflict(merge_b->ctx->wc_ctx, conflict,
+ merge_b->pool));
+ }
- return svn_error_return(
- svn_wc__add_tree_conflict(merge_b->ctx->wc_ctx, conflict, merge_b->pool));
+ return SVN_NO_ERROR;
}
/* Similar to tree_conflict(), but if this is an "add" action and there
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/mergeinfo.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/mergeinfo.c Tue Jan 25 17:24:01 2011
@@ -41,6 +41,7 @@
#include "private/svn_mergeinfo_private.h"
#include "private/svn_wc_private.h"
#include "private/svn_ra_private.h"
+#include "private/svn_fspath.h"
#include "client.h"
#include "mergeinfo.h"
#include "svn_private_config.h"
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_delta/path_driver.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_delta/path_driver.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_delta/path_driver.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_delta/path_driver.c Tue Jan 25 17:24:01 2011
@@ -31,6 +31,7 @@
#include "svn_dirent_uri.h"
#include "svn_path.h"
#include "svn_sorts.h"
+#include "private/svn_fspath.h"
/*** Helper functions. ***/
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_base/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_base/dag.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_base/dag.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_base/dag.c Tue Jan 25 17:24:01 2011
@@ -54,6 +54,7 @@
#include "private/svn_skel.h"
#include "private/svn_fs_util.h"
+#include "private/svn_fspath.h"
#include "../libsvn_fs/fs-loader.h"
#include "svn_private_config.h"
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_base/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_base/tree.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_base/tree.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_base/tree.c Tue Jan 25 17:24:01 2011
@@ -64,6 +64,7 @@
#include "bdb/node-origins-table.h"
#include "bdb/miscellaneous-table.h"
#include "../libsvn_fs/fs-loader.h"
+#include "private/svn_fspath.h"
#include "private/svn_fs_util.h"
#include "private/svn_mergeinfo_private.h"
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/dag.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/dag.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/dag.c Tue Jan 25 17:24:01 2011
@@ -36,6 +36,7 @@
#include "../libsvn_fs/fs-loader.h"
+#include "private/svn_fspath.h"
#include "svn_private_config.h"
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/fs_fs.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/fs_fs.c Tue Jan 25 17:24:01 2011
@@ -1892,7 +1892,7 @@ open_pack_or_rev_file(apr_file_t **file,
APR_READ | APR_BUFFERED, APR_OS_DEFAULT, pool);
if (err && APR_STATUS_IS_ENOENT(err->apr_err)
- && ffd->format >= SVN_FS_FS__MIN_PACKED_FORMAT)
+ && ffd->format >= SVN_FS_FS__MIN_PACKED_FORMAT)
{
/* Could not open the file. This may happen if the
* file once existed but got packed later. */
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/lock.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/lock.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/lock.c Tue Jan 25 17:24:01 2011
@@ -40,6 +40,7 @@
#include "../libsvn_fs/fs-loader.h"
#include "private/svn_fs_util.h"
+#include "private/svn_fspath.h"
#include "svn_private_config.h"
/* Names of hash keys used to store a lock for writing to disk. */
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/tree.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_fs_fs/tree.c Tue Jan 25 17:24:01 2011
@@ -60,6 +60,7 @@
#include "private/svn_mergeinfo_private.h"
#include "private/svn_fs_util.h"
+#include "private/svn_fspath.h"
#include "../libsvn_fs/fs-loader.h"
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra/ra_loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra/ra_loader.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra/ra_loader.c Tue Jan 25 17:24:01 2011
@@ -301,6 +301,16 @@ svn_error_t *svn_ra_open4(svn_ra_session
/* Initialize the return variable. */
*session_p = NULL;
+ apr_err = apr_uri_parse(sesspool, repos_URL, &repos_URI);
+ /* ### Should apr_uri_parse leave hostname NULL? It doesn't
+ * for "file:///" URLs, only for bogus URLs like "bogus".
+ * If this is the right behavior for apr_uri_parse, maybe we
+ * should have a svn_uri_parse wrapper. */
+ if (apr_err != APR_SUCCESS || repos_URI.hostname == NULL)
+ return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
+ _("Illegal repository URL '%s'"),
+ repos_URL);
+
if (callbacks->auth_baton)
{
/* The 'store-passwords' and 'store-auth-creds' parameters used to
@@ -363,15 +373,6 @@ svn_error_t *svn_ra_open4(svn_ra_session
/* Find out where we're about to connect to, and
* try to pick a server group based on the destination. */
- apr_err = apr_uri_parse(sesspool, repos_URL, &repos_URI);
- /* ### Should apr_uri_parse leave hostname NULL? It doesn't
- * for "file:///" URLs, only for bogus URLs like "bogus".
- * If this is the right behavior for apr_uri_parse, maybe we
- * should have a svn_uri_parse wrapper. */
- if (apr_err != APR_SUCCESS || repos_URI.hostname == NULL)
- return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
- _("Illegal repository URL '%s'"),
- repos_URL);
server_group = svn_config_find_group(servers, repos_URI.hostname,
SVN_CONFIG_SECTION_GROUPS,
sesspool);
@@ -500,7 +501,19 @@ svn_error_t *svn_ra_open4(svn_ra_session
what to do. */
if (corrected_url_p && corrected_url)
{
- *corrected_url_p = apr_pstrdup(pool, corrected_url);
+ if (! svn_path_is_url(corrected_url))
+ {
+ /* RFC1945 and RFC2616 state that the Location header's
+ value (from whence this CORRECTED_URL ultimately comes),
+ if present, must be an absolute URI. But some Apache
+ versions (those older than 2.2.11, it seems) transmit
+ only the path portion of the URI. See issue #3775 for
+ details. */
+ apr_uri_t corrected_URI = repos_URI;
+ corrected_URI.path = (char *)corrected_url;
+ corrected_url = apr_uri_unparse(pool, &corrected_URI, 0);
+ }
+ *corrected_url_p = svn_uri_canonicalize(corrected_url, pool);
svn_pool_destroy(sesspool);
return SVN_NO_ERROR;
}
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_local/ra_plugin.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_local/ra_plugin.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_local/ra_plugin.c Tue Jan 25 17:24:01 2011
@@ -36,6 +36,7 @@
#include "../libsvn_ra/ra_loader.h"
#include "private/svn_mergeinfo_private.h"
#include "private/svn_repos_private.h"
+#include "private/svn_fspath.h"
#define APR_WANT_STRFUNC
#include <apr_want.h>
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_neon/fetch.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_neon/fetch.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_neon/fetch.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_neon/fetch.c Tue Jan 25 17:24:01 2011
@@ -188,10 +188,11 @@ typedef struct report_baton_t {
/* Use an intermediate tmpfile for the REPORT response. */
svn_boolean_t spool_response;
- /* A modern server will understand our "send-all" attribute on the
- update report request, and will put a "send-all" attribute on
- its response. If we see that attribute, we set this to true,
- otherwise, it stays false (i.e., it's not a modern server). */
+ /* If this report is for a switch, update, or status (but not a
+ merge/diff), then we made the update report request with the "send-all"
+ attribute. The server reponds to this by putting a "send-all" attribute
+ in its response. If we see that attribute, we set this to true,
+ otherwise, it stays false. */
svn_boolean_t receiving_all;
/* Hash mapping 'const char *' paths -> 'const char *' lock tokens. */
@@ -1588,19 +1589,16 @@ start_element(int *elem, void *userdata,
/* push the new baton onto the directory baton stack */
push_dir(rb, new_dir_baton, pathbuf, subpool);
- /* Property fetching is implied in addition. This flag is only
- for parsing old-style reports; it is ignored when talking to
- a modern server. */
+ /* Property fetching is implied in addition. */
TOP_DIR(rb).fetch_props = TRUE;
bc_url = svn_xml_get_attr_value("bc-url", atts);
- /* In non-modern report responses, we're just told to fetch the
+ /* If we are not in send-all mode, we're just told to fetch the
props later. In that case, we can at least do a pre-emptive
depth-1 propfind on the directory right now; this prevents
individual propfinds on added-files later on, thus reducing
- the number of network turnarounds (though not by as much as
- simply getting a modern report response!). */
+ the number of network turnarounds. */
if ((! rb->receiving_all) && bc_url)
{
apr_hash_t *bc_children;
@@ -1711,9 +1709,7 @@ start_element(int *elem, void *userdata,
crev, rb->file_pool,
&rb->file_baton));
- /* Property fetching is implied in addition. This flag is only
- for parsing old-style reports; it is ignored when talking to
- a modern server. */
+ /* Property fetching is implied in addition. */
rb->fetch_props = TRUE;
break;
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/commit.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/commit.c Tue Jan 25 17:24:01 2011
@@ -311,7 +311,8 @@ handle_checkout(serf_request_t *request,
if (status)
err = svn_error_compose_create(svn_error_wrap_apr(status, NULL), err);
- ctx->resource_url = svn_uri_canonicalize(uri.path, ctx->pool);
+ ctx->resource_url = svn_ra_serf__uri_canonicalize(uri.path, pool,
+ ctx->pool);
}
return err;
@@ -487,7 +488,8 @@ get_version_url(const char **checked_in_
if (current_version)
{
- *checked_in_url = svn_uri_canonicalize(current_version->data, pool);
+ *checked_in_url =
+ svn_ra_serf__uri_canonicalize(current_version->data, pool, pool);
return SVN_NO_ERROR;
}
}
@@ -542,7 +544,7 @@ get_version_url(const char **checked_in_
_("Path '%s' not present"),
session->repos_url.path);
- root_checkout = svn_uri_canonicalize(root_checkout, pool);
+ root_checkout = svn_ra_serf__uri_canonicalize(root_checkout, pool, pool);
}
*checked_in_url = svn_path_url_add_component2(root_checkout, relpath, pool);
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/merge.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/merge.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/merge.c Tue Jan 25 17:24:01 2011
@@ -364,7 +364,8 @@ end_merge(svn_ra_serf__xml_parser_t *par
info->prop_val = apr_pstrmemdup(info->pool, info->prop_val,
info->prop_val_len);
if (strcmp(info->prop_name, "href") == 0)
- info->prop_val = svn_uri_canonicalize(info->prop_val, info->pool);
+ info->prop_val = svn_ra_serf__uri_canonicalize(info->prop_val,
+ info->pool, info->pool);
/* Set our property. */
apr_hash_set(info->props, info->prop_name, APR_HASH_KEY_STRING,
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/options.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/options.c Tue Jan 25 17:24:01 2011
@@ -187,7 +187,9 @@ end_options(svn_ra_serf__xml_parser_t *p
{
options_ctx->collect_cdata = FALSE;
options_ctx->activity_collection =
- svn_uri_canonicalize(options_ctx->attr_val, options_ctx->pool);
+ svn_ra_serf__uri_canonicalize(options_ctx->attr_val,
+ options_ctx->pool,
+ options_ctx->pool);
pop_state(options_ctx);
}
@@ -343,10 +345,12 @@ capabilities_headers_iterator_callback(v
orc->session->repos_root = orc->session->repos_url;
orc->session->repos_root.path = apr_pstrdup(orc->session->pool, val);
orc->session->repos_root_str =
- svn_uri_canonicalize(apr_uri_unparse(orc->session->pool,
- &orc->session->repos_root,
- 0),
- orc->session->pool);
+ svn_ra_serf__uri_canonicalize(
+ apr_uri_unparse(orc->session->pool,
+ &orc->session->repos_root,
+ 0),
+ orc->session->pool,
+ orc->session->pool);
}
else if (svn_cstring_casecmp(key, SVN_DAV_ME_RESOURCE_HEADER) == 0)
{
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/property.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/property.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/property.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/property.c Tue Jan 25 17:24:01 2011
@@ -25,6 +25,7 @@
#include <serf.h>
+#include "svn_path.h"
#include "svn_base64.h"
#include "svn_xml.h"
#include "svn_props.h"
@@ -342,7 +343,8 @@ end_propfind(svn_ra_serf__xml_parser_t *
{
if (strcmp(ctx->depth, "1") == 0)
{
- ctx->current_path = svn_uri_canonicalize(info->val, ctx->pool);
+ ctx->current_path =
+ svn_ra_serf__uri_canonicalize(info->val, ctx->pool, ctx->pool);
}
else
{
@@ -1032,7 +1034,8 @@ svn_ra_serf__get_baseline_info(const cha
"the requested checked-in value"));
}
- baseline_url = svn_uri_canonicalize(baseline_url, pool);
+ baseline_url = svn_ra_serf__uri_canonicalize(baseline_url,
+ pool, pool);
SVN_ERR(svn_ra_serf__retrieve_props(props, session, conn,
baseline_url, revision, "0",
@@ -1049,7 +1052,8 @@ svn_ra_serf__get_baseline_info(const cha
"requested baseline-collection value"));
}
- basecoll_url = svn_uri_canonicalize(basecoll_url, pool);
+ basecoll_url = svn_ra_serf__uri_canonicalize(basecoll_url,
+ pool, pool);
if (latest_revnum)
{
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/ra_serf.h?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/ra_serf.h Tue Jan 25 17:24:01 2011
@@ -794,6 +794,17 @@ const char *
svn_ra_serf__response_get_location(serf_bucket_t *response,
apr_pool_t *pool);
+/* Canonicalize URI, in the general sense. URI might be a full,
+ * absolute, schema-ful URL. It might be just the path portion of a
+ * URL. Or it might be a relative path. Whatever the case, it is a
+ * URI-encoded identifier of *some sort*, as will be the returned form
+ * thereof.
+ */
+const char *
+svn_ra_serf__uri_canonicalize(const char *uri,
+ apr_pool_t *scratch_pool,
+ apr_pool_t *result_pool);
+
/** XML helper functions. **/
/*
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/serf.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/serf.c Tue Jan 25 17:24:01 2011
@@ -906,7 +906,7 @@ svn_ra_serf__get_dir(svn_ra_session_t *r
*/
dirent_walk.full_paths = apr_hash_make(pool);
dirent_walk.base_paths = apr_hash_make(pool);
- dirent_walk.orig_path = svn_uri_canonicalize(path, pool);
+ dirent_walk.orig_path = svn_ra_serf__uri_canonicalize(path, pool, pool);
SVN_ERR(svn_ra_serf__walk_all_paths(props, revision, path_dirent_walker,
&dirent_walk, pool));
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/update.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/update.c Tue Jan 25 17:24:01 2011
@@ -1676,7 +1676,8 @@ start_report(svn_ra_serf__xml_parser_t *
}
else if (state == IGNORE_PROP_NAME)
{
- push_state(parser, ctx, PROP);
+ report_info_t *info = push_state(parser, ctx, PROP);
+ info->prop_encoding = svn_xml_get_attr_value("encoding", attrs);
}
else if (state == NEED_PROP_NAME)
{
@@ -1686,6 +1687,7 @@ start_report(svn_ra_serf__xml_parser_t *
info->prop_ns = name.namespace;
info->prop_name = apr_pstrdup(parser->state->pool, name.name);
+ info->prop_encoding = svn_xml_get_attr_value("encoding", attrs);
info->prop_val = NULL;
info->prop_val_len = 0;
}
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/util.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_serf/util.c Tue Jan 25 17:24:01 2011
@@ -914,7 +914,7 @@ svn_ra_serf__response_get_location(serf_
headers = serf_bucket_response_get_headers(response);
val = serf_bucket_headers_get(headers, "Location");
- return val ? svn_uri_canonicalize(val, pool) : NULL;
+ return val ? svn_ra_serf__uri_canonicalize(val, pool, pool) : NULL;
}
/* Implements svn_ra_serf__response_handler_t */
@@ -1837,9 +1837,9 @@ svn_ra_serf__discover_vcc(const char **v
session->repos_root = session->repos_url;
session->repos_root.path = apr_pstrdup(session->pool, url_buf->data);
session->repos_root_str =
- svn_uri_canonicalize(apr_uri_unparse(session->pool,
- &session->repos_root, 0),
- session->pool);
+ svn_ra_serf__uri_canonicalize(apr_uri_unparse(session->pool,
+ &session->repos_root, 0),
+ pool, session->pool);
}
/* Store the repository UUID in the cache. */
@@ -1934,3 +1934,35 @@ svn_ra_serf__error_on_status(int status_
return SVN_NO_ERROR;
}
+
+
+static const char *
+relative_uri_normalize(const char *relpath,
+ apr_pool_t *scratch_pool,
+ apr_pool_t *result_pool)
+{
+ return svn_path_uri_encode(
+ svn_relpath_canonicalize(
+ svn_path_uri_decode(relpath, scratch_pool),
+ scratch_pool),
+ result_pool);
+}
+
+
+const char *
+svn_ra_serf__uri_canonicalize(const char *uri,
+ apr_pool_t *scratch_pool,
+ apr_pool_t *result_pool)
+{
+ if (svn_path_is_url(uri))
+ return svn_uri_canonicalize(uri, result_pool);
+
+ if (uri[0] == '/')
+ return apr_pstrcat(result_pool, "/",
+ relative_uri_normalize(uri + 1,
+ scratch_pool,
+ scratch_pool),
+ NULL);
+
+ return relative_uri_normalize(uri, scratch_pool, result_pool);
+}
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/authz.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/authz.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/authz.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/authz.c Tue Jan 25 17:24:01 2011
@@ -391,8 +391,8 @@ authz_get_tree_access(svn_config_t *cfg,
any kind of granted access. Implements the
svn_config_section_enumerator2_t interface. */
static svn_boolean_t
-authz_global_parse_section(const char *section_name, void *baton,
- apr_pool_t *pool)
+authz_get_any_access_parser_cb(const char *section_name, void *baton,
+ apr_pool_t *pool)
{
struct authz_lookup_baton *b = baton;
@@ -422,10 +422,10 @@ authz_global_parse_section(const char *s
* to any path within the REPOSITORY. Return TRUE if so. Use POOL
* for temporary allocations. */
static svn_boolean_t
-authz_get_global_access(svn_config_t *cfg, const char *repos_name,
- const char *user,
- svn_repos_authz_access_t required_access,
- apr_pool_t *pool)
+authz_get_any_access(svn_config_t *cfg, const char *repos_name,
+ const char *user,
+ svn_repos_authz_access_t required_access,
+ apr_pool_t *pool)
{
struct authz_lookup_baton baton = { 0 };
@@ -434,8 +434,13 @@ authz_get_global_access(svn_config_t *cf
baton.required_access = required_access;
baton.access = FALSE; /* Deny access by default. */
baton.repos_path = apr_pstrcat(pool, repos_name, ":/", (char *)NULL);
-
- svn_config_enumerate_sections2(cfg, authz_global_parse_section,
+
+ /* We could have used svn_config_enumerate2 for "repos_name:/".
+ * However, this requires access for root explicitly (which the user
+ * may not always have). So we end up enumerating the sections in
+ * the authz CFG and stop on the first match with some access for
+ * this user. */
+ svn_config_enumerate_sections2(cfg, authz_get_any_access_parser_cb,
&baton, pool);
/* If walking the configuration was inconclusive, deny access. */
@@ -743,12 +748,12 @@ svn_repos_authz_check_access(svn_authz_t
{
const char *current_path = path;
- /* If PATH is NULL, do a global access lookup. */
+ /* If PATH is NULL, check if the user has *any* access. */
if (!path)
{
- *access_granted = authz_get_global_access(authz->cfg, repos_name,
- user, required_access,
- pool);
+ *access_granted = authz_get_any_access(authz->cfg, repos_name,
+ user, required_access,
+ pool);
return SVN_NO_ERROR;
}
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/hooks.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/hooks.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/hooks.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/hooks.c Tue Jan 25 17:24:01 2011
@@ -35,6 +35,7 @@
#include "repos.h"
#include "svn_private_config.h"
#include "private/svn_fs_private.h"
+#include "private/svn_repos_private.h"
@@ -592,7 +593,7 @@ svn_repos__hooks_pre_obliterate(svn_repo
const svn_string_t *obliteration_set,
apr_pool_t *pool)
{
- const char *hook = svn_repos_pre_obliterate_hook(repos, pool);
+ const char *hook = svn_repos__pre_obliterate_hook(repos, pool);
svn_boolean_t broken_link;
if ((hook = check_hook_cmd(hook, &broken_link, pool)) && broken_link)
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/reporter.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/reporter.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/reporter.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/reporter.c Tue Jan 25 17:24:01 2011
@@ -33,6 +33,7 @@
#include "repos.h"
#include "svn_private_config.h"
#include "private/svn_dep_compat.h"
+#include "private/svn_fspath.h"
#define NUM_CACHED_SOURCE_ROOTS 4
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/repos.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/repos.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/repos.c Tue Jan 25 17:24:01 2011
@@ -32,6 +32,7 @@
#include "svn_fs.h"
#include "svn_ra.h" /* for SVN_RA_CAPABILITY_* */
#include "svn_repos.h"
+#include "private/svn_repos_private.h"
#include "svn_private_config.h" /* for SVN_TEMPLATE_ROOT_DIR */
#include "repos.h"
@@ -163,7 +164,7 @@ svn_repos_post_revprop_change_hook(svn_r
const char *
-svn_repos_pre_obliterate_hook(svn_repos_t *repos, apr_pool_t *pool)
+svn_repos__pre_obliterate_hook(svn_repos_t *repos, apr_pool_t *pool)
{
return svn_dirent_join(repos->hook_path, SVN_REPOS__HOOK_PRE_OBLITERATE,
pool);
@@ -171,7 +172,7 @@ svn_repos_pre_obliterate_hook(svn_repos_
const char *
-svn_repos_post_obliterate_hook(svn_repos_t *repos, apr_pool_t *pool)
+svn_repos__post_obliterate_hook(svn_repos_t *repos, apr_pool_t *pool)
{
return svn_dirent_join(repos->hook_path, SVN_REPOS__HOOK_POST_OBLITERATE,
pool);
@@ -549,7 +550,7 @@ PREWRITTEN_HOOKS_TEXT
/* Pre-obliterate hook. */
{
this_path = apr_psprintf(pool, "%s%s",
- svn_repos_pre_obliterate_hook(repos, pool),
+ svn_repos__pre_obliterate_hook(repos, pool),
SVN_REPOS__HOOK_DESC_EXT);
#define SCRIPT_NAME SVN_REPOS__HOOK_PRE_OBLITERATE
@@ -1042,7 +1043,7 @@ PREWRITTEN_HOOKS_TEXT
/* Post-obliterate hook. */
{
this_path = apr_psprintf(pool, "%s%s",
- svn_repos_post_obliterate_hook(repos, pool),
+ svn_repos__post_obliterate_hook(repos, pool),
SVN_REPOS__HOOK_DESC_EXT);
#define SCRIPT_NAME SVN_REPOS__HOOK_POST_OBLITERATE
Propchange: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/adler32.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 25 17:24:01 2011
@@ -1 +1 @@
-/subversion/trunk/subversion/libsvn_subr/adler32.c:1054732-1058220
+/subversion/trunk/subversion/libsvn_subr/adler32.c:1054732-1063360
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/deprecated.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/deprecated.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/deprecated.c Tue Jan 25 17:24:01 2011
@@ -256,7 +256,7 @@ svn_subst_translate_string(svn_string_t
apr_pool_t *pool)
{
return svn_subst_translate_string2(new_value, NULL, NULL, value,
- encoding, pool, pool);
+ encoding, FALSE, pool, pool);
}
svn_error_t *
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/dirent_uri.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/dirent_uri.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/dirent_uri.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/dirent_uri.c Tue Jan 25 17:24:01 2011
@@ -37,6 +37,7 @@
#include "svn_ctype.h"
#include "dirent_uri.h"
+#include "private/svn_fspath.h"
/* The canonical empty path. Can this be changed? Well, change the empty
test below and the path library will work, not so sure about the fs/wc
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/mergeinfo.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/mergeinfo.c Tue Jan 25 17:24:01 2011
@@ -32,6 +32,7 @@
#include "svn_error_codes.h"
#include "svn_string.h"
#include "svn_mergeinfo.h"
+#include "private/svn_fspath.h"
#include "private/svn_mergeinfo_private.h"
#include "svn_private_config.h"
#include "svn_hash.h"
Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/path.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/path.c?rev=1063367&r1=1063366&r2=1063367&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/path.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/path.c Tue Jan 25 17:24:01 2011
@@ -428,12 +428,88 @@ svn_path_compare_paths(const char *path1
return (unsigned char)(path1[i]) < (unsigned char)(path2[i]) ? -1 : 1;
}
+/* Return the string length of the longest common ancestor of PATH1 and PATH2.
+ *
+ * This function handles everything except the URL-handling logic
+ * of svn_path_get_longest_ancestor, and assumes that PATH1 and
+ * PATH2 are *not* URLs.
+ *
+ * If the two paths do not share a common ancestor, return 0.
+ *
+ * New strings are allocated in POOL.
+ */
+static apr_size_t
+get_path_ancestor_length(const char *path1,
+ const char *path2,
+ apr_pool_t *pool)
+{
+ apr_size_t path1_len, path2_len;
+ apr_size_t i = 0;
+ apr_size_t last_dirsep = 0;
+
+ path1_len = strlen(path1);
+ path2_len = strlen(path2);
+
+ if (SVN_PATH_IS_EMPTY(path1) || SVN_PATH_IS_EMPTY(path2))
+ return 0;
+
+ while (path1[i] == path2[i])
+ {
+ /* Keep track of the last directory separator we hit. */
+ if (path1[i] == '/')
+ last_dirsep = i;
+
+ i++;
+
+ /* If we get to the end of either path, break out. */
+ if ((i == path1_len) || (i == path2_len))
+ break;
+ }
+
+ /* two special cases:
+ 1. '/' is the longest common ancestor of '/' and '/foo'
+ 2. '/' is the longest common ancestor of '/rif' and '/raf' */
+ if (i == 1 && path1[0] == '/' && path2[0] == '/')
+ return 1;
+
+ /* last_dirsep is now the offset of the last directory separator we
+ crossed before reaching a non-matching byte. i is the offset of
+ that non-matching byte. */
+ if (((i == path1_len) && (path2[i] == '/'))
+ || ((i == path2_len) && (path1[i] == '/'))
+ || ((i == path1_len) && (i == path2_len)))
+ return i;
+ else
+ if (last_dirsep == 0 && path1[0] == '/' && path2[0] == '/')
+ return 1;
+ return last_dirsep;
+}
+
+
char *
svn_path_get_longest_ancestor(const char *path1,
const char *path2,
apr_pool_t *pool)
{
- return svn_uri_get_longest_ancestor(path1, path2, pool);
+ svn_boolean_t path1_is_url = svn_path_is_url(path1);
+ svn_boolean_t path2_is_url = svn_path_is_url(path2);
+
+ /* Are we messing with URLs? If we have a mix of URLs and non-URLs,
+ there's nothing common between them. */
+ if (path1_is_url && path2_is_url)
+ {
+ return svn_uri_get_longest_ancestor(path1, path2, pool);
+ }
+ else if ((! path1_is_url) && (! path2_is_url))
+ {
+ return apr_pstrndup(pool, path1,
+ get_path_ancestor_length(path1, path2, pool));
+ }
+ else
+ {
+ /* A URL and a non-URL => no common prefix */
+ return apr_pmemdup(pool, SVN_EMPTY_PATH, sizeof(SVN_EMPTY_PATH));
+ }
}
const char *
@@ -441,14 +517,70 @@ svn_path_is_child(const char *path1,
const char *path2,
apr_pool_t *pool)
{
- return svn_uri_is_child(path1, path2, pool);
+ apr_size_t i;
+
+ /* assert (is_canonical (path1, strlen (path1))); ### Expensive strlen */
+ /* assert (is_canonical (path2, strlen (path2))); ### Expensive strlen */
+
+ /* Allow "" and "foo" to be parent/child */
+ if (SVN_PATH_IS_EMPTY(path1)) /* "" is the parent */
+ {
+ if (SVN_PATH_IS_EMPTY(path2) /* "" not a child */
+ || path2[0] == '/') /* "/foo" not a child */
+ return NULL;
+ else
+ /* everything else is child */
+ return pool ? apr_pstrdup(pool, path2) : path2;
+ }
+
+ /* Reach the end of at least one of the paths. How should we handle
+ things like path1:"foo///bar" and path2:"foo/bar/baz"? It doesn't
+ appear to arise in the current Subversion code, it's not clear to me
+ if they should be parent/child or not. */
+ for (i = 0; path1[i] && path2[i]; i++)
+ if (path1[i] != path2[i])
+ return NULL;
+
+ /* There are two cases that are parent/child
+ ... path1[i] == '\0'
+ .../foo path2[i] == '/'
+ or
+ / path1[i] == '\0'
+ /foo path2[i] != '/'
+ */
+ if (path1[i] == '\0' && path2[i])
+ {
+ if (path2[i] == '/')
+ return pool ? apr_pstrdup(pool, path2 + i + 1) : path2 + i + 1;
+ else if (i == 1 && path1[0] == '/')
+ return pool ? apr_pstrdup(pool, path2 + 1) : path2 + 1;
+ }
+
+ /* Otherwise, path2 isn't a child. */
+ return NULL;
}
svn_boolean_t
svn_path_is_ancestor(const char *path1, const char *path2)
{
- return svn_uri_is_ancestor(path1, path2);
+ apr_size_t path1_len = strlen(path1);
+
+ /* If path1 is empty and path2 is not absoulte, then path1 is an ancestor. */
+ if (SVN_PATH_IS_EMPTY(path1))
+ return *path2 != '/';
+
+ /* If path1 is a prefix of path2, then:
+ - If path1 ends in a path separator,
+ - If the paths are of the same length
+ OR
+ - path2 starts a new path component after the common prefix,
+ then path1 is an ancestor. */
+ if (strncmp(path1, path2, path1_len) == 0)
+ return path1[path1_len - 1] == '/'
+ || (path2[path1_len] == '/' || path2[path1_len] == '\0');
+
+ return FALSE;
}