svn commit: r965016 - /subversion/trunk/subversion/tests/cmdline/basic_tests.py

2010-07-16 Thread danielsh
Author: danielsh
Date: Sat Jul 17 05:27:30 2010
New Revision: 965016

URL: http://svn.apache.org/viewvc?rev=965016&view=rev
Log:
Once and for all, make the test suite complain if it's asked to test serf but
the svn binary only supports neon, or vice-versa.

* subversion/tests/cmdline/basic_tests.py
  (meta_correct_library_being_used):
New "test function" to verify that the desired library is available to the
svn binary.
  (test_list):
Run the new "test" for DAV only.

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=965016&r1=965015&r2=965016&view=diff
==
--- subversion/trunk/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/basic_tests.py Sat Jul 17 
05:27:30 2010
@@ -33,6 +33,7 @@ from svntest import wc
 
 # (abbreviation)
 Skip = svntest.testcase.Skip
+SkipUnless = svntest.testcase.SkipUnless
 XFail = svntest.testcase.XFail
 Wimp = svntest.testcase.Wimp
 Item = wc.StateItem
@@ -2509,6 +2510,13 @@ def delete_from_url_with_spaces(sbox):
   'rm', sbox.repo_url + 
'/Dir%20With/Spaces',
   '-m', 'Deleted')
 
+def meta_correct_library_being_used(sbox):
+  "verify that neon/serf are compiled if tested"
+  expected_re = (r'^\* ra_%s :' % svntest.main.options.http_library)
+  expected_output = svntest.verify.RegexOutput(expected_re, match_all=False)
+  svntest.actions.run_and_verify_svn("is $http_library available",
+ expected_output, [], '--version')
+
 #--
 
 
@@ -2566,6 +2574,8 @@ test_list = [ None,
   basic_add_svn_format_file,
   basic_mkdir_mix_targets,
   delete_from_url_with_spaces,
+  SkipUnless(meta_correct_library_being_used,
+ svntest.main.is_ra_type_dav),
  ]
 
 if __name__ == '__main__':




svn commit: r964963 - /subversion/trunk/subversion/libsvn_client/diff.c

2010-07-16 Thread rhuijben
Author: rhuijben
Date: Fri Jul 16 22:09:28 2010
New Revision: 964963

URL: http://svn.apache.org/viewvc?rev=964963&view=rev
Log:
Following up on r961775, make adjust_paths_for_diff_labels() also update
the changed file path, just like the original code did before r961775.

This should at least partially fix the JavaHL test failures.

* subversion/libsvn_client/diff.c
  (adjust_paths_for_diff_labels): Make path a pointer to pointer to string,
like the other adjusted paths. Move to first position for consistency.
Update usages of path.
  (display_prop_diffs): Update caller.
  (diff_content_changed): Update caller.

Modified:
subversion/trunk/subversion/libsvn_client/diff.c

Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=964963&r1=964962&r2=964963&view=diff
==
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Fri Jul 16 22:09:28 2010
@@ -190,19 +190,20 @@ maybe_append_eol(const svn_string_t *tok
 }
 }
 
-/* Adjust PATH1 and PATH2, representing the original targets passed to the
- * the diff command, to handle the case when we're dealing with different
- * anchors. PATH represents the file that has changed. RELATIVE_TO_DIR is
- * the directory the diff target should be considered relative to. All
- * allocations are done in POOL. */
+/* Adjust PATH, PATH1 and PATH2, representing the changed file and the two
+ * original targets passed to the diff command, to handle the case when
+ * we're dealing with different anchors. RELATIVE_TO_DIR is the directory
+ * the diff target should be considered relative to. All allocations are done
+ * in POOL. */
 static svn_error_t *
