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

2011-05-20 Thread philip
Author: philip
Date: Fri May 20 23:40:59 2011
New Revision: 1125597

URL: http://svn.apache.org/viewvc?rev=1125597&view=rev
Log:
* status: comment on r1036429, remove 2nd r1036429 section

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=1125597&r1=1125596&r2=1125597&view=diff
==
--- subversion/branches/1.6.x/STATUS (original)
+++ subversion/branches/1.6.x/STATUS Fri May 20 23:40:59 2011
@@ -15,13 +15,6 @@ Status of 1.6.17:
 Candidate changes:
 ==
 
- * r1036429
-   Fix svnsync_tests 29 for issue 3641.
-   Justification:
- Server assert using BDB.
-   Votes:
- +1: philip
-
 Veto-blocked changes:
 =
 
@@ -171,6 +164,9 @@ Veto-blocked changes:
  -1: hwright (I'm not sure we need this: the merge conflicts, and the
   assert isn't even in 1.6.x.  I'm happy to remove this veto
   if a proper backport branch is provided.)
+ (It merges cleanly when I try it. This change is needed now
+  that the issue 3641 branch has been merged, probably that
+  dependency was not clear.  philip)
 
 
  * r879766




svn commit: r1125595 - /subversion/trunk/subversion/libsvn_ra_neon/fetch.c

2011-05-20 Thread ivan
Author: ivan
Date: Fri May 20 23:31:00 2011
New Revision: 1125595

URL: http://svn.apache.org/viewvc?rev=1125595&view=rev
Log:
* subversion/libsvn_ra_neon/fetch.c
  (svn_ra_neon__get_file): Tighten variable scope.

Modified:
subversion/trunk/subversion/libsvn_ra_neon/fetch.c

Modified: subversion/trunk/subversion/libsvn_ra_neon/fetch.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/fetch.c?rev=1125595&r1=1125594&r2=1125595&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/fetch.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/fetch.c Fri May 20 23:31:00 2011
@@ -714,7 +714,6 @@ svn_error_t *svn_ra_neon__get_file(svn_r
   const svn_string_t *expected_checksum = NULL;
   file_write_ctx_t fwc;
   ne_propname md5_propname = { SVN_DAV_PROP_NS_DAV, "md5-checksum" };
-  const char *hex_digest;
 
   /* Only request a checksum if we're getting the file contents. */
   /* ### We should arrange for the checksum to be returned in the
@@ -755,6 +754,7 @@ svn_error_t *svn_ra_neon__get_file(svn_r
 
   if (fwc.do_checksum)
 {
+  const char *hex_digest;
   svn_checksum_t *checksum;
 
   SVN_ERR(svn_checksum_final(&checksum, fwc.checksum_ctx, pool));




Re: svn commit: r1125327 - /subversion/trunk/subversion/svndumpfilter/main.c

2011-05-20 Thread Hyrum K Wright
This may be picking nits, but is the format for size_t and apr_size_t
guaranteed to be the same on all platforms?

-Hyrum

On Fri, May 20, 2011 at 4:17 AM,   wrote:
> Author: philip
> Date: Fri May 20 11:17:58 2011
> New Revision: 1125327
>
> URL: http://svn.apache.org/viewvc?rev=1125327&view=rev
> Log:
> * subversion/svndumpfilter/main.c
>  (write_prop_to_stringbuf): Followup to r1125288, make format match type.
>
> Modified:
>    subversion/trunk/subversion/svndumpfilter/main.c
>
> Modified: subversion/trunk/subversion/svndumpfilter/main.c
> URL: 
> http://svn.apache.org/viewvc/subversion/trunk/subversion/svndumpfilter/main.c?rev=1125327&r1=1125326&r2=1125327&view=diff
> ==
> --- subversion/trunk/subversion/svndumpfilter/main.c (original)
> +++ subversion/trunk/subversion/svndumpfilter/main.c Fri May 20 11:17:58 2011
> @@ -90,7 +90,7 @@ write_prop_to_stringbuf(svn_stringbuf_t
>   namelen = strlen(name);
>   svn_stringbuf_appendbytes(*strbuf, "K ", 2);
>
> -  bytes_used = apr_snprintf(buf, sizeof(buf), "%d", namelen);
> +  bytes_used = apr_snprintf(buf, sizeof(buf), "%" APR_SIZE_T_FMT, namelen);
>   svn_stringbuf_appendbytes(*strbuf, buf, bytes_used);
>   svn_stringbuf_appendbyte(*strbuf, '\n');
>
>
>
>


svn propchange: r927243 - svn:log

2011-05-20 Thread pburba
Author: pburba
Revision: 927243
Modified property: svn:log

Modified: svn:log at Fri May 20 20:46:22 2011
--
--- svn:log (original)
+++ svn:log Fri May 20 20:46:22 2011
@@ -1,6 +1,8 @@
 Fix reopened issue #3020 'Reflect dropped/renumbered revisions in
 svn:mergeinfo data during svnadmin load'
 
+Note from the future: This change was reverted in r936387.
+
 * subversion/libsvn_repos/load.c
 
   (parse_baton): Document REV_MAP member.  Add to new members to track the



svn propchange: r936387 - svn:log

2011-05-20 Thread pburba
Author: pburba
Revision: 936387
Modified property: svn:log

Modified: svn:log at Fri May 20 20:45:50 2011
--
--- svn:log (original)
+++ svn:log Fri May 20 20:45:50 2011
@@ -1,4 +1,5 @@
-Revert r927243, see http://svn.haxx.se/dev/archive-2010-04/0475.shtml
+Revert issue #3020 fix made i r927243, see
+http://svn.haxx.se/dev/archive-2010-04/0475.shtml
 
 * subversion/libsvn_repos/load.c
 



svn commit: r1125548 - in /subversion/trunk/subversion/libsvn_client: checkout.c client.h externals.c

2011-05-20 Thread rhuijben
Author: rhuijben
Date: Fri May 20 20:25:18 2011
New Revision: 1125548

URL: http://svn.apache.org/viewvc?rev=1125548&view=rev
Log:
Following up on r1125313 and r1104292, remove an ugly hack from
svn_client__ra_session_from_path_results, to make sure we don't
crash because 'there is no svn_node_unknown'.

* subversion/libsvn_client/checkout.c
  (svn_client__checkout_internal): Update user.

* subversion/libsvn_client/client.h
  (svn_client__ra_session_from_path_results): Just use all enum values,
instead of using NULL as unknown.

* subversion/libsvn_client/externals.c
  (handle_external_item_change): Update user. Fixes a dangling pointer problem
(again).

Modified:
subversion/trunk/subversion/libsvn_client/checkout.c
subversion/trunk/subversion/libsvn_client/client.h
subversion/trunk/subversion/libsvn_client/externals.c

Modified: subversion/trunk/subversion/libsvn_client/checkout.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/checkout.c?rev=1125548&r1=1125547&r2=1125548&view=diff
==
--- subversion/trunk/subversion/libsvn_client/checkout.c (original)
+++ subversion/trunk/subversion/libsvn_client/checkout.c Fri May 20 20:25:18 
2011
@@ -120,8 +120,8 @@ svn_client__checkout_internal(svn_revnum
 if ((have_revnum = (ra_cache && SVN_IS_VALID_REVNUM(ra_cache->ra_revnum
   revnum = ra_cache->ra_revnum;
 
-if ((have_kind = (ra_cache && ra_cache->kind_p)))
-  kind = *(ra_cache->kind_p);
+if ((have_kind = (ra_cache && ra_cache->kind != svn_node_unknown)))
+  kind = ra_cache->kind;
 
 if (! have_repos_root_url || ! have_repos_uuid || ! have_session_url ||
 ! have_revnum || ! have_kind)

Modified: subversion/trunk/subversion/libsvn_client/client.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/client.h?rev=1125548&r1=1125547&r2=1125548&view=diff
==
--- subversion/trunk/subversion/libsvn_client/client.h (original)
+++ subversion/trunk/subversion/libsvn_client/client.h Fri May 20 20:25:18 2011
@@ -473,11 +473,8 @@ typedef struct svn_client__ra_session_fr
  revnum is unknown.  */
   svn_revnum_t ra_revnum;
 
-  /* An optional node kind for the URL.  Since there is no enum value
- for an unknown node kind, it is represented as a pointer to a
- svn_node_kind_t with a NULL pointer indicating an unknown
- value. */
-  svn_node_kind_t *kind_p;
+  /* An optional node kind for the URL.  svn_node_unknown if unknown */
+  svn_node_kind_t kind;
 } svn_client__ra_session_from_path_results;
 
 /* Checkout into LOCAL_ABSPATH a working copy of URL at REVISION, and (if not

Modified: subversion/trunk/subversion/libsvn_client/externals.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/externals.c?rev=1125548&r1=1125547&r2=1125548&view=diff
==
--- subversion/trunk/subversion/libsvn_client/externals.c (original)
+++ subversion/trunk/subversion/libsvn_client/externals.c Fri May 20 20:25:18 
2011
@@ -706,6 +706,8 @@ handle_external_item_change(const struct
   const char *old_url;
   const char *new_url;
 
+  ra_cache.kind = svn_node_unknown;
+
   local_abspath = target_abspath;
 
   SVN_ERR_ASSERT(eb->repos_root_url && parent_dir_url);
@@ -792,7 +794,7 @@ handle_external_item_change(const struct
  ra_cache.ra_session_url,
  ra_cache.ra_revnum);
 
-  ra_cache.kind_p = &kind;
+  ra_cache.kind = kind;
 }
 
   /* Not protecting against recursive externals.  Detecting them in
@@ -811,7 +813,7 @@ handle_external_item_change(const struct
svn_wc_create_notify(local_abspath, svn_wc_notify_update_external,
 scratch_pool), scratch_pool);
 
-  switch (*ra_cache.kind_p)
+  switch (ra_cache.kind)
 {
 case svn_node_dir:
   /* The target dir might have multiple components.  Guarantee
@@ -972,7 +974,7 @@ handle_external_item_change(const struct
  In the latter case, the call below will try to make sure that
  the external really is a WC pointing to the correct
  URL/revision. */
-  switch (*ra_cache.kind_p)
+  switch (ra_cache.kind)
 {
 case svn_node_dir:
   SVN_ERR(switch_dir_external(local_abspath, new_url,




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

2011-05-20 Thread stsp
Author: stsp
Date: Fri May 20 18:35:41 2011
New Revision: 1125498

URL: http://svn.apache.org/viewvc?rev=1125498&view=rev
Log:
Fix issue #3893, wc_db::flush_entries() needs recursion.

* subversion/libsvn_wc/wc_db.c
  (is_immediate_child_path): New helper.
  (remove_from_access_cache): New helper, split out of ...
  (flush_entries): ... this function. This now takes a DEPTH parameter
   to control flushing of access baton information for child nodes.
  (svn_wc__db_base_add_directory, svn_wc__db_base_add_file,
   svn_wc__db_base_add_symlink, add_absent_excluded_not_present_node,
   svn_wc__db_base_remove, svn_wc__db_op_copy_dir, svn_wc__db_op_copy_file,
   svn_wc__db_op_copy_symlink, svn_wc__db_op_add_directory,
   svn_wc__db_op_add_file, svn_wc__db_op_add_symlink,
   svn_wc__db_global_record_fileinfo, svn_wc__db_op_set_changelist,
   svn_wc__db_op_mark_resolved, svn_wc__db_op_set_tree_conflict,
   svn_wc__db_op_revert, svn_wc__db_op_remove_node,
   svn_wc__db_temp_op_remove_working, svn_wc__db_op_set_base_depth,
   svn_wc__db_op_delete, svn_wc__db_global_commit,
   db_op_set_rev_and_repos_relpath, svn_wc__db_lock_add,
   svn_wc__db_lock_remove, svn_wc__db_temp_op_end_directory_update,
   svn_wc__db_temp_op_start_directory_update, make_copy_txn,
   svn_wc__db_temp_op_set_new_dir_to_incomplete): Update callers, passing
appropriate DEPTH parameter values to flush_entries().

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=1125498&r1=1125497&r2=1125498&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri May 20 18:35:41 2011
@@ -1199,36 +1199,80 @@ gather_repo_children(const apr_array_hea
 }
 
 
-/* Flush the access baton for LOCAL_ABSPATH from the access baton cache in
- * WCROOT. This function must be called when the access baton cache goes
- * stale, i.e. data about LOCAL_ABSPATH will need to be read again from disk.
+/* Return TRUE if CHILD_ABSPATH is an immediate child of PARENT_ABSPATH.
+ * Else, return FALSE. */
+static svn_boolean_t
+is_immediate_child_path(const char *parent_abspath, const char *child_abspath)
+{
+  return (svn_dirent_is_ancestor(parent_abspath, child_abspath) &&
+svn_path_component_count(parent_abspath) ==
+svn_path_component_count(child_abspath) + 1);
+}
+
+
+/* Remove the access baton for LOCAL_ABSPATH from ACCESS_CACHE. */
+static void
+remove_from_access_cache(apr_hash_t *access_cache,
+ const char *local_abspath)
+{
+  svn_wc_adm_access_t *adm_access;
+  
+  adm_access = apr_hash_get(access_cache, local_abspath, APR_HASH_KEY_STRING);
+  if (adm_access)
+svn_wc__adm_access_set_entries(adm_access, NULL);
+}
+
+
+/* Flush the access baton for LOCAL_ABSPATH, and any of its children up to
+ * the specified DEPTH, from the access baton cache in WCROOT.
+ * Also flush the access baton for the parent of LOCAL_ABSPATH.I
+ *
+ * This function must be called when the access baton cache goes stale,
+ * i.e. data about LOCAL_ABSPATH will need to be read again from disk.
+ *
  * Use SCRATCH_POOL for temporary allocations. */
 static svn_error_t *
 flush_entries(svn_wc__db_wcroot_t *wcroot,
   const char *local_abspath,
+  svn_depth_t depth,
   apr_pool_t *scratch_pool)
 {
-  svn_wc_adm_access_t *adm_access;
   const char *parent_abspath;
 
   if (apr_hash_count(wcroot->access_cache) == 0)
 return SVN_NO_ERROR;
 
-  adm_access = apr_hash_get(wcroot->access_cache, local_abspath,
-APR_HASH_KEY_STRING);
+  remove_from_access_cache(wcroot->access_cache, local_abspath);
 
-  if (adm_access)
-svn_wc__adm_access_set_entries(adm_access, NULL);
+  if (depth > svn_depth_empty)
+{
+  apr_hash_index_t *hi;
+
+  /* Flush access batons of children within the specified depth. */
+  for (hi = apr_hash_first(scratch_pool, wcroot->access_cache);
+   hi;
+   hi = apr_hash_next(hi))
+{
+  const char *item_abspath = svn__apr_hash_index_key(hi);
+
+  if ((depth == svn_depth_files || depth == svn_depth_immediates) &&
+  is_immediate_child_path(local_abspath, item_abspath))
+{
+  remove_from_access_cache(wcroot->access_cache, item_abspath);
+}
+  else if (depth == svn_depth_infinity &&
+   svn_dirent_is_ancestor(local_abspath, item_abspath))
+{
+  remove_from_access_cache(wcroot->access_cache, item_abspath);
+}
+}
+}
 
   /* We're going to be overly aggressive here and just flush the parent
  without doing much checking.  This may hurt performance for
  legacy API consumers, but that's not our problem. :) */
   

svn commit: r1125496 - in /subversion/trunk/subversion/tests/cmdline: svnrdump_tests.py svnrdump_tests_data/mergeinfo_included_full.dump svnrdump_tests_data/partial_incremental.dump svnrdump_tests_dat

2011-05-20 Thread pburba
Author: pburba
Date: Fri May 20 18:23:39 2011
New Revision: 1125496

URL: http://svn.apache.org/viewvc?rev=1125496&view=rev
Log:
Three new tests for issue #3890 "'svnrdump load' does not map revisions
like 'svnadmin load' does".

* subversion/tests/cmdline/svnrdump_tests.py

  (svnadmin_tests.test_create): Import.

  (reflect_dropped_renumbered_revs,
   dont_drop_valid_mergeinfo_during_incremental_svnrdump_loads,
   svnrdump_load_partial_incremental_dump): New tests.  The first two are
   based on existing svnadmin tests for issue #3020 but use
   svnrdump [dump|load] in place of svnadmin [dump|load]. 

  (test_list): Add the three new tests. 

* subversion/tests/cmdline/svnrdump_tests_data/mergeinfo_included_full.dump
  New test dump analogous to
  subversion/tests/cmdline/svnadmin_tests_data/mergeinfo_included_full.dump
  but in dump format version 3 rather than v2 to allow use with svnrdump.
 
* subversion/tests/cmdline/svnrdump_tests_data/partial_incremental.dump
  As above, but analogous to
  subversion/tests/cmdline/svndumpfilter_tests_data/with_merges.dump.

  Note: The conversions were achieved simply by loading the v2 dump file
  and then svnadmin dumping it with the --deltas option (this forces v3).

* subversion/tests/cmdline/svnrdump_tests_data/with_merges.dump
  New v3 test dump.

Added:

subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/mergeinfo_included_full.dump

subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/partial_incremental.dump
   (with props)

subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/with_merges.dump  
 (with props)
Modified:
subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py?rev=1125496&r1=1125495&r2=1125496&view=diff
==
--- subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py Fri May 20 
18:23:39 2011
@@ -34,6 +34,7 @@ from svntest.verify import SVNUnexpected
 from svntest.verify import SVNExpectedStderr
 from svntest.main import write_restrictive_svnserve_conf
 from svntest.main import server_has_partial_replay
+from svnadmin_tests import test_create
 
 # (abbreviation)
 Skip = svntest.testcase.Skip_deco
@@ -118,7 +119,7 @@ def run_load_test(sbox, dumpfile_name, e
   """Load a dumpfile using 'svnrdump load', dump it with 'svnadmin
   dump' and check that the same dumpfile is produced"""
 
-  # Create an empty sanbox repository
+  # Create an empty sandbox repository
   build_repos(sbox)
 
   # Create the revprop-change hook for this test
@@ -345,8 +346,429 @@ def multi_prop_edit_load(sbox):
   "load: multiple prop edits on a file"
   run_load_test(sbox, "multi-prop-edits.dump", None, False)
 
+#--
+# This test replicates svnadmin_tests.py 16 'reflect dropped renumbered
+# revs in svn:mergeinfo' but uses 'svnrdump load' in place of
+# 'svnadmin load'.
+@XFail()
+@Issue(3890)
+def reflect_dropped_renumbered_revs(sbox):
+  "svnrdump renumbers dropped revs in mergeinfo"
+
+  # Create an empty sandbox repository
+  build_repos(sbox)
+
+  # Create the revprop-change hook for this test
+  svntest.actions.enable_revprop_changes(sbox.repo_dir)
+
+  # Load the specified dump file into the sbox repository using
+  # svnrdump load
+  dump_file = open(os.path.join(os.path.dirname(sys.argv[0]),
+'svnrdump_tests_data',
+'with_merges.dump'),
+   'rb')
+  svnrdump_dumpfile = dump_file.readlines()
+  dump_file.close()
+
+  # svnrdump load the dump file.
+  svntest.actions.run_and_verify_svnrdump(svnrdump_dumpfile,
+  svntest.verify.AnyOutput,
+  [], 0, '-q', 'load',
+  sbox.repo_url)
+
+  # Create the 'toplevel' directory in repository and then load the same
+  # dumpfile into that subtree.
+  svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 10.\n'],
+[], "mkdir", sbox.repo_url + "/toplevel",
+ "-m", "Create toplevel dir to load into")
+  # This currently fails with this error:
+  #
+  #   >svnrdump load file:///C:/SVN/src-trunk/Debug/subversion/tests/cmdline
+  #   /svn-test-work/repositories/svnrdump_tests-40/toplevel < with_merges.dump
+  #   * Loaded revision 0.
+  #   * Loaded revision 11.
+  #   * Loaded revision 12.
+  #   * Loaded revision 13.
+  #   * Loaded revision 14.
+  #   * Loaded revision 15.
+  #   * Loaded revision 16.
+  #   * Loaded revision 17.
+  #   * Loaded revision 18.
+  #   ..\..\..\subversion\svnr

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

2011-05-20 Thread philip
Author: philip
Date: Fri May 20 16:46:29 2011
New Revision: 1125459

URL: http://svn.apache.org/viewvc?rev=1125459&view=rev
Log:
* STATUS: propose r1036429

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=1125459&r1=1125458&r2=1125459&view=diff
==
--- subversion/branches/1.6.x/STATUS (original)
+++ subversion/branches/1.6.x/STATUS Fri May 20 16:46:29 2011
@@ -15,6 +15,13 @@ Status of 1.6.17:
 Candidate changes:
 ==
 
+ * r1036429
+   Fix svnsync_tests 29 for issue 3641.
+   Justification:
+ Server assert using BDB.
+   Votes:
+ +1: philip
+
 Veto-blocked changes:
 =
 




svn commit: r1125455 - in /subversion/trunk/subversion: libsvn_wc/upgrade.c libsvn_wc/wc.h libsvn_wc/wc_db_pristine.c tests/cmdline/svntest/wc.py

2011-05-20 Thread julianfoad
Author: julianfoad
Date: Fri May 20 16:38:24 2011
New Revision: 1125455

URL: http://svn.apache.org/viewvc?rev=1125455&view=rev
Log:
Prepare to give pristine text files a filename extension of ".svn-base"
after the string of 40 hex digits.  This will help users who search the disk
using a tool that can easily exclude matches to a given filename extension
but cannot easily exclude pristine files any other way.

This change will not be active until SVN_WC__VERSION is bumped to 29, at
which time svntest/wc.py:text_base_path() will need to be adjusted as
indicated in its comment.

See email "WC format bump imminent - renaming pristines [...]" from Julian
Foad on 2011-05-20, .

* subversion/libsvn_wc/upgrade.c
  (rename_pristine_file): New function.
  (bump_to_29): Rename all pristine files using rename_pristine_file().

* subversion/libsvn_wc/wc_db_pristine.c
  (PRISTINE_STORAGE_EXT): New #define.
  (get_pristine_fname): Append PRISTINE_STORAGE_EXT to the file name.

* subversion/libsvn_wc/wc.h
  Add this rename to the documentation of format 29.

* subversion/tests/cmdline/svntest/wc.py
  (text_base_path): Add a comment that we will need to append ".svn-base"
to the file name here when we bump the format.

Modified:
subversion/trunk/subversion/libsvn_wc/upgrade.c
subversion/trunk/subversion/libsvn_wc/wc.h
subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c
subversion/trunk/subversion/tests/cmdline/svntest/wc.py

Modified: subversion/trunk/subversion/libsvn_wc/upgrade.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/upgrade.c?rev=1125455&r1=1125454&r2=1125455&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/trunk/subversion/libsvn_wc/upgrade.c Fri May 20 16:38:24 2011
@@ -1213,13 +1213,47 @@ bump_to_28(void *baton, svn_sqlite__db_t
   return SVN_NO_ERROR;
 }
 
+/* If FINFO indicates that PATH names a file, rename it to '.svn-base'.
+ * Ignore any file whose name is not the expected length, in order to make
+ * life easier for any developer who runs this code twice or has some
+ * non-standard files in the pristine directory.
+ *
+ * A callback for bump_to_29(), implementing #svn_io_walk_func_t. */
+static svn_error_t *
+rename_pristine_file(void *baton,
+ const char *path,
+ const apr_finfo_t *finfo,
+ apr_pool_t *pool)
+{
+  const char *new_path;
+
+  /* The old pristine file name was 40 hex digits. */
+  if (finfo->filetype == APR_REG && strlen(path) == 40)
+{
+  new_path = apr_pstrcat(pool, path, ".svn-base", (char *)NULL);
+  SVN_ERR(svn_io_file_rename(path, new_path, pool));
+}
+  return SVN_NO_ERROR;
+}
+
 static svn_error_t *
 bump_to_29(void *baton, svn_sqlite__db_t *sdb, apr_pool_t *scratch_pool)
 {
+  const char *wcroot_abspath = ((struct bump_baton *)baton)->wcroot_abspath;
+  const char *pristine_dir;
+
   /* ### Before enabling this code we should be able to upgrade existing
  ### file externals to their new location */
   SVN_ERR_MALFUNCTION();
 
+  /* Rename all pristine files, adding a ".svn-base" suffix. */
+  pristine_dir = svn_dirent_join_many(scratch_pool, wcroot_abspath,
+  svn_wc_get_adm_dir(scratch_pool),
+  PRISTINE_STORAGE_RELPATH, NULL);
+  SVN_ERR(svn_io_dir_walk2(pristine_dir, APR_FINFO_MIN,
+   rename_pristine_file, NULL, scratch_pool));
+
+  /* Externals */
   SVN_ERR(svn_sqlite__exec_statements(sdb, STMT_CREATE_EXTERNALS));
   SVN_ERR(svn_sqlite__exec_statements(sdb, STMT_UPGRADE_TO_29));
   return SVN_NO_ERROR;

Modified: subversion/trunk/subversion/libsvn_wc/wc.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc.h?rev=1125455&r1=1125454&r2=1125455&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/wc.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc.h Fri May 20 16:38:24 2011
@@ -146,7 +146,9 @@ extern "C" {
  * The bump to 28 converted any remaining references to MD5 checksums
  *   to SHA1 checksums. Bumped in r1095214.
  *
- * The bump to 29 will probably introduce the EXTERNALS store. Not bumped yet
+ * The bump to 29 renamed the pristine files from '' to
+ * '.svn-base' and introduced the EXTERNALS store.
+ * ### Not bumped yet
  *
  * == 1.7.x shipped with format ???
  *

Modified: subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c?rev=1125455&r1=1125454&r2=1125455&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c Fr

svn commit: r1125450 - /subversion/trunk/subversion/libsvn_wc/wc-queries.sql

2011-05-20 Thread philip
Author: philip
Date: Fri May 20 16:24:05 2011
New Revision: 1125450

URL: http://svn.apache.org/viewvc?rev=1125450&view=rev
Log:
Keep the local_relpath checks grouped together for consistency.
This doesn't look any less effecient in SQLite's query plan 

* subversion/libsvn_wc/wc-queries.sql
  (STMT_SELECT_BASE_NODE_LOCK_TOKENS_RECURSIVE,
   STMT_CLEAR_BASE_NODE_RECURSIVE_DAV_CACHE,
   STMT_RECURSIVE_UPDATE_NODE_REPO,
   STMT_DELETE_NODES_RECURSIVE): Do the special case path check 
before, rather than between, the local_relpath checks.

Modified:
subversion/trunk/subversion/libsvn_wc/wc-queries.sql

Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-queries.sql?rev=1125450&r1=1125449&r2=1125450&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Fri May 20 16:24:05 
2011
@@ -261,8 +261,8 @@ FROM nodes
 LEFT JOIN lock ON nodes.repos_id = lock.repos_id
   AND nodes.repos_path = lock.repos_relpath
 WHERE wc_id = ?1 AND op_depth = 0
-  AND (local_relpath = ?2
-   OR ?2 = ''
+  AND (?2 = ''
+   OR local_relpath = ?2
OR (local_relpath > ?2 || '/' AND local_relpath < ?2 || '0'))
 
 -- STMT_INSERT_WCROOT
@@ -296,16 +296,16 @@ WHERE repos_id = ?1 AND repos_relpath = 
 -- STMT_CLEAR_BASE_NODE_RECURSIVE_DAV_CACHE
 UPDATE nodes SET dav_cache = NULL
 WHERE dav_cache IS NOT NULL AND wc_id = ?1 AND op_depth = 0
-  AND (local_relpath = ?2
-   OR ?2 = ''
+  AND (?2 = ''
+   OR local_relpath = ?2
OR (local_relpath > ?2 || '/' AND local_relpath < ?2 || '0'))
 
 -- STMT_RECURSIVE_UPDATE_NODE_REPO
 UPDATE nodes SET repos_id = ?4, dav_cache = NULL
 WHERE wc_id = ?1
   AND repos_id = ?3
-  AND (local_relpath = ?2
-   OR ?2 = ''
+  AND (?2 = ''
+   OR local_relpath = ?2
OR (local_relpath > ?2 || '/' AND local_relpath < ?2 || '0'))
 
 -- STMT_UPDATE_LOCK_REPOS_ID
@@ -566,8 +566,8 @@ WHERE wc_id = ?1 AND local_relpath = ?2
 -- STMT_DELETE_NODES_RECURSIVE
 DELETE FROM nodes
 WHERE wc_id = ?1
-  AND (local_relpath = ?2
-   OR ?2 = ''
+  AND (?2 = ''
+   OR local_relpath = ?2
OR (local_relpath > ?2 || '/' AND local_relpath < ?2 || '0'))
   AND op_depth >= ?3
 




svn commit: r1125443 - in /subversion/trunk/subversion: libsvn_client/copy.c tests/cmdline/copy_tests.py

2011-05-20 Thread philip
Author: philip
Date: Fri May 20 15:59:36 2011
New Revision: 1125443

URL: http://svn.apache.org/viewvc?rev=1125443&view=rev
Log:
Allow wc-to-wc copyies of the base of a deleted node, rather than
crashing, as this was supported by 1.6.

* subversion/libsvn_client/copy.c
  (try_copy): Avoid using an unitialised variable, scan deletions.

* subversion/tests/cmdline/copy_tests.py
  (mixed_rev_copy_del): Remove outdated comment.
  (copy_base_of_deleted): New test.
  (test_list): Add new test.

Modified:
subversion/trunk/subversion/libsvn_client/copy.c
subversion/trunk/subversion/tests/cmdline/copy_tests.py

Modified: subversion/trunk/subversion/libsvn_client/copy.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/copy.c?rev=1125443&r1=1125442&r2=1125443&view=diff
==
--- subversion/trunk/subversion/libsvn_client/copy.c (original)
+++ subversion/trunk/subversion/libsvn_client/copy.c Fri May 20 15:59:36 2011
@@ -2224,14 +2224,13 @@ try_copy(const apr_array_header_t *sourc
   NULL,
   ctx->wc_ctx,
   pair->src_abspath_or_url,
-  FALSE, iterpool, iterpool));
+  TRUE, iterpool, iterpool));
 
   if (copyfrom_repos_relpath)
 url = svn_path_url_add_component2(copyfrom_repos_root_url,
   copyfrom_repos_relpath,
   pool);
-
-  if (url == NULL)
+  else
 return svn_error_createf
   (SVN_ERR_ENTRY_MISSING_URL, NULL,
_("'%s' does not have a URL associated with it"),

Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/copy_tests.py?rev=1125443&r1=1125442&r2=1125443&view=diff
==
--- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Fri May 20 15:59:36 
2011
@@ -4753,15 +4753,6 @@ def mixed_rev_copy_del(sbox):
 entry_status=None)
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
-  # This test currently fails above, as both alpha and beta disappear
-  # from status, what should happen is unclear.  In 1.6 both names
-  # remained in status 'D'.
-
-  # The commit doesn't work either, it should not delete alpha but
-  # must delete beta.  In 1.6 both alpha and beta were deleted and the
-  # commit failed.  It's not clear how the client can determine that
-  # alpha and beta should be treated differently.
-  # See issue 3314
   expected_output = svntest.wc.State(wc_dir, {
 'A/B/E_copy'  : Item(verb='Adding'),
 'A/B/E_copy/beta' : Item(verb='Deleting'),
@@ -4773,6 +4764,7 @@ def mixed_rev_copy_del(sbox):
 expected_status,
 None,
 wc_dir)
+
 def copy_delete_undo(sbox, use_revert):
   "copy, delete child, undo"
 
@@ -5163,6 +5155,23 @@ def deleted_file_with_case_clash(sbox):
}
   svntest.actions.run_and_verify_info([expected_info_IOTA], IOTA_path)
 
+def copy_base_of_deleted(sbox):
+  """copy -rBASE deleted"""
+
+  sbox.build(read_only = True)
+  wc_dir = sbox.wc_dir
+
+  svntest.actions.run_and_verify_svn(None, None, [], 'rm', sbox.ospath('A/mu'))
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('A/mu', status='D ')
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  svntest.actions.run_and_verify_svn(None, None, [], 'cp', '-rBASE',
+ sbox.ospath('A/mu'), sbox.ospath('A/mu2'))
+  expected_status.add({
+'A/mu2' : Item(status='A ', copied='+', wc_rev='-'),
+})
+
 
 
 # Run the tests
@@ -5270,6 +5279,7 @@ test_list = [ None,
   copy_wc_url_with_absent,
   copy_url_shortcut,
   deleted_file_with_case_clash,
+  copy_base_of_deleted,
  ]
 
 if __name__ == '__main__':




svn commit: r1125429 - in /subversion/trunk/subversion/libsvn_wc: lock.c workqueue.c

2011-05-20 Thread gstein
Author: gstein
Date: Fri May 20 15:28:06 2011
New Revision: 1125429

URL: http://svn.apache.org/viewvc?rev=1125429&view=rev
Log:
Remove some ### markers by simple code rearrangement. No functional changes.

* subversion/libsvn_wc/lock.c:
  (do_close): needless forward decl removed
  (add_to_shared, get_from_shared, close_single): moved further up the
file in order to remove forward declarations.

* subversion/libsvn_wc/workqueue.c:
  (dispatch_work_item): needless forward decl removed
  (svn_wc__wq_build_file_copy_translated): remove ### comment since we are
already translating to relative paths

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

Modified: subversion/trunk/subversion/libsvn_wc/lock.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/lock.c?rev=1125429&r1=1125428&r2=1125429&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/lock.c (original)
+++ subversion/trunk/subversion/libsvn_wc/lock.c Fri May 20 15:28:06 2011
@@ -83,23 +83,6 @@ static const svn_wc_adm_access_t missing
 #define svn_wc__db_is_closed(db) FALSE
 
 
-
-/* ### these functions are here for forward references. generally, they're
-   ### here to avoid the code churn from moving the definitions.  */
-
-static svn_error_t *
-do_close(svn_wc_adm_access_t *adm_access, svn_boolean_t preserve_lock,
- apr_pool_t *scratch_pool);
-
-static svn_error_t *
-add_to_shared(svn_wc_adm_access_t *lock, apr_pool_t *scratch_pool);
-
-static svn_error_t *
-close_single(svn_wc_adm_access_t *adm_access,
- svn_boolean_t preserve_lock,
- apr_pool_t *scratch_pool);
-
-
 svn_error_t *
 svn_wc__internal_check_wc(int *wc_format,
   svn_wc__db_t *db,
@@ -216,6 +199,100 @@ svn_wc_check_wc2(int *wc_format,
 }
 
 
+/* */
+static svn_error_t *
+add_to_shared(svn_wc_adm_access_t *lock, apr_pool_t *scratch_pool)
+{
+  /* ### sometimes we replace &missing with a now-valid lock.  */
+  {
+svn_wc_adm_access_t *prior = svn_wc__db_temp_get_access(lock->db,
+lock->abspath,
+scratch_pool);
+if (IS_MISSING(prior))
+  SVN_ERR(svn_wc__db_temp_close_access(lock->db, lock->abspath,
+   prior, scratch_pool));
+  }
+
+  svn_wc__db_temp_set_access(lock->db, lock->abspath, lock,
+ scratch_pool);
+
+  return SVN_NO_ERROR;
+}
+
+
+/* */
+static svn_wc_adm_access_t *
+get_from_shared(const char *abspath,
+svn_wc__db_t *db,
+apr_pool_t *scratch_pool)
+{
+  /* We closed the DB when it became empty. ABSPATH is not present.  */
+  if (db == NULL)
+return NULL;
+  return svn_wc__db_temp_get_access(db, abspath, scratch_pool);
+}
+
+
+/* */
+static svn_error_t *
+close_single(svn_wc_adm_access_t *adm_access,
+ svn_boolean_t preserve_lock,
+ apr_pool_t *scratch_pool)
+{
+  svn_boolean_t locked;
+
+  if (adm_access->closed)
+return SVN_NO_ERROR;
+
+  /* Physically unlock if required */
+  SVN_ERR(svn_wc__db_wclock_owns_lock(&locked, adm_access->db,
+  adm_access->abspath, TRUE,
+  scratch_pool));
+  if (locked)
+{
+  if (!preserve_lock)
+{
+  /* Remove the physical lock in the admin directory for
+ PATH. It is acceptable for the administrative area to
+ have disappeared, such as when the directory is removed
+ from the working copy.  It is an error for the lock to
+ have disappeared if the administrative area still exists. */
+
+  svn_error_t *err = svn_wc__db_wclock_release(adm_access->db,
+   adm_access->abspath,
+   scratch_pool);
+  if (err)
+{
+  if (svn_wc__adm_area_exists(adm_access->abspath, scratch_pool))
+return err;
+  svn_error_clear(err);
+}
+}
+}
+
+  /* Reset to prevent further use of the lock. */
+  adm_access->closed = TRUE;
+
+  /* Detach from set */
+  SVN_ERR(svn_wc__db_temp_close_access(adm_access->db, adm_access->abspath,
+   adm_access, scratch_pool));
+
+  /* Possibly close the underlying wc_db. */
+  if (!adm_access->db_provided)
+{
+  apr_hash_t *opened = svn_wc__db_temp_get_all_access(adm_access->db,
+  scratch_pool);
+  if (apr_hash_count(opened) == 0)
+{
+  SVN_ERR(svn_wc__db_close(adm_access->db));
+  adm_access->db = NULL;
+}
+}
+
+  return SVN_NO_ERROR;
+}
+
+
 /* Cleanup for a locked access baton.
 
 

svn commit: r1125426 - /subversion/trunk/subversion/libsvn_ra_neon/props.c

2011-05-20 Thread ivan
Author: ivan
Date: Fri May 20 15:04:48 2011
New Revision: 1125426

URL: http://svn.apache.org/viewvc?rev=1125426&view=rev
Log:
ra_neon: Eliminate one more request when speaking with HTTPv2 enabled server.

* subversion/libsvn_ra_neon/props.c
  (svn_ra_neon__get_baseline_info): Request youngest revision from server 
   only if we're really need it.

Modified:
subversion/trunk/subversion/libsvn_ra_neon/props.c

Modified: subversion/trunk/subversion/libsvn_ra_neon/props.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/props.c?rev=1125426&r1=1125425&r2=1125426&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/props.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/props.c Fri May 20 15:04:48 2011
@@ -994,10 +994,12 @@ svn_error_t *svn_ra_neon__get_baseline_i
  semantics.  */
   if (SVN_RA_NEON__HAVE_HTTPV2_SUPPORT(sess))
 {
-  svn_revnum_t youngest;
-
-  if (! SVN_IS_VALID_REVNUM(revision))
+  /* Fetch youngest revision from server only if needed to construct
+ baseline collection URL or return to caller. */
+  if (! SVN_IS_VALID_REVNUM(revision) && (bc_url_p || latest_rev))
 {
+  svn_revnum_t youngest;
+
   SVN_ERR(svn_ra_neon__exchange_capabilities(sess, NULL,
  &youngest, pool));
   if (! SVN_IS_VALID_REVNUM(youngest))




svn commit: r1125418 - /subversion/trunk/subversion/libsvn_wc/wc-metadata.sql

2011-05-20 Thread julianfoad
Author: julianfoad
Date: Fri May 20 14:36:08 2011
New Revision: 1125418

URL: http://svn.apache.org/viewvc?rev=1125418&view=rev
Log:
* subversion/libsvn_wc/wc-metadata.sql
  (STMT_UPGRADE_TO_29): After doing the upgrade, bump the format number,
like all the other upgrade statements do. (The current format is 28
so this statement is not yet in use.)

Modified:
subversion/trunk/subversion/libsvn_wc/wc-metadata.sql

Modified: subversion/trunk/subversion/libsvn_wc/wc-metadata.sql
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-metadata.sql?rev=1125418&r1=1125417&r2=1125418&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-metadata.sql Fri May 20 14:36:08 
2011
@@ -747,6 +747,8 @@ BEGIN
   WHERE checksum = OLD.checksum;
 END;
 
+PRAGMA user_version = 29;
+
 /* - */
 
 /* Format YYY introduces new handling for conflict information.  */




svn commit: r1125415 - in /subversion/trunk/subversion/libsvn_ra_neon: ra_neon.h session.c util.c

2011-05-20 Thread ivan
Author: ivan
Date: Fri May 20 14:29:12 2011
New Revision: 1125415

URL: http://svn.apache.org/viewvc?rev=1125415&view=rev
Log:
Follow-up to r1125391: Use svn_tristate_t instead of hardcoded values.

Suggested by: gstein

* subversion/libsvn_ra_neon/ra_neon.h
  (svn_ra_neon__session_t): Change type of supports_deadprop_count to 
   svn_tristate_t.

* subversion/libsvn_ra_neon/session.c
  (svn_ra_neon__open): Initialize supports_deadprop_count to 
   svn_tristate_unknown.

* subversion/libsvn_ra_neon/util.c
  (svn_ra_neon__get_deadprop_count_support): Update.
  

Modified:
subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h
subversion/trunk/subversion/libsvn_ra_neon/session.c
subversion/trunk/subversion/libsvn_ra_neon/util.c

Modified: subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h?rev=1125415&r1=1125414&r2=1125415&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h Fri May 20 14:29:12 
2011
@@ -128,10 +128,8 @@ typedef struct svn_ra_neon__session_t {
   apr_hash_t *capabilities;
 
   /* Tri-state variable holding information about server support for
- deadprop-count property. Zero if information still unknown,
- positive if server support deadprop-count and negative if it
- does not. */
-  int supports_deadprop_count;
+ deadprop-count property.*/
+  svn_tristate_t supports_deadprop_count;
 
   /*** HTTP v2 protocol stuff. ***
*

Modified: subversion/trunk/subversion/libsvn_ra_neon/session.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/session.c?rev=1125415&r1=1125414&r2=1125415&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/session.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/session.c Fri May 20 14:29:12 
2011
@@ -950,7 +950,7 @@ svn_ra_neon__open(svn_ra_session_t *sess
   ras->progress_baton = callbacks->progress_baton;
   ras->progress_func = callbacks->progress_func;
   ras->capabilities = apr_hash_make(ras->pool);
-  ras->supports_deadprop_count = 0;
+  ras->supports_deadprop_count = svn_tristate_unknown;
   ras->vcc = NULL;
   ras->uuid = NULL;
   /* save config and server group in the auth parameter hash */

Modified: subversion/trunk/subversion/libsvn_ra_neon/util.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/util.c?rev=1125415&r1=1125414&r2=1125415&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/util.c Fri May 20 14:29:12 2011
@@ -1623,7 +1623,7 @@ svn_ra_neon__get_deadprop_count_support(
 }
 
   /* Check if we already checked deadprop_count support. */
-  if (!ras->supports_deadprop_count)
+  if (ras->supports_deadprop_count == svn_tristate_unknown)
 {
   svn_ra_neon__resource_t *rsrc;
   const svn_string_t *deadprop_count;
@@ -1636,15 +1636,15 @@ svn_ra_neon__get_deadprop_count_support(
 APR_HASH_KEY_STRING);
   if (deadprop_count != NULL)
 {
-  ras->supports_deadprop_count = 1;
+  ras->supports_deadprop_count = svn_tristate_true;
 }
   else
 {
-  ras->supports_deadprop_count = -1;
+  ras->supports_deadprop_count = svn_tristate_false;
 }
 }
 
-  *supported = (ras->supports_deadprop_count > 0);
+  *supported = (ras->supports_deadprop_count == svn_tristate_true);
 
   return SVN_NO_ERROR;
 }




svn commit: r1125409 - /subversion/trunk/subversion/libsvn_ra_neon/fetch.c

2011-05-20 Thread ivan
Author: ivan
Date: Fri May 20 14:14:06 2011
New Revision: 1125409

URL: http://svn.apache.org/viewvc?rev=1125409&view=rev
Log:
Formatting fix.

* subversion/libsvn_ra_neon/fetch.c
  (svn_ra_neon__get_dir): Remove whitespace before paren.

Found by: gstein

Modified:
subversion/trunk/subversion/libsvn_ra_neon/fetch.c

Modified: subversion/trunk/subversion/libsvn_ra_neon/fetch.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/fetch.c?rev=1125409&r1=1125408&r2=1125409&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/fetch.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/fetch.c Fri May 20 14:14:06 2011
@@ -822,8 +822,8 @@ svn_error_t *svn_ra_neon__get_dir(svn_ra
  targeted PROPFIND. */
   if (dirent_fields & SVN_DIRENT_HAS_PROPS)
 {
-  SVN_ERR(svn_ra_neon__get_deadprop_count_support
-(&supports_deadprop_count, ras, final_url, pool));
+  SVN_ERR(svn_ra_neon__get_deadprop_count_support(
+&supports_deadprop_count, ras, final_url, pool));
 }
 
   /* if we didn't ask for the has_props field, we can get individual




svn commit: r1125403 - /subversion/trunk/subversion/include/svn_io.h

2011-05-20 Thread julianfoad
Author: julianfoad
Date: Fri May 20 14:05:50 2011
New Revision: 1125403

URL: http://svn.apache.org/viewvc?rev=1125403&view=rev
Log:
* subversion/include/svn_io.h
  (svn_io_dir_walk2): Document the 'wanted' parameter better.

Modified:
subversion/trunk/subversion/include/svn_io.h

Modified: subversion/trunk/subversion/include/svn_io.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_io.h?rev=1125403&r1=1125402&r2=1125403&view=diff
==
--- subversion/trunk/subversion/include/svn_io.h (original)
+++ subversion/trunk/subversion/include/svn_io.h Fri May 20 14:05:50 2011
@@ -1514,7 +1514,8 @@ typedef svn_error_t * (*svn_io_walk_func
  * on the directory itself before invoking it on any children thereof.
  *
  * Deliver to @a walk_func the information specified by @a wanted,
- * plus the items specified by @c APR_FINFO_TYPE and @c APR_FINFO_NAME.
+ * which is a combination of @c APR_FINFO_* flags, plus the
+ * information specified by @c APR_FINFO_TYPE and @c APR_FINFO_NAME.
  *
  * Use @a pool for all allocations.
  *




svn commit: r1125399 - /subversion/trunk/CHANGES

2011-05-20 Thread stsp
Author: stsp
Date: Fri May 20 14:02:04 2011
New Revision: 1125399

URL: http://svn.apache.org/viewvc?rev=1125399&view=rev
Log:
* CHANGES: Update 1.6.17 section with changes merged into 1.6.x.

Modified:
subversion/trunk/CHANGES

Modified: subversion/trunk/CHANGES
URL: 
http://svn.apache.org/viewvc/subversion/trunk/CHANGES?rev=1125399&r1=1125398&r2=1125399&view=diff
==
--- subversion/trunk/CHANGES (original)
+++ subversion/trunk/CHANGES Fri May 20 14:02:04 2011
@@ -188,10 +188,16 @@ http://svn.apache.org/repos/asf/subversi
 * fixed: write-through proxy could direcly commit to slave (r917523)
 * detect a particular corruption condition in FSFS (r1100213)
 * improve error message when clients refer to unkown revisions (r939000)
+* bugfixes and optimizations to the DAV mirroring code (r878607)
+* fixed: locked and deleted file causes tree conflict (issue #3525)
+* fixed: update touches locked file with svn:keywords property (issue 
#3471)
+* fix svnsync handling of directory copyfrom (issue #3641)
+* fix log -g excessive duplicate output (issue #3650)
 
   Developer-visible changes:
 * fix reporting FS-level post-commit processing errors (r1104098)
 * fix JVM recognition on OS X Snow Leopard (10.6) (r1028084)
+* allow building on Windows with recent Expat (r1074572)
 
 
 Version 1.6.16




svn commit: r1125398 - /subversion/trunk/subversion/libsvn_ra_neon/util.c

2011-05-20 Thread ivan
Author: ivan
Date: Fri May 20 13:55:13 2011
New Revision: 1125398

URL: http://svn.apache.org/viewvc?rev=1125398&view=rev
Log:
ra_neon: Save another HTTP request when speaking with HTTPv2 enabled server.

* subversion/libsvn_ra_neon/util.c
  (svn_ra_neon__get_deadprop_count_support): Assume that HTTPv2 enabled 
   servers always support deadprop-count property.

Modified:
subversion/trunk/subversion/libsvn_ra_neon/util.c

Modified: subversion/trunk/subversion/libsvn_ra_neon/util.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/util.c?rev=1125398&r1=1125397&r2=1125398&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/util.c Fri May 20 13:55:13 2011
@@ -1615,6 +1615,13 @@ svn_ra_neon__get_deadprop_count_support(
 { NULL }
   };
 
+  if (SVN_RA_NEON__HAVE_HTTPV2_SUPPORT(ras))
+{
+  /* HTTPv2 enabled servers always supports deadprop-count property. */
+  *supported = TRUE;
+  return SVN_NO_ERROR;
+}
+
   /* Check if we already checked deadprop_count support. */
   if (!ras->supports_deadprop_count)
 {




svn commit: r1125391 - in /subversion/trunk/subversion/libsvn_ra_neon: fetch.c ra_neon.h session.c util.c

2011-05-20 Thread ivan
Author: ivan
Date: Fri May 20 13:48:53 2011
New Revision: 1125391

URL: http://svn.apache.org/viewvc?rev=1125391&view=rev
Log:
ra_neon: Cache information about deadprop-count support in ra_session object.

* subversion/libsvn_ra_neon/fetch.c
  (deadprop_count_support_props): Move to subversion/libsvn_ra_neon/util.c.
  (svn_ra_neon__get_dir): Use svn_ra_neon__get_deadprop_count_support() 
   function instead of requesting this information from server.

* subversion/libsvn_ra_neon/ra_neon.h
  (svn_ra_neon__session_t): Add supports_deadprop_count tri-state variable to
   cache information about deadprop-count support.
  (svn_ra_neon__get_deadprop_count_support): New.

* subversion/libsvn_ra_neon/session.c
  (svn_ra_neon__open): Initialize supports_deadprop_count to zero (unknown).

* subversion/libsvn_ra_neon/util.c
  (svn_ra_neon__get_deadprop_count_support): New, extracted from 
   svn_ra_neon__get_dir().

Modified:
subversion/trunk/subversion/libsvn_ra_neon/fetch.c
subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h
subversion/trunk/subversion/libsvn_ra_neon/session.c
subversion/trunk/subversion/libsvn_ra_neon/util.c

Modified: subversion/trunk/subversion/libsvn_ra_neon/fetch.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/fetch.c?rev=1125391&r1=1125390&r2=1125391&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/fetch.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/fetch.c Fri May 20 13:48:53 2011
@@ -774,14 +774,6 @@ svn_error_t *svn_ra_neon__get_file(svn_r
   return SVN_NO_ERROR;
 }
 
-/* The property we need to fetch to see whether the server we are
-   connected to supports the deadprop-count property. */
-static const ne_propname deadprop_count_support_props[] =
-{
-  { SVN_DAV_PROP_NS_DAV, "deadprop-count" },
-  { NULL }
-};
-
 svn_error_t *svn_ra_neon__get_dir(svn_ra_session_t *session,
   apr_hash_t **dirents,
   svn_revnum_t *fetched_rev,
@@ -830,15 +822,8 @@ svn_error_t *svn_ra_neon__get_dir(svn_ra
  targeted PROPFIND. */
   if (dirent_fields & SVN_DIRENT_HAS_PROPS)
 {
-  const svn_string_t *deadprop_count;
-
-  SVN_ERR(svn_ra_neon__get_props_resource(&rsrc, ras, final_url, NULL,
-  deadprop_count_support_props,
-  pool));
-  deadprop_count = apr_hash_get(rsrc->propset,
-SVN_RA_NEON__PROP_DEADPROP_COUNT,
-APR_HASH_KEY_STRING);
-  supports_deadprop_count = (deadprop_count != NULL);
+  SVN_ERR(svn_ra_neon__get_deadprop_count_support
+(&supports_deadprop_count, ras, final_url, pool));
 }
 
   /* if we didn't ask for the has_props field, we can get individual

Modified: subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h?rev=1125391&r1=1125390&r2=1125391&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h Fri May 20 13:48:53 
2011
@@ -127,6 +127,12 @@ typedef struct svn_ra_neon__session_t {
  constants' addresses, therefore). */
   apr_hash_t *capabilities;
 
+  /* Tri-state variable holding information about server support for
+ deadprop-count property. Zero if information still unknown,
+ positive if server support deadprop-count and negative if it
+ does not. */
+  int supports_deadprop_count;
+
   /*** HTTP v2 protocol stuff. ***
*
* We assume that if mod_dav_svn sends one of the special v2 OPTIONs
@@ -1173,6 +1179,15 @@ const char *
 svn_ra_neon__uri_unparse(const ne_uri *uri,
  apr_pool_t *pool);
 
+/* Sets *SUPPORTS_DEADPROP_COUNT to non-zero if server supports
+ * deadprop-count property. Uses FINAL_URL to discover this informationn
+ * if it is not already cached. */
+svn_error_t *
+svn_ra_neon__get_deadprop_count_support(svn_boolean_t *supported,
+svn_ra_neon__session_t *ras,
+const char *final_url,
+apr_pool_t *pool);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/trunk/subversion/libsvn_ra_neon/session.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/session.c?rev=1125391&r1=1125390&r2=1125391&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/session.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/session.c Fri May 20 13:48:53 
2011
@@ -950,6 +950,7 @@ svn_ra_neo

svn commit: r1125392 - in /subversion/branches/1.6.x: ./ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_repos/ subversion/libsvn_subr/ subversion/tests/cmd

2011-05-20 Thread stsp
Author: stsp
Date: Fri May 20 13:48:55 2011
New Revision: 1125392

URL: http://svn.apache.org/viewvc?rev=1125392&view=rev
Log:
Reintegrate the 1.6.x-issue3650 branch.

 * r1076730, r1078954, r1081255
   Fix issue #3650 "log -g produces excessive duplicate output"
   Justification:
 Eliminates potentially massive duplication when tracing logs
 across merge reintegrations.
   Branch:
 ^/subversion/branches/1.6.x-issue3650
   Votes:
 +1: pburba, stsp, sbutler

Modified:
subversion/branches/1.6.x/   (props changed)
subversion/branches/1.6.x/STATUS
subversion/branches/1.6.x/subversion/include/private/svn_mergeinfo_private.h
subversion/branches/1.6.x/subversion/include/svn_repos.h
subversion/branches/1.6.x/subversion/libsvn_client/merge.c
subversion/branches/1.6.x/subversion/libsvn_client/mergeinfo.c
subversion/branches/1.6.x/subversion/libsvn_client/mergeinfo.h
subversion/branches/1.6.x/subversion/libsvn_repos/log.c
subversion/branches/1.6.x/subversion/libsvn_subr/mergeinfo.c
subversion/branches/1.6.x/subversion/tests/cmdline/log_tests.py

Propchange: subversion/branches/1.6.x/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May 20 13:48:55 2011
@@ -21,6 +21,7 @@
 /subversion/branches/1.6.x-issue3641:1072041-1125381
 /subversion/branches/1.6.x-issue3646:957327-1002699
 /subversion/branches/1.6.x-issue3648:964172-1001805
+/subversion/branches/1.6.x-issue3650:1095508-1125384
 /subversion/branches/1.6.x-issue3651:952977-954985
 /subversion/branches/1.6.x-issue3654:953882-955338
 /subversion/branches/1.6.x-issue3683:965785-988062
@@ -117,4 +118,4 @@
 /subversion/branches/tc_url_rev:874351-874483
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
-/subversion/trunk:875965,875968,876004,876012,876017,876019,876022,876024,876032,876041-876042,876048,876051,876055-876056,876059,876083,876091,876097,876101,876104,876109,876123-876125,876129,876132,876138,876160,876167,876175,876180,876185,876205,876223-876225,876230,876233,876245,876252,876256,876283,876287,876312,876326-876327,876330,876366,876372,876374,876376,876383,876386,876442,876456-876457,876462-876464,876467,876469,876480,876486,876495-876497,876516-876518,876524,876526,876583,876601,876614-876615,876628,876633,876641,876645,876659,876687,876689,876705,876715,876726,876760,876763,876794,876804,876815-876816,876821,876825,876837,876840-876841,876843,876849,876857-876858,876862,876873,876890,876897,876905,876908,876925,876931,876934,876948-876949,876953,876987,876993,877011,877014,877016,877028-877029,877038,877119,877127,877146,877157,877191,877195,877203,877211,877230,877234,877237,877243,877249,877259,877261,877304,877319,877407,877437,877441-877442,877453,87745
 
9,877472,877544,877553,877565,877568,877573,877593,877595,877597,877601,877612,877665,877667,877681,877692,877696,877701,877720,877730,877784,877793,877797,877809,877814-877815,877819,877821,877842,877848,877853,877867,877869,877873,877901,877909,877916,877931,877942,877953,877964,877968,877970,877981-877982,878005,878013,878015,878020,878046,878053,878062,878074,878080,878089,878091,878093,878095,878127,878129,878131,878142,878173-878176,878216,878240,878242,878255,878269,878272,878279,878296-878297,878303,878321,878335,878338,878341,878343,878353,878364,878367-878368,878385,878399,878423,878426,878447,878462,878484,878491,878498,878532,878590,878595,878607,878625-878627,878646,878659,878673,878682-878683,878690-878691,878693,878723,878760-878761,878873,878875,878877,878879,878905,878910-878911,878915-878916,878924-878925,878946,878949,878955,878960,878970,878981,879001,879033,879056,879074,879076,879081-879082,879093,879105,879126,879148,879170,879198-879199,879201,879271,
 
879293,879357,879375-879376,879403,879631,879635-879636,879688,879709-879711,879747,879902,879916,879954,879961,879966,879971,880027,880082,880095,880105,880146,880162,880226,880274-880275,880370,880450,880461,880474,880525-880526,880552,881905,884842,886164,886197,888715,888979,889081,889840,891672,892050,892085,895514,895653,896522,896915,898048,898963,899826,899828,900797,901304,901752,902093,902467,904301,904394,904594,905303,905326,906256,906305,906587,907644,908980-908981,917523,917640,918211,922516,923389,923391,926151,926167,927323,927328,931209,931211,931392,931568,932942,933299,934599,934603,935631,935992,935996,937610,939000,939002,939375-939376,944635,945350,946355,946767,947006,948512,948916,949307,950931,950933,951753,952992,953317,955369,957507,958024,959004,959760,961055,961970,962377-962378,964167,964349,964767,965405,965469,965508,979045,979429,980811,981449,981921,984565,984928,984931,991534,992114,996884,997026,997070,997457,997466,997471,997474,138,1
 
60,1000607,1000612,1001009,1002094,1005446,1022675,1024269,1027957,1028084,1028108,1028125,1031165,1031186,1032808,1033166,1033290,1033665,1033685,1033921,10

svn commit: r1125384 - in /subversion/branches/1.6.x: ./ subversion/libsvn_repos/ subversion/tests/cmdline/ subversion/tests/cmdline/svnsync_tests_data/ subversion/tests/cmdline/svntest/

2011-05-20 Thread stsp
Author: stsp
Date: Fri May 20 13:46:01 2011
New Revision: 1125384

URL: http://svn.apache.org/viewvc?rev=1125384&view=rev
Log:
Reintegrate the 1.6.x-issue3641 branch.

 * r962377, r962378, r1036978, r1037762, r1063572, r1063573, r1063592
   Fix issue #3641 svnsync handling of directory copyfrom.
   Justification:
 Could lead to sync'd repositories being different from the master.
   Concerns:
 http://article.gmane.org/gmane.comp.version-control.subversion.devel/120590
   Branch:
 ^/subversion/branches/1.6.x-issue3641
 All the revisions merge cleanly, the branch is only needed for a slight
 tweak to the expected dump file for svnsync test 29, to account for the
 differences in how 1.6 prints property hashes and how 1.7 does it, see
 r966458.
   Notes:
 See also the r1036429 group.
   Votes:
 +1: pburba, cmpilato, philip
 -0: danielsh (authz concerns on the original fix)

Added:

subversion/branches/1.6.x/subversion/tests/cmdline/svnsync_tests_data/descend_into_replace.dump
  - copied unchanged from r1125381, 
subversion/branches/1.6.x-issue3641/subversion/tests/cmdline/svnsync_tests_data/descend_into_replace.dump

subversion/branches/1.6.x/subversion/tests/cmdline/svnsync_tests_data/descend_into_replace.expected.dump
  - copied unchanged from r1125381, 
subversion/branches/1.6.x-issue3641/subversion/tests/cmdline/svnsync_tests_data/descend_into_replace.expected.dump
Modified:
subversion/branches/1.6.x/   (props changed)
subversion/branches/1.6.x/CHANGES   (props changed)
subversion/branches/1.6.x/STATUS
subversion/branches/1.6.x/subversion/libsvn_repos/replay.c
subversion/branches/1.6.x/subversion/tests/cmdline/merge_tests.py   (props 
changed)
subversion/branches/1.6.x/subversion/tests/cmdline/svnsync_tests.py
subversion/branches/1.6.x/subversion/tests/cmdline/svntest/main.py   (props 
changed)

Propchange: subversion/branches/1.6.x/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May 20 13:46:01 2011
@@ -18,6 +18,7 @@
 /subversion/branches/1.6.x-issue3573:906488-923765
 /subversion/branches/1.6.x-issue3605:923668-923887
 /subversion/branches/1.6.x-issue3623:952794-956049
+/subversion/branches/1.6.x-issue3641:1072041-1125381
 /subversion/branches/1.6.x-issue3646:957327-1002699
 /subversion/branches/1.6.x-issue3648:964172-1001805
 /subversion/branches/1.6.x-issue3651:952977-954985
@@ -116,4 +117,4 @@
 /subversion/branches/tc_url_rev:874351-874483
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
-/subversion/trunk:875965,875968,876004,876012,876017,876019,876022,876024,876032,876041-876042,876048,876051,876055-876056,876059,876083,876091,876097,876101,876104,876109,876123-876125,876129,876132,876138,876160,876167,876175,876180,876185,876205,876223-876225,876230,876233,876245,876252,876256,876283,876287,876312,876326-876327,876330,876366,876372,876374,876376,876383,876386,876442,876456-876457,876462-876464,876467,876469,876480,876486,876495-876497,876516-876518,876524,876526,876583,876601,876614-876615,876628,876633,876641,876645,876659,876687,876689,876705,876715,876726,876760,876763,876794,876804,876815-876816,876821,876825,876837,876840-876841,876843,876849,876857-876858,876862,876873,876890,876897,876905,876908,876925,876931,876934,876948-876949,876953,876987,876993,877011,877014,877016,877028-877029,877038,877119,877127,877146,877157,877191,877195,877203,877211,877230,877234,877237,877243,877249,877259,877261,877304,877319,877407,877437,877441-877442,877453,87745
 
9,877472,877544,877553,877565,877568,877573,877593,877595,877597,877601,877612,877665,877667,877681,877692,877696,877701,877720,877730,877784,877793,877797,877809,877814-877815,877819,877821,877842,877848,877853,877867,877869,877873,877901,877909,877916,877931,877942,877953,877964,877968,877970,877981-877982,878005,878013,878015,878020,878046,878053,878062,878074,878080,878089,878091,878093,878095,878127,878129,878131,878142,878173-878176,878216,878240,878242,878255,878269,878272,878279,878296-878297,878303,878321,878335,878338,878341,878343,878353,878364,878367-878368,878385,878399,878423,878426,878447,878462,878484,878491,878498,878532,878590,878595,878607,878625-878627,878646,878659,878673,878682-878683,878690-878691,878693,878723,878760-878761,878873,878875,878877,878879,878905,878910-878911,878915-878916,878924-878925,878946,878949,878955,878960,878970,878981,879001,879033,879056,879074,879076,879081-879082,879093,879105,879126,879148,879170,879198-879199,879201,879271,
 
879293,879357,879375-879376,879403,879631,879635-879636,879688,879709-879711,879747,879902,879916,879954,879961,879966,879971,880027,880082,880095,880105,880146,880162,880226,880274-880275,880370,880450,880461,880474,880525-880526,880552,881905,884842,886164,886197,888715,888979,889081,889840,891672,892050,892085,895514,895653,896522,896915,898048,8

svn commit: r1125383 - /subversion/trunk/contrib/hook-scripts/hook_toolbox.py

2011-05-20 Thread neels
Author: neels
Date: Fri May 20 13:45:41 2011
New Revision: 1125383

URL: http://svn.apache.org/viewvc?rev=1125383&view=rev
Log:
* contrib/hook-scripts/hook_toolbox.py: Add ISC license.

Suggested by: stsp, sbutler

Modified:
subversion/trunk/contrib/hook-scripts/hook_toolbox.py

Modified: subversion/trunk/contrib/hook-scripts/hook_toolbox.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/contrib/hook-scripts/hook_toolbox.py?rev=1125383&r1=1125382&r2=1125383&view=diff
==
--- subversion/trunk/contrib/hook-scripts/hook_toolbox.py (original)
+++ subversion/trunk/contrib/hook-scripts/hook_toolbox.py Fri May 20 13:45:41 
2011
@@ -1,3 +1,17 @@
+# Copyright (c) 2011 elego Software Solutions GmbH 
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
 # Python module helpful for writing hook scripts.
 #
 # This is mostly an example for calling 'svnlook' and 'svn' from Python hooks




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

2011-05-20 Thread sbutler
Author: sbutler
Date: Fri May 20 13:41:41 2011
New Revision: 1125380

URL: http://svn.apache.org/viewvc?rev=1125380&view=rev
Log:
* STATUS: Vote for the r1076730 (issue 3650) group, approving it.

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=1125380&r1=1125379&r2=1125380&view=diff
==
--- subversion/branches/1.6.x/STATUS (original)
+++ subversion/branches/1.6.x/STATUS Fri May 20 13:41:41 2011
@@ -15,16 +15,6 @@ Status of 1.6.17:
 Candidate changes:
 ==
 
- * r1076730, r1078954, r1081255
-   Fix issue #3650 "log -g produces excessive duplicate output"
-   Justification:
- Eliminates potentially massive duplication when tracing logs
- across merge reintegrations.
-   Branch:
- ^/subversion/branches/1.6.x-issue3650
-   Votes:
- +1: pburba, stsp
-
 Veto-blocked changes:
 =
 
@@ -213,3 +203,13 @@ Approved changes:
Votes:
  +1: pburba, cmpilato, philip
  -0: danielsh (authz concerns on the original fix)
+
+ * r1076730, r1078954, r1081255
+   Fix issue #3650 "log -g produces excessive duplicate output"
+   Justification:
+ Eliminates potentially massive duplication when tracing logs
+ across merge reintegrations.
+   Branch:
+ ^/subversion/branches/1.6.x-issue3650
+   Votes:
+ +1: pburba, stsp, sbutler




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

2011-05-20 Thread stsp
Author: stsp
Date: Fri May 20 13:38:29 2011
New Revision: 1125379

URL: http://svn.apache.org/viewvc?rev=1125379&view=rev
Log:
* subversion/libsvn_wc/wc_db.c (flush_entries): Add docstring.

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=1125379&r1=1125378&r2=1125379&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri May 20 13:38:29 2011
@@ -1199,7 +1199,10 @@ gather_repo_children(const apr_array_hea
 }
 
 
-/* */
+/* Flush the access baton for LOCAL_ABSPATH from the access baton cache in
+ * WCROOT. This function must be called when the access baton cache goes
+ * stale, i.e. data about LOCAL_ABSPATH will need to be read again from disk.
+ * Use SCRATCH_POOL for temporary allocations. */
 static svn_error_t *
 flush_entries(svn_wc__db_wcroot_t *wcroot,
   const char *local_abspath,




svn commit: r1125370 - /subversion/trunk/contrib/hook-scripts/hook_toolbox.py

2011-05-20 Thread neels
Author: neels
Date: Fri May 20 13:10:32 2011
New Revision: 1125370

URL: http://svn.apache.org/viewvc?rev=1125370&view=rev
Log:
* contrib/hook-scripts/hook_toolbox.py: Add file, courtesy of elego.

Added:
subversion/trunk/contrib/hook-scripts/hook_toolbox.py

Added: subversion/trunk/contrib/hook-scripts/hook_toolbox.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/contrib/hook-scripts/hook_toolbox.py?rev=1125370&view=auto
==
--- subversion/trunk/contrib/hook-scripts/hook_toolbox.py (added)
+++ subversion/trunk/contrib/hook-scripts/hook_toolbox.py Fri May 20 13:10:32 
2011
@@ -0,0 +1,124 @@
+# Python module helpful for writing hook scripts.
+#
+# This is mostly an example for calling 'svnlook' and 'svn' from Python hooks
+# and for reading simple configuration files. While it's an example, this may
+# also be useful in a production environment as is.
+#
+# To use this, place this file next to your python hook scripts (e.g. in
+# 'repos/hooks/'). To be able use these functions, you may simply write:
+#   from hook_toolbox import *
+
+# NOTE: Adjust the BIN_PATH according to your operating system, to get valid
+# paths to your binaries (e.g. '/usr/bin/svnlook'):
+BIN_PATH = '/usr/bin'
+
+
+import sys, os, subprocess, shlex
+
+
+def get_log_message(*args):
+  '''Synopsis:
+   get_log_message(repos, '-t', transaction)   (from pre-commit hook)
+   get_log_message(repos, '-r', revision)  (from post-commit hook)
+ Returns the log message as a string.
+  '''
+  cmd = [os.path.join(BIN_PATH, 'svnlook'), 'propget', '--revprop']
+  cmd.extend(args)
+  cmd.append('svn:log')
+  return run(*cmd)
+
+
+def get_changed_paths(*args):
+  '''Synopsis:
+   get_changed_paths(repos, '-t', transaction)   (from pre-commit hook)
+   get_changed_paths(repos, '-r', revision)  (from post-commit hook)
+ Returns the list of changed paths, relative to the repository root.
+  '''
+  cmd = [os.path.join(BIN_PATH, 'svnlook'), 'changed']
+  cmd.extend(args)
+  changes = run(*cmd)
+  #print changes
+
+  # First four chars of each svnlook output line show the kind of change.
+  # The rest of the line is the complete repository path. See:
+  # http://svnbook.red-bean.com/nightly/en/svn.ref.svnlook.c.changed.html
+  changed_paths = [ line[4:] for line in changes.split('\n') if len(line) > 4 ]
+
+  #print '%s:\n '%(' '.join(args)), '\n  '.join(changed_paths)
+  return changed_paths
+
+  
+def has_path_changed(path, changed_paths):
+  '''Returns True if any changed path begins with the given path.
+ path: A path relative to the repos root, without leading slash.
+ changed_paths: A list obtained from the function get_changed_paths().'''
+
+  for changed_path in changed_paths:
+if changed_path.startswith(path):
+  return True
+  return False
+
+
+def read_config(repos, filename, expected_tokens_per_line=-1):
+  '''Reads the file /conf/ line wise and tokenizes each
+  line according to shell syntax rules. For example, a file like
+
+   # comments & blank lines ignored
+
+   aaa bb
+    "d d d" ee
+   ff
+
+  would return a list
+
+   [ ['aaa', 'bb'],
+ ['', 'd d d', 'ee'],
+ ['ff']   ]
+
+  If expected_tokens_per_line is > 0, then only the lines matching the
+  given number of tokens are returned. In above example, passing
+  expected_tokens_per_line=2 would yield just:
+
+   [ ['aaa', 'bb'] ]
+
+  Returns an empty list if no such config file exists.
+  '''
+  path = os.path.join(repos, 'conf', filename)
+  if not os.path.exists(path):
+print 'Not present:', path
+return []
+
+  config_lines = open(path).readlines()
+
+  tokenized_lines = [ shlex.split(line, True) for line in config_lines ]
+  tokenized_lines = [ tokens for tokens in tokenized_lines if tokens ]
+
+  if expected_tokens_per_line < 1:
+return tokenized_lines
+
+  matching_lines = [ tokens for tokens in tokenized_lines
+ if len(tokens) == expected_tokens_per_line ]
+
+  if len(matching_lines) < len(tokenized_lines):
+print '*** %d syntax errors in %s' % (
+ len(tokenized_lines) - len(matching_lines),
+ path)
+
+  return matching_lines
+
+
+def update_working_copy(wc_path):
+  if not os.path.exists(wc_path):
+print '--> *** Cannot find working copy', wc_path
+return None
+  return run(os.path.join(BIN_PATH, 'svn'), 'update', wc_path)
+
+
+def run(*cmd):
+  '''Call the given command & args and return what it printed to stdout.
+ e.g. result = run('/usr/bin/svn', 'info', wc_dir_path) '''
+  print '-->', ' '.join(cmd)
+  stdout = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
+  print stdout.strip()
+  return stdout
+




svn commit: r1125363 - /subversion/trunk/tools/dev/unix-build/Makefile.svn

2011-05-20 Thread stsp
Author: stsp
Date: Fri May 20 12:57:37 2011
New Revision: 1125363

URL: http://svn.apache.org/viewvc?rev=1125363&view=rev
Log:
* tools/dev/unix-build/Makefile.svn: Optionally put authz short_circuit option
   into httpd config file.

Modified:
subversion/trunk/tools/dev/unix-build/Makefile.svn

Modified: subversion/trunk/tools/dev/unix-build/Makefile.svn
URL: 
http://svn.apache.org/viewvc/subversion/trunk/tools/dev/unix-build/Makefile.svn?rev=1125363&r1=1125362&r2=1125363&view=diff
==
--- subversion/trunk/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/trunk/tools/dev/unix-build/Makefile.svn Fri May 20 12:57:37 2011
@@ -32,6 +32,7 @@ ENABLE_JAVA_BINDINGS ?= no # they don't 
 USE_APR_ICONV ?= no # set to yes to use APR iconv instead of GNU iconv
 PARALLEL ?= PARALLEL=1 CLEANUP=1
 USE_HTTPV1 ?= no
+USE_AUTHZ_SHORT_CIRCUIT ?= no
 
 PWD= $(shell pwd)
 UNAME  = $(shell uname)
@@ -1050,6 +1051,9 @@ httpd-conf:
 ifeq ($(USE_HTTPV1),yes)
echo "SVNAdvertiseV2Protocol off" >> $(HTTPD_CHECK_CONF)
 endif
+ifeq ($(USE_AUTHZ_SHORT_CIRCUIT),yes)
+   echo "SVNPathAuthz short_circuit" >> $(HTTPD_CHECK_CONF)
+endif
echo "" >> $(HTTPD_CHECK_CONF)
echo "" >> $(HTTPD_CHECK_CONF)
echo "DAV svn" >> $(HTTPD_CHECK_CONF)
@@ -1062,6 +1066,9 @@ endif
 ifeq ($(USE_HTTPV1),yes)
echo "SVNAdvertiseV2Protocol off" >> $(HTTPD_CHECK_CONF)
 endif
+ifeq ($(USE_AUTHZ_SHORT_CIRCUIT),yes)
+   echo "SVNPathAuthz short_circuit" >> $(HTTPD_CHECK_CONF)
+endif
echo "" >> $(HTTPD_CHECK_CONF)
echo "# This Location lets you access repositories dropped in /tmp/" >> 
$(HTTPD_CHECK_CONF)
echo "" >> $(HTTPD_CHECK_CONF)
@@ -1071,6 +1078,9 @@ endif
 ifeq ($(USE_HTTPV1),yes)
echo "SVNAdvertiseV2Protocol off" >> $(HTTPD_CHECK_CONF)
 endif
+ifeq ($(USE_AUTHZ_SHORT_CIRCUIT),yes)
+   echo "SVNPathAuthz short_circuit" >> $(HTTPD_CHECK_CONF)
+endif
echo "" >> $(HTTPD_CHECK_CONF)
echo 'RedirectMatch permanent 
^/svn-test-work/repositories/REDIRECT-PERM-(.*)$$ 
/svn-test-work/repositories/$$1' >> $(HTTPD_CHECK_CONF)
echo 'RedirectMatch ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)$$ 
/svn-test-work/repositories/$$1' >> $(HTTPD_CHECK_CONF)




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

2011-05-20 Thread philip
Author: philip
Date: Fri May 20 12:49:18 2011
New Revision: 1125361

URL: http://svn.apache.org/viewvc?rev=1125361&view=rev
Log:
* STATUS: vote/approve issue 3641 branch

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=1125361&r1=1125360&r2=1125361&view=diff
==
--- subversion/branches/1.6.x/STATUS (original)
+++ subversion/branches/1.6.x/STATUS Fri May 20 12:49:18 2011
@@ -15,25 +15,6 @@ Status of 1.6.17:
 Candidate changes:
 ==
 
- * r962377, r962378, r1036978, r1037762, r1063572, r1063573, r1063592
-   Fix issue #3641 svnsync handling of directory copyfrom.
-   Justification:
- Could lead to sync'd repositories being different from the master.
-   Concerns:
- 
http://article.gmane.org/gmane.comp.version-control.subversion.devel/120590
-   Branch:
- ^/subversion/branches/1.6.x-issue3641
- All the revisions merge cleanly, the branch is only needed for a slight
- tweak to the expected dump file for svnsync test 29, to account for the
- differences in how 1.6 prints property hashes and how 1.7 does it, see
- r966458.
-   Notes:
- See also the r1036429 group.
-   Votes:
- +1: philip (r962377, r962378, r1063572, r1063573, r1063592 only)
- +1: pburba, cmpilato
- -0: danielsh (authz concerns on the original fix)
-
  * r1076730, r1078954, r1081255
Fix issue #3650 "log -g produces excessive duplicate output"
Justification:
@@ -214,3 +195,21 @@ Veto-blocked changes:
 
 Approved changes:
 =
+
+ * r962377, r962378, r1036978, r1037762, r1063572, r1063573, r1063592
+   Fix issue #3641 svnsync handling of directory copyfrom.
+   Justification:
+ Could lead to sync'd repositories being different from the master.
+   Concerns:
+ 
http://article.gmane.org/gmane.comp.version-control.subversion.devel/120590
+   Branch:
+ ^/subversion/branches/1.6.x-issue3641
+ All the revisions merge cleanly, the branch is only needed for a slight
+ tweak to the expected dump file for svnsync test 29, to account for the
+ differences in how 1.6 prints property hashes and how 1.7 does it, see
+ r966458.
+   Notes:
+ See also the r1036429 group.
+   Votes:
+ +1: pburba, cmpilato, philip
+ -0: danielsh (authz concerns on the original fix)




svn commit: r1125351 - /subversion/trunk/subversion/libsvn_ra_neon/fetch.c

2011-05-20 Thread ivan
Author: ivan
Date: Fri May 20 12:36:13 2011
New Revision: 1125351

URL: http://svn.apache.org/viewvc?rev=1125351&view=rev
Log:
* subversion/libsvn_ra_neon/fetch.c
  (svn_ra_neon__get_dir): Discover deadprop-count support only if caller 
   requested SVN_DIRENT_HAS_PROPS information.

Modified:
subversion/trunk/subversion/libsvn_ra_neon/fetch.c

Modified: subversion/trunk/subversion/libsvn_ra_neon/fetch.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/fetch.c?rev=1125351&r1=1125350&r2=1125351&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/fetch.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/fetch.c Fri May 20 12:36:13 2011
@@ -823,20 +823,23 @@ svn_error_t *svn_ra_neon__get_dir(svn_ra
 {
   ne_propname *which_props;
   svn_boolean_t supports_deadprop_count;
-  const svn_string_t *deadprop_count;
 
   /* For issue 2151: See if we are dealing with a server that
  understands the deadprop-count property.  If it doesn't, we'll
  need to do an allprop PROPFIND.  If it does, we'll execute a more
  targeted PROPFIND. */
-  SVN_ERR(svn_ra_neon__get_props_resource(&rsrc, ras, final_url, NULL,
-  deadprop_count_support_props,
-  pool));
-  deadprop_count = apr_hash_get(rsrc->propset,
-SVN_RA_NEON__PROP_DEADPROP_COUNT,
-APR_HASH_KEY_STRING);
-  supports_deadprop_count = (deadprop_count != NULL);
+  if (dirent_fields & SVN_DIRENT_HAS_PROPS)
+{
+  const svn_string_t *deadprop_count;
 
+  SVN_ERR(svn_ra_neon__get_props_resource(&rsrc, ras, final_url, NULL,
+  deadprop_count_support_props,
+  pool));
+  deadprop_count = apr_hash_get(rsrc->propset,
+SVN_RA_NEON__PROP_DEADPROP_COUNT,
+APR_HASH_KEY_STRING);
+  supports_deadprop_count = (deadprop_count != NULL);
+}
 
   /* if we didn't ask for the has_props field, we can get individual
  properties. */




RE: svn commit: r1125313 - /subversion/trunk/subversion/libsvn_client/externals.c

2011-05-20 Thread Bert Huijben
A pointer to this variable is used outside that inner scope!

I added that comment to document that problem as it may cause segfaults.

Bert Huijben (Cell phone) From: phi...@apache.org
Sent: vrijdag 20 mei 2011 12:24
To: commits@subversion.apache.org
Subject: svn commit: r1125313
- /subversion/trunk/subversion/libsvn_client/externals.c
Author: philip
Date: Fri May 20 10:23:42 2011
New Revision: 1125313

URL: http://svn.apache.org/viewvc?rev=1125313&view=rev
Log:
* subversion/libsvn_client/externals.c
  (handle_external_item_change): Move a variable to an inner scope
   to avoid a shadowing warning.

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

Modified: subversion/trunk/subversion/libsvn_client/externals.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/externals.c?rev=1125313&r1=1125312&r2=1125313&view=diff
==
--- subversion/trunk/subversion/libsvn_client/externals.c (original)
+++ subversion/trunk/subversion/libsvn_client/externals.c Fri May 20
10:23:42 2011
@@ -701,7 +701,6 @@ handle_external_item_change(const struct
 apr_pool_t *scratch_pool)
 {
   svn_ra_session_t *ra_session;
-  svn_node_kind_t kind; /* Stored as pointer in ra_cache */
   svn_client__ra_session_from_path_results ra_cache = { 0 };
   const char *local_abspath;
   const char *old_url;
@@ -762,6 +761,8 @@ handle_external_item_change(const struct
  determine if the external is a file or directory. */
   if (new_item)
 {
+  svn_node_kind_t kind;
+
   /* Get the RA connection. */
   SVN_ERR(svn_client__ra_session_from_path(&ra_session,
&ra_cache.ra_revnum,


Re: svn commit: r1124207 - /subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c

2011-05-20 Thread Julian Foad
Daniel Shahaf wrote:
> Perhaps change 'svnserve -M' too, for consistency?
> 
> stef...@apache.org wrote on Wed, May 18, 2011 at 11:53:54 -:
> > Make the SVNInMemoryCacheSize mod_dav_svn module setting interpret
> > its parameter value as "kB" instead of "MB". This is more in line with how
> > all other Apache settings are being handled.
> > 
> > * subversion/mod_dav_svn/mod_dav_svn.c
> >   (SVNInMemoryCacheSize_cmd): interpret parameter as "kB" instead of "MB"
> >   (cmds): update short user doc string
[...]
> > Modified: subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c
[...]
> > -  settings.cache_size = value * 0x10;
> > +  settings.cache_size = value * 0x400;
> >  
> >svn_set_cache_config(&settings);
> >  
> > @@ -931,8 +931,8 @@ static const command_rec cmds[] =
> >/* per server */
> >AP_INIT_TAKE1("SVNInMemoryCacheSize", SVNInMemoryCacheSize_cmd, NULL,
> >  RSRC_CONF,
> > -"specifies the maximum size im MB per process of 
> > Subversion's "
> > -"in-memory object cache (default value is 16; 0 
> > deactivates "
> > +"specifies the maximum size im kB per process of 
> > Subversion's "

Not introduced by this patch, but: "im kB" -> "in kB".

> > +"in-memory object cache (default value is 16384; 0 
> > deactivates "
> >  "the cache)."),

- Julian




svn commit: r1125343 - /subversion/trunk/subversion/libsvn_ra_neon/fetch.c

2011-05-20 Thread ivan
Author: ivan
Date: Fri May 20 12:14:59 2011
New Revision: 1125343

URL: http://svn.apache.org/viewvc?rev=1125343&view=rev
Log:
* subversion/libsvn_ra_neon/fetch.c
  (svn_ra_neon__get_dir): Tighten variable scope.

Suggested by: gstein

Modified:
subversion/trunk/subversion/libsvn_ra_neon/fetch.c

Modified: subversion/trunk/subversion/libsvn_ra_neon/fetch.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/fetch.c?rev=1125343&r1=1125342&r2=1125343&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/fetch.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/fetch.c Fri May 20 12:14:59 2011
@@ -797,7 +797,6 @@ svn_error_t *svn_ra_neon__get_dir(svn_ra
   const char *final_url;
   apr_size_t final_url_n_components;
   svn_ra_neon__session_t *ras = session->priv;
-  const svn_string_t *deadprop_count;
   const char *url = svn_path_url_add_component2(ras->url->data, path, pool);
 
   /* If the revision is invalid (HEAD), then we're done -- just fetch
@@ -824,6 +823,7 @@ svn_error_t *svn_ra_neon__get_dir(svn_ra
 {
   ne_propname *which_props;
   svn_boolean_t supports_deadprop_count;
+  const svn_string_t *deadprop_count;
 
   /* For issue 2151: See if we are dealing with a server that
  understands the deadprop-count property.  If it doesn't, we'll




svn propchange: r1125316 - svn:log

2011-05-20 Thread stefan2
Author: stefan2
Revision: 1125316
Modified property: svn:log

Modified: svn:log at Fri May 20 12:09:36 2011
--
--- svn:log (original)
+++ svn:log Fri May 20 12:09:36 2011
@@ -1,3 +1,5 @@
+Reverted in r1125340.
+
 Fix build breakage: teach the preprocessor to simply ignore SVN_DBG
 in non-debug builds.
 



svn commit: r1125340 - /subversion/trunk/subversion/include/private/svn_debug.h

2011-05-20 Thread stefan2
Author: stefan2
Date: Fri May 20 12:08:26 2011
New Revision: 1125340

URL: http://svn.apache.org/viewvc?rev=1125340&view=rev
Log:
Basically revert r1125316 but keep the "non-debug" section in the code
and explain why we don't define SVN_DBG there. Obviously, people like
me tend not to read the whole file before making changes ...

* subversion/include/private/svn_debug.h
  (SVN_DBG): don't define that in non-SVN_DEBUG mode; 
 put a comment just there

Modified:
subversion/trunk/subversion/include/private/svn_debug.h

Modified: subversion/trunk/subversion/include/private/svn_debug.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_debug.h?rev=1125340&r1=1125339&r2=1125340&view=diff
==
--- subversion/trunk/subversion/include/private/svn_debug.h (original)
+++ subversion/trunk/subversion/include/private/svn_debug.h Fri May 20 12:08:26 
2011
@@ -87,7 +87,7 @@ svn_dbg__printf(const char *fmt, ...)
 
 #else /* SVN_DEBUG */
 
-#define SVN_DBG(ARGS) (void)
+/* We DON'T define SVN_DBG in release mode. See top of this file. */
 
 #endif /* SVN_DEBUG */
 #endif /* SVN_DEBUG_H */




svn commit: r1125338 - /subversion/trunk/subversion/libsvn_fs_fs/caching.c

2011-05-20 Thread stefan2
Author: stefan2
Date: Fri May 20 12:01:39 2011
New Revision: 1125338

URL: http://svn.apache.org/viewvc?rev=1125338&view=rev
Log:
Prepare for SVN_DBG being reverted to its previous definition.

* subversion/libsvn_fs_fs/caching.c
  (dump_cache_statistics): disable the stats output code in release mode

Suggested by: greg

Modified:
subversion/trunk/subversion/libsvn_fs_fs/caching.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/caching.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/caching.c?rev=1125338&r1=1125337&r2=1125338&view=diff
==
--- subversion/trunk/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/caching.c Fri May 20 12:01:39 2011
@@ -104,7 +104,9 @@ dump_cache_statistics(void *baton_void)
   for (i = 0; i < lines->nelts; ++i)
 {
   const char *line = APR_ARRAY_IDX(lines, i, const char *);
+#ifdef SVN_DEBUG
   SVN_DBG(("%s\n", line));
+#endif
 }
 }
 




svn commit: r1125332 - /subversion/trunk/subversion/libsvn_ra_neon/fetch.c

2011-05-20 Thread ivan
Author: ivan
Date: Fri May 20 11:31:42 2011
New Revision: 1125332

URL: http://svn.apache.org/viewvc?rev=1125332&view=rev
Log:
* subversion/libsvn_ra_neon/fetch.c
  (svn_ra_neon__get_dir): Query for deadprop-count support only if caller
   requested directory entries.

Modified:
subversion/trunk/subversion/libsvn_ra_neon/fetch.c

Modified: subversion/trunk/subversion/libsvn_ra_neon/fetch.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/fetch.c?rev=1125332&r1=1125331&r2=1125332&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/fetch.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/fetch.c Fri May 20 11:31:42 2011
@@ -796,7 +796,6 @@ svn_error_t *svn_ra_neon__get_dir(svn_ra
   apr_hash_t *resources;
   const char *final_url;
   apr_size_t final_url_n_components;
-  svn_boolean_t supports_deadprop_count;
   svn_ra_neon__session_t *ras = session->priv;
   const svn_string_t *deadprop_count;
   const char *url = svn_path_url_add_component2(ras->url->data, path, pool);
@@ -821,21 +820,23 @@ svn_error_t *svn_ra_neon__get_dir(svn_ra
 *fetched_rev = got_rev;
 }
 
-  /* For issue 2151: See if we are dealing with a server that
- understands the deadprop-count property.  If it doesn't, we'll
- need to do an allprop PROPFIND.  If it does, we'll execute a more
- targeted PROPFIND. */
-  SVN_ERR(svn_ra_neon__get_props_resource(&rsrc, ras, final_url, NULL,
-  deadprop_count_support_props,
-  pool));
-  deadprop_count = apr_hash_get(rsrc->propset,
-SVN_RA_NEON__PROP_DEADPROP_COUNT,
-APR_HASH_KEY_STRING);
-  supports_deadprop_count = (deadprop_count != NULL);
-
   if (dirents)
 {
   ne_propname *which_props;
+  svn_boolean_t supports_deadprop_count;
+
+  /* For issue 2151: See if we are dealing with a server that
+ understands the deadprop-count property.  If it doesn't, we'll
+ need to do an allprop PROPFIND.  If it does, we'll execute a more
+ targeted PROPFIND. */
+  SVN_ERR(svn_ra_neon__get_props_resource(&rsrc, ras, final_url, NULL,
+  deadprop_count_support_props,
+  pool));
+  deadprop_count = apr_hash_get(rsrc->propset,
+SVN_RA_NEON__PROP_DEADPROP_COUNT,
+APR_HASH_KEY_STRING);
+  supports_deadprop_count = (deadprop_count != NULL);
+
 
   /* if we didn't ask for the has_props field, we can get individual
  properties. */




svn commit: r1125328 - in /subversion/trunk/subversion/libsvn_ra_neon: commit.c props.c ra_neon.h

2011-05-20 Thread ivan
Author: ivan
Date: Fri May 20 11:23:42 2011
New Revision: 1125328

URL: http://svn.apache.org/viewvc?rev=1125328&view=rev
Log:
* subversion/libsvn_ra_neon/ra_neon.h
* subversion/libsvn_ra_neon/props.c
  (svn_ra_neon__get_starting_props): Remove unused label argument. Since all 
   callers provide NULL now.
  (svn_ra_neon__search_for_starting_props, svn_ra_neon__do_check_path): 
   Update callers.

* subversion/libsvn_ra_neon/commit.c
  (commit_add_file): Update callers.

Modified:
subversion/trunk/subversion/libsvn_ra_neon/commit.c
subversion/trunk/subversion/libsvn_ra_neon/props.c
subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h

Modified: subversion/trunk/subversion/libsvn_ra_neon/commit.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/commit.c?rev=1125328&r1=1125327&r2=1125328&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/commit.c Fri May 20 11:23:42 2011
@@ -1185,9 +1185,9 @@ static svn_error_t * commit_add_file(con
   public_url = svn_path_url_add_component2(file->cc->ras->url->data,
path, workpool);
   err1 = svn_ra_neon__get_starting_props(&res, file->cc->ras,
- put_target, NULL, workpool);
+ put_target, workpool);
   err2 = svn_ra_neon__get_starting_props(&res, file->cc->ras,
- public_url, NULL, workpool);
+ public_url, workpool);
   if (! err1 && ! err2)
 {
   /* If the PROPFINDs succeed the file already exists */

Modified: subversion/trunk/subversion/libsvn_ra_neon/props.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/props.c?rev=1125328&r1=1125327&r2=1125328&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/props.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/props.c Fri May 20 11:23:42 2011
@@ -646,12 +646,11 @@ svn_error_t * svn_ra_neon__get_one_prop(
 svn_error_t * svn_ra_neon__get_starting_props(svn_ra_neon__resource_t **rsrc,
   svn_ra_neon__session_t *sess,
   const char *url,
-  const char *label,
   apr_pool_t *pool)
 {
   svn_string_t *propval;
 
-  SVN_ERR(svn_ra_neon__get_props_resource(rsrc, sess, url, label,
+  SVN_ERR(svn_ra_neon__get_props_resource(rsrc, sess, url, NULL,
   starting_props, pool));
 
   /* Cache some of the resource information. */
@@ -738,7 +737,7 @@ svn_ra_neon__search_for_starting_props(s
 {
   svn_pool_clear(iterpool);
   err = svn_ra_neon__get_starting_props(rsrc, sess, path_s->data,
-NULL, iterpool);
+iterpool);
   if (! err)
 break;   /* found an existing, readable parent! */
 
@@ -1346,8 +1345,7 @@ svn_ra_neon__do_check_path(svn_ra_sessio
 pool);
 
   /* query the DAV:resourcetype of the full, assembled URL. */
-  err = svn_ra_neon__get_starting_props(&rsrc, ras, full_bc_url,
-NULL, pool);
+  err = svn_ra_neon__get_starting_props(&rsrc, ras, full_bc_url, pool);
   if (! err)
 is_dir = rsrc->is_collection;
 }

Modified: subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h?rev=1125328&r1=1125327&r2=1125328&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h Fri May 20 11:23:42 
2011
@@ -483,7 +483,6 @@ svn_error_t * svn_ra_neon__get_props_res
 svn_error_t * svn_ra_neon__get_starting_props(svn_ra_neon__resource_t **rsrc,
   svn_ra_neon__session_t *sess,
   const char *url,
-  const char *label,
   apr_pool_t *pool);
 
 /* Shared helper func: given a public URL which may not exist in HEAD,




svn propchange: r1125288 - svn:log

2011-05-20 Thread philip
Author: philip
Revision: 1125288
Modified property: svn:log

Modified: svn:log at Fri May 20 11:19:16 2011
--
--- svn:log (original)
+++ svn:log Fri May 20 11:19:16 2011
@@ -1,4 +1,4 @@
-Move a couple variables around and fix a intereger size mismatch.
+Move a couple variables around and fix a integer size mismatch.
 
 * subversion/svndumpfilter/main.c
   (write_prop_to_stringbuf): Use size_t.



svn commit: r1125327 - /subversion/trunk/subversion/svndumpfilter/main.c

2011-05-20 Thread philip
Author: philip
Date: Fri May 20 11:17:58 2011
New Revision: 1125327

URL: http://svn.apache.org/viewvc?rev=1125327&view=rev
Log:
* subversion/svndumpfilter/main.c
  (write_prop_to_stringbuf): Followup to r1125288, make format match type.

Modified:
subversion/trunk/subversion/svndumpfilter/main.c

Modified: subversion/trunk/subversion/svndumpfilter/main.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svndumpfilter/main.c?rev=1125327&r1=1125326&r2=1125327&view=diff
==
--- subversion/trunk/subversion/svndumpfilter/main.c (original)
+++ subversion/trunk/subversion/svndumpfilter/main.c Fri May 20 11:17:58 2011
@@ -90,7 +90,7 @@ write_prop_to_stringbuf(svn_stringbuf_t 
   namelen = strlen(name);
   svn_stringbuf_appendbytes(*strbuf, "K ", 2);
 
-  bytes_used = apr_snprintf(buf, sizeof(buf), "%d", namelen);
+  bytes_used = apr_snprintf(buf, sizeof(buf), "%" APR_SIZE_T_FMT, namelen);
   svn_stringbuf_appendbytes(*strbuf, buf, bytes_used);
   svn_stringbuf_appendbyte(*strbuf, '\n');
 




svn commit: r1125326 - /subversion/trunk/subversion/libsvn_ra_neon/props.c

2011-05-20 Thread ivan
Author: ivan
Date: Fri May 20 11:15:41 2011
New Revision: 1125326

URL: http://svn.apache.org/viewvc?rev=1125326&view=rev
Log:
ra_neon: Reduce number of HTTP requests for svn ls command to 11 from 14 
when working with HTTPv1 server.

* subversion/libsvn_ra_neon/props.c
  (svn_ra_neon__get_starting_props): Discover repository root from 
   baseline-relative-path.

Modified:
subversion/trunk/subversion/libsvn_ra_neon/props.c

Modified: subversion/trunk/subversion/libsvn_ra_neon/props.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/props.c?rev=1125326&r1=1125325&r2=1125326&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/props.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/props.c Fri May 20 11:15:41 2011
@@ -674,6 +674,27 @@ svn_error_t * svn_ra_neon__get_starting_
 sess->uuid = apr_pstrdup(sess->pool, propval->data);
 }
 
+  if (! sess->repos_root)
+{
+  propval = apr_hash_get((*rsrc)->propset,
+ SVN_RA_NEON__PROP_BASELINE_RELPATH,
+ APR_HASH_KEY_STRING);
+
+  if (propval)
+  {
+ne_uri uri;
+svn_stringbuf_t *urlbuf = svn_stringbuf_create(url, pool);
+
+svn_path_remove_components(urlbuf,
+   svn_path_component_count(propval->data));
+
+uri = sess->root;
+uri.path = urlbuf->data;
+
+sess->repos_root = svn_ra_neon__uri_unparse(&uri, sess->pool);
+  }
+}
+
   return SVN_NO_ERROR;
 }
 




svn commit: r1125316 - /subversion/trunk/subversion/include/private/svn_debug.h

2011-05-20 Thread stefan2
Author: stefan2
Date: Fri May 20 10:44:31 2011
New Revision: 1125316

URL: http://svn.apache.org/viewvc?rev=1125316&view=rev
Log:
Fix build breakage: teach the preprocessor to simply ignore SVN_DBG
in non-debug builds.

* subversion/include/private/svn_debug.h
  (SVN_DBG): define as no-op, if SVN_DEBUG has not been defined

Modified:
subversion/trunk/subversion/include/private/svn_debug.h

Modified: subversion/trunk/subversion/include/private/svn_debug.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_debug.h?rev=1125316&r1=1125315&r2=1125316&view=diff
==
--- subversion/trunk/subversion/include/private/svn_debug.h (original)
+++ subversion/trunk/subversion/include/private/svn_debug.h Fri May 20 10:44:31 
2011
@@ -85,5 +85,9 @@ svn_dbg__printf(const char *fmt, ...)
 }
 #endif /* __cplusplus */
 
+#else /* SVN_DEBUG */
+
+#define SVN_DBG(ARGS) (void)
+
 #endif /* SVN_DEBUG */
 #endif /* SVN_DEBUG_H */




svn commit: r1125315 - in /subversion/trunk/subversion/libsvn_ra_neon: options.c ra_neon.h util.c

2011-05-20 Thread ivan
Author: ivan
Date: Fri May 20 10:43:05 2011
New Revision: 1125315

URL: http://svn.apache.org/viewvc?rev=1125315&view=rev
Log:
ra_neon: Refactor and fix small memory leak.

* subversion/libsvn_ra_neon/ra_neon.h
* subversion/libsvn_ra_neon/util.c
  (svn_ra_neon__uri_unparse): New wrapper around ne_uri_unparse().

* subversion/libsvn_ra_neon/options.c
  (parse_capabilities): Use svn_ra_neon__uri_unparse().

Modified:
subversion/trunk/subversion/libsvn_ra_neon/options.c
subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h
subversion/trunk/subversion/libsvn_ra_neon/util.c

Modified: subversion/trunk/subversion/libsvn_ra_neon/options.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/options.c?rev=1125315&r1=1125314&r2=1125315&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/options.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/options.c Fri May 20 10:43:05 
2011
@@ -225,13 +225,10 @@ parse_capabilities(ne_request *req,
 }
   if ((val = ne_get_response_header(req, SVN_DAV_ROOT_URI_HEADER)))
 {
-  ne_uri root = ras->root;
-  char *root_uri;
+  ne_uri root_uri = ras->root;
 
-  root.path = (char *)val;
-  root_uri = ne_uri_unparse(&root);
-  ras->repos_root = apr_pstrdup(ras->pool, root_uri);
-  free(root_uri);
+  root_uri.path = (char *)val;
+  ras->repos_root = svn_ra_neon__uri_unparse(&root_uri, ras->pool);
 }
 
   /* HTTP v2 stuff */

Modified: subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h?rev=1125315&r1=1125314&r2=1125315&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h Fri May 20 10:43:05 
2011
@@ -1168,6 +1168,12 @@ svn_ra_neon__assemble_locktoken_body(svn
  apr_pool_t *pool);
 
 
+/* Wrapper around ne_uri_unparse(). Turns a URI structure back into a string.
+ * The returned string is allocated in POOL. */
+const char *
+svn_ra_neon__uri_unparse(const ne_uri *uri,
+ apr_pool_t *pool);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/trunk/subversion/libsvn_ra_neon/util.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/util.c?rev=1125315&r1=1125314&r2=1125315&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/util.c Fri May 20 10:43:05 2011
@@ -1578,3 +1578,23 @@ svn_ra_neon__request_get_location(svn_ra
   const char *val = ne_get_response_header(request->ne_req, "Location");
   return val ? svn_urlpath__canonicalize(val, pool) : NULL;
 }
+
+const char *
+svn_ra_neon__uri_unparse(const ne_uri *uri,
+ apr_pool_t *pool)
+{
+  char *unparsed_uri;
+  const char *result;
+
+  /* Unparse uri. */
+  unparsed_uri = ne_uri_unparse(uri);
+
+  /* Copy string to result pool. */
+  result = apr_pstrdup(pool, unparsed_uri);
+
+  /* Free neon's allocated copy. */
+  ne_free(unparsed_uri);
+
+  /* Return string allocated in result pool. */
+  return result;
+}




svn commit: r1125313 - /subversion/trunk/subversion/libsvn_client/externals.c

2011-05-20 Thread philip
Author: philip
Date: Fri May 20 10:23:42 2011
New Revision: 1125313

URL: http://svn.apache.org/viewvc?rev=1125313&view=rev
Log:
* subversion/libsvn_client/externals.c
  (handle_external_item_change): Move a variable to an inner scope
   to avoid a shadowing warning.

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

Modified: subversion/trunk/subversion/libsvn_client/externals.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/externals.c?rev=1125313&r1=1125312&r2=1125313&view=diff
==
--- subversion/trunk/subversion/libsvn_client/externals.c (original)
+++ subversion/trunk/subversion/libsvn_client/externals.c Fri May 20 10:23:42 
2011
@@ -701,7 +701,6 @@ handle_external_item_change(const struct
 apr_pool_t *scratch_pool)
 {
   svn_ra_session_t *ra_session;
-  svn_node_kind_t kind; /* Stored as pointer in ra_cache */
   svn_client__ra_session_from_path_results ra_cache = { 0 };
   const char *local_abspath;
   const char *old_url;
@@ -762,6 +761,8 @@ handle_external_item_change(const struct
  determine if the external is a file or directory. */
   if (new_item)
 {
+  svn_node_kind_t kind;
+
   /* Get the RA connection. */
   SVN_ERR(svn_client__ra_session_from_path(&ra_session,
&ra_cache.ra_revnum,




svn commit: r1125312 - /subversion/trunk/subversion/libsvn_fs_fs/caching.c

2011-05-20 Thread stefan2
Author: stefan2
Date: Fri May 20 10:21:04 2011
New Revision: 1125312

URL: http://svn.apache.org/viewvc?rev=1125312&view=rev
Log:
* subversion/libsvn_fs_fs/caching.c
  (init_callbacks, svn_fs_fs__initialize_caches, init_txn_callbacks,
   init_txn_callbacks, svn_fs_fs__initialize_txn_caches): add docstrings

Modified:
subversion/trunk/subversion/libsvn_fs_fs/caching.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/caching.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/caching.c?rev=1125312&r1=1125311&r2=1125312&view=diff
==
--- subversion/trunk/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/caching.c Fri May 20 10:21:04 2011
@@ -119,6 +119,13 @@ dump_cache_statistics(void *baton_void)
 }
 #endif /* DEBUG_CACHE_DUMP_STATS */
 
+/* This function sets / registers the required callbacks for a given
+ * not transaction-specific CACHE object in FS. 
+ * 
+ * All these svn_cache__t instances shall be handled uniformly. That 
+ * applies to the NO_HANDLER flag as well which controls whether the
+ * error handler will be sets for the cache.
+ */
 static svn_error_t *
 init_callbacks(svn_cache__t *cache,
svn_fs_t *fs,
@@ -155,6 +162,12 @@ init_callbacks(svn_cache__t *cache,
   return SVN_NO_ERROR;
 }
 
+/* Initialize all session-local caches in FS according to the global
+ * cache settings. Use POOL for allocations.
+ * 
+ * Please note that it is permissible for this function to set some
+ * or all of these caches to NULL, regardless of any setting.
+ */
 svn_error_t *
 svn_fs_fs__initialize_caches(svn_fs_t *fs,
  apr_pool_t *pool)
@@ -368,6 +381,10 @@ remove_txn_cache(void *baton_void)
   return  APR_SUCCESS;
 }
 
+/* This function sets / registers the required callbacks for a given
+ * transaction-specific *CACHE object. In particular, it will ensure
+ * that *CACHE gets reset to NULL upon POOL destruction latest.
+ */
 static void
 init_txn_callbacks(svn_cache__t **cache,
apr_pool_t *pool)
@@ -387,6 +404,13 @@ init_txn_callbacks(svn_cache__t **cache,
 }
 }
 
+/* Initialize all transaction-local caches in FS according to the global
+ * cache settings and make TXN_ID part of their key space. Use POOL for
+ * allocations.
+ * 
+ * Please note that it is permissible for this function to set some or all
+ * of these caches to NULL, regardless of any setting.
+ */
 svn_error_t *
 svn_fs_fs__initialize_txn_caches(svn_fs_t *fs,
  const char *txn_id,
@@ -442,6 +466,8 @@ svn_fs_fs__initialize_txn_caches(svn_fs_
   return SVN_NO_ERROR;
 }
 
+/* Make sure all transaction-local caches in FS are reset to NULL.
+ */
 void
 svn_fs_fs__reset_txn_caches(svn_fs_t *fs)
 {




svn commit: r1125311 - /subversion/trunk/win-tests.py

2011-05-20 Thread ivan
Author: ivan
Date: Fri May 20 10:17:02 2011
New Revision: 1125311

URL: http://svn.apache.org/viewvc?rev=1125311&view=rev
Log:
Add option to win-tests.py to enable SVNPathAuthz short_circuit mode 
when running tests.

* win-tests.py
  (_usage_exit): Document --http-short-circuit option.
  (): Parse --http-short-circuit option.
  (Httpd): Add SVNPathAuthz directive to generated Apache HTTP server 
   configuration file.

Modified:
subversion/trunk/win-tests.py

Modified: subversion/trunk/win-tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/win-tests.py?rev=1125311&r1=1125310&r2=1125311&view=diff
==
--- subversion/trunk/win-tests.py (original)
+++ subversion/trunk/win-tests.py Fri May 20 10:17:02 2011
@@ -77,6 +77,7 @@ def _usage_exit():
   print("  --httpd-daemon : Run Apache httpd as daemon")
   print("  --httpd-service: Run Apache httpd as Windows service 
(default)")
   print("  --http-library : dav library to use, neon (default) or 
serf")
+  print("  --http-short-circuit   : Use SVNPathAuthz short_circuit on HTTP 
server")
   print("  --disable-http-v2  : Do not advertise support for HTTPv2 on 
server")
   print("  --javahl   : Run the javahl tests instead of the normal 
tests")
   print("  --list : print test doc strings only")
@@ -124,7 +125,8 @@ opts, args = my_getopt(sys.argv[1:], 'hr
['release', 'debug', 'verbose', 'quiet', 'cleanup',
 'test=', 'url=', 'svnserve-args=', 'fs-type=', 
'asp.net-hack',
 'httpd-dir=', 'httpd-port=', 'httpd-daemon',
-'httpd-server', 'http-library=', 'disable-http-v2', 
'help',
+'httpd-server', 'http-library=', 'http-short-circuit',
+'disable-http-v2', 'help',
 'fsfs-packing', 'fsfs-sharding=', 'javahl',
 'list', 'enable-sasl', 'bin=', 'parallel',
 'config-file=', 'server-minor-version=',
@@ -144,6 +146,7 @@ run_httpd = None
 httpd_port = None
 httpd_service = None
 http_library = 'neon'
+http_short_circuit = False
 advertise_httpv2 = True
 list_tests = None
 milestone_filter = None
@@ -194,6 +197,8 @@ for opt, val in opts:
 httpd_service = 1
   elif opt == '--http-library':
 http_library = val
+  elif opt == '--http-short-circuit':
+http_short_circuit = True
   elif opt == 'disable-http-v2':
 advertise_httpv2 = False
   elif opt == '--fsfs-sharding':
@@ -418,7 +423,8 @@ class Svnserve:
 
 class Httpd:
   "Run httpd for DAV tests"
-  def __init__(self, abs_httpd_dir, abs_objdir, abs_builddir, httpd_port, 
service, httpv2):
+  def __init__(self, abs_httpd_dir, abs_objdir, abs_builddir, httpd_port,
+   service, httpv2, short_circuit):
 self.name = 'apache.exe'
 self.httpd_port = httpd_port
 self.httpd_dir = abs_httpd_dir
@@ -432,6 +438,11 @@ class Httpd:
 self.proc_handle = None
 self.path = os.path.join(self.httpd_dir, 'bin', self.name)
 
+if short_circuit:
+  self.path_authz_option = 'short_circuit'
+else:
+  self.path_authz_option = 'on'
+
 if not os.path.exists(self.path):
   self.name = 'httpd.exe'
   self.path = os.path.join(self.httpd_dir, 'bin', self.name)
@@ -564,6 +575,7 @@ class Httpd:
   '  DAV svn\n' \
   '  SVNParentPath   ' + self._quote(path) + '\n' \
   '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
+  '  SVNPathAuthz ' + self.path_authz_option + '\n' \
   '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
   '  AuthTypeBasic\n' \
   '  AuthName"Subversion Repository"\n' \
@@ -654,7 +666,7 @@ if not list_tests:
 
   if run_httpd:
 daemon = Httpd(abs_httpd_dir, abs_objdir, abs_builddir, httpd_port,
-   httpd_service, advertise_httpv2)
+   httpd_service, advertise_httpv2, http_short_circuit)
 
   # Start service daemon, if any
   if daemon:




svn commit: r1125307 - /subversion/trunk/win-tests.py

2011-05-20 Thread ivan
Author: ivan
Date: Fri May 20 10:06:48 2011
New Revision: 1125307

URL: http://svn.apache.org/viewvc?rev=1125307&view=rev
Log:
Add option to win-tests.py to disable using HTTPv2 when running tests.

* win-tests.py
  (_usage_exit): Document --disable-http-v2 option.
  (): Parse --disable-http-v2 option.
  (Httpd): Add SVNAdvertiseV2Protocol directive to generated Apache HTTP 
   server configuration file.

Modified:
subversion/trunk/win-tests.py

Modified: subversion/trunk/win-tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/win-tests.py?rev=1125307&r1=1125306&r2=1125307&view=diff
==
--- subversion/trunk/win-tests.py (original)
+++ subversion/trunk/win-tests.py Fri May 20 10:06:48 2011
@@ -77,6 +77,7 @@ def _usage_exit():
   print("  --httpd-daemon : Run Apache httpd as daemon")
   print("  --httpd-service: Run Apache httpd as Windows service 
(default)")
   print("  --http-library : dav library to use, neon (default) or 
serf")
+  print("  --disable-http-v2  : Do not advertise support for HTTPv2 on 
server")
   print("  --javahl   : Run the javahl tests instead of the normal 
tests")
   print("  --list : print test doc strings only")
   print("  --milestone-filter=RE  : RE is a regular expression pattern that 
(when")
@@ -123,7 +124,7 @@ opts, args = my_getopt(sys.argv[1:], 'hr
['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',
+'httpd-server', 'http-library=', 'disable-http-v2', 
'help',
 'fsfs-packing', 'fsfs-sharding=', 'javahl',
 'list', 'enable-sasl', 'bin=', 'parallel',
 'config-file=', 'server-minor-version=',
@@ -143,6 +144,7 @@ run_httpd = None
 httpd_port = None
 httpd_service = None
 http_library = 'neon'
+advertise_httpv2 = True
 list_tests = None
 milestone_filter = None
 test_javahl = None
@@ -192,6 +194,8 @@ for opt, val in opts:
 httpd_service = 1
   elif opt == '--http-library':
 http_library = val
+  elif opt == 'disable-http-v2':
+advertise_httpv2 = False
   elif opt == '--fsfs-sharding':
 fsfs_sharding = int(val)
   elif opt == '--fsfs-packing':
@@ -414,10 +418,16 @@ class Svnserve:
 
 class Httpd:
   "Run httpd for DAV tests"
-  def __init__(self, abs_httpd_dir, abs_objdir, abs_builddir, httpd_port, 
service):
+  def __init__(self, abs_httpd_dir, abs_objdir, abs_builddir, httpd_port, 
service, httpv2):
 self.name = 'apache.exe'
 self.httpd_port = httpd_port
 self.httpd_dir = abs_httpd_dir
+
+if httpv2:
+  self.httpv2_option = 'on'
+else:
+  self.httpv2_option = 'off'
+
 self.service = service
 self.proc_handle = None
 self.path = os.path.join(self.httpd_dir, 'bin', self.name)
@@ -553,6 +563,7 @@ class Httpd:
   '\n' \
   '  DAV svn\n' \
   '  SVNParentPath   ' + self._quote(path) + '\n' \
+  '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
   '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
   '  AuthTypeBasic\n' \
   '  AuthName"Subversion Repository"\n' \
@@ -643,7 +654,7 @@ if not list_tests:
 
   if run_httpd:
 daemon = Httpd(abs_httpd_dir, abs_objdir, abs_builddir, httpd_port,
-   httpd_service)
+   httpd_service, advertise_httpv2)
 
   # Start service daemon, if any
   if daemon:




svn commit: r1125304 - /subversion/trunk/subversion/tests/cmdline/svntest/main.py

2011-05-20 Thread stefan2
Author: stefan2
Date: Fri May 20 09:59:06 2011
New Revision: 1125304

URL: http://svn.apache.org/viewvc?rev=1125304&view=rev
Log:
Ignore DBG: lines during repo loading as well.

* tests/cmdline/svntest/main.py
  (filter_dbg): new utility function
  (copy_repos): ignore DBG: lines

Patch by: danielsh

Modified:
subversion/trunk/subversion/tests/cmdline/svntest/main.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=1125304&r1=1125303&r2=1125304&view=diff
==
--- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Fri May 20 
09:59:06 2011
@@ -330,6 +330,11 @@ def get_fsfs_format_file_path(repo_dir):
 
   return os.path.join(repo_dir, "db", "format")
 
+def filter_dbg(lines):
+  for line in lines:
+if not line.startswith('DBG:'):
+  yield line
+
 # Run any binary, logging the command line and return code
 def run_command(command, error_expected, binary_mode=0, *varargs):
   """Run COMMAND with VARARGS. Return exit code as int; stdout, stderr
@@ -874,7 +879,7 @@ def copy_repos(src_path, dst_path, head_
 
   load_re = re.compile(r'^--- Committed revision (\d+) >>>\r?$')
   expect_revision = 1
-  for load_line in load_stdout:
+  for load_line in filter_dbg(load_stdout):
 match = load_re.match(load_line)
 if match:
   if match.group(1) != str(expect_revision):




svn commit: r1125302 - /subversion/trunk/subversion/libsvn_fs_fs/caching.c

2011-05-20 Thread stefan2
Author: stefan2
Date: Fri May 20 09:55:36 2011
New Revision: 1125302

URL: http://svn.apache.org/viewvc?rev=1125302&view=rev
Log:
Make dumping cache statistics not break our tests.

* subversion/libsvn_fs_fs/caching.c
  (dump_cache_statistics): print statistics using SVN_DBG()

Modified:
subversion/trunk/subversion/libsvn_fs_fs/caching.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/caching.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/caching.c?rev=1125302&r1=1125301&r2=1125302&view=diff
==
--- subversion/trunk/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/caching.c Fri May 20 09:55:36 2011
@@ -32,6 +32,7 @@
 #include "svn_cache_config.h"
 
 #include "svn_private_config.h"
+#include "private/svn_debug.h"
 
 /* Return a memcache in *MEMCACHE_P for FS if it's configured to use
memcached, or NULL otherwise.  Also, sets *FAIL_STOP to a boolean
@@ -87,6 +88,8 @@ dump_cache_statistics(void *baton_void)
   apr_status_t result = APR_SUCCESS;
   svn_cache__info_t info;
   svn_string_t *text_stats;
+  apr_array_header_t *lines;
+  int i;
 
   svn_error_t *err = svn_cache__get_info(baton->cache,
  &info,
@@ -96,7 +99,13 @@ dump_cache_statistics(void *baton_void)
   if (! err)
 {
   text_stats = svn_cache__format_info(&info, baton->pool);
-  err = svn_cmdline_printf(baton->pool, "%s\n", text_stats->data);
+  lines = svn_cstring_split(text_stats->data, "\n", FALSE, baton->pool);
+  
+  for (i = 0; i < lines->nelts; ++i)
+{
+  const char *line = APR_ARRAY_IDX(lines, i, const char *);
+  SVN_DBG(("%s\n", line));
+}
 }
 
   /* process error returns */




svn commit: r1125292 - in /subversion/trunk: configure.ac notes/knobs subversion/libsvn_ra/ra_loader.c subversion/svn_private_config.hw

2011-05-20 Thread ivan
Author: ivan
Date: Fri May 20 09:28:57 2011
New Revision: 1125292

URL: http://svn.apache.org/viewvc?rev=1125292&view=rev
Log:
Add DEFAULT_HTTP_LIBRARY define for configuring default HTTP library to use.

* configure.ac
  (): Add DEFAULT_HTTP_LIBRARY define.
* notes/knobs
  (Defaults): Document DEFAULT_HTTP_LIBRARY define.
* subversion/libsvn_ra/ra_loader.c
  (svn_ra_open4): Use DEFAULT_HTTP_LIBRARY instead of hardcoded value.
* subversion/svn_private_config.hw
  (DEFAULT_HTTP_LIBRARY): Add.

Modified:
subversion/trunk/configure.ac
subversion/trunk/notes/knobs
subversion/trunk/subversion/libsvn_ra/ra_loader.c
subversion/trunk/subversion/svn_private_config.hw

Modified: subversion/trunk/configure.ac
URL: 
http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1125292&r1=1125291&r2=1125292&view=diff
==
--- subversion/trunk/configure.ac (original)
+++ subversion/trunk/configure.ac Fri May 20 09:28:57 2011
@@ -1232,6 +1232,10 @@ DEFAULT_FS_TYPE="fsfs"
 AC_DEFINE_UNQUOTED(DEFAULT_FS_TYPE, "$DEFAULT_FS_TYPE",
[The fs type to use by default])
 
+DEFAULT_HTTP_LIBRARY="serf"
+AC_DEFINE_UNQUOTED(DEFAULT_HTTP_LIBRARY, "$DEFAULT_HTTP_LIBRARY",
+   [The http library to use by default])
+
 # BSD/OS (BSDi) needs to use a different include syntax in Makefile
 INCLUDE_OUTPUTS="include \$(top_srcdir)/build-outputs.mk"
 case "$host" in

Modified: subversion/trunk/notes/knobs
URL: 
http://svn.apache.org/viewvc/subversion/trunk/notes/knobs?rev=1125292&r1=1125291&r2=1125292&view=diff
==
--- subversion/trunk/notes/knobs (original)
+++ subversion/trunk/notes/knobs Fri May 20 09:28:57 2011
@@ -28,6 +28,7 @@ API. Everything else is not officially s
 2.1 Defaults
 
 DEFAULT_FS_TYPE
+DEFAULT_HTTP_LIBRARY
 MAX_SECS_TO_LINGER
 SUFFIX_LINES_TO_KEEP
 SVN_FS_FS_DEFAULT_MAX_FILES_PER_DIR

Modified: subversion/trunk/subversion/libsvn_ra/ra_loader.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra/ra_loader.c?rev=1125292&r1=1125291&r2=1125292&view=diff
==
--- subversion/trunk/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/trunk/subversion/libsvn_ra/ra_loader.c Fri May 20 09:28:57 2011
@@ -286,7 +286,7 @@ svn_error_t *svn_ra_open4(svn_ra_session
   apr_uri_t repos_URI;
   apr_status_t apr_err;
 #ifdef CHOOSABLE_DAV_MODULE
-  const char *http_library = "serf";
+  const char *http_library = DEFAULT_HTTP_LIBRARY;
 #endif
   /* Auth caching parameters. */
   svn_boolean_t store_passwords = SVN_CONFIG_DEFAULT_OPTION_STORE_PASSWORDS;
@@ -412,7 +412,7 @@ svn_error_t *svn_ra_open4(svn_ra_session
 = svn_config_get_server_setting(servers,
 server_group, /* NULL is OK */
 SVN_CONFIG_OPTION_HTTP_LIBRARY,
-"serf");
+DEFAULT_HTTP_LIBRARY);
 
   if (strcmp(http_library, "neon") != 0 &&
   strcmp(http_library, "serf") != 0)

Modified: subversion/trunk/subversion/svn_private_config.hw
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn_private_config.hw?rev=1125292&r1=1125291&r2=1125292&view=diff
==
--- subversion/trunk/subversion/svn_private_config.hw (original)
+++ subversion/trunk/subversion/svn_private_config.hw Fri May 20 09:28:57 2011
@@ -58,6 +58,8 @@
 /* The default FS back-end type */
 #define DEFAULT_FS_TYPE "fsfs"
 
+/* The default HTTP library to use */
+#define DEFAULT_HTTP_LIBRARY "serf"
 
 /* Define to the Python/C API format character suitable for apr_int64_t */
 #if defined(_WIN64)




svn commit: r1125291 - /subversion/trunk/subversion/libsvn_subr/cache-membuffer.c

2011-05-20 Thread julianfoad
Author: julianfoad
Date: Fri May 20 09:24:46 2011
New Revision: 1125291

URL: http://svn.apache.org/viewvc?rev=1125291&view=rev
Log:
* subversion/libsvn_subr/cache-membuffer.c
  (deserialize_svn_stringbuf): Make the parameter const-ness match the
function type that it's supposed to implement. Document that type.
  (serialize_svn_stringbuf): Document the function type that it implements.

Modified:
subversion/trunk/subversion/libsvn_subr/cache-membuffer.c

Modified: subversion/trunk/subversion/libsvn_subr/cache-membuffer.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache-membuffer.c?rev=1125291&r1=1125290&r2=1125291&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/cache-membuffer.c (original)
+++ subversion/trunk/subversion/libsvn_subr/cache-membuffer.c Fri May 20 
09:24:46 2011
@@ -1788,7 +1788,8 @@ static svn_cache__vtable_t membuffer_cac
   svn_membuffer_cache_get_info
 };
 
-/* standard serialization function for svn_stringbuf_t items
+/* standard serialization function for svn_stringbuf_t items.
+ * Implements svn_cache__serialize_func_t.
  */
 static svn_error_t *
 serialize_svn_stringbuf(char **buffer,
@@ -1804,11 +1805,12 @@ serialize_svn_stringbuf(char **buffer,
   return SVN_NO_ERROR;
 }
 
-/* standard de-serialization function for svn_stringbuf_t items
+/* standard de-serialization function for svn_stringbuf_t items.
+ * Implements svn_cache__deserialize_func_t.
  */
 static svn_error_t *
 deserialize_svn_stringbuf(void **item,
-  const char *buffer,
+  char *buffer,
   apr_size_t buffer_size,
   apr_pool_t *pool)
 {




svn commit: r1125288 - /subversion/trunk/subversion/svndumpfilter/main.c

2011-05-20 Thread hwright
Author: hwright
Date: Fri May 20 09:15:43 2011
New Revision: 1125288

URL: http://svn.apache.org/viewvc?rev=1125288&view=rev
Log:
Move a couple variables around and fix a intereger size mismatch.

* subversion/svndumpfilter/main.c
  (write_prop_to_stringbuf): Use size_t.
  (ary_prefix_match): Use a size_t, and tighten some scope.

Modified:
subversion/trunk/subversion/svndumpfilter/main.c

Modified: subversion/trunk/subversion/svndumpfilter/main.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svndumpfilter/main.c?rev=1125288&r1=1125287&r2=1125288&view=diff
==
--- subversion/trunk/subversion/svndumpfilter/main.c (original)
+++ subversion/trunk/subversion/svndumpfilter/main.c Fri May 20 09:15:43 2011
@@ -82,7 +82,8 @@ write_prop_to_stringbuf(svn_stringbuf_t 
 const char *name,
 const svn_string_t *value)
 {
-  int bytes_used, namelen;
+  int bytes_used;
+  size_t namelen;
   char buf[SVN_KEYLINE_MAXLEN];
 
   /* Output name length, then name. */
@@ -112,13 +113,14 @@ write_prop_to_stringbuf(svn_stringbuf_t 
 static svn_boolean_t
 ary_prefix_match(const apr_array_header_t *pfxlist, const char *path)
 {
-  int i, pfx_len, path_len = strlen(path);
-  const char *pfx;
+  int i;
+  size_t path_len = strlen(path);
 
   for (i = 0; i < pfxlist->nelts; i++)
 {
-  pfx = APR_ARRAY_IDX(pfxlist, i, const char *);
-  pfx_len = strlen(pfx);
+  const char *pfx = APR_ARRAY_IDX(pfxlist, i, const char *);
+  size_t pfx_len = strlen(pfx);
+
   if (path_len < pfx_len)
 continue;
   if (strncmp(path, pfx, pfx_len) == 0