svn commit: r979955 - /subversion/trunk/subversion/tests/cmdline/diff_tests.py
Author: dannas Date: Wed Jul 28 06:17:09 2010 New Revision: 979955 URL: http://svn.apache.org/viewvc?rev=979955view=rev Log: Simplify the testdata for an XFailing property diff test. The actual diff still misses one context line; 'line 3'. Using the same testdata and changes on a text file shows all context lines. * subversion/tests/cmdline/diff_tests.py (diff_prop_missing_context): Use lines of the format 'line digit'. Remove empty lines. Modified: subversion/trunk/subversion/tests/cmdline/diff_tests.py Modified: subversion/trunk/subversion/tests/cmdline/diff_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/diff_tests.py?rev=979955r1=979954r2=979955view=diff == --- subversion/trunk/subversion/tests/cmdline/diff_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/diff_tests.py Wed Jul 28 06:17:09 2010 @@ -3374,16 +3374,13 @@ def diff_prop_missing_context(sbox): iota_path = os.path.join(wc_dir, 'iota') prop_val = .join([ - One line\n, - Another line\n, - \n, - $ email EOT\n, -mat...@docs.uu.se\n, -Something strange @ my place\n, -EOT\n, - \n, - to a shell, will produce the output\n, - \n, + line 1\n, + line 2\n, + line 3\n, + line 4\n, + line 5\n, + line 6\n, + line 7\n, ]) svntest.main.run_svn(None, propset, prop, prop_val, iota_path) @@ -3396,13 +3393,11 @@ def diff_prop_missing_context(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, None, wc_dir) - prop_val = .join([\n, - $ email EOT\n, -mat...@docs.uu.se\n, -Something strange @ my place\n, -EOT\n, - \n, - \n, + prop_val = .join([ + line 3\n, + line 4\n, + line 5\n, + line 6\n, ]) svntest.main.run_svn(None, propset, prop, prop_val, iota_path) @@ -3415,18 +3410,14 @@ def diff_prop_missing_context(sbox): Property changes on: iota\n, ___\n, Modified: prop\n, -## -1,10 +1,7 ##\n, --One line\n, --Another line\n, -\n, -$ email EOT\n, - mat...@docs.uu.se\n, - Something strange @ my place\n, - EOT\n, -\n, --to a shell, will produce the output\n, -\n, -\n, +## -1,8 +1,5 ##\n, +-line 1\n, +-line 2\n, + line 3\n, + line 4\n, + line 5\n, + line 6\n, +-line 7\n, ] svntest.actions.run_and_verify_svn(None, expected_output, [],
svn commit: r979972 - /subversion/trunk/COMMITTERS
Author: rhuijben Date: Wed Jul 28 07:28:00 2010 New Revision: 979972 URL: http://svn.apache.org/viewvc?rev=979972view=rev Log: * COMMITTERS (artagnon): Extend partial commit privileges to the common cmdline test suite framework (svntest). Modified: subversion/trunk/COMMITTERS Modified: subversion/trunk/COMMITTERS URL: http://svn.apache.org/viewvc/subversion/trunk/COMMITTERS?rev=979972r1=979971r2=979972view=diff == --- subversion/trunk/COMMITTERS [UTF-8] (original) +++ subversion/trunk/COMMITTERS [UTF-8] Wed Jul 28 07:28:00 2010 @@ -143,7 +143,7 @@ Commit access for specific areas: esr Eric S. Raymond e...@thyrsus.com (svncutter) gmcdonald Gavin McDonald ga...@16degrees.com.au (build/hudson, tools/buildbot) - artagnon Ramkumar Ramachandra artag...@gmail.com (svnrdump) + artagnon Ramkumar Ramachandra artag...@gmail.com (svnrdump, svntest) Translation of message files:
svn commit: r979975 - /subversion/trunk/subversion/tests/cmdline/svntest/verify.py
Author: artagnon Date: Wed Jul 28 07:41:21 2010 New Revision: 979975 URL: http://svn.apache.org/viewvc?rev=979975view=rev Log: Followup r979295 to handle the expected_is_regexp case in display_lines. * subversion/tests/cmdline/svntest/verify.py (display_lines): When expected is a string and not a list (in the expected_in_regexp case), put it in a one-member list, and don't output a diff. Found by: rhuijben Modified: subversion/trunk/subversion/tests/cmdline/svntest/verify.py Modified: subversion/trunk/subversion/tests/cmdline/svntest/verify.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/verify.py?rev=979975r1=979974r2=979975view=diff == --- subversion/trunk/subversion/tests/cmdline/svntest/verify.py (original) +++ subversion/trunk/subversion/tests/cmdline/svntest/verify.py Wed Jul 28 07:41:21 2010 @@ -280,25 +280,25 @@ def display_lines(message, label, expect output = 'EXPECTED %s' % label if expected_is_regexp: output += ' (regexp)' + expected = [expected + '\n'] if expected_is_unordered: output += ' (unordered)' output += ':' print(output) for x in expected: sys.stdout.write(x) -if expected_is_regexp: - sys.stdout.write('\n') if actual is not None: print('ACTUAL %s:' % label) for x in actual: sys.stdout.write(x) # Additionally print unified diff - print('DIFF ' + ' '.join(output.split(' ')[1:])) - for x in unified_diff(expected, actual, -fromfile=EXPECTED %s % label, -tofile=ACTUAL %s % label): -sys.stdout.write(x) + if not expected_is_regexp: +print('DIFF ' + ' '.join(output.split(' ')[1:])) +for x in unified_diff(expected, actual, + fromfile=EXPECTED %s % label, + tofile=ACTUAL %s % label): + sys.stdout.write(x) def compare_and_display_lines(message, label, expected, actual, raisable=None):
svn commit: r979976 - /subversion/trunk/subversion/libsvn_client/patch.c
Author: dannas Date: Wed Jul 28 07:44:58 2010 New Revision: 979976 URL: http://svn.apache.org/viewvc?rev=979976view=rev Log: Follow-up to r979835. Allow more than just a deleted prop to be installed for a path. Before this change, the code stopped looping over property targets after a deleted prop target was found. * subversion/libsvn_client/patch.c (install_patched_prop_targets): Replace a break statement with a continue. Modified: subversion/trunk/subversion/libsvn_client/patch.c Modified: subversion/trunk/subversion/libsvn_client/patch.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/patch.c?rev=979976r1=979975r2=979976view=diff == --- subversion/trunk/subversion/libsvn_client/patch.c (original) +++ subversion/trunk/subversion/libsvn_client/patch.c Wed Jul 28 07:44:58 2010 @@ -2066,7 +2066,7 @@ install_patched_prop_targets(patch_targe TRUE /* skip_checks */, NULL, NULL, iterpool)); - break; + continue; } /* A property is usually one line long.
svn propchange: r979976 - svn:log
Author: dannas Revision: 979976 Modified property: svn:log Modified: svn:log at Wed Jul 28 08:12:47 2010 -- --- svn:log (original) +++ svn:log Wed Jul 28 08:12:47 2010 @@ -3,5 +3,5 @@ installed for a path. Before this change over property targets after a deleted prop target was found. * subversion/libsvn_client/patch.c - (install_patched_prop_targets): Replace a break statement with a -continue. + (install_patched_prop_targets): Continue to the next prop target +after having deleted a property.
svn commit: r980011 - /subversion/trunk/subversion/libsvn_wc/adm_ops.c
Author: philip Date: Wed Jul 28 09:55:10 2010 New Revision: 980011 URL: http://svn.apache.org/viewvc?rev=980011view=rev Log: * subversion/libsvn_wc/adm_ops.c (svn_wc_add4): Always use the same function to check for locks. Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=980011r1=980010r2=980011view=diff == --- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original) +++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Wed Jul 28 09:55:10 2010 @@ -1194,10 +1194,10 @@ svn_wc_add4(svn_wc_context_t *wc_ctx, ### Perhaps the lock should be created in the same transaction that adds the node? */ - svn_boolean_t locked; - SVN_ERR(svn_wc_locked2(locked, NULL, wc_ctx, local_abspath, - scratch_pool)); - if (!locked) + svn_boolean_t owns_lock; + SVN_ERR(svn_wc__db_wclock_owns_lock(owns_lock, db, local_abspath, + FALSE, scratch_pool)); + if (!owns_lock) SVN_ERR(svn_wc__db_wclock_obtain(db, local_abspath, 0, FALSE, scratch_pool)); }
svn commit: r980012 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Author: rhuijben Date: Wed Jul 28 10:04:30 2010 New Revision: 980012 URL: http://svn.apache.org/viewvc?rev=980012view=rev Log: * subversion/libsvn_wc/wc_db.c (is_wclocked): Fix error leak. Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=980012r1=980011r2=980012view=diff == --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original) +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Wed Jul 28 10:04:30 2010 @@ -8265,6 +8265,8 @@ is_wclocked(svn_boolean_t *locked, *locked = FALSE; return SVN_NO_ERROR; } + else +SVN_ERR(err); SVN_ERR(svn_sqlite__step(have_row, stmt));
svn commit: r980016 - /subversion/trunk/subversion/tests/cmdline/commit_tests.py
Author: rhuijben Date: Wed Jul 28 10:43:43 2010 New Revision: 980016 URL: http://svn.apache.org/viewvc?rev=980016view=rev Log: * subversion/tests/cmdline/commit_tests.py (make_standard_slew_of_changes): Remove assumption that after a 'svn rm DIR', DIR is still on disk, in preparation for single-db. Modified: subversion/trunk/subversion/tests/cmdline/commit_tests.py Modified: subversion/trunk/subversion/tests/cmdline/commit_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/commit_tests.py?rev=980016r1=980015r2=980016view=diff == --- subversion/trunk/subversion/tests/cmdline/commit_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/commit_tests.py Wed Jul 28 10:43:43 2010 @@ -86,11 +86,15 @@ def make_standard_slew_of_changes(wc_dir svntest.main.run_svn(None, 'add', 'Q') # Remove two directories - svntest.main.run_svn(None, 'rm', os.path.join('A', 'B', 'E')) + A_B_E = os.path.join('A', 'B', 'E') + svntest.main.run_svn(None, 'rm', A_B_E) svntest.main.run_svn(None, 'rm', os.path.join('A', 'C')) # Replace one of the removed directories - svntest.main.run_svn(None, 'add', os.path.join('A', 'B', 'E')) + # But first recreate if it doesn't exist (single-db) + if not os.path.exists(A_B_E): +os.mkdir(A_B_E) + svntest.main.run_svn(None, 'add', A_B_E) # Make property mods to two directories svntest.main.run_svn(None, 'propset', 'foo', 'bar', os.curdir)
svn commit: r980017 - /subversion/trunk/subversion/libsvn_wc/update_editor.c
Author: philip Date: Wed Jul 28 10:50:10 2010 New Revision: 980017 URL: http://svn.apache.org/viewvc?rev=980017view=rev Log: * subversion/libsvn_wc/update_editor.c: (close_file): Remove some out-of-db props code. Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=980017r1=980016r2=980017view=diff == --- subversion/trunk/subversion/libsvn_wc/update_editor.c (original) +++ subversion/trunk/subversion/libsvn_wc/update_editor.c Wed Jul 28 10:50:10 2010 @@ -5217,24 +5217,6 @@ close_file(void *file_baton, /* We will ALWAYS have properties to save (after a not-dry-run merge). */ SVN_ERR_ASSERT(new_base_props != NULL new_actual_props != NULL); - { -apr_hash_t *props; -apr_array_header_t *prop_diffs; - -/* ### grr. the BASE/ACTUAL props changes need to occur before the - ### merge_file() work. we may be able to solve this by shifting - ### some of the code blocks in this function up to here. in any - ### case, get the old-style props files written now, before - ### merge_file. the in-database values are going to occur later - ### (skew!), but we'll get that fixed before switching over to - ### db properties. */ -props = new_actual_props; -SVN_ERR(svn_prop_diffs(prop_diffs, new_actual_props, new_base_props, - pool)); -if (prop_diffs-nelts == 0) - props = NULL; - } - /* Merge the text. This will queue some additional work. */ SVN_ERR(merge_file(all_work_items, install_pristine, install_from, content_state, fb, new_text_base_sha1_checksum,
svn commit: r980031 - in /subversion/trunk/subversion/tests/cmdline: entries-dump.c svntest/main.py svntest/wc.py
Author: rhuijben Date: Wed Jul 28 11:59:17 2010 New Revision: 980031 URL: http://svn.apache.org/viewvc?rev=980031view=rev Log: Make the entry verification code in our testsuite use the real list of directories in a working copy instead of just using all the on-disk directories and ignoring errors. This enables forward compatibility with single-db case where deleted directories don't exist after 'svn rm'. I implemented this by adding an optional command argument on entries-dump and then using that list instead of using the on-disk directories. * subversion/tests/cmdline/entries-dump.c (includes): Add private/svn_wc_private.h (directory_walk_baton): New struct. (print_dir): New function. (directory_dump): New function. (main): Add --dump-dirs support and just return the exit code. * subversion/tests/cmdline/svntest/main.py (run_entriesdump_subdirs): New function. * subversion/tests/cmdline/svntest/wc.py (from_entries): Use main.run_entriesdump_subdirs to get the subdirs in the working copy instead of just guessing what directory could be a subdir. Modified: subversion/trunk/subversion/tests/cmdline/entries-dump.c subversion/trunk/subversion/tests/cmdline/svntest/main.py subversion/trunk/subversion/tests/cmdline/svntest/wc.py Modified: subversion/trunk/subversion/tests/cmdline/entries-dump.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/entries-dump.c?rev=980031r1=980030r2=980031view=diff == --- subversion/trunk/subversion/tests/cmdline/entries-dump.c (original) +++ subversion/trunk/subversion/tests/cmdline/entries-dump.c Wed Jul 28 11:59:17 2010 @@ -32,6 +32,7 @@ #include svn_wc.h #include svn_dirent_uri.h +#include private/svn_wc_private.h static void str_value(const char *name, const char *value) @@ -131,6 +132,59 @@ entries_dump(const char *dir_path, apr_p } +/* baton for print_dir */ +struct directory_walk_baton +{ + svn_wc_context_t *wc_ctx; + const char *root_abspath; + const char *prefix_path; +}; + +/* svn_wc__node_found_func_t implementation for directory_dump */ +static svn_error_t * +print_dir(const char *local_abspath, + void *walk_baton, + apr_pool_t *scratch_pool) +{ + struct directory_walk_baton *bt = walk_baton; + svn_node_kind_t kind; + + SVN_ERR(svn_wc_read_kind(kind, bt-wc_ctx, local_abspath, FALSE, + scratch_pool)); + + if (kind != svn_node_dir) +return SVN_NO_ERROR; + + printf(%s\n, + svn_dirent_local_style( + svn_dirent_join(bt-prefix_path, + svn_dirent_skip_ancestor(bt-root_abspath, +local_abspath), + scratch_pool), + scratch_pool)); + + return SVN_NO_ERROR; +} + +/* Print all not-hidden subdirectories in the working copy, starting by path */ +static svn_error_t * +directory_dump(const char *path, + apr_pool_t *scratch_pool) +{ + struct directory_walk_baton bt; + + SVN_ERR(svn_wc_context_create(bt.wc_ctx, NULL, scratch_pool, scratch_pool)); + SVN_ERR(svn_dirent_get_absolute(bt.root_abspath, path, scratch_pool)); + + bt.prefix_path = path; + + SVN_ERR(svn_wc__node_walk_children(bt.wc_ctx, bt.root_abspath, FALSE, + print_dir, bt, svn_depth_infinity, + NULL, NULL, scratch_pool)); + + return svn_error_return(svn_wc_context_destroy(bt.wc_ctx)); +} + int main(int argc, const char *argv[]) { @@ -138,24 +192,38 @@ main(int argc, const char *argv[]) int exit_code = EXIT_SUCCESS; svn_error_t *err; const char *path; + const char *cmd; - if (argc != 2) + if (argc 2 || argc 4) { - printf(USAGE: entries-dump DIR_PATH\n); + fprintf(stderr, USAGE: entries-dump [--entries|--subdirs] DIR_PATH\n); exit(1); } if (apr_initialize() != APR_SUCCESS) { - printf(apr_initialize() failed.\n); + fprintf(stderr, apr_initialize() failed.\n); exit(1); } /* set up the global pool */ pool = svn_pool_create(NULL); - path = svn_dirent_internal_style(argv[1], pool); - err = entries_dump(path, pool); + path = svn_dirent_internal_style(argv[argc-1], pool); + + if (argc 2) +cmd = argv[1]; + else +cmd = NULL; + + if (!cmd || !strcmp(cmd, --entries)) +err = entries_dump(path, pool); + else if (!strcmp(cmd, --subdirs)) +err = directory_dump(path, pool); + else +err = svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL, +Invalid command '%s', +cmd); if (err) { svn_handle_error2(err, stderr, FALSE, entries-dump: ); @@ -167,6 +235,5 @@ main(int argc, const char *argv[]) svn_pool_destroy(pool); apr_terminate(); - exit(exit_code); return exit_code; } Modified:
svn commit: r980037 - in /subversion/trunk: subversion/tests/cmdline/svntest/main.py win-tests.py
Author: rhuijben Date: Wed Jul 28 12:37:25 2010 New Revision: 980037 URL: http://svn.apache.org/viewvc?rev=980037view=rev Log: Don't print an unnecessary blank line after every entries-dump invocation, and allow using the not verbose mode on Windows. * subversion/tests/cmdline/svntest/main.py (run_entriesdump): Stop printing blank line. * win-tests.py (_usage_exit): Describe --quiet (global): Parse -q and --quiet and use not quiet as verbose value of the test harness instead of a constant True. Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py subversion/trunk/win-tests.py Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/main.py?rev=980037r1=980036r2=980037view=diff == --- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original) +++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Wed Jul 28 12:37:25 2010 @@ -599,9 +599,6 @@ def run_entriesdump(path): # to stdout in verbose mode. exit_code, stdout_lines, stderr_lines = spawn_process(entriesdump_binary, 0, 0, None, path) - if options.verbose: -### finish the CMD output -print if exit_code or stderr_lines: ### report on this? or continue to just skip it? return None @@ -1308,7 +1305,7 @@ def _create_parser(): parser = optparse.OptionParser(usage=usage) parser.add_option('-l', '--list', action='store_true', dest='list_tests', help='Print test doc strings instead of running them') - parser.add_option('-v', '--verbose', action='store_true', + parser.add_option('-v', '--verbose', action='store_true', dest='verbose', help='Print binary command-lines (not with --quiet)') parser.add_option('-q', '--quiet', action='store_true', help='Print only unexpected results (not with --verbose)') Modified: subversion/trunk/win-tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/win-tests.py?rev=980037r1=980036r2=980037view=diff == --- subversion/trunk/win-tests.py (original) +++ subversion/trunk/win-tests.py Wed Jul 28 12:37:25 2010 @@ -59,6 +59,7 @@ def _usage_exit(): print( -u URL, --url=URL : run ra_dav or ra_svn tests against URL;) print( will start svnserve for ra_svn tests) print( -v, --verbose : talk more) + print( -q, --quiet: talk less) print( -f, --fs-type=type : filesystem type to use (fsfs is default)) print( -c, --cleanup : cleanup after running a test) print( -t, --test=TEST: Run the TEST test (all is default); use) @@ -111,9 +112,9 @@ for section in gen_obj.sections.values() dll_basename = section.name + - + str(gen_obj.version) + .dll svn_dlls.append(os.path.join(subversion, section.name, dll_basename)) -opts, args = my_getopt(sys.argv[1:], 'hrdvct:pu:f:', - ['release', 'debug', 'verbose', 'cleanup', 'test=', -'url=', 'svnserve-args=', 'fs-type=', 'asp.net-hack', +opts, args = my_getopt(sys.argv[1:], 'hrdvqct:pu:f:', + ['release', 'debug', 'verbose', 'quiet', 'cleanup', +'test=', 'url=', 'svnserve-args=', 'fs-type=', 'asp.net-hack', 'httpd-dir=', 'httpd-port=', 'httpd-daemon', 'httpd-server', 'http-library=', 'help', 'fsfs-packing', 'fsfs-sharding=', 'javahl', @@ -123,7 +124,7 @@ if len(args) 1: print('Warning: non-option arguments after the first one will be ignored') # Interpret the options and set parameters -base_url, fs_type, verbose, cleanup = None, None, None, None +base_url, fs_type, verbose, quiet, cleanup = None, None, None, None, None repo_loc = 'local repository.' objdir = 'Debug' log = 'tests.log' @@ -154,6 +155,8 @@ for opt, val in opts: fs_type = val elif opt in ('-v', '--verbose'): verbose = 1 + elif opt in ('-q', '--quiet'): +quiet = 1 elif opt in ('-c', '--cleanup'): cleanup = 1 elif opt in ('-t', '--test'): @@ -653,8 +656,8 @@ if not test_javahl: os.path.join(abs_builddir, log), os.path.join(abs_builddir, faillog), base_url, fs_type, http_library, - server_minor_version, 1, cleanup, - enable_sasl, parallel, config_file, + server_minor_version, not quiet, + cleanup, enable_sasl, parallel, config_file, fsfs_sharding, fsfs_packing, list_tests, svn_bin) old_cwd = os.getcwd()
svn commit: r980046 - /subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
Author: julianfoad Date: Wed Jul 28 13:18:28 2010 New Revision: 980046 URL: http://svn.apache.org/viewvc?rev=980046view=rev Log: Add assertions in FSFS to trap an internal error that is believed to have occurred in real life. See email from me on 2010-06-22, FSFS error in DAV MERGE - Can't open file 'db/transactions/props', http://svn.haxx.se/dev/archive-2010-06/0327.shtml. * subversion/libsvn_fs_fs/fs_fs.c (path_txn_dir, get_txn_proplist): Assert that the txn id is not null. Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=980046r1=980045r2=980046view=diff == --- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original) +++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Wed Jul 28 13:18:28 2010 @@ -325,6 +325,7 @@ path_revprops(svn_fs_t *fs, svn_revnum_t static APR_INLINE const char * path_txn_dir(svn_fs_t *fs, const char *txn_id, apr_pool_t *pool) { + SVN_ERR_ASSERT_NO_RETURN(txn_id != NULL); return svn_dirent_join_many(pool, fs-path, PATH_TXNS_DIR, apr_pstrcat(pool, txn_id, PATH_EXT_TXN, NULL), NULL); @@ -4600,6 +4601,13 @@ get_txn_proplist(apr_hash_t *proplist, { svn_stream_t *stream; + /* The following error has been observed at least twice in real life when + * WANdisco software sends a DAV 'MERGE' command to a Subversion server: + * Can't open file '[...]/db/transactions/props': No such file or directory + * The path should be '[...]/db/transactions/txn-id/props'. + * The only way that could happen is if txn_id was NULL here. */ + SVN_ERR_ASSERT(txn_id != NULL); + /* Open the transaction properties file. */ SVN_ERR(svn_stream_open_readonly(stream, path_txn_props(fs, txn_id, pool), pool, pool));
svn commit: r980050 - /subversion/trunk/subversion/tests/cmdline/patch_tests.py
Author: dannas Date: Wed Jul 28 13:35:21 2010 New Revision: 980050 URL: http://svn.apache.org/viewvc?rev=980050view=rev Log: Add XFailing test for 'svn patch' involving added paths with properties. We have to be able to deal with diffs created on those. Currently, we fail when we try to invoke svn_wc_prop_getX() on the not yet existing node. * subversion/tests/cmdline/patch_tests.py (patch_add_path_with_props): New (test_list): Add the new test. Modified: subversion/trunk/subversion/tests/cmdline/patch_tests.py Modified: subversion/trunk/subversion/tests/cmdline/patch_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/patch_tests.py?rev=980050r1=980049r2=980050view=diff == --- subversion/trunk/subversion/tests/cmdline/patch_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/patch_tests.py Wed Jul 28 13:35:21 2010 @@ -2526,6 +2526,70 @@ def patch_dir_properties(sbox): 1, # check-props 1) # dry-run +def patch_add_path_with_props(sbox): + patch that adds paths with props + + sbox.build() + wc_dir = sbox.wc_dir + + patch_file_path = make_patch_path(sbox) + iota_path = os.path.join(wc_dir, 'iota') + + # Apply patch that adds a file and a dir. + + unidiff_patch = [ +Index: new\n, +===\n, +--- new\t(revision 0)\n, ++++ new\t(working copy)\n, +@@ -0,0 +1 @@\n, ++This is the file 'new'\n, +\n, +Property changes on: new\n, +---\n, +Added: added\n, +## -0,0 +1 ##\n, ++This is the property 'added'.\n, +Index: X\n, +===\n, +--- X\t(revision 0)\n, ++++ X\t(working copy)\n, +\n, +Property changes on: X\n, +---\n, +Added: added\n, +## -0,0 +1 ##\n, ++This is the property 'added'.\n, + ] + + svntest.main.file_write(patch_file_path, ''.join(unidiff_patch)) + + added_prop_contents = This is the property 'added'.\n + + expected_output = [ +'A %s\n' % os.path.join(wc_dir, 'new'), +'A %s\n' % os.path.join(wc_dir, 'X'), + ] + + expected_disk = svntest.main.greek_state.copy() + expected_disk.add({'new': Item(contents=This is the file 'new'\n, + props={'added' : added_prop_contents})}) + expected_disk.add({'X': Item(props={'added' : added_prop_contents})}) + expected_status = svntest.actions.get_virginal_state(wc_dir, 1) + expected_status.add({'new': Item(status='A ', wc_rev='0')}) + expected_status.add({'X': Item(status='A ', wc_rev='0')}) + + expected_skip = wc.State('', { }) + + svntest.actions.run_and_verify_patch(wc_dir, os.path.abspath(patch_file_path), + expected_output, + expected_disk, + expected_status, + expected_skip, + None, # expected err + 1, # check-props + 1) # dry-run + #Run the tests @@ -2552,6 +2616,7 @@ test_list = [ None, patch_with_properties, patch_same_twice, XFail(patch_dir_properties), + XFail(patch_add_path_with_props), ] if __name__ == '__main__':
svn commit: r980060 - in /subversion/trunk/subversion/tests/cmdline: basic_tests.py commit_tests.py
Author: rhuijben Date: Wed Jul 28 14:01:23 2010 New Revision: 980060 URL: http://svn.apache.org/viewvc?rev=980060view=rev Log: Remove a few more assumptions on directories that exist after calling 'svn rm' on them from our test suite. This for forward compatibility with single-db. * subversion/tests/cmdline/basic_tests.py (basic_delete): The directory should still exist only when the parent directory has its own .svn area. * subversion/tests/cmdline/commit_tests.py (nested_dir_replacements): Recreate A_D locally if it was deleted by 'svn rm' Modified: subversion/trunk/subversion/tests/cmdline/basic_tests.py subversion/trunk/subversion/tests/cmdline/commit_tests.py Modified: subversion/trunk/subversion/tests/cmdline/basic_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/basic_tests.py?rev=980060r1=980059r2=980060view=diff == --- subversion/trunk/subversion/tests/cmdline/basic_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/basic_tests.py Wed Jul 28 14:01:23 2010 @@ -1149,9 +1149,9 @@ def basic_delete(sbox): # check versioned dir is not removed if not verify_dir_deleted(F_path): -print(Removed versioned dir) -### we should raise a less generic error here. which? -raise svntest.Failure +# If we are not running in single-db, this is an error +if os.path.isdir(os.path.join(F_path, '../' + svntest.main.get_admin_name())): + raise svntest.Failure(Removed administrative area) # check unversioned and added dirs has been removed if verify_dir_deleted(Q_path): Modified: subversion/trunk/subversion/tests/cmdline/commit_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/commit_tests.py?rev=980060r1=980059r2=980060view=diff == --- subversion/trunk/subversion/tests/cmdline/commit_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/commit_tests.py Wed Jul 28 14:01:23 2010 @@ -456,16 +456,19 @@ def nested_dir_replacements(sbox): sbox.build() wc_dir = sbox.wc_dir + A_D = os.path.join(wc_dir, 'A', 'D') + # Delete and re-add A/D (a replacement), and A/D/H (another replace). - svntest.main.run_svn(None, 'rm', os.path.join(wc_dir, 'A', 'D')) - svntest.main.run_svn(None, 'add', '--depth=empty', - os.path.join(wc_dir, 'A', 'D')) - svntest.main.run_svn(None, 'add', '--depth=empty', - os.path.join(wc_dir, 'A', 'D', 'H')) + svntest.main.run_svn(None, 'rm', A_D) + + if not os.path.exists(A_D): +os.mkdir(A_D) + svntest.main.run_svn(None, 'add', '--depth=empty', A_D) + svntest.main.run_svn(None, 'add', '--depth=empty', os.path.join(A_D, 'H')) # For kicks, add new file A/D/bloo. - svntest.main.file_append(os.path.join(wc_dir, 'A', 'D', 'bloo'), hi) - svntest.main.run_svn(None, 'add', os.path.join(wc_dir, 'A', 'D', 'bloo')) + svntest.main.file_append(os.path.join(A_D, 'bloo'), hi) + svntest.main.run_svn(None, 'add', os.path.join(A_D, 'bloo')) # Verify pre-commit status: # @@ -1952,6 +1955,9 @@ def mods_in_schedule_delete(sbox): C_path = os.path.join(wc_dir, 'A', 'C') svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [], 'rm', C_path) + + if not os.path.exists(C_path): +os.mkdir(C_path) foo_path = os.path.join(C_path, 'foo') foo_contents = 'zig\nzag\n' svntest.main.file_append(foo_path, foo_contents)
svn commit: r980068 - /subversion/trunk/subversion/libsvn_wc/status.c
Author: rhuijben Date: Wed Jul 28 14:26:32 2010 New Revision: 980068 URL: http://svn.apache.org/viewvc?rev=980068view=rev Log: * subversion/libsvn_wc/status.c (handle_dir_entry): In single-db mode, directories that don't exist on disk can just be handled as a directory. Modified: subversion/trunk/subversion/libsvn_wc/status.c Modified: subversion/trunk/subversion/libsvn_wc/status.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/status.c?rev=980068r1=980067r2=980068view=diff == --- subversion/trunk/subversion/libsvn_wc/status.c (original) +++ subversion/trunk/subversion/libsvn_wc/status.c Wed Jul 28 14:26:32 2010 @@ -997,9 +997,22 @@ handle_dir_entry(const struct walk_statu void *cancel_baton, apr_pool_t *pool) { - /* We are looking at a directory on-disk. */ - if (path_kind == svn_node_dir - db_kind == svn_wc__db_kind_dir) + /* We are looking at a directory on-disk. + With a db per directory the directory must exist to recurse, but + with single-db we only have to check for obstructions. + + (Without recursing you would only see the root of a delete operation + in single db mode.) + ### TODO: Should we recurse on obstructions anyway? + ### (Requires changes to the test suite) + */ + if (db_kind == svn_wc__db_kind_dir +#ifdef SVN_WC__SINGLE_DB + path_kind != svn_node_file +#else + path_kind == svn_node_dir +#endif + ) { /* Descend only if the subdirectory is a working copy directory (which we've discovered because we got a THIS_DIR entry. And only descend
svn commit: r980069 - /subversion/trunk/subversion/libsvn_wc/adm_crawler.c
Author: rhuijben Date: Wed Jul 28 14:28:24 2010 New Revision: 980069 URL: http://svn.apache.org/viewvc?rev=980069view=rev Log: * subversion/libsvn_wc/adm_crawler.c (report_revisions_and_depths): When using a single db, it is not an issue if a directory does not exist. We have the administrative data anyway, so we don't have to send the server the data again. Modified: subversion/trunk/subversion/libsvn_wc/adm_crawler.c Modified: subversion/trunk/subversion/libsvn_wc/adm_crawler.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_crawler.c?rev=980069r1=980068r2=980069view=diff == --- subversion/trunk/subversion/libsvn_wc/adm_crawler.c (original) +++ subversion/trunk/subversion/libsvn_wc/adm_crawler.c Wed Jul 28 14:28:24 2010 @@ -243,6 +243,7 @@ report_revisions_and_depths(svn_wc__db_t int i; const char *dir_repos_root, *dir_repos_relpath; svn_depth_t dir_depth; + svn_error_t *err; /* Get both the SVN Entries and the actual on-disk entries. Also @@ -251,8 +252,18 @@ report_revisions_and_depths(svn_wc__db_t dir_abspath = svn_dirent_join(anchor_abspath, dir_path, scratch_pool); SVN_ERR(svn_wc__db_base_get_children(base_children, db, dir_abspath, scratch_pool, iterpool)); - SVN_ERR(svn_io_get_dirents3(dirents, dir_abspath, TRUE, - scratch_pool, scratch_pool)); + + err = svn_io_get_dirents3(dirents, dir_abspath, TRUE, +scratch_pool, scratch_pool); + + if (err (APR_STATUS_IS_ENOENT(err-apr_err) + || APR_STATUS_IS_ENODIR(err-apr_err))) +{ + svn_error_clear(err); + dirents = apr_hash_make(scratch_pool); +} + else +SVN_ERR(err); /*** Do the real reporting and recursing. ***/ @@ -403,10 +414,20 @@ report_revisions_and_depths(svn_wc__db_t NULL, NULL, db, this_abspath, iterpool, iterpool)); - if (restore_files wrk_status != svn_wc__db_status_added - wrk_status != svn_wc__db_status_deleted + if (wrk_status == svn_wc__db_status_added) +SVN_ERR(svn_wc__db_scan_addition(wrk_status, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, + db, this_abspath, + iterpool, iterpool)); + + if (restore_files + wrk_status != svn_wc__db_status_added +#ifndef SVN_WC__SINGLE_DB wrk_status != svn_wc__db_status_obstructed_add - wrk_status != svn_wc__db_status_obstructed_delete) + wrk_status != svn_wc__db_status_obstructed_delete +#endif + wrk_status != svn_wc__db_status_deleted) + { svn_node_kind_t dirent_kind; @@ -427,6 +448,7 @@ report_revisions_and_depths(svn_wc__db_t missing = TRUE; } } +#ifndef SVN_WC__SINGLE_DB else missing = TRUE; @@ -442,6 +464,11 @@ report_revisions_and_depths(svn_wc__db_t iterpool)); continue; } +#else + /* With single-db, we always know about all children, so + never tell the server that we don't know, but want to know + about the missing child. */ +#endif } /* And finally prepare for reporting */
svn commit: r980075 - in /subversion/trunk/subversion: include/private/svn_wc_private.h libsvn_wc/adm_ops.c libsvn_wc/entries.c libsvn_wc/node.c libsvn_wc/wc_db.c libsvn_wc/wc_db.h libsvn_wc/workqueue
Author: rhuijben Date: Wed Jul 28 14:44:19 2010 New Revision: 980075 URL: http://svn.apache.org/viewvc?rev=980075view=rev Log: For WC-NG single db: Make 'svn rm DIR' directly remove the on-disk directory, instead of scheduling it for delete at commit time. This patch will make a few more tests fail for single-db, but brings the status of single-db much further towards the final 1.7 behavior. * subversion/libsvn_wc/adm_ops.c (erase_unversioned_from_wc): Allow ignoring missing files and directories. (erase_from_wc): Unused when using single-db. Update caller. (svn_wc_delete4): Keep 'svn rm not-versioned' an error, but allow 'svn rm missing-file'. In single-db mode don't record keep-local, but just delete directories and anything below when not using keep-local. * subversion/libsvn_wc/entries.c (read_one_entry): Set keep_local to TRUE on a directory, when it is deleted but still exists and keep it false in all other cases. * subversion/libsvn_wc/node.c (svn_wc__temp_get_keep_local): In single-db mode, always return false. * subversion/libsvn_wc/wc_db.c (svn_wc__db_temp_determine_keep_local, svn_wc__db_temp_set_keep_local): #ifdef these functions for !SINGLE-DB * subversion/libsvn_wc/wc_db.h (svn_wc__db_temp_determine_keep_local, svn_wc__db_temp_set_keep_local): #ifdef these functions for !SINGLE-DB * subversion/libsvn_wc/workqueue.c (run_killme, svn_wc__wq_add_killme): #ifdef for !SINGLE-DB (run_deletion_postcommit): In single db mode we can handle directories exactly like files. Add note on switched nodes. (dispatch_table): Remove OP_KILLME for !SINGLE-DB * subversion/libsvn_wc/workqueue.h (run_killme, svn_wc__wq_add_killme): #ifdef for !SINGLE-DB Modified: subversion/trunk/subversion/include/private/svn_wc_private.h subversion/trunk/subversion/libsvn_wc/adm_ops.c subversion/trunk/subversion/libsvn_wc/entries.c subversion/trunk/subversion/libsvn_wc/node.c subversion/trunk/subversion/libsvn_wc/wc_db.c subversion/trunk/subversion/libsvn_wc/wc_db.h subversion/trunk/subversion/libsvn_wc/workqueue.c subversion/trunk/subversion/libsvn_wc/workqueue.h Modified: subversion/trunk/subversion/include/private/svn_wc_private.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=980075r1=980074r2=980075view=diff == --- subversion/trunk/subversion/include/private/svn_wc_private.h (original) +++ subversion/trunk/subversion/include/private/svn_wc_private.h Wed Jul 28 14:44:19 2010 @@ -701,7 +701,10 @@ svn_wc__temp_mark_missing_not_present(co apr_pool_t *scratch_pool); /* Return the @a *keep_local flag for local_abspath. (This flag will - go away once we have a consolidated administrative area) */ + go away once we have a consolidated administrative area. In that + case it will always return FALSE.) + + ### Only used by the commit processing in libsvn_client */ svn_error_t * svn_wc__temp_get_keep_local(svn_boolean_t *keep_local, svn_wc_context_t *wc_ctx, Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=980075r1=980074r2=980075view=diff == --- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original) +++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Wed Jul 28 14:44:19 2010 @@ -527,25 +527,29 @@ svn_wc_process_committed_queue2(svn_wc_c * from the physical filesystem. PATH is assumed to be an unversioned file * or directory. * + * If ignore_enoent is TRUE, ignore missing targets. + * * If CANCEL_FUNC is non-null, invoke it with CANCEL_BATON at various * points, return any error immediately. */ static svn_error_t * erase_unversioned_from_wc(const char *path, + svn_boolean_t ignore_enoent, svn_cancel_func_t cancel_func, void *cancel_baton, - apr_pool_t *pool) + apr_pool_t *scratch_pool) { svn_error_t *err; /* Optimize the common case: try to delete the file */ - err = svn_io_remove_file2(path, FALSE, pool); + err = svn_io_remove_file2(path, ignore_enoent, scratch_pool); if (err) { /* Then maybe it was a directory? */ svn_error_clear(err); - err = svn_io_remove_dir2(path, FALSE, cancel_func, cancel_baton, pool); + err = svn_io_remove_dir2(path, ignore_enoent, cancel_func, cancel_baton, + scratch_pool); if (err) { @@ -555,20 +559,22 @@ erase_unversioned_from_wc(const char *pa svn_node_kind_t kind; svn_error_clear(err); - SVN_ERR(svn_io_check_path(path, kind, pool)); +
svn commit: r980084 - /subversion/trunk/subversion/libsvn_wc/adm_crawler.c
Author: philip Date: Wed Jul 28 15:01:28 2010 New Revision: 980084 URL: http://svn.apache.org/viewvc?rev=980084view=rev Log: * subversion/libsvn_wc/adm_crawler.c (report_revisions_and_depths): Remove shadow variable declaration. Modified: subversion/trunk/subversion/libsvn_wc/adm_crawler.c Modified: subversion/trunk/subversion/libsvn_wc/adm_crawler.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_crawler.c?rev=980084r1=980083r2=980084view=diff == --- subversion/trunk/subversion/libsvn_wc/adm_crawler.c (original) +++ subversion/trunk/subversion/libsvn_wc/adm_crawler.c Wed Jul 28 15:01:28 2010 @@ -300,7 +300,6 @@ report_revisions_and_depths(svn_wc__db_t svn_depth_t this_depth; svn_wc__db_lock_t *this_lock; svn_boolean_t this_switched; - svn_error_t *err; /* Clear the iteration subpool here because the loop has a bunch of 'continue' jump statements. */
svn commit: r980087 - /subversion/trunk/subversion/tests/cmdline/basic_tests.py
Author: rhuijben Date: Wed Jul 28 15:10:32 2010 New Revision: 980087 URL: http://svn.apache.org/viewvc?rev=980087view=rev Log: Turn basic_tests.py 16 attempt to change node kind into a work in progress test, as this scenario is now supported in single-db mode. Updated the test to check for the new expected (succeeding) behavior, instead of the original 'must fail' behavior. * subversion/tests/cmdline/basic_tests.py (basic_node_kind_change): Update test to test new expected behavior instead of just making sure that the change didn't break the wc. (test_list): Mark basic_node_kind_change as work in progress. Modified: subversion/trunk/subversion/tests/cmdline/basic_tests.py Modified: subversion/trunk/subversion/tests/cmdline/basic_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/basic_tests.py?rev=980087r1=980086r2=980087view=diff == --- subversion/trunk/subversion/tests/cmdline/basic_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/basic_tests.py Wed Jul 28 15:10:32 2010 @@ -1213,8 +1213,8 @@ def basic_checkout_deleted(sbox): #-- -# Issue 846, changing a deleted file to an added directory is not -# supported. +# Issue 846, changing a deleted file to an added directory was not +# supported before WC-NG. But we can handle it. def basic_node_kind_change(sbox): attempt to change node kind @@ -1232,25 +1232,24 @@ def basic_node_kind_change(sbox): svntest.actions.run_and_verify_status(wc_dir, expected_status) # Try and fail to create a directory (file scheduled for deletion) - svntest.actions.run_and_verify_svn('Cannot change node kind', - None, svntest.verify.AnyOutput, - 'mkdir', gamma_path) + svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', gamma_path) - # Status is unchanged + # Status is replaced + expected_status.tweak('A/D/gamma', status='R ') svntest.actions.run_and_verify_status(wc_dir, expected_status) # Commit file deletion expected_output = wc.State(wc_dir, { -'A/D/gamma' : Item(verb='Deleting'), +'A/D/gamma' : Item(verb='Replacing'), }) expected_status = svntest.actions.get_virginal_state(wc_dir, 1) - expected_status.remove('A/D/gamma') + expected_status.tweak('A/D/gamma', status=' ', wc_rev='2') svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, None, wc_dir) # Try and fail to create a directory (file deleted) - svntest.actions.run_and_verify_svn('Cannot change node kind', + svntest.actions.run_and_verify_svn(None, None, svntest.verify.AnyOutput, 'mkdir', gamma_path) @@ -1261,11 +1260,12 @@ def basic_node_kind_change(sbox): svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) # mkdir should succeed + svntest.actions.run_and_verify_svn(None, None, [], 'rm', gamma_path) svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', gamma_path) expected_status.tweak(wc_rev=2) expected_status.add({ -'A/D/gamma' : Item(status='A ', wc_rev=0), +'A/D/gamma' : Item(status='R ', wc_rev=2), }) svntest.actions.run_and_verify_status(wc_dir, expected_status) @@ -2542,7 +2542,7 @@ test_list = [ None, basic_switch, basic_delete, basic_checkout_deleted, - basic_node_kind_change, + Wimp('Needs single-db', basic_node_kind_change), basic_import, basic_cat, basic_ls,
svn commit: r980088 - /subversion/trunk/subversion/tests/cmdline/commit_tests.py
Author: rhuijben Date: Wed Jul 28 15:14:09 2010 New Revision: 980088 URL: http://svn.apache.org/viewvc?rev=980088view=rev Log: * subversion/tests/cmdline/commit_tests.py (nested_dir_replacements): Following up on r980060, also recreate the second tested directory. Modified: subversion/trunk/subversion/tests/cmdline/commit_tests.py Modified: subversion/trunk/subversion/tests/cmdline/commit_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/commit_tests.py?rev=980088r1=980087r2=980088view=diff == --- subversion/trunk/subversion/tests/cmdline/commit_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/commit_tests.py Wed Jul 28 15:14:09 2010 @@ -461,8 +461,10 @@ def nested_dir_replacements(sbox): # Delete and re-add A/D (a replacement), and A/D/H (another replace). svntest.main.run_svn(None, 'rm', A_D) + # Recreate directories for single-db if not os.path.exists(A_D): os.mkdir(A_D) +os.mkdir(os.path.join(A_D, 'H')) svntest.main.run_svn(None, 'add', '--depth=empty', A_D) svntest.main.run_svn(None, 'add', '--depth=empty', os.path.join(A_D, 'H'))
svn commit: r980104 - /subversion/trunk/subversion/libsvn_wc/upgrade.c
Author: julianfoad Date: Wed Jul 28 15:52:48 2010 New Revision: 980104 URL: http://svn.apache.org/viewvc?rev=980104view=rev Log: * subversion/libsvn_wc/upgrade.c (migrate_props): Remove this forward declaration as it is no longer needed. Modified: subversion/trunk/subversion/libsvn_wc/upgrade.c Modified: subversion/trunk/subversion/libsvn_wc/upgrade.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/upgrade.c?rev=980104r1=980103r2=980104view=diff == --- subversion/trunk/subversion/libsvn_wc/upgrade.c (original) +++ subversion/trunk/subversion/libsvn_wc/upgrade.c Wed Jul 28 15:52:48 2010 @@ -71,14 +71,6 @@ #define PRISTINE_STORAGE_RELPATH pristine -/* Forward declare until we decide to shift/reorder functions. */ -static svn_error_t * -migrate_props(const char *wcroot_abspath, - svn_sqlite__db_t *sdb, - int original_format, - apr_pool_t *scratch_pool); - - /* Read the properties from the file at PROPFILE_ABSPATH, returning them as a hash in *PROPS. If the propfile is NOT present, then NULL will be returned in *PROPS. */
svn commit: r980110 - in /subversion/trunk/subversion/include: private/svn_wc_private.h svn_ra.h
Author: julianfoad Date: Wed Jul 28 16:12:34 2010 New Revision: 980110 URL: http://svn.apache.org/viewvc?rev=980110view=rev Log: Fix Doxygen mark-up. * subversion/include/private/svn_wc_private.h (svn_wc__node_get_repos_info, svn_wc__node_get_working_rev_info): Write @a arg instead of @arg. * subversion/include/svn_ra.h (svn_ra_do_status2): Same. Modified: subversion/trunk/subversion/include/private/svn_wc_private.h subversion/trunk/subversion/include/svn_ra.h Modified: subversion/trunk/subversion/include/private/svn_wc_private.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=980110r1=980109r2=980110view=diff == --- subversion/trunk/subversion/include/private/svn_wc_private.h (original) +++ subversion/trunk/subversion/include/private/svn_wc_private.h Wed Jul 28 16:12:34 2010 @@ -222,7 +222,7 @@ svn_wc__node_get_children(const apr_arra /** * Fetch the repository root information for a given @a local_abspath into - * @a *repos_root_url and @a repos_uuid. Use @wc_ctx to access the working copy + * @a *repos_root_url and @a repos_uuid. Use @a wc_ctx to access the working copy * for @a local_abspath, @a scratch_pool for all temporary allocations, * @a result_pool for result allocations. Note: the result may be NULL if the * given node has no repository root associated with it (e.g. locally added). @@ -501,7 +501,7 @@ svn_wc__node_get_base_rev(svn_revnum_t * * SVN_INVALID_REVNUM. In case of a replacement, we return the BASE * revision. * - * The @changed_rev is set to the latest committed change to @a + * The @a changed_rev is set to the latest committed change to @a * local_abspath before or equal to @a revision, unless the node is * copied-here or moved-here. Then it is the revision of the latest committed * change before or equal to the copyfrom_rev. NOTE, that we use Modified: subversion/trunk/subversion/include/svn_ra.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_ra.h?rev=980110r1=980109r2=980110view=diff == --- subversion/trunk/subversion/include/svn_ra.h (original) +++ subversion/trunk/subversion/include/svn_ra.h Wed Jul 28 16:12:34 2010 @@ -1157,7 +1157,7 @@ svn_ra_do_switch(svn_ra_session_t *sessi * * Get status as deeply as @a depth indicates. If @a depth is * #svn_depth_unknown, get the status down to the ambient depth of the - * working copy. If @depth is deeper than the working copy, include changes + * working copy. If @a depth is deeper than the working copy, include changes * that would be needed to populate the working copy to that depth. * * The caller may not perform any RA operations using @a session
svn commit: r980118 - in /subversion/branches/performance/subversion: include/private/svn_cache.h libsvn_subr/cache-membuffer.c
Author: stefan2 Date: Wed Jul 28 16:42:10 2010 New Revision: 980118 URL: http://svn.apache.org/viewvc?rev=980118view=rev Log: Rename membuffer_cache_t to svn_membuffer_t as requested in http://svn.haxx.se/dev/archive-2010-07/0625.shtml It is not using the svn_cache__ prefix, though, because it doesn't have anything to do with the svn_cache__* interface. It is more akin to svn_memcache_t. Once we are at it, we also fix some pointer formatting t* x to t *x. * subversion/include/private/svn_cache.h (svn_membuffer_t): renamed from membuffer_cache_t (svn_cache__membuffer_cache_create, svn_cache__create_membuffer_cache): adapt signature to rename * subversion/libsvn_subr/cache-membuffer.c (svn_membuffer_t): renamed from membuffer_cache_t (lock_cache, unlock_cache, get_entry, move_entry, ensure_data_insertable): adapt signature to rename and fix pointer formatting (get_index, drop_entry, insert_entry, get_group_index, find_entry, membuffer_cache_set, membuffer_cache_get, svn_membuffer_cache_t, svn_cache__create_membuffer_cache): adapt signature to rename (svn_cache__membuffer_cache_create, svn_cache__membuffer_cache_create): adapt signature as well as implementation to rename and fix pointer formatting Modified: subversion/branches/performance/subversion/include/private/svn_cache.h subversion/branches/performance/subversion/libsvn_subr/cache-membuffer.c Modified: subversion/branches/performance/subversion/include/private/svn_cache.h URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/private/svn_cache.h?rev=980118r1=980117r2=980118view=diff == --- subversion/branches/performance/subversion/include/private/svn_cache.h (original) +++ subversion/branches/performance/subversion/include/private/svn_cache.h Wed Jul 28 16:42:10 2010 @@ -95,7 +95,7 @@ typedef struct svn_memcache_t svn_memcac /** * An opaque structure representing a membuffer cache object. */ -typedef struct membuffer_cache_t membuffer_cache_t; +typedef struct svn_membuffer_t svn_membuffer_t; /** * Opaque type for an in-memory cache. @@ -195,7 +195,7 @@ svn_cache__make_memcache_from_config(svn * Allocations will be made in @a pool, in particular the data buffers. */ svn_error_t* -svn_cache__membuffer_cache_create(membuffer_cache_t **cache, +svn_cache__membuffer_cache_create(svn_membuffer_t **cache, apr_size_t total_size, apr_size_t directory_size, svn_boolean_t thread_safe, @@ -222,7 +222,7 @@ svn_cache__membuffer_cache_create(membuf */ svn_error_t * svn_cache__create_membuffer_cache(svn_cache__t **cache_p, - membuffer_cache_t *membuffer, + svn_membuffer_t *membuffer, svn_cache__serialize_func_t serialize, svn_cache__deserialize_func_t deserialize, apr_ssize_t klen, Modified: subversion/branches/performance/subversion/libsvn_subr/cache-membuffer.c URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_subr/cache-membuffer.c?rev=980118r1=980117r2=980118view=diff == --- subversion/branches/performance/subversion/libsvn_subr/cache-membuffer.c (original) +++ subversion/branches/performance/subversion/libsvn_subr/cache-membuffer.c Wed Jul 28 16:42:10 2010 @@ -147,7 +147,7 @@ typedef entry_t entry_group_t[GROUP_SIZE /* The cache header structure. */ -struct membuffer_cache_t +struct svn_membuffer_t { /* The dictionary, GROUP_SIZE * group_count entries long. Never NULL. */ @@ -240,7 +240,7 @@ align_entry(apr_uint64_t address) /* Acquire the cache mutex, if necessary. */ static svn_error_t * -lock_cache(membuffer_cache_t* cache) +lock_cache(svn_membuffer_t *cache) { #if APR_HAS_THREADS if (cache-mutex) @@ -257,7 +257,7 @@ lock_cache(membuffer_cache_t* cache) /* Release the cache mutex, if necessary. */ static svn_error_t * -unlock_cache(membuffer_cache_t* cache, svn_error_t *err) +unlock_cache(svn_membuffer_t *cache, svn_error_t *err) { #if APR_HAS_THREADS if (cache-mutex) @@ -277,8 +277,8 @@ unlock_cache(membuffer_cache_t* cache, s /* Resolve a dictionary entry reference, i.e. return the entry * for the given IDX. */ -static APR_INLINE entry_t* -get_entry(membuffer_cache_t* cache, apr_size_t idx) +static APR_INLINE entry_t * +get_entry(svn_membuffer_t *cache, apr_size_t idx) { return cache-directory[idx / GROUP_SIZE][idx % GROUP_SIZE]; } @@ -286,7 +286,7 @@ get_entry(membuffer_cache_t* cache, apr_ /* Get the entry references for the given ENTRY. */ static APR_INLINE apr_uint32_t -get_index(membuffer_cache_t *cache, entry_t *entry) +get_index(svn_membuffer_t *cache,
svn commit: r980136 - in /subversion/trunk/subversion: include/svn_types.h libsvn_subr/io.c libsvn_wc/adm_crawler.c libsvn_wc/adm_ops.c libsvn_wc/upgrade.c libsvn_wc/workqueue.c
Author: rhuijben Date: Wed Jul 28 17:35:57 2010 New Revision: 980136 URL: http://svn.apache.org/viewvc?rev=980136view=rev Log: Standardize our use of APR_STATUS_IS_ENOTDIR() to use a subversion specific macro, to document why we catch an extra error in one place, instead of all over the place. This should really be fixed in APR. * subversion/include/svn_types.h (SVN__APR_STATUS_IS_ENOTDIR): New define. * subversion/libsvn_subr/io.c (io_check_path, svn_io_stat_dirent): Use SVN__APR_STATUS_IS_ENOTDIR instead of local define. * subversion/libsvn_wc/adm_crawler.c (report_revisions_and_depths): Check for ENOTDIR in the right way. * subversion/libsvn_wc/adm_ops.c (erase_from_wc): Use SVN__APR_STATUS_IS_ENOTDIR. * subversion/libsvn_wc/upgrade.c (read_propfile): Use SVN__APR_STATUS_IS_ENOTDIR. * subversion/libsvn_wc/workqueue.c (run_file_move): Just check for ENOENT. ENODIR (not ENOTDIR) can't be returned. Modified: subversion/trunk/subversion/include/svn_types.h subversion/trunk/subversion/libsvn_subr/io.c subversion/trunk/subversion/libsvn_wc/adm_crawler.c subversion/trunk/subversion/libsvn_wc/adm_ops.c subversion/trunk/subversion/libsvn_wc/upgrade.c subversion/trunk/subversion/libsvn_wc/workqueue.c Modified: subversion/trunk/subversion/include/svn_types.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_types.h?rev=980136r1=980135r2=980136view=diff == --- subversion/trunk/subversion/include/svn_types.h (original) +++ subversion/trunk/subversion/include/svn_types.h Wed Jul 28 17:35:57 2010 @@ -131,6 +131,16 @@ svn__apr_hash_index_klen(const apr_hash_ void * svn__apr_hash_index_val(const apr_hash_index_t *hi); +/** On Windows, APR_STATUS_IS_ENOTDIR includes several kinds of + * invalid-pathname error but not this one, so we include it. */ +/* ### This fix should go into APR. */ +#ifndef WIN32 +#define SVN__APR_STATUS_IS_ENOTDIR(s) APR_STATUS_IS_ENOTDIR(status) +#else +#define SVN__APR_STATUS_IS_ENOTDIR(s) (APR_STATUS_IS_ENOTDIR(s) \ + || ((s) == APR_OS_START_SYSERR + ERROR_INVALID_NAME)) +#endif + /** @} */ /** The various types of nodes in the Subversion filesystem. */ Modified: subversion/trunk/subversion/libsvn_subr/io.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=980136r1=980135r2=980136view=diff == --- subversion/trunk/subversion/libsvn_subr/io.c (original) +++ subversion/trunk/subversion/libsvn_subr/io.c Wed Jul 28 17:35:57 2010 @@ -222,14 +222,7 @@ io_check_path(const char *path, if (APR_STATUS_IS_ENOENT(apr_err)) *kind = svn_node_none; - else if (APR_STATUS_IS_ENOTDIR(apr_err) -#ifdef WIN32 - /* On Windows, APR_STATUS_IS_ENOTDIR includes several kinds of -* invalid-pathname error but not this one, so we include it. */ - /* ### This fix should go into APR. */ - || (APR_TO_OS_ERROR(apr_err) == ERROR_INVALID_NAME) -#endif - ) + else if (SVN__APR_STATUS_IS_ENOTDIR(apr_err)) *kind = svn_node_none; else if (apr_err) return svn_error_wrap_apr(apr_err, _(Can't check path '%s'), @@ -2083,14 +2076,7 @@ svn_io_stat_dirent(const svn_io_dirent2_ if (err ignore_enoent (APR_STATUS_IS_ENOENT(err-apr_err) - || APR_STATUS_IS_ENOTDIR(err-apr_err) -#ifdef WIN32 - /* On Windows, APR_STATUS_IS_ENOTDIR includes several kinds of -* invalid-pathname error but not this one, so we include it. */ - /* ### This fix should go into APR. */ - || (APR_TO_OS_ERROR(err-apr_err) == ERROR_INVALID_NAME) -#endif - )) + || SVN__APR_STATUS_IS_ENOTDIR(err-apr_err))) { svn_error_clear(err); dirent = svn_io_dirent2_create(result_pool); Modified: subversion/trunk/subversion/libsvn_wc/adm_crawler.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_crawler.c?rev=980136r1=980135r2=980136view=diff == --- subversion/trunk/subversion/libsvn_wc/adm_crawler.c (original) +++ subversion/trunk/subversion/libsvn_wc/adm_crawler.c Wed Jul 28 17:35:57 2010 @@ -257,7 +257,7 @@ report_revisions_and_depths(svn_wc__db_t scratch_pool, scratch_pool); if (err (APR_STATUS_IS_ENOENT(err-apr_err) - || APR_STATUS_IS_ENODIR(err-apr_err))) + || SVN__APR_STATUS_IS_ENOTDIR(err-apr_err))) { svn_error_clear(err); dirents = apr_hash_make(scratch_pool); Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=980136r1=980135r2=980136view=diff == ---
svn commit: r980139 - in /subversion/trunk/subversion: include/svn_dirent_uri.h libsvn_subr/dirent_uri.c
Author: julianfoad Date: Wed Jul 28 17:51:10 2010 New Revision: 980139 URL: http://svn.apache.org/viewvc?rev=980139view=rev Log: Rename some function parameters for clarity: where xxx1 and xxx2 represent two paths in a parent-child relationship, rename them to parent_xxx and child_xxx respectively. * subversion/include/svn_dirent_uri.h, subversion/libsvn_subr/dirent_uri.c (svn_dirent_is_child, svn_relpath_is_child, svn_uri_is_child, svn_dirent_is_ancestor, svn_relpath_is_ancestor, svn_uri_is_ancestor, svn_dirent_skip_ancestor, svn_relpath_skip_ancestor, svn_uri_skip_ancestor): Rename parameters. Modified: subversion/trunk/subversion/include/svn_dirent_uri.h subversion/trunk/subversion/libsvn_subr/dirent_uri.c Modified: subversion/trunk/subversion/include/svn_dirent_uri.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_dirent_uri.h?rev=980139r1=980138r2=980139view=diff == --- subversion/trunk/subversion/include/svn_dirent_uri.h (original) +++ subversion/trunk/subversion/include/svn_dirent_uri.h Wed Jul 28 17:51:10 2010 @@ -561,19 +561,19 @@ svn_dirent_get_absolute(const char **pab const char *relative, apr_pool_t *pool); -/** Test if @a uri2 is a child of @a uri1. +/** Test if @a child_uri is a child of @a parent_uri. * If not, return @c NULL. * If so, return a copy of the remainder uri, allocated in @a pool. - * (The remainder is the component which, added to @a uri1, yields - * @a uri2. The remainder does not begin with a dir separator.) + * (The remainder is the component which, added to @a parent_uri, yields + * @a child_uri. The remainder does not begin with a dir separator.) * * Both uris must be in canonical form, and must either be absolute, * or contain no .. components. * - * If @a uri2 is the same as @a uri1, it is not considered a child, + * If @a child_uri is the same as @a parent_uri, it is not considered a child, * so the result is @c NULL; an empty string is never returned. * - * If @a pool is @c NULL , a pointer into @a uri2 will be returned to + * If @a pool is @c NULL , a pointer into @a child_uri will be returned to * identify the remainder uri. * * ### @todo the .. restriction is unfortunate, and would ideally @@ -584,12 +584,12 @@ svn_dirent_get_absolute(const char **pab * @since New in 1.7. */ const char * -svn_uri_is_child(const char *uri1, - const char *uri2, +svn_uri_is_child(const char *parent_uri, + const char *child_uri, apr_pool_t *pool); /** - * This function is similar as svn_uri_is_child(), except that it supports + * This function is similar to svn_uri_is_child(), except that it supports * Windows dirents and UNC paths on Windows. * * ### @todo Makes no attempt to handle one absolute and one relative @@ -598,88 +598,90 @@ svn_uri_is_child(const char *uri1, * @since New in 1.6. */ const char * -svn_dirent_is_child(const char *dirent1, -const char *dirent2, +svn_dirent_is_child(const char *parent_dirent, +const char *child_dirent, apr_pool_t *pool); /** - * This function is similar as svn_uri_is_child(), except that it supports + * This function is similar to svn_uri_is_child(), except that it supports * only relative paths. * * @since New in 1.7. */ const char * -svn_relpath_is_child(const char *relpath1, - const char *relpath2, +svn_relpath_is_child(const char *parent_relpath, + const char *child_relpath, apr_pool_t *pool); -/** Return TRUE if @a dirent1 is an ancestor of @a dirent2 or the dirents are - * equal and FALSE otherwise. +/** Return TRUE if @a parent_dirent is an ancestor of @a child_dirent or + * the dirents are equal, and FALSE otherwise. * * @since New in 1.6. */ svn_boolean_t -svn_dirent_is_ancestor(const char *path1, - const char *path2); +svn_dirent_is_ancestor(const char *parent_dirent, + const char *child_dirent); -/** Return TRUE if @a relpath1 is an ancestor of @a relpath2 or the relpaths - * are equal and FALSE otherwise. +/** Return TRUE if @a parent_relpath is an ancestor of @a child_relpath or + * the relpaths are equal, and FALSE otherwise. * * This function supports only relative paths. * * @since New in 1.7. */ svn_boolean_t -svn_relpath_is_ancestor(const char *relpath1, -const char *relpath2); +svn_relpath_is_ancestor(const char *parent_relpath, +const char *child_relpath); -/** Return TRUE if @a uri1 is an ancestor of @a uri2 or the uris are - * equal and FALSE otherwise. +/** Return TRUE if @a parent_uri is an ancestor of @a child_uri or + * the uris are equal, and FALSE otherwise. * * This function supports URLs.
svn commit: r980153 - /subversion/trunk/subversion/libsvn_wc/status.c
Author: rhuijben Date: Wed Jul 28 18:43:57 2010 New Revision: 980153 URL: http://svn.apache.org/viewvc?rev=980153view=rev Log: Following up on r960708 and r980075, make our status walker also use a directories' dirents when doing a 'svn status -u'. This makes the information stable enough to calculate obstruction and missing status on them. This is needed in single-db mode as the wc-db layer will not see obstructions there. * subversion/libsvn_wc/status.c (assemble_status): Remove path_kind that was also used for driving the path walk and use dirent for obstruction and missing calculations instead. Implement single-db handling. (send_status_structure): Remove path_kind argument forwarding. (get_dir_status): Accept dirent. (handle_dir_entry): Use dirent instead of path_kind. (get_dir_status): Accept dirent. Fix ENODIR check. Pass dirent instead of FALSE to send_status_structure. (make_dir_baton): Fetch dirent for passing to get_dir_status. (handle_statii): Accept local_abspath. Fetch dirents for passing to get_dir_status. (close_directory): Update caller. Fetch dirent for passing to get_dir_status. (svn_wc_walk_status): Fetch a dirent instead of just checking the type and pass this to get_dir_status. (internal_status): Use status instead of fetching hidden. Update caller. Modified: subversion/trunk/subversion/libsvn_wc/status.c Modified: subversion/trunk/subversion/libsvn_wc/status.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/status.c?rev=980153r1=980152r2=980153view=diff == --- subversion/trunk/subversion/libsvn_wc/status.c (original) +++ subversion/trunk/subversion/libsvn_wc/status.c Wed Jul 28 18:43:57 2010 @@ -240,22 +240,20 @@ internal_status(svn_wc_status3_t **statu apr_pool_t *result_pool, apr_pool_t *scratch_pool); -/* Fill in *STATUS for LOCAL_ABSPATH, whose entry data is available in DB. - Allocate *STATUS in RESULT_POOL. Use SCRATCH_POOL for temporary - allocations. +/* Fill in *STATUS for LOCAL_ABSPATH, using DB. Allocate *STATUS in + RESULT_POOL and use SCRATCH_POOL for temporary allocations. PARENT_REPOS_ROOT_URL and PARENT_REPOS_RELPATH are the the repository root and repository relative path of the parent of LOCAL_ABSPATH or NULL if LOCAL_ABSPATH doesn't have a versioned parent directory. - PATH_KIND is the node kind of LOCAL_ABSPATH as determined by the caller. - DIRENT contains more details about the in-wc node of LOCAL_ABSPATH, - including whether it is a symlink. If DIRENT is NULL, don't handle - LOCAL_ABSPATH as a symlink and assume no cached data. + DIRENT is the local representation of LOCAL_ABSPATH in the working copy or + NULL if the node does not exist on disk. - If GET_ALL is zero, and ENTRY is not locally modified, then *STATUS - will be set to NULL. If GET_ALL is non-zero, then *STATUS will be + If GET_ALL is FALSE, and LOCAL_ABSPATH is not locally modified, then + *STATUS will be set to NULL. If GET_ALL is non-zero, then *STATUS will be allocated and returned no matter what. + The status struct's repos_lock field will be set to REPOS_LOCK. */ static svn_error_t * @@ -264,7 +262,6 @@ assemble_status(svn_wc_status3_t **statu const char *local_abspath, const char *parent_repos_root_url, const char *parent_repos_relpath, -svn_node_kind_t path_kind, const svn_io_dirent2_t *dirent, svn_boolean_t get_all, const svn_lock_t *repos_lock, @@ -342,24 +339,14 @@ assemble_status(svn_wc_status3_t **statu if (!repos_root_url parent_repos_root_url) repos_root_url = apr_pstrdup(result_pool, parent_repos_root_url); - /* Examine whether our directory metadata is present, and compensate - if it is missing. - - There are a several kinds of obstruction that we detect here: - - - versioned subdir is missing - - the versioned subdir's admin area is missing - - the versioned subdir has been replaced with a file/symlink + /* Examine whether our target is missing or obstructed or missing. - Net result: the target is obstructed and the metadata is unavailable. - - Note: wc_db can also detect a versioned file that has been replaced - with a versioned subdir (moved from somewhere). We don't look for - that right away because the file's metadata is still present, so we - can examine properties and conflicts and whatnot. - - ### note that most obstruction concepts disappear in single-db mode - */ + While we are not completely in single-db mode yet, data about + obstructed or missing nodes might be incomplete here. This is + reported by svn_wc_db_status_obstructed_. In single-db + mode these obstructions are no longer reported and we have + to detect obstructions
svn commit: r980176 - /subversion/trunk/subversion/libsvn_wc/status.c
Author: rhuijben Date: Wed Jul 28 19:33:02 2010 New Revision: 980176 URL: http://svn.apache.org/viewvc?rev=980176view=rev Log: * subversion/libsvn_wc/status.c (get_dir_status): Fix compilation for single-db mode. Modified: subversion/trunk/subversion/libsvn_wc/status.c Modified: subversion/trunk/subversion/libsvn_wc/status.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/status.c?rev=980176r1=980175r2=980176view=diff == --- subversion/trunk/subversion/libsvn_wc/status.c (original) +++ subversion/trunk/subversion/libsvn_wc/status.c Wed Jul 28 19:33:02 2010 @@ -1160,7 +1160,7 @@ get_dir_status(const struct walk_status_ #ifdef SVN_WC__SINGLE_DB if (err (APR_STATUS_IS_ENOENT(err-apr_err) - || SVN__APR_STATUS_IS_ENODIR(err-apr_err))) + || SVN__APR_STATUS_IS_ENOTDIR(err-apr_err))) { svn_error_clear(err); dirents = apr_hash_make(subpool);
svn commit: r980179 - in /subversion/trunk/subversion/svnrdump: dumpfile_parser.c load_editor.c load_editor.h svnrdump.c
Author: artagnon Date: Wed Jul 28 19:35:31 2010 New Revision: 980179 URL: http://svn.apache.org/viewvc?rev=980179view=rev Log: svnrdump: Add a wireframe structure to parse a dumpstream and build a commit editor. * subversion/svnrdump/dumpfile_parser.c (build_dumpfile_parser): Build and return a dumpfile parser to parse the dumpfile stream in stream using svn_repos_parse_dumpstream2(). Currently, it's a no-op and returns the error 'svnrdump: Unsupported dumpfile version: 3' because no real callbacks have been set up. * subversion/svnrdump/load_editor.c (drive_load_editor): Write a no-op to drive the load editor `editor` using an abstract operation represented as a `struct operation` to commit to session `session`. (get_load_editor): Change API to return `root_operation` and take a `stream` to parse using the dumpfile parser. Fill in the function to do some memory allocation and call build_dumpfile_parser(), svn_ra_get_commit_editor3() and open_root() of the svn_delta_editor_t editor. (commit_callback): Write a new function to print progress everytime a commit is made. The callback is set by get_load_editor() in its call to svn_ra_get_commit_editor3(). * subversion/svnrdump/load_editor.h (operation): Write a new structure to represent an abstract operation to commit. Currently, it's a reduced version of the corresponding struct in svnmucc. Also write a doxygen-friendly description. (build_dumpfile_parser): Expose the function so that functions in load_editor.c can see it in dumpfile_parser.c. Not intended to become a public API. Also write a doxygen-friendly description. (get_load_editor): Track the API changes. Update the documentation string. * subversion/svnrdump/svnrdump.c (load_revisions): Track the API changes made to load_editor and additionally call drive_load_editor. Added: subversion/trunk/subversion/svnrdump/dumpfile_parser.c Modified: subversion/trunk/subversion/svnrdump/load_editor.c subversion/trunk/subversion/svnrdump/load_editor.h subversion/trunk/subversion/svnrdump/svnrdump.c Added: subversion/trunk/subversion/svnrdump/dumpfile_parser.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/dumpfile_parser.c?rev=980179view=auto == --- subversion/trunk/subversion/svnrdump/dumpfile_parser.c (added) +++ subversion/trunk/subversion/svnrdump/dumpfile_parser.c Wed Jul 28 19:35:31 2010 @@ -0,0 +1,26 @@ +#include svn_pools.h +#include svn_delta.h +#include svn_repos.h +#include svn_io.h +#include svn_ra.h + +#include load_editor.h + +svn_error_t * +build_dumpfile_parser(const svn_repos_parse_fns2_t **parser, + void **parse_baton, + svn_stream_t *stream, + apr_pool_t *pool) +{ + svn_repos_parse_fns2_t *pf; + + pf = apr_pcalloc(pool, sizeof(*pf)); + + SVN_ERR(svn_repos_parse_dumpstream2(stream, pf, NULL, + NULL, NULL, pool)); + + *parser = pf; + *parse_baton = NULL; + + return SVN_NO_ERROR; +} Modified: subversion/trunk/subversion/svnrdump/load_editor.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/load_editor.c?rev=980179r1=980178r2=980179view=diff == --- subversion/trunk/subversion/svnrdump/load_editor.c (original) +++ subversion/trunk/subversion/svnrdump/load_editor.c Wed Jul 28 19:35:31 2010 @@ -24,14 +24,59 @@ #include svn_pools.h #include svn_delta.h +#include svn_repos.h +#include svn_ra.h +#include svn_cmdline.h -#include dump_editor.h +#include load_editor.h +static svn_error_t * +commit_callback(const svn_commit_info_t *commit_info, +void *baton, +apr_pool_t *pool) +{ + SVN_ERR(svn_cmdline_printf(pool, r%ld committed by %s at %s\n, + commit_info-revision, + (commit_info-author + ? commit_info-author : (no author)), + commit_info-date)); + return SVN_NO_ERROR; +} + +svn_error_t * +drive_load_editor(struct operation *operation, + const svn_delta_editor_t *editor, + apr_pool_t *pool) +{ + return SVN_NO_ERROR; +} + +/* The load editor is a essentially a dumpfile parser connected to a + commit editor. It can be driven using drive_load_editor(). */ svn_error_t * get_load_editor(const svn_delta_editor_t **editor, void **edit_baton, +struct operation **root_operation, svn_stream_t *stream, +svn_ra_session_t *session, apr_pool_t *pool) { + const svn_repos_parse_fns2_t *parser; + void *pb = NULL; + const svn_delta_editor_t *de; + struct operation *root; + + root = apr_pcalloc(pool, sizeof(*root)); + +
svn commit: r980184 - /subversion/trunk/subversion/include/svn_types.h
Author: rhuijben Date: Wed Jul 28 19:39:57 2010 New Revision: 980184 URL: http://svn.apache.org/viewvc?rev=980184view=rev Log: * subversion/include/svn_types.h (SVN__APR_STATUS_IS_ENOTDIR): Fix stupid type that breaks the !WIN32 build. Modified: subversion/trunk/subversion/include/svn_types.h Modified: subversion/trunk/subversion/include/svn_types.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_types.h?rev=980184r1=980183r2=980184view=diff == --- subversion/trunk/subversion/include/svn_types.h (original) +++ subversion/trunk/subversion/include/svn_types.h Wed Jul 28 19:39:57 2010 @@ -135,7 +135,7 @@ svn__apr_hash_index_val(const apr_hash_i * invalid-pathname error but not this one, so we include it. */ /* ### This fix should go into APR. */ #ifndef WIN32 -#define SVN__APR_STATUS_IS_ENOTDIR(s) APR_STATUS_IS_ENOTDIR(status) +#define SVN__APR_STATUS_IS_ENOTDIR(s) APR_STATUS_IS_ENOTDIR(s) #else #define SVN__APR_STATUS_IS_ENOTDIR(s) (APR_STATUS_IS_ENOTDIR(s) \ || ((s) == APR_OS_START_SYSERR + ERROR_INVALID_NAME))
svn commit: r980188 - in /subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl: ./ callback/
Author: hwright Date: Wed Jul 28 19:47:50 2010 New Revision: 980188 URL: http://svn.apache.org/viewvc?rev=980188view=rev Log: [ in subversion/bindings/javahl/src/org/apache/subversion/javahl/ ] * ClientNotifyInformation.java, DirEntry.java, ProgressEvent.java, callback/StatusCallback.java, callback/DiffSummaryCallback.java, callback/LogMessageCallback.java, callback/InfoCallback.java, callback/ListCallback.java, callback/ProplistCallback.java, callback/PatchCallback.java, callback/BlameCallback.java, callback/ChangelistCallback.java, Info2.java, DiffSummary.java, ReposNotifyInformation.java: Update busted javadoc links. Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/DirEntry.java subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/Info2.java subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ProgressEvent.java subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/BlameCallback.java subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ChangelistCallback.java subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/DiffSummaryCallback.java subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/InfoCallback.java subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ListCallback.java subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/LogMessageCallback.java subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/PatchCallback.java subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ProplistCallback.java subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/StatusCallback.java Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java?rev=980188r1=980187r2=980188view=diff == --- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java (original) +++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java Wed Jul 28 19:47:50 2010 @@ -28,7 +28,7 @@ import java.util.EventObject; /** * The event passed to the {...@link Notify2#onNotify(NotifyInformation)} - * API to notify {...@link SVNClientInterface} of relevant events. + * API to notify {...@link ISVNClient} of relevant events. * * @since 1.2 */ Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java?rev=980188r1=980187r2=980188view=diff == --- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java (original) +++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java Wed Jul 28 19:47:50 2010 @@ -28,7 +28,7 @@ import java.util.EventObject; /** * The event passed to the {...@link * DiffSummaryReceiver#onSummary(DiffSummary)} API in response to path - * differences reported by {...@link SVNClientInterface#diffSummarize}. + * differences reported by {...@link ISVNClient#diffSummarize}. * * @since 1.5 */ Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/DirEntry.java URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/DirEntry.java?rev=980188r1=980187r2=980188view=diff == --- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/DirEntry.java (original) +++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/DirEntry.java Wed Jul 28 19:47:50 2010 @@ -26,7 +26,7 @@ package org.apache.subversion.javahl; import java.util.Date; /** - * A general subversion directory entry. Used for SVNClientInterface.list + * A general subversion directory entry. Used for {...@link ISVNClient#list}. */ public class DirEntry implements java.io.Serializable
svn propchange: r980171 - svn:log
Author: rhuijben Revision: 980171 Modified property: svn:log Modified: svn:log at Wed Jul 28 20:03:11 2010 -- --- svn:log (original) +++ svn:log Wed Jul 28 20:03:11 2010 @@ -5,7 +5,7 @@ retrievals I added in r980153, as in the * subversion/libsvn_wc/status.c (get_dir_status): Reorder arguments. (handle_dir_entry): Update caller. - (get_dir_status): Reorder arguments and update document DIRENT. + (get_dir_status): Reorder arguments and document DIRENT argument. (make_dir_baton): Update caller. Skip retrieving dirent as it is not used anyway. Pass cancel function and baton. (handle_statii): Update caller. Skip retrieving dirents as they are
svn commit: r980196 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Author: rhuijben Date: Wed Jul 28 20:30:48 2010 New Revision: 980196 URL: http://svn.apache.org/viewvc?rev=980196view=rev Log: Use SVN_WC__SINGLE_DB as check for sharding pristines instead of SVN__SKIP_SUBDIR. The single DB format should be as close as (currently) possible to the final 1.7 on-disk format. * subversion/libsvn_wc/wc_db.c (SVN__SKIP_SUBDIR): Remove define. (get_pristine_fname): Check for SVN_WC__SINGLE_DB instead of !SVN__SKIP_SUBDIR. Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=980196r1=980195r2=980196view=diff == --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original) +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Wed Jul 28 20:30:48 2010 @@ -104,13 +104,6 @@ #define UNKNOWN_WC_ID ((apr_int64_t) -1) #define FORMAT_FROM_SDB (-1) - -/* ### since we're putting the pristine files per-dir, then we don't need - ### to create subdirectories in order to keep the directory size down. - ### when we can aggregate pristine files across dirs/wcs, then we will - ### need to undo the SKIP. */ -#define SVN__SKIP_SUBDIR - /* This is a character used to escape itself and the globbing character in globbing sql expressions below. See escape_sqlite_like(). @@ -287,7 +280,7 @@ escape_sqlite_like(const char * const st to hold CHECKSUM's pristine file, relating to the pristine store configured for the working copy indicated by PDH. The returned path does not necessarily currently exist. -#ifndef SVN__SKIP_SUBDIR +#ifdef SVN_WC__SINGLE_DB Iff CREATE_SUBDIR is TRUE, then this function will make sure that the parent directory of PRISTINE_ABSPATH exists. This is only useful when about to create a new pristine. @@ -303,7 +296,7 @@ get_pristine_fname(const char **pristine { const char *base_dir_abspath; const char *hexdigest = svn_checksum_to_cstring(sha1_checksum, scratch_pool); -#ifndef SVN__SKIP_SUBDIR +#ifdef SVN_WC__SINGLE_DB char subdir[3]; #endif @@ -325,7 +318,7 @@ get_pristine_fname(const char **pristine /* We should have a valid checksum and (thus) a valid digest. */ SVN_ERR_ASSERT(hexdigest != NULL); -#ifndef SVN__SKIP_SUBDIR +#ifdef SVN_WC__SINGLE_DB /* Get the first two characters of the digest, for the subdir. */ subdir[0] = hexdigest[0]; subdir[1] = hexdigest[1]; @@ -350,7 +343,7 @@ get_pristine_fname(const char **pristine /* The file is located at DIR/.svn/pristine/XX/XXYYZZ... */ *pristine_abspath = svn_dirent_join_many(result_pool, base_dir_abspath, -#ifndef SVN__SKIP_SUBDIR +#ifdef SVN_WC__SINGLE_DB subdir, #endif hexdigest,
svn commit: r980203 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Author: rhuijben Date: Wed Jul 28 20:43:24 2010 New Revision: 980203 URL: http://svn.apache.org/viewvc?rev=980203view=rev Log: * subversion/libsvn_wc/wc_db.c (svn_wc__db_temp_op_set_base_incomplete): Fix possible NULL reference. Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=980203r1=980202r2=980203view=diff == --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original) +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Wed Jul 28 20:43:24 2010 @@ -8503,7 +8503,9 @@ svn_wc__db_temp_op_set_base_incomplete(s { pdh = svn_wc__db_pdh_get_or_create(db, local_dir_abspath, FALSE, scratch_pool); - flush_entries(pdh); + + if (pdh != NULL) + flush_entries(pdh); } return SVN_NO_ERROR;
svn commit: r980231 - /subversion/trunk/build.conf
Author: rhuijben Date: Wed Jul 28 21:09:03 2010 New Revision: 980231 URL: http://svn.apache.org/viewvc?rev=980231view=rev Log: * build.conf (svnrdump): Following up on r980179, add libsvn_repos in an attempt to fix the build on two buildbots. Modified: subversion/trunk/build.conf Modified: subversion/trunk/build.conf URL: http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=980231r1=980230r2=980231view=diff == --- subversion/trunk/build.conf (original) +++ subversion/trunk/build.conf Wed Jul 28 21:09:03 2010 @@ -171,7 +171,7 @@ manpages = subversion/svnversion/svnvers description = Subversion remote repository dumper type = exe path = subversion/svnrdump -libs = libsvn_client libsvn_ra libsvn_delta libsvn_subr apr +libs = libsvn_client libsvn_ra libsvn_repos libsvn_delta libsvn_subr apr install = bin manpages = subversion/svnrdump/svnrdump.1
svn commit: r980235 - /subversion/trunk/subversion/tests/cmdline/svntest/wc.py
Author: rhuijben Date: Wed Jul 28 21:31:31 2010 New Revision: 980235 URL: http://svn.apache.org/viewvc?rev=980235view=rev Log: Fix pristine location finder for sharded single db and non '/' paths. * subversion/tests/cmdline/svntest/wc.py (text_base_path): Update location calculation. Modified: subversion/trunk/subversion/tests/cmdline/svntest/wc.py Modified: subversion/trunk/subversion/tests/cmdline/svntest/wc.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/wc.py?rev=980235r1=980234r2=980235view=diff == --- subversion/trunk/subversion/tests/cmdline/svntest/wc.py (original) +++ subversion/trunk/subversion/tests/cmdline/svntest/wc.py Wed Jul 28 21:31:31 2010 @@ -823,8 +823,9 @@ def text_base_path(file_path): if head == root_path: raise svntest.Failure(No DB for + file_path) root_path = head -relpath = os.path.join(tail, relpath) +relpath = os.path.join(tail, relpath).replace(os.sep, '/') + print('%s : %s' %(db_path, relpath)) c = db.cursor() c.execute(select checksum from working_node where local_relpath = ' + relpath + ') @@ -836,7 +837,16 @@ def text_base_path(file_path): if checksum is None or checksum[0:6] != $sha1$: raise svntest.Failure(No SHA1 checksum for + relpath) db.close() - return os.path.join(root_path, dot_svn, 'pristine', checksum[6:]) + + checksum = checksum[6:] + # Calculate single DB location + fn = os.path.join(root_path, dot_svn, 'pristine', checksum[0:2], checksum) + + if os.path.isfile(fn): +return fn + + # Calculate per dir location + return os.path.join(root_path, dot_svn, 'pristine', checksum) #
svn commit: r980241 - /subversion/trunk/subversion/tests/cmdline/svntest/verify.py
Author: rhuijben Date: Wed Jul 28 21:39:27 2010 New Revision: 980241 URL: http://svn.apache.org/viewvc?rev=980241view=rev Log: * subversion/tests/cmdline/svntest/verify.py (display_lines): If expected or actual is a string, convert it to a list before calling unified_diff() on it. Modified: subversion/trunk/subversion/tests/cmdline/svntest/verify.py Modified: subversion/trunk/subversion/tests/cmdline/svntest/verify.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/verify.py?rev=980241r1=980240r2=980241view=diff == --- subversion/trunk/subversion/tests/cmdline/svntest/verify.py (original) +++ subversion/trunk/subversion/tests/cmdline/svntest/verify.py Wed Jul 28 21:39:27 2010 @@ -295,6 +295,13 @@ def display_lines(message, label, expect # Additionally print unified diff if not expected_is_regexp: print('DIFF ' + ' '.join(output.split(' ')[1:])) + +if type(expected) is str: + expected = [expected] + +if type(actual) is str: + actual = [actual] + for x in unified_diff(expected, actual, fromfile=EXPECTED %s % label, tofile=ACTUAL %s % label):
svn commit: r980251 - in /subversion/trunk/subversion: include/private/svn_fs_util.h libsvn_fs_base/bdb/lock-tokens-table.c libsvn_fs_base/bdb/locks-table.c libsvn_fs_base/lock.c libsvn_fs_base/tree.c
Author: rhuijben Date: Wed Jul 28 22:21:22 2010 New Revision: 980251 URL: http://svn.apache.org/viewvc?rev=980251view=rev Log: Convert dirents to local style in several libsvn_fs_(base|fs) error messages. * subversion/include/private/svn_fs_util.h (SVN_FS__ERR_NOT_MUTABLE, SVN_FS__ERR_NOT_DIRECTORY, SVN_FS__ERR_NOT_FILE, SVN_FS__ERR_PATH_ALREADY_LOCKED, SVN_FS__ERR_NO_SUCH_LOCK, SVN_FS__ERR_LOCK_EXPIRED, SVN_FS__ERR_NO_USER, SVN_FS__ERR_LOCK_OWNER_MISMATCH): Add pool argument and convert to local style. * subversion/libsvn_fs_base/bdb/lock-tokens-table.c (svn_fs_bdb__lock_token_delete, svn_fs_bdb__lock_token_get): Update callers. * subversion/libsvn_fs_base/bdb/locks-table.c (svn_fs_bdb__lock_get): Update caller. * subversion/libsvn_fs_base/lock.c (txn_body_lock, txn_body_unlock): Update callers. * subversion/libsvn_fs_base/tree.c (mutable_root_node, open_path): Update callers. * subversion/libsvn_fs_fs/lock.c (get_lock, lock_body, unlock_body): Update callers. * subversion/libsvn_fs_fs/tree.c (mutable_root_node, open_path): Update callers. Modified: subversion/trunk/subversion/include/private/svn_fs_util.h subversion/trunk/subversion/libsvn_fs_base/bdb/lock-tokens-table.c subversion/trunk/subversion/libsvn_fs_base/bdb/locks-table.c subversion/trunk/subversion/libsvn_fs_base/lock.c subversion/trunk/subversion/libsvn_fs_base/tree.c subversion/trunk/subversion/libsvn_fs_fs/lock.c subversion/trunk/subversion/libsvn_fs_fs/tree.c Modified: subversion/trunk/subversion/include/private/svn_fs_util.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_fs_util.h?rev=980251r1=980250r2=980251view=diff == --- subversion/trunk/subversion/include/private/svn_fs_util.h (original) +++ subversion/trunk/subversion/include/private/svn_fs_util.h Wed Jul 28 22:21:22 2010 @@ -98,63 +98,64 @@ svn_fs__check_fs(svn_fs_t *fs, svn_boole /* SVN_FS__ERR_NOT_MUTABLE: the caller attempted to change a node outside of a transaction. FS is of type svn_fs_t *. */ -#define SVN_FS__ERR_NOT_MUTABLE(fs, rev, path_in_repo) \ - svn_error_createf \ -(SVN_ERR_FS_NOT_MUTABLE, 0, \ +#define SVN_FS__ERR_NOT_MUTABLE(fs, rev, path_in_repo, scratch_pool) \ + svn_error_createf( \ + SVN_ERR_FS_NOT_MUTABLE, 0, \ _(File is not mutable: filesystem '%s', revision %ld, path '%s'), \ - fs-path, rev, path_in_repo) + svn_dirent_local_style(fs-path, scratch_pool), rev, path_in_repo) /* FS is of type svn fs_t *.*/ -#define SVN_FS__ERR_NOT_DIRECTORY(fs, path_in_repo)\ - svn_error_createf\ -(SVN_ERR_FS_NOT_DIRECTORY, 0, \ - _('%s' is not a directory in filesystem '%s'), \ - path_in_repo, fs-path) +#define SVN_FS__ERR_NOT_DIRECTORY(fs, path_in_repo, scratch_pool) \ + svn_error_createf( \ + SVN_ERR_FS_NOT_DIRECTORY, 0, \ + _('%s' is not a directory in filesystem '%s'), \ + path_in_repo, svn_dirent_local_style(fs-path, scratch_pool)) /* FS is of type svn fs_t *. */ -#define SVN_FS__ERR_NOT_FILE(fs, path_in_repo) \ - svn_error_createf\ -(SVN_ERR_FS_NOT_FILE, 0, \ - _('%s' is not a file in filesystem '%s'), \ - path_in_repo, fs-path) +#define SVN_FS__ERR_NOT_FILE(fs, path_in_repo, scratch_pool) \ + svn_error_createf( \ + SVN_ERR_FS_NOT_FILE, 0, \ + _('%s' is not a file in filesystem '%s'), \ + path_in_repo, svn_dirent_local_style(fs-path, scratch_pool)) + /* FS is of type svn fs_t *, LOCK is of type svn_lock_t *. */ -#define SVN_FS__ERR_PATH_ALREADY_LOCKED(fs, lock) \ - svn_error_createf\ -(SVN_ERR_FS_PATH_ALREADY_LOCKED, 0,\ - _(Path '%s' is already locked by user '%s' in filesystem '%s'), \ - lock-path, lock-owner, fs-path) +#define SVN_FS__ERR_PATH_ALREADY_LOCKED(fs, lock, scratch_pool) \ + svn_error_createf(\ + SVN_ERR_FS_PATH_ALREADY_LOCKED, 0, \ + _(Path '%s' is already locked by user '%s' in filesystem '%s'), \ + lock-path, lock-owner, svn_dirent_local_style(fs-path, scratch_pool)) /* FS is of type svn fs_t *. */ -#define SVN_FS__ERR_NO_SUCH_LOCK(fs, path_in_repo) \ - svn_error_createf
svn commit: r980258 - /subversion/trunk/subversion/libsvn_wc/crop.c
Author: rhuijben Date: Wed Jul 28 22:40:53 2010 New Revision: 980258 URL: http://svn.apache.org/viewvc?rev=980258view=rev Log: * subversion/libsvn_wc/crop.c (crop_children): Use depth infinity for depth unknown before comparing with the new depth. Modified: subversion/trunk/subversion/libsvn_wc/crop.c Modified: subversion/trunk/subversion/libsvn_wc/crop.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/crop.c?rev=980258r1=980257r2=980258view=diff == --- subversion/trunk/subversion/libsvn_wc/crop.c (original) +++ subversion/trunk/subversion/libsvn_wc/crop.c Wed Jul 28 22:40:53 2010 @@ -85,12 +85,13 @@ crop_children(svn_wc__db_t *db, NULL, db, local_abspath, pool, iterpool)); + if (dir_depth == svn_depth_unknown) +dir_depth = svn_depth_infinity; + /* Update the depth of target first, if needed. */ if (dir_depth depth) -{ - SVN_ERR(svn_wc__db_temp_op_set_dir_depth(db, local_abspath, depth, - iterpool)); -} +SVN_ERR(svn_wc__db_temp_op_set_dir_depth(db, local_abspath, depth, + iterpool)); /* Looping over current directory's SVN entries: */ SVN_ERR(svn_wc__db_read_children(children, db, local_abspath, pool,
svn commit: r980263 - in /subversion/trunk/subversion/libsvn_wc: adm_files.c adm_files.h adm_ops.c
Author: rhuijben Date: Wed Jul 28 23:13:05 2010 New Revision: 980263 URL: http://svn.apache.org/viewvc?rev=980263view=rev Log: Allow destroying a single-db working copy via its root using svn_wc__adm_destroy(). This should fix a few externals tests for single-db. * subversion/libsvn_wc/adm_files.c (svn_wc__adm_destroy): Accept cancel_func, cancel_baton. Retrieve the wcroot path and if that is the passed path destroy its .svn subdir. * subversion/libsvn_wc/adm_files.h (svn_wc__adm_destroy): Update prototype. * subversion/libsvn_wc/adm_ops.c (svn_wc__internal_remove_from_revision_control): Update caller. Modified: subversion/trunk/subversion/libsvn_wc/adm_files.c subversion/trunk/subversion/libsvn_wc/adm_files.h subversion/trunk/subversion/libsvn_wc/adm_ops.c Modified: subversion/trunk/subversion/libsvn_wc/adm_files.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_files.c?rev=980263r1=980262r2=980263view=diff == --- subversion/trunk/subversion/libsvn_wc/adm_files.c (original) +++ subversion/trunk/subversion/libsvn_wc/adm_files.c Wed Jul 28 23:13:05 2010 @@ -680,23 +680,38 @@ svn_wc_ensure_adm4(svn_wc_context_t *wc_ svn_error_t * svn_wc__adm_destroy(svn_wc__db_t *db, const char *dir_abspath, +svn_cancel_func_t cancel_func, +void *cancel_baton, apr_pool_t *scratch_pool) { -#ifndef SINGLE_DB const char *adm_abspath; -#endif SVN_ERR_ASSERT(svn_dirent_is_absolute(dir_abspath)); SVN_ERR(svn_wc__write_check(db, dir_abspath, scratch_pool)); +#ifdef SVN_WC__SINGLE_DB + SVN_ERR(svn_wc__db_get_wcroot(adm_abspath, db, dir_abspath, +scratch_pool, scratch_pool)); +#endif + + /* Well, the coast is clear for blowing away the administrative directory, which also removes the lock */ SVN_ERR(svn_wc__db_temp_forget_directory(db, dir_abspath, scratch_pool)); -#ifndef SINGLE_DB +#ifndef SVN_WC__SINGLE_DB adm_abspath = svn_wc__adm_child(dir_abspath, NULL, scratch_pool); SVN_ERR(svn_io_remove_dir2(adm_abspath, FALSE, NULL, NULL, scratch_pool)); +#else + /* ### We should check if we are the only user of this DB!!! */ + + if (strcmp(adm_abspath, dir_abspath) == 0) +SVN_ERR(svn_io_remove_dir2(svn_wc__adm_child(adm_abspath, NULL, + scratch_pool), + FALSE, + cancel_func, cancel_baton, + scratch_pool)); #endif return SVN_NO_ERROR; Modified: subversion/trunk/subversion/libsvn_wc/adm_files.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_files.h?rev=980263r1=980262r2=980263view=diff == --- subversion/trunk/subversion/libsvn_wc/adm_files.h (original) +++ subversion/trunk/subversion/libsvn_wc/adm_files.h Wed Jul 28 23:13:05 2010 @@ -214,9 +214,13 @@ svn_wc__open_writable_base(svn_stream_t apr_pool_t *scratch_pool); -/* Blow away the admistrative directory associated with DIR_ABSPATH */ +/* Blow away the admistrative directory associated with DIR_ABSPATH. + For single-db this doesn't perform actual work unless the wcroot is passed. + */ svn_error_t *svn_wc__adm_destroy(svn_wc__db_t *db, const char *dir_abspath, + svn_cancel_func_t cancel_func, + void *cancel_baton, apr_pool_t *scratch_pool); Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=980263r1=980262r2=980263view=diff == --- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original) +++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Wed Jul 28 23:13:05 2010 @@ -2084,7 +2084,8 @@ svn_wc__internal_remove_from_revision_co /* Remove the entire administrative .svn area, thereby removing _this_ dir from revision control too. */ - SVN_ERR(svn_wc__adm_destroy(db, local_abspath, iterpool)); + SVN_ERR(svn_wc__adm_destroy(db, local_abspath, + cancel_func, cancel_baton, iterpool)); /* If caller wants us to recursively nuke everything on disk, go ahead, provided that there are no dangling local-mod files
svn commit: r980278 - in /subversion/trunk/subversion: libsvn_client/patch.c tests/cmdline/patch_tests.py
Author: rhuijben Date: Thu Jul 29 00:49:57 2010 New Revision: 980278 URL: http://svn.apache.org/viewvc?rev=980278view=rev Log: Make 'svn patch' handle adding directories over deleted nodes. This feature was documented as 'needs wc-ng', while replacing directories just works in 1.6. The old implementation just needed fixing for single db. And even with multi-db we allow replacing a deleted file with a directory; so why wait? * subversion/libsvn_client/patch.c (create_missing_parents): Don't copy a constant input argument to a tempvar. Allow replacing any deleted node as long as there is no in-wc obstruction. Just create all directory levels at once, to support single-db (where deleted directories do not exist) and not-single db (where they do) wc-ng with the same code. * subversion/tests/cmdline/patch_tests.py (patch_add_new_dir): Update expected values to expect an addition of A/C/Y/new. Modified: subversion/trunk/subversion/libsvn_client/patch.c subversion/trunk/subversion/tests/cmdline/patch_tests.py Modified: subversion/trunk/subversion/libsvn_client/patch.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/patch.c?rev=980278r1=980277r2=980278view=diff == --- subversion/trunk/subversion/libsvn_client/patch.c (original) +++ subversion/trunk/subversion/libsvn_client/patch.c Thu Jul 29 00:49:57 2010 @@ -1823,14 +1823,15 @@ create_missing_parents(patch_target_t *t apr_pool_t *iterpool; /* Check if we can safely create the target's parent. */ - local_abspath = apr_pstrdup(scratch_pool, abs_wc_path); + local_abspath = abs_wc_path; components = svn_path_decompose(target-local_relpath, scratch_pool); present_components = 0; iterpool = svn_pool_create(scratch_pool); for (i = 0; i components-nelts - 1; i++) { const char *component; - svn_node_kind_t kind; + svn_node_kind_t wc_kind, disk_kind; + svn_boolean_t is_deleted; svn_pool_clear(iterpool); @@ -1838,49 +1839,45 @@ create_missing_parents(patch_target_t *t const char *); local_abspath = svn_dirent_join(local_abspath, component, scratch_pool); - SVN_ERR(svn_wc_read_kind(kind, ctx-wc_ctx, local_abspath, TRUE, + SVN_ERR(svn_wc_read_kind(wc_kind, ctx-wc_ctx, local_abspath, TRUE, iterpool)); - if (kind == svn_node_file) + + SVN_ERR(svn_io_check_path(local_abspath, disk_kind, iterpool)); + + if (wc_kind != svn_node_none) +SVN_ERR(svn_wc__node_is_status_deleted(is_deleted, + ctx-wc_ctx, + local_abspath, + iterpool)); + else +is_deleted = FALSE; + + if (disk_kind == svn_node_file + || (wc_kind == svn_node_file !is_deleted)) { - /* Obstructed. */ + /* on-disk files and missing files are obstructions */ target-skipped = TRUE; break; } - else if (kind == svn_node_dir) + else if (wc_kind == svn_node_dir) { - /* ### wc-ng should eventually be able to replace - * directories in-place, so this schedule conflict - * check will go away. We could then also make the - * svn_wc_read_kind() call above ignore hidden - * nodes.*/ - svn_boolean_t is_deleted; - - SVN_ERR(svn_wc__node_is_status_deleted(is_deleted, - ctx-wc_ctx, - local_abspath, - iterpool)); if (is_deleted) -{ - target-skipped = TRUE; - break; -} +break; + /* continue one level deeper */ present_components++; } + else if (disk_kind == svn_node_dir) +{ + /* Obstructed. ### BH: why? We can just add a directory */ + target-skipped = TRUE; + break; +} else { - /* The WC_DB doesn't know much about this node. - * Check what's on disk. */ - svn_node_kind_t disk_kind; - - SVN_ERR(svn_io_check_path(local_abspath, disk_kind, -iterpool)); - if (disk_kind != svn_node_none) -{ - /* An unversioned item is in the way. */ - target-skipped = TRUE; - break; -} + /* It's not a file, it's not a dir.. + Let's add a dir */ + break; } } @@ -1896,6 +1893,15 @@ create_missing_parents(patch_target_t *t component, scratch_pool); } + if (!dry_run present_components