-adjust_paths_for_diff_labels(const char **path1,
+adjust_paths_for_diff_labels(const char **path,
+ const char **path1,
  const char **path2,
- const char *path,
  const char *relative_to_dir,
  apr_pool_t *pool)
 {
   apr_size_t len;
+  const char *new_path = *path;
   const char *new_path1 = *path1;
   const char *new_path2 = *path2;
 
@@ -228,31 +229,31 @@ adjust_paths_for_diff_labels(const char 
  a particular style, so not calling svn_dirent_local_style() on the
  paths below.*/
   if (new_path1[0] == '\0')
-new_path1 = apr_psprintf(pool, "%s", path);
+new_path1 = apr_psprintf(pool, "%s", new_path);
   else if (new_path1[0] == '/')
-new_path1 = apr_psprintf(pool, "%s\t(...%s)", path, new_path1);
+new_path1 = apr_psprintf(pool, "%s\t(...%s)", new_path, new_path1);
   else
-new_path1 = apr_psprintf(pool, "%s\t(.../%s)", path, new_path1);
+new_path1 = apr_psprintf(pool, "%s\t(.../%s)", new_path, new_path1);
 
   if (new_path2[0] == '\0')
-new_path2 = apr_psprintf(pool, "%s", path);
+new_path2 = apr_psprintf(pool, "%s", new_path);
   else if (new_path2[0] == '/')
-new_path2 = apr_psprintf(pool, "%s\t(...%s)", path, new_path2);
+new_path2 = apr_psprintf(pool, "%s\t(...%s)", new_path, new_path2);
   else
-new_path2 = apr_psprintf(pool, "%s\t(.../%s)", path, new_path2);
+new_path2 = apr_psprintf(pool, "%s\t(.../%s)", new_path, new_path2);
 
   if (relative_to_dir)
 {
   /* Possibly adjust the paths shown in the output (see issue #2723). */
-  const char *child_path = svn_dirent_is_child(relative_to_dir, path,
+  const char *child_path = svn_dirent_is_child(relative_to_dir, new_path,
pool);
 
   if (child_path)
-path = child_path;
-  else if (!svn_path_compare_paths(relative_to_dir, path))
-path = ".";
+new_path = child_path;
+  else if (!svn_path_compare_paths(relative_to_dir, new_path))
+new_path = ".";
   else
-return MAKE_ERR_BAD_RELATIVE_PATH(path, relative_to_dir);
+return MAKE_ERR_BAD_RELATIVE_PATH(new_path, relative_to_dir);
 
   child_path = svn_dirent_is_child(relative_to_dir, new_path1, pool);
 
@@ -272,6 +273,7 @@ adjust_paths_for_diff_labels(const char 
   else
 return MAKE_ERR_BAD_RELATIVE_PATH(new_path2, relative_to_dir);
 }
+  *path = new_path;
   *path1 = new_path1;
   *path2 = new_path2;
 
@@ -344,7 +346,7 @@ display_prop_diffs(const apr_array_heade
 const char *label1;
 const char *label2;
 
-SVN_ERR(adjust_paths_for_diff_labels(&path1, &path2, path,
+SVN_ERR(adjust_paths_for_diff_labels(&path, &path1, &path2,
  relative_to_dir, pool));
 
 label1 = diff_label(path1, rev1, pool);
@@ -699,7 +701,7 @@ diff_content_changed(const char *path,
   path1 = diff_cmd_baton->orig_path_1;
   path2 = diff_cmd_baton->orig_path_2;
 
-  SVN_ERR(adjust_paths_for_diff_lab

svn commit: r964953 - /subversion/trunk/subversion/libsvn_client/commit.c

2010-07-16 Thread hwright
Author: hwright
Date: Fri Jul 16 21:27:23 2010
New Revision: 964953

URL: http://svn.apache.org/viewvc?rev=964953&view=rev
Log:
Use absolute paths consistently throughout the client commit code.

* subversion/libsvn_client/commit.c
  (get_ra_editor): Change param name, and assume an absolute path.
  (svn_client_import3): Get the absolute path, and use it.

Modified:
subversion/trunk/subversion/libsvn_client/commit.c

Modified: subversion/trunk/subversion/libsvn_client/commit.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit.c?rev=964953&r1=964952&r2=964953&view=diff
==
--- subversion/trunk/subversion/libsvn_client/commit.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit.c Fri Jul 16 21:27:23 2010
@@ -598,7 +598,7 @@ get_ra_editor(svn_ra_session_t **ra_sess
   void **edit_baton,
   svn_client_ctx_t *ctx,
   const char *base_url,
-  const char *base_dir,
+  const char *base_dir_abspath,
   const char *log_msg,
   const apr_array_header_t *commit_items,
   const apr_hash_t *revprop_table,
@@ -610,9 +610,6 @@ get_ra_editor(svn_ra_session_t **ra_sess
 {
   void *commit_baton;
   apr_hash_t *commit_revprops;
-  const char *base_dir_abspath;
-
-  SVN_ERR(svn_dirent_get_absolute(&base_dir_abspath, base_dir, pool));
 
   /* Open an RA session to URL. */
   SVN_ERR(svn_client__open_ra_session_internal(ra_session, base_url,
@@ -667,13 +664,17 @@ svn_client_import3(svn_commit_info_t **c
   svn_ra_session_t *ra_session;
   apr_hash_t *excludes = apr_hash_make(pool);
   svn_node_kind_t kind;
-  const char *base_dir = path;
+  const char *local_abspath;
+  const char *base_dir_abspath;
   apr_array_header_t *new_entries = apr_array_make(pool, 4,
sizeof(const char *));
   const char *temp;
   const char *dir;
   apr_pool_t *subpool;
 
+  SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
+  base_dir_abspath = local_abspath;
+
   /* Create a new commit item and add it to the array. */
   if (SVN_CLIENT__HAS_LOG_MSG_FUNC(ctx))
 {
@@ -702,9 +703,9 @@ svn_client_import3(svn_commit_info_t **c
 }
 }
 
-  SVN_ERR(svn_io_check_path(path, &kind, pool));
+  SVN_ERR(svn_io_check_path(local_abspath, &kind, pool));
   if (kind == svn_node_file)
-base_dir = svn_dirent_dirname(path, pool);
+base_dir_abspath = svn_dirent_dirname(local_abspath, pool);
 
   /* Figure out all the path components we need to create just to have
  a place to stick our imported tree. */
@@ -735,7 +736,7 @@ svn_client_import3(svn_commit_info_t **c
 }
 }
   while ((err = get_ra_editor(&ra_session,
-  &editor, &edit_baton, ctx, url, base_dir,
+  &editor, &edit_baton, ctx, url, base_dir_abspath,
   log_msg, NULL, revprop_table,
   commit_info_p, FALSE, NULL, TRUE, subpool)));
 




svn commit: r964949 - /subversion/trunk/

2010-07-16 Thread hwright
Author: hwright
Date: Fri Jul 16 20:56:05 2010
New Revision: 964949

URL: http://svn.apache.org/viewvc?rev=964949&view=rev
Log:
* /:
  Add fails.log to svn:ignore.

Modified:
subversion/trunk/   (props changed)

Propchange: subversion/trunk/
--
--- svn:ignore (original)
+++ svn:ignore Fri Jul 16 20:56:05 2010
@@ -17,6 +17,7 @@ autogen-standalone.mk
 autom4te.cache
 gen-make.opts
 tests.log
+fails.log
 db4-win32
 db
 *.o




svn commit: r964942 - /subversion/trunk/subversion/svn/

2010-07-16 Thread hwright
Author: hwright
Date: Fri Jul 16 20:34:39 2010
New Revision: 964942

URL: http://svn.apache.org/viewvc?rev=964942&view=rev
Log:
Remove a couple of arguments from the notifier retriever in the client, and
replace them with functions which can set the same parameters (in rare cases).

* subversion/svn/cl.h
  (svn_cl__get_notifier): Remove params, update docstring.
  (svn_cl__notifier_mark_checkout, svn_cl__notifier_mark_export): New.

* subversion/svn/notify.c
  (svn_cl__get_notifier): Remove params, and set defaults.
  (svn_cl__notifier_mark_checkout, svn_cl__notifier_mark_export): New.

* subversion/svn/patch-cmd.c,
  subversion/svn/merge-cmd.c,
  subversion/svn/propdel-cmd.c,
  subversion/svn/checkout-cmd.c,
  subversion/svn/move-cmd.c,
  subversion/svn/mkdir-cmd.c,
  subversion/svn/revert-cmd.c,
  subversion/svn/copy-cmd.c,
  subversion/svn/changelist-cmd.c,
  subversion/svn/log-cmd.c,
  subversion/svn/update-cmd.c,
  subversion/svn/resolved-cmd.c,
  subversion/svn/upgrade-cmd.c,
  subversion/svn/commit-cmd.c,
  subversion/svn/add-cmd.c,
  subversion/svn/propset-cmd.c,
  subversion/svn/switch-cmd.c,
  subversion/svn/delete-cmd.c,
  subversion/svn/import-cmd.c,
  subversion/svn/resolve-cmd.c,
  subversion/svn/export-cmd.c,
  subversion/svn/status-cmd.c,
  subversion/svn/lock-cmd.c,
  subversion/svn/unlock-cmd.c:
Update callers.

Modified:
subversion/trunk/subversion/svn/add-cmd.c
subversion/trunk/subversion/svn/changelist-cmd.c
subversion/trunk/subversion/svn/checkout-cmd.c
subversion/trunk/subversion/svn/cl.h
subversion/trunk/subversion/svn/commit-cmd.c
subversion/trunk/subversion/svn/copy-cmd.c
subversion/trunk/subversion/svn/delete-cmd.c
subversion/trunk/subversion/svn/export-cmd.c
subversion/trunk/subversion/svn/import-cmd.c
subversion/trunk/subversion/svn/lock-cmd.c
subversion/trunk/subversion/svn/log-cmd.c
subversion/trunk/subversion/svn/merge-cmd.c
subversion/trunk/subversion/svn/mkdir-cmd.c
subversion/trunk/subversion/svn/move-cmd.c
subversion/trunk/subversion/svn/notify.c
subversion/trunk/subversion/svn/patch-cmd.c
subversion/trunk/subversion/svn/propdel-cmd.c
subversion/trunk/subversion/svn/propset-cmd.c
subversion/trunk/subversion/svn/resolve-cmd.c
subversion/trunk/subversion/svn/resolved-cmd.c
subversion/trunk/subversion/svn/revert-cmd.c
subversion/trunk/subversion/svn/status-cmd.c
subversion/trunk/subversion/svn/switch-cmd.c
subversion/trunk/subversion/svn/unlock-cmd.c
subversion/trunk/subversion/svn/update-cmd.c
subversion/trunk/subversion/svn/upgrade-cmd.c

Modified: subversion/trunk/subversion/svn/add-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/add-cmd.c?rev=964942&r1=964941&r2=964942&view=diff
==
--- subversion/trunk/subversion/svn/add-cmd.c (original)
+++ subversion/trunk/subversion/svn/add-cmd.c Fri Jul 16 20:34:39 2010
@@ -59,7 +59,7 @@ svn_cl__add(apr_getopt_t *os,
 
   if (! opt_state->quiet)
 SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, FALSE, FALSE, pool));
+ FALSE, pool));
 
   if (opt_state->depth == svn_depth_unknown)
 opt_state->depth = svn_depth_infinity;

Modified: subversion/trunk/subversion/svn/changelist-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/changelist-cmd.c?rev=964942&r1=964941&r2=964942&view=diff
==
--- subversion/trunk/subversion/svn/changelist-cmd.c (original)
+++ subversion/trunk/subversion/svn/changelist-cmd.c Fri Jul 16 20:34:39 2010
@@ -72,7 +72,7 @@ svn_cl__changelist(apr_getopt_t *os,
 
   if (! opt_state->quiet)
 SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, FALSE, FALSE, pool));
+ FALSE, pool));
   else
 /* FIXME: This is required because svn_client_create_context()
always initializes ctx->notify_func2 to a wrapper function

Modified: subversion/trunk/subversion/svn/checkout-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/checkout-cmd.c?rev=964942&r1=964941&r2=964942&view=diff
==
--- subversion/trunk/subversion/svn/checkout-cmd.c (original)
+++ subversion/trunk/subversion/svn/checkout-cmd.c Fri Jul 16 20:34:39 2010
@@ -113,8 +113,11 @@ svn_cl__checkout(apr_getopt_t *os,
 }
 
   if (! opt_state->quiet)
-SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2, TRUE,
- FALSE, FALSE, pool));
+{
+  SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
+   FALSE, pool));
+  SVN_ERR(svn_cl__notifier_mark_checkout(ctx->notify_

svn commit: r964938 - /subversion/trunk/subversion/libsvn_wc/lock.c

2010-07-16 Thread rhuijben
Author: rhuijben
Date: Fri Jul 16 20:24:01 2010
New Revision: 964938

URL: http://svn.apache.org/viewvc?rev=964938&view=rev
Log:
Following up on r922926, fix an accidental lock release in the lock acquire
code. This fixes the externals tests failures on ra_serf/ra_neon.

* subversion/libsvn_wc/lock.c
  (svn_wc__acquire_write_lock): When failing to acquire a lock, don't try
to release obtained locks on non-directories, as that will just release
the parent directory's lock.

Modified:
subversion/trunk/subversion/libsvn_wc/lock.c

Modified: subversion/trunk/subversion/libsvn_wc/lock.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/lock.c?rev=964938&r1=964937&r2=964938&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/lock.c (original)
+++ subversion/trunk/subversion/libsvn_wc/lock.c Fri Jul 16 20:24:01 2010
@@ -1614,11 +1614,18 @@ svn_wc__acquire_write_lock(const char **
   child_relpath = APR_ARRAY_IDX(children, i, const char *);
   child_abspath = svn_dirent_join(local_abspath, child_relpath,
   iterpool);
-   err2 = svn_wc__release_write_lock(wc_ctx, child_abspath,
- iterpool);
-   if (err2)
- svn_error_compose(err, err2);
-   --i;
+
+  /* Don't release locks on non-directories as that will
+ try to release the lock on the parent directory! */
+  err2 = svn_wc__db_read_kind(&kind, wc_ctx->db, child_abspath,
+  FALSE, iterpool);
+
+  if (!err2 && kind == svn_wc__db_kind_dir)
+err2 = svn_wc__release_write_lock(wc_ctx, child_abspath,
+  iterpool);
+
+  err = svn_error_compose_create(err, err2);
+  --i;
 }
   return svn_error_return(err);
 }




svn commit: r964935 - /subversion/trunk/subversion/libsvn_client/patch.c

2010-07-16 Thread dannas
Author: dannas
Date: Fri Jul 16 20:15:16 2010
New Revision: 964935

URL: http://svn.apache.org/viewvc?rev=964935&view=rev
Log:
* subversion/libsvn_client/patch.c
  (match_hunk): Require that all lines match when comparing 
modified_text to determine if a hunk has already been applied. Else
a hunk that adds a newline at the end will be treated as already 
applied even if it isn't.

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=964935&r1=964934&r2=964935&view=diff
==
--- subversion/trunk/subversion/libsvn_client/patch.c (original)
+++ subversion/trunk/subversion/libsvn_client/patch.c Fri Jul 16 20:15:16 2010
@@ -702,7 +702,11 @@ match_hunk(svn_boolean_t *matched, patch
 SVN_ERR(svn_diff_hunk_readline_original_text(hunk, &hunk_line,
  NULL, &hunk_eof,
  iterpool, iterpool));
-  if (hunk_line->len == 0 && hunk_eof)
+
+  /* When comparing modified text we require that all lines match, else
+   * a hunk that adds a newline at the end will be treated as already
+   * applied even if it isn't. */
+  if (! match_modified && hunk_line->len == 0 && hunk_eof)
 *matched = lines_matched;
   else
 *matched = FALSE;




svn commit: r964927 - /subversion/trunk/subversion/libsvn_wc/update_editor.c

2010-07-16 Thread rhuijben
Author: rhuijben
Date: Fri Jul 16 19:50:37 2010
New Revision: 964927

URL: http://svn.apache.org/viewvc?rev=964927&view=rev
Log:
Remove the lock release code from the update editor that was introduced in the
failure to update code path in r919416. The locks should be released via the
access batons for old api-users (like how it worked before) and new code
uses an infinite depth approach (or something that looks like that if you
don't use SVN_WC__SINGLE_DB. In both cases the update editor should never
release locks that it didn't obtain itself.

* subversion/libsvn_wc/update_editor.c
  (edit_baton): Remove close_edit_complete.
  (cleanup_dir_baton): Remove lock release.
  (close_edit): Don't set close_edit_complete.
  (make_editor): Don't initialize close_edit_complete.

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=964927&r1=964926&r2=964927&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Fri Jul 16 19:50:37 
2010
@@ -196,11 +196,6 @@ struct edit_baton
   /* Allow unversioned obstructions when adding a path. */
   svn_boolean_t allow_unver_obstructions;
 
-  /* The close_edit method destroys the edit pool and so runs the
- cleanup_dir_baton cleanup handlers.  This flag is set to indicate
- that the edit was completed successfully. */
-  svn_boolean_t close_edit_complete;
-
   /* If this is a 'switch' operation, the new relpath of target_abspath,
  else NULL. */
   const char *switch_relpath;
@@ -506,17 +501,6 @@ cleanup_dir_baton(void *dir_baton)
eb->cancel_func, eb->cancel_baton,
pool);
 
-  /* If the editor aborts for some sort of error, the command line
- client relies on pool cleanup to run outstanding work queues and
- remove locks.  This avoids leaving the working copy locked in
- many cases, but plays havoc with operations that do multiple
- updates (think externals). So we flag updates that complete
- successfully and avoid removing locks.  In 1.6 locks were
- associated with a pool distinct from the edit pool and so were
- removed separately. */
-  if (!err && !eb->close_edit_complete)
-err = svn_wc__release_write_lock(eb->wc_ctx, db->local_abspath, pool);
-
   if (err)
 {
   apr_status_t apr_err = err->apr_err;
@@ -5958,7 +5942,6 @@ close_edit(void *edit_baton,
  should also make eb->pool not be a subpool (see make_editor),
  and change callers of svn_client_{checkout,update,switch} to do
  better pool management. ### */
-  eb->close_edit_complete = TRUE;
   svn_pool_destroy(eb->pool);
 
   return SVN_NO_ERROR;
@@ -6066,7 +6049,6 @@ make_editor(svn_revnum_t *target_revisio
   eb->fetch_func   = fetch_func;
   eb->fetch_baton  = fetch_baton;
   eb->allow_unver_obstructions = allow_unver_obstructions;
-  eb->close_edit_complete  = FALSE;
   eb->skipped_trees= apr_hash_make(edit_pool);
   eb->ext_patterns = preserved_exts;
 




svn commit: r964924 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

2010-07-16 Thread philip
Author: philip
Date: Fri Jul 16 19:41:56 2010
New Revision: 964924

URL: http://svn.apache.org/viewvc?rev=964924&view=rev
Log:
Remove two svn_sqlite__reset calls.

* subversion/tests/cmdline/svntest/wc.py
  (svn_wc__db_base_set_dav_cache): No need to reset in error path.
  (wclock_obtain_cb): Shuffle resets to remove one.

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=964924&r1=964923&r2=964924&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jul 16 19:41:56 2010
@@ -2157,8 +2157,7 @@ svn_wc__db_base_set_dav_cache(svn_wc__db
   SVN_ERR(svn_sqlite__update(&affected_rows, stmt));
 
   if (affected_rows != 1)
-return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND,
- svn_sqlite__reset(stmt),
+return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
  _("The node '%s' was not found."),
  svn_dirent_local_style(local_abspath,
 scratch_pool));
@@ -7744,9 +7743,10 @@ wclock_obtain_cb(void *baton,
   if (levels >= 0)
 levels += relpath_op_depth(lock_relpath);
 
+  SVN_ERR(svn_sqlite__reset(stmt));
+
   if (levels == -1 || levels >= lock_depth)
 {
-  SVN_ERR(svn_sqlite__reset(stmt));
 
   err = svn_error_createf(
   SVN_ERR_WC_LOCKED, NULL,
@@ -7765,16 +7765,16 @@ wclock_obtain_cb(void *baton,
 
   break; /* There can't be interesting locks on higher nodes */
 }
+  else
+SVN_ERR(svn_sqlite__reset(stmt));
 
   if (!*lock_relpath)
 break;
 
   lock_relpath = svn_relpath_dirname(lock_relpath, scratch_pool);
 
-  SVN_ERR(svn_sqlite__reset(stmt));
 }
 
-  SVN_ERR(svn_sqlite__reset(stmt));
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
 STMT_INSERT_WC_LOCK));
   SVN_ERR(svn_sqlite__bindf(stmt, "isi", wcroot->wc_id,




svn commit: r964910 - /subversion/trunk/subversion/tests/cmdline/svntest/wc.py

2010-07-16 Thread philip
Author: philip
Date: Fri Jul 16 19:19:38 2010
New Revision: 964910

URL: http://svn.apache.org/viewvc?rev=964910&view=rev
Log:
Prepare for single-db.

* subversion/tests/cmdline/svntest/wc.py
  (from_entries): Allow versioned dirs without a .svn.

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=964910&r1=964909&r2=964910&view=diff
==
--- subversion/trunk/subversion/tests/cmdline/svntest/wc.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/wc.py Fri Jul 16 19:19:38 
2010
@@ -555,14 +555,14 @@ class State:
   if dot_svn in dirs:
 # don't visit the .svn subdir
 dirs.remove(dot_svn)
-  else:
+
+  entries = svntest.main.run_entriesdump(dirpath)
+  if entries is None:
 # this is not a versioned directory. remove all subdirectories since
 # we don't want to visit them. then skip this directory.
 dirs[:] = []
 continue
 
-  entries = svntest.main.run_entriesdump(dirpath)
-
   if dirpath == '.':
 parent = ''
   elif dirpath.startswith('.' + os.sep):




Re: svn commit: r964704 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

2010-07-16 Thread Philip Martin
Bert Huijben  writes:

> Doesn't _update handle this specific reset? If not I think it should.

The compiler was complaing about a missing argument to
svn_error_createf.  I was just following the pattern used by next
function.

>if (affected_rows != 1)
>  return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND,
> + svn_sqlite__reset(stmt),
>   _("The node '%s' was not found."),
>   svn_dirent_local_style(local_abspath,
>  scratch_pool));

-- 
Philip


RE: svn commit: r964704 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

2010-07-16 Thread Bert Huijben
Doesn't _update handle this specific reset? If not I think it should.

Bert Huijben (mobile phone)

- Oorspronkelijk bericht -
Van: phi...@apache.org
Verzonden: vrijdag 16 juli 2010 9:57
Aan: commits@subversion.apache.org
Onderwerp: svn commit: r964704 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

Author: philip
Date: Fri Jul 16 07:57:02 2010
New Revision: 964704

URL: http://svn.apache.org/viewvc?rev=964704&view=rev
Log:
* subversion/libsvn_wc/wc_db.c
  (svn_wc__db_base_set_dav_cache): Reset stmt on error, this adds a
   missing parameter to svn_error_createf.

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=964704&r1=964703&r2=964704&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jul 16 07:57:02 2010
@@ -2158,6 +2158,7 @@ svn_wc__db_base_set_dav_cache(svn_wc__db
 
   if (affected_rows != 1)
 return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND,
+ svn_sqlite__reset(stmt),
  _("The node '%s' was not found."),
  svn_dirent_local_style(local_abspath,
 scratch_pool));





svn commit: r964774 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

2010-07-16 Thread philip
Author: philip
Date: Fri Jul 16 11:37:17 2010
New Revision: 964774

URL: http://svn.apache.org/viewvc?rev=964774&view=rev
Log:
Make entries-dump work with single-db.

* subversion/libsvn_wc/wc_db.c
  (svn_wc__db_temp_get_format, svn_wc__db_temp_borrow_sdb): Allow
   non-empty local_relpath.

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=964774&r1=964773&r2=964774&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jul 16 11:37:17 2010
@@ -6892,7 +6892,11 @@ svn_wc__db_temp_get_format(int *format,
   /* ### for per-dir layouts, the wcroot should be this directory,
  ### so bail if the PDH is a parent (and, thus, local_relpath is
  ### something besides "").  */
-  if (err || *local_relpath != '\0')
+  if (err
+#ifndef SVN_WC__SINGLE_DB
+  || *local_relpath != '\0'
+#endif
+  )
 {
   if (err && err->apr_err != SVN_ERR_WC_NOT_WORKING_COPY)
 return svn_error_return(err);
@@ -7154,10 +7158,12 @@ svn_wc__db_temp_borrow_sdb(svn_sqlite__d
   scratch_pool, scratch_pool));
   VERIFY_USABLE_PDH(pdh);
 
+#ifndef SVN_WC__SINGLE_DB
   /* We better be looking at the proper wcroot for this directory.
  If we ended up with a stub, then the subdirectory (and its SDB!)
  are missing.  */
   SVN_ERR_ASSERT(*local_relpath == '\0');
+#endif
 
   *sdb = pdh->wcroot->sdb;
 




svn commit: r964772 - /subversion/branches/1.6.x/STATUS

2010-07-16 Thread stylesen
Author: stylesen
Date: Fri Jul 16 11:34:25 2010
New Revision: 964772

URL: http://svn.apache.org/viewvc?rev=964772&view=rev
Log:
* STATUS: Nominate and vote for r964767.

Modified:
subversion/branches/1.6.x/STATUS

Modified: subversion/branches/1.6.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.6.x/STATUS?rev=964772&r1=964771&r2=964772&view=diff
==
--- subversion/branches/1.6.x/STATUS (original)
+++ subversion/branches/1.6.x/STATUS Fri Jul 16 11:34:25 2010
@@ -190,6 +190,14 @@ Candidate changes:
Votes:
  +1: pburba
 
+ * r964767
+   Fix for issue #3683 "Escape unsafe charaters in a URL during export".
+   Justification:
+ This makes svn export more user friendly, by not forcing the user
+ to manually encode the URLs before doing an export.
+   Votes:
+ +1: stylesen
+
 Veto-blocked changes:
 =
 




svn commit: r964767 - in /subversion/trunk/subversion: include/private/svn_opt_private.h libsvn_subr/opt.c

2010-07-16 Thread stylesen
Author: stylesen
Date: Fri Jul 16 11:21:44 2010
New Revision: 964767

URL: http://svn.apache.org/viewvc?rev=964767&view=rev
Log:
Fix issue #3683 - 'Escape unsafe charaters in a URL during export.'

* subversion/include/private/svn_opt_private.h
  (svn_opt__arg_canonicalize_url): Fix comment for the above change.

* subversion/libsvn_subr/opt.c
  (svn_opt__arg_canonicalize_url): Remove check for proper URI encoding
   of the target URL, since it is not required. This is because, just
   few lines down the code we call svn_uri_canonicalize() which actually
   URI encodes all characters based on svn_uri__char_validity table.

Modified:
subversion/trunk/subversion/include/private/svn_opt_private.h
subversion/trunk/subversion/libsvn_subr/opt.c

Modified: subversion/trunk/subversion/include/private/svn_opt_private.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_opt_private.h?rev=964767&r1=964766&r2=964767&view=diff
==
--- subversion/trunk/subversion/include/private/svn_opt_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_opt_private.h Fri Jul 16 
11:21:44 2010
@@ -66,7 +66,6 @@ svn_opt__split_arg_at_peg_revision(const
 /* Attempt to transform URL_IN, which is a URL-like user input, into a
  * valid URL:
  *   - escape IRI characters and some other non-URI characters
- *   - check that only valid URI characters remain
  *   - check that no back-path ("..") components are present
  *   - canonicalize the separator ("/") characters
  * URL_IN is in UTF-8 encoding and has no peg revision specifier.

Modified: subversion/trunk/subversion/libsvn_subr/opt.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/opt.c?rev=964767&r1=964766&r2=964767&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/opt.c (original)
+++ subversion/trunk/subversion/libsvn_subr/opt.c Fri Jul 16 11:21:44 2010
@@ -941,12 +941,6 @@ svn_opt__arg_canonicalize_url(const char
   /* Auto-escape some ASCII characters. */
   target = svn_path_uri_autoescape(target, pool);
 
-  /* The above doesn't guarantee a valid URI. */
-  if (! svn_path_is_uri_safe(target))
-return svn_error_createf(SVN_ERR_BAD_URL, 0,
- _("URL '%s' is not properly URI-encoded"),
- target);
-
   /* Verify that no backpaths are present in the URL. */
   if (svn_path_is_backpath_present(target))
 return svn_error_createf(SVN_ERR_BAD_URL, 0,




svn commit: r964747 - /subversion/branches/1.6.x/STATUS

2010-07-16 Thread stsp
Author: stsp
Date: Fri Jul 16 10:43:48 2010
New Revision: 964747

URL: http://svn.apache.org/viewvc?rev=964747&view=rev
Log:
* STATUS: Use better link to user's post in r876615 item.

Modified:
subversion/branches/1.6.x/STATUS

Modified: subversion/branches/1.6.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.6.x/STATUS?rev=964747&r1=964746&r2=964747&view=diff
==
--- subversion/branches/1.6.x/STATUS (original)
+++ subversion/branches/1.6.x/STATUS Fri Jul 16 10:43:48 2010
@@ -266,7 +266,7 @@ Veto-blocked changes:
  * r876615
Make ra_neon provide a better error message upon 403 Forbidden.
Justification:
- User complained: http://svn.haxx.se/users/archive-2010-07/0211.shtml
+ User complained: http://svn.haxx.se/users/archive-2010-07/0320.shtml
Votes:
  +1: stsp, danielsh
 




svn commit: r964746 - /subversion/branches/1.6.x/STATUS

2010-07-16 Thread danielsh
Author: danielsh
Date: Fri Jul 16 10:42:54 2010
New Revision: 964746

URL: http://svn.apache.org/viewvc?rev=964746&view=rev
Log:
* STATUS: Vote for r876615.

Modified:
subversion/branches/1.6.x/STATUS

Modified: subversion/branches/1.6.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.6.x/STATUS?rev=964746&r1=964745&r2=964746&view=diff
==
--- subversion/branches/1.6.x/STATUS (original)
+++ subversion/branches/1.6.x/STATUS Fri Jul 16 10:42:54 2010
@@ -268,7 +268,7 @@ Veto-blocked changes:
Justification:
  User complained: http://svn.haxx.se/users/archive-2010-07/0211.shtml
Votes:
- +1: stsp
+ +1: stsp, danielsh
 
 Approved changes:
 =




svn commit: r964736 - /subversion/branches/1.6.x/STATUS

2010-07-16 Thread stsp
Author: stsp
Date: Fri Jul 16 10:34:34 2010
New Revision: 964736

URL: http://svn.apache.org/viewvc?rev=964736&view=rev
Log:
* STATUS: Nominate r876615

Modified:
subversion/branches/1.6.x/STATUS

Modified: subversion/branches/1.6.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.6.x/STATUS?rev=964736&r1=964735&r2=964736&view=diff
==
--- subversion/branches/1.6.x/STATUS (original)
+++ subversion/branches/1.6.x/STATUS Fri Jul 16 10:34:34 2010
@@ -263,5 +263,12 @@ Veto-blocked changes:
Votes:
  -1: cmpilato (pending results of aforemented discussion)
 
+ * r876615
+   Make ra_neon provide a better error message upon 403 Forbidden.
+   Justification:
+ User complained: http://svn.haxx.se/users/archive-2010-07/0211.shtml
+   Votes:
+ +1: stsp
+
 Approved changes:
 =




svn commit: r964729 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

2010-07-16 Thread philip
Author: philip
Date: Fri Jul 16 09:35:39 2010
New Revision: 964729

URL: http://svn.apache.org/viewvc?rev=964729&view=rev
Log:
* subversion/libsvn_wc/wc_db.c (wclock_obtain_cb): Add two resets.

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=964729&r1=964728&r2=964729&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jul 16 09:35:39 2010
@@ -7764,8 +7764,11 @@ wclock_obtain_cb(void *baton,
 break;
 
   lock_relpath = svn_relpath_dirname(lock_relpath, scratch_pool);
+
+  SVN_ERR(svn_sqlite__reset(stmt));
 }
 
+  SVN_ERR(svn_sqlite__reset(stmt));
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
 STMT_INSERT_WC_LOCK));
   SVN_ERR(svn_sqlite__bindf(stmt, "isi", wcroot->wc_id,




svn commit: r964704 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

2010-07-16 Thread philip
Author: philip
Date: Fri Jul 16 07:57:02 2010
New Revision: 964704

URL: http://svn.apache.org/viewvc?rev=964704&view=rev
Log:
* subversion/libsvn_wc/wc_db.c
  (svn_wc__db_base_set_dav_cache): Reset stmt on error, this adds a
   missing parameter to svn_error_createf.

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=964704&r1=964703&r2=964704&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jul 16 07:57:02 2010
@@ -2158,6 +2158,7 @@ svn_wc__db_base_set_dav_cache(svn_wc__db
 
   if (affected_rows != 1)
 return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND,
+ svn_sqlite__reset(stmt),
  _("The node '%s' was not found."),
  svn_dirent_local_style(local_abspath,
 scratch_pool));