svn propchange: r1462041 - svn:log

2014-12-19 Thread hwright
Author: hwright
Revision: 1462041
Modified property: svn:log

Modified: svn:log at Sat Dec 20 03:22:06 2014
--
--- svn:log (original)
+++ svn:log Sat Dec 20 03:22:06 2014
@@ -7,4 +7,5 @@ at last chunk boundary.
 * subversion/tests/libsvn_diff/diff-diff3-test.c
   (test_token_compare): Extend.
 
-Patch by: jcorvel, me
+Patch by: jcorvel
+  me



svn propchange: r1393730 - svn:log

2014-12-19 Thread hwright
Author: hwright
Revision: 1393730
Modified property: svn:log

Modified: svn:log at Sat Dec 20 03:21:39 2014
--
--- svn:log (original)
+++ svn:log Sat Dec 20 03:21:39 2014
@@ -4,4 +4,5 @@
   (Revision): Move escaping from __init__() to render_commit()
 and render_dirs_changed().  See comments within for why.
 
-Patch by: breser, me
+Patch by: breser
+  me



svn propchange: r878792 - svn:log

2014-12-19 Thread hwright
Author: hwright
Revision: 878792
Modified property: svn:log

Modified: svn:log at Fri Dec 19 20:44:52 2014
--
--- svn:log (original)
+++ svn:log Fri Dec 19 20:44:52 2014
@@ -4,4 +4,4 @@ New test: updating a locked file should
   (update_deleted_locked_files): New test.
   (test_list): Append new test XFAIL.
 
-Reported by: Frank Rast 
+Reported by: Frank Rast 



svn propchange: r1501163 - svn:log

2014-12-19 Thread hwright
Author: hwright
Revision: 1501163
Modified property: svn:log

Modified: svn:log at Fri Dec 19 20:44:16 2014
--
--- svn:log (original)
+++ svn:log Fri Dec 19 20:44:16 2014
@@ -5,7 +5,7 @@
 Allow 'svn checkout' to work within a working copy that is locked.
 Fixes a regression from 1.7.
 
-Reported by: Frank Loeffler 
+Reported by: Frank Loeffler 
 See http://svn.haxx.se/users/archive-2013-07/0066.shtml
 
 * subversion/include/private/svn_wc_private.h



svn propchange: r1573006 - svn:log

2014-12-19 Thread hwright
Author: hwright
Revision: 1573006
Modified property: svn:log

Modified: svn:log at Fri Dec 19 20:43:42 2014
--
--- svn:log (original)
+++ svn:log Fri Dec 19 20:43:42 2014
@@ -92,6 +92,6 @@ Fix some typos.
 * subversion/tests/svn_test_main.c:
 * tools/dev/trails.py: Fix some typos.
 
-Patch by: Veres Lajos 
+Patch by: Veres Lajos 
 (I removed some changes that were wrong or can't be made due to API breakage)
 



svn propchange: r1553376 - svn:log

2014-12-19 Thread hwright
Author: hwright
Revision: 1553376
Modified property: svn:log

Modified: svn:log at Fri Dec 19 20:43:24 2014
--
--- svn:log (original)
+++ svn:log Fri Dec 19 20:43:24 2014
@@ -11,4 +11,4 @@ perl: subversion/libsvn_subr/dirent_uri.
   (add_file): All members of the new_file struct shall have
   the same lifetime as the struct itself.
 
-Patch by: Roman Kagan 
+Patch by: Roman Kagan 



svn propchange: r1187695 - svn:log

2014-12-19 Thread hwright
Author: hwright
Revision: 1187695
Modified property: svn:log

Modified: svn:log at Fri Dec 19 20:42:58 2014
--
--- svn:log (original)
+++ svn:log Fri Dec 19 20:42:58 2014
@@ -1,7 +1,7 @@
 mod_dav_svn should not raise an error on POST requests outside a
 Subversion location as these are not directed at Subversion.
 
-Found by: Jean-Daniel Dupas 
+Found by: Jean-Daniel Dupas 
 
 * subversion/mod_dav_svn/mod_dav_svn.c
   (dav_svn__handler): Only process requests that are within a Subversion



svn propchange: r870196 - svn:log

2014-12-19 Thread hwright
Author: hwright
Revision: 870196
Modified property: svn:log

Modified: svn:log at Fri Dec 19 20:42:38 2014
--
--- svn:log (original)
+++ svn:log Fri Dec 19 20:42:38 2014
@@ -5,4 +5,4 @@ boo-boo.
   (svn_client__switch_internal): Pass the switch URL and target path
 in the right order to svn_client__handle_externals().
 
-Reported by: Issac Goldstand 
+Reported by: Issac Goldstand 



svn propchange: r1376414 - svn:log

2014-12-19 Thread hwright
Author: hwright
Revision: 1376414
Modified property: svn:log

Modified: svn:log at Fri Dec 19 20:42:03 2014
--
--- svn:log (original)
+++ svn:log Fri Dec 19 20:42:03 2014
@@ -1,6 +1,6 @@
 Fix a memory read bug.
 
-Found by: Tony Butt 
+Found by: Tony Butt 
 
 * subversion/libsvn_subr/dirent_uri.c
   (svn_dirent_skip_ancestor, svn_relpath_skip_ancestor,



svn propchange: r1377016 - svn:log

2014-12-19 Thread hwright
Author: hwright
Revision: 1377016
Modified property: svn:log

Modified: svn:log at Fri Dec 19 20:41:39 2014
--
--- svn:log (original)
+++ svn:log Fri Dec 19 20:41:39 2014
@@ -4,4 +4,5 @@ Follow-up to r1376993 fixing some misnam
   (maybe_set_lock_token_header): Replace 'commit' variable instances
 with 'commit_ctx'.
 
-Reported by: buildbot, rhuijben
+Reported by: buildbot
+ rhuijben



svn propchange: r1439592 - svn:log

2014-12-19 Thread hwright
Author: hwright
Revision: 1439592
Modified property: svn:log

Modified: svn:log at Fri Dec 19 20:41:12 2014
--
--- svn:log (original)
+++ svn:log Fri Dec 19 20:41:12 2014
@@ -2,7 +2,9 @@ mailer.py: provide a "repos_dir basename
 
 Patch by: Janos Gyerik 
 (log message by me)
-Review by: breser, cmpilato, danielsh
+Review by: breser
+   cmpilato
+   danielsh
 
 * tools/hook-scripts/mailer/mailer.py
   (main): Define 'repos_basename' for substitution.



svn propchange: r1589243 - svn:log

2014-12-19 Thread hwright
Author: hwright
Revision: 1589243
Modified property: svn:log

Modified: svn:log at Fri Dec 19 20:39:59 2014
--
--- svn:log (original)
+++ svn:log Fri Dec 19 20:39:59 2014
@@ -2,4 +2,4 @@
   (init_lock_baton): Use standard indentation in switch statement.
  No functional change.
 
-Found by: ivan.
+Found by: ivan



svn propchange: r1413033 - svn:log

2014-12-19 Thread hwright
Author: hwright
Revision: 1413033
Modified property: svn:log

Modified: svn:log at Fri Dec 19 20:39:05 2014
--
--- svn:log (original)
+++ svn:log Fri Dec 19 20:39:05 2014
@@ -1,6 +1,6 @@
 Fix a typo in 'svnmucc --help'.
 
-Found by: sebb .
+Found by: sebb 
 
 * subversion/svnmucc/svnmucc.c
   (usage): s/so override/to override/.



svn commit: r1646623 - /subversion/trunk/subversion/libsvn_diff/diff_file.c

2014-12-18 Thread hwright
Author: hwright
Date: Fri Dec 19 04:29:00 2014
New Revision: 1646623

URL: http://svn.apache.org/r1646623
Log:
* subversion/libsvn_diff/diff_file.c
  (find_identical_suffix): Remove a variable that was being set, but not used,
   and move it into an inner scope instead.

Modified:
subversion/trunk/subversion/libsvn_diff/diff_file.c

Modified: subversion/trunk/subversion/libsvn_diff/diff_file.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_diff/diff_file.c?rev=1646623&r1=1646622&r2=1646623&view=diff
==
--- subversion/trunk/subversion/libsvn_diff/diff_file.c (original)
+++ subversion/trunk/subversion/libsvn_diff/diff_file.c Fri Dec 19 04:29:00 2014
@@ -544,7 +544,6 @@ find_identical_suffix(apr_off_t *suffix_
   int suffix_lines_to_keep = SUFFIX_LINES_TO_KEEP;
   svn_boolean_t is_match;
   apr_off_t lines = 0;
-  svn_boolean_t had_cr;
   svn_boolean_t had_nl;
   apr_size_t i;
 
@@ -685,7 +684,6 @@ find_identical_suffix(apr_off_t *suffix_
 
   /* We skipped some bytes, so there are no closing EOLs */
   had_nl = FALSE;
-  had_cr = FALSE;
 }
 
   /* The > min_curp[i] check leaves at least one final byte for checking
@@ -712,7 +710,7 @@ find_identical_suffix(apr_off_t *suffix_
  one file reaches its end. */
   do
 {
-  had_cr = FALSE;
+  svn_boolean_t had_cr = FALSE;
   while (!is_one_at_eof(file_for_suffix, file_len)
  && *file_for_suffix[0].curp != '\n'
  && *file_for_suffix[0].curp != '\r')




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

2014-12-18 Thread hwright
Author: hwright
Date: Fri Dec 19 04:27:39 2014
New Revision: 1646622

URL: http://svn.apache.org/r1646622
Log:
* subversion/libsvn_client/diff.c
  (adjust_paths_for_diff_labels): Don't set a value that is going to
  immediately go out of scope.

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

Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1646622&r1=1646621&r2=1646622&view=diff
==
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Fri Dec 19 04:27:39 2014
@@ -154,9 +154,6 @@ adjust_paths_for_diff_labels(const char
 new_path = ".";
   else
 return MAKE_ERR_BAD_RELATIVE_PATH(new_path, relative_to_dir);
-
-  child_path = svn_dirent_is_child(relative_to_dir, new_path1,
-   result_pool);
 }
 
   {




svn commit: r1646620 - /subversion/trunk/subversion/libsvn_subr/sysinfo.c

2014-12-18 Thread hwright
Author: hwright
Date: Fri Dec 19 03:36:41 2014
New Revision: 1646620

URL: http://svn.apache.org/r1646620
Log:
Fix memory leak on MacOS platforms.

* subversion/libsvn_subr/sysinfo.c
  (system_version_plist): Release the CFMutableDataRef if returning early.

Modified:
subversion/trunk/subversion/libsvn_subr/sysinfo.c

Modified: subversion/trunk/subversion/libsvn_subr/sysinfo.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/sysinfo.c?rev=1646620&r1=1646619&r2=1646620&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/sysinfo.c (original)
+++ subversion/trunk/subversion/libsvn_subr/sysinfo.c Fri Dec 19 03:36:41 2014
@@ -940,6 +940,7 @@ system_version_plist(svn_boolean_t *serv
   if (!APR_STATUS_IS_ENOENT(err->apr_err))
 {
   svn_error_clear(err);
+  CFRelease(resource);
   return NULL;
 }
   else
@@ -950,6 +951,7 @@ system_version_plist(svn_boolean_t *serv
   if (err)
 {
   svn_error_clear(err);
+  CFRelease(resource);
   return NULL;
 }
 




svn commit: r1646615 - /subversion/trunk/subversion/libsvn_client/locking_commands.c

2014-12-18 Thread hwright
Author: hwright
Date: Fri Dec 19 03:03:20 2014
New Revision: 1646615

URL: http://svn.apache.org/r1646615
Log:
* subversion/libsvn_client/locking_commands.c:
Don't allocate a variable that is never used.

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

Modified: subversion/trunk/subversion/libsvn_client/locking_commands.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/locking_commands.c?rev=1646615&r1=1646614&r2=1646615&view=diff
==
--- subversion/trunk/subversion/libsvn_client/locking_commands.c (original)
+++ subversion/trunk/subversion/libsvn_client/locking_commands.c Fri Dec 19 
03:03:20 2014
@@ -402,10 +402,9 @@ organize_lock_targets(apr_array_header_t
 _("Unable to lock/unlock across multiple "
   "repositories"));
 
-  /* Now we need to create a couple of different hash mappings. */
+  /* Now we need to create our mapping. */
   rel_fs_paths = apr_hash_make(result_pool);
-  target_urls = apr_array_make(scratch_pool, targets->nelts,
-   sizeof(const char *));
+
   for (hi = apr_hash_first(scratch_pool, wc_info);
hi;
hi = apr_hash_next(hi))




svn commit: r1646613 - /subversion/trunk/subversion/libsvn_fs_x/hotcopy.c

2014-12-18 Thread hwright
Author: hwright
Date: Fri Dec 19 02:26:55 2014
New Revision: 1646613

URL: http://svn.apache.org/r1646613
Log:
Remove a couple of redundant assignments and checks.  We already have the
desired source and destination paths, and we already know the kind of the
source subdir, so just cut to the chase and do the hotcopy.

* subversion/libsvn_fs_x/hotcopy.c
  (hotcopy_body): Don't recompute src_subdir and dst_subdir when we already have
  them handy.

Modified:
subversion/trunk/subversion/libsvn_fs_x/hotcopy.c

Modified: subversion/trunk/subversion/libsvn_fs_x/hotcopy.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/hotcopy.c?rev=1646613&r1=1646612&r2=1646613&view=diff
==
--- subversion/trunk/subversion/libsvn_fs_x/hotcopy.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/hotcopy.c Fri Dec 19 02:26:55 2014
@@ -849,14 +849,8 @@ hotcopy_body(void *baton, apr_pool_t *po
 {
   /* Copy the rep cache and then remove entries for revisions
* that did not make it into the destination. */
-  src_subdir = svn_dirent_join(src_fs->path, REP_CACHE_DB_NAME, pool);
-  dst_subdir = svn_dirent_join(dst_fs->path, REP_CACHE_DB_NAME, pool);
-  SVN_ERR(svn_io_check_path(src_subdir, &kind, pool));
-  if (kind == svn_node_file)
-{
-  SVN_ERR(svn_sqlite__hotcopy(src_subdir, dst_subdir, pool));
-  SVN_ERR(svn_fs_x__del_rep_reference(dst_fs, src_youngest, pool));
-}
+  SVN_ERR(svn_sqlite__hotcopy(src_subdir, dst_subdir, pool));
+  SVN_ERR(svn_fs_x__del_rep_reference(dst_fs, src_youngest, pool));
 }
 
   /* Copy the txn-current file. */




svn commit: r1646611 - /subversion/trunk/subversion/libsvn_client/mtcc.c

2014-12-18 Thread hwright
Author: hwright
Date: Fri Dec 19 02:03:02 2014
New Revision: 1646611

URL: http://svn.apache.org/r1646611
Log:
Ensure that the the base_revision member is set when initializing the 
svn_client__mtcc_t struct.

* subversion/libsvn_client/mtcc.c
  (svn_client__mtcc_create): Make sure base_revision member is set in all
 code paths, restructure things to make this a
 bit more obvious.

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

Modified: subversion/trunk/subversion/libsvn_client/mtcc.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/mtcc.c?rev=1646611&r1=1646610&r2=1646611&view=diff
==
--- subversion/trunk/subversion/libsvn_client/mtcc.c (original)
+++ subversion/trunk/subversion/libsvn_client/mtcc.c Fri Dec 19 02:03:02 2014
@@ -337,7 +337,6 @@ svn_client__mtcc_create(svn_client__mtcc
 
   *mtcc = apr_pcalloc(mtcc_pool, sizeof(**mtcc));
   (*mtcc)->pool = mtcc_pool;
-  (*mtcc)->base_revision = base_revision;
 
   (*mtcc)->root_op = mtcc_op_create(NULL, FALSE, TRUE, mtcc_pool);
 
@@ -350,9 +349,12 @@ svn_client__mtcc_create(svn_client__mtcc
   SVN_ERR(svn_ra_get_latest_revnum((*mtcc)->ra_session, 
&(*mtcc)->head_revision,
scratch_pool));
 
-  if (! SVN_IS_VALID_REVNUM(base_revision))
-base_revision = (*mtcc)->head_revision;
-  else if (base_revision > (*mtcc)->head_revision)
+  if (SVN_IS_VALID_REVNUM(base_revision))
+(*mtcc)->base_revision = base_revision;
+  else
+(*mtcc)->base_revision = (*mtcc)->head_revision;
+
+  if ((*mtcc)->base_revision > (*mtcc)->head_revision)
 return svn_error_createf(SVN_ERR_FS_NO_SUCH_REVISION, NULL,
  _("No such revision %ld (HEAD is %ld)"),
  base_revision, (*mtcc)->head_revision);




svn propchange: r1467189 - svn:log

2014-12-18 Thread hwright
Author: hwright
Revision: 1467189
Modified property: svn:log

Modified: svn:log at Fri Dec 19 02:01:55 2014
--
--- svn:log (original)
+++ svn:log Fri Dec 19 02:01:55 2014
@@ -1,5 +1,6 @@
 * tools/dev/remove-trailing-whitespace.zsh: New script.
 
-Patch by: hwright, me
+Patch by: hwright
+  me
 (I adjusted the script found in the "remove trailing whitespace" commits' log
 messages (r866391))



svn commit: r1449262 [23/25] - in /subversion/branches/ev2-export: ./ build/ build/ac-macros/ build/generator/ build/generator/swig/ build/generator/templates/ build/win32/ contrib/server-side/fsfsfix

2013-02-22 Thread hwright
Modified: 
subversion/branches/ev2-export/subversion/tests/libsvn_repos/repos-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/libsvn_repos/repos-test.c?rev=1449262&r1=1449261&r2=1449262&view=diff
==
--- subversion/branches/ev2-export/subversion/tests/libsvn_repos/repos-test.c 
(original)
+++ subversion/branches/ev2-export/subversion/tests/libsvn_repos/repos-test.c 
Sat Feb 23 01:25:38 2013
@@ -1157,7 +1157,7 @@ authz_get_handle(svn_authz_t **authz_p, 
   SVN_ERR_W(svn_stream_puts(stream, authz_contents),
 "Writing authz contents to stream");
 
-  SVN_ERR_W(svn_repos_authz_parse(authz_p, stream, pool),
+  SVN_ERR_W(svn_repos_authz_parse(authz_p, stream, NULL, pool),
 "Parsing the authz contents");
 
   SVN_ERR_W(svn_stream_close(stream),
@@ -1451,34 +1451,35 @@ in_repo_authz(const svn_test_opts_t *opt
 
   /* repos relative URL */
   repos_root = svn_repos_path(repos, pool);
-  SVN_ERR(svn_repos_authz_read2(&authz_cfg, "^/authz", TRUE, repos_root,
-pool));
+  SVN_ERR(svn_repos_authz_read2(&authz_cfg, "^/authz", NULL, TRUE,
+repos_root, pool));
   SVN_ERR(authz_check_access(authz_cfg, test_set, pool));
 
   /* absolute file URL, repos_root is NULL to validate the contract that it
* is not needed except when a repos relative URL is passed. */
   SVN_ERR(svn_uri_get_file_url_from_dirent(&repos_url, repos_root, pool));
   authz_url = apr_pstrcat(pool, repos_url, "/authz", (char *)NULL);
-  SVN_ERR(svn_repos_authz_read2(&authz_cfg, authz_url, TRUE, NULL, pool));
+  SVN_ERR(svn_repos_authz_read2(&authz_cfg, authz_url, NULL, TRUE,
+NULL, pool));
   SVN_ERR(authz_check_access(authz_cfg, test_set, pool));
   
   /* Non-existant path in the repo with must_exist set to FALSE */ 
-  SVN_ERR(svn_repos_authz_read2(&authz_cfg, "^/A/authz", FALSE, repos_root,
-pool));
+  SVN_ERR(svn_repos_authz_read2(&authz_cfg, "^/A/authz", NULL, FALSE,
+repos_root, pool));
 
   /* Non-existant path in the repo with must_exist set to TRUE */ 
-  err = svn_repos_authz_read2(&authz_cfg, "^/A/authz", TRUE, repos_root,
-  pool);
-  if (!err || err->apr_err != SVN_ERR_AUTHZ_INVALID_CONFIG)
+  err = svn_repos_authz_read2(&authz_cfg, "^/A/authz", NULL, TRUE,
+  repos_root, pool);
+  if (!err || err->apr_err != SVN_ERR_ILLEGAL_TARGET)
 return svn_error_createf(SVN_ERR_TEST_FAILED, err,
  "Got %s error instead of expected "
- "SVN_ERR_AUTHZ_INVALID_CONFIG",
+ "SVN_ERR_ILLEGAL_TARGET",
  err ? "unexpected" : "no");
   svn_error_clear(err);
 
   /* http:// URL which is unsupported */
   err = svn_repos_authz_read2(&authz_cfg, "http://example.com/repo/authz";,
-  TRUE, repos_root, pool);
+  NULL, TRUE, repos_root, pool);
   if (!err || err->apr_err != SVN_ERR_RA_ILLEGAL_URL)
 return svn_error_createf(SVN_ERR_TEST_FAILED, err,
  "Got %s error instead of expected "
@@ -1488,6 +1489,160 @@ in_repo_authz(const svn_test_opts_t *opt
 
   /* svn:// URL which is unsupported */
   err = svn_repos_authz_read2(&authz_cfg, "svn://example.com/repo/authz",
+  NULL, TRUE, repos_root, pool);
+  if (!err || err->apr_err != SVN_ERR_RA_ILLEGAL_URL)
+return svn_error_createf(SVN_ERR_TEST_FAILED, err,
+ "Got %s error instead of expected "
+ "SVN_ERR_RA_ILLEGAL_URL",
+ err ? "unexpected" : "no");
+  svn_error_clear(err);
+
+
+  return SVN_NO_ERROR;
+}
+
+
+/* Test in-repo authz with global groups. */
+static svn_error_t *
+in_repo_groups_authz(const svn_test_opts_t *opts,
+ apr_pool_t *pool)
+{
+  svn_repos_t *repos;
+  svn_fs_t *fs;
+  svn_fs_txn_t *txn;
+  svn_fs_root_t *txn_root;
+  svn_revnum_t youngest_rev;
+  svn_authz_t *authz_cfg;
+  const char *groups_contents;
+  const char *authz_contents;
+  const char *repos_root;
+  const char *repos_url;
+  const char *groups_url;
+  const char *authz_url;
+  svn_error_t *err;
+  struct check_access_tests test_set[] = {
+/* reads */
+{ "/A", NULL, NULL, svn_authz_read, FALSE },
+{ "/A", NULL, "plato", svn_authz_read, TRUE },
+{ "/A", NULL, "socrates", svn_authz_read, TRUE },
+{ "/A", NULL, "solon", svn_authz_read, TRUE },
+{ "/A", NULL, "ephialtes", svn_authz_read, TRUE },
+/* writes */
+{ "/A", NULL, NULL, svn_authz_write, FALSE },
+{ "/A", NULL, "plato", svn_authz_write, FALSE },
+{ "/A", NULL, "socrates", svn_authz_write, FALSE },
+{ "/A", NULL, "solon", svn_authz_w

svn commit: r1449262 [25/25] - in /subversion/branches/ev2-export: ./ build/ build/ac-macros/ build/generator/ build/generator/swig/ build/generator/templates/ build/win32/ contrib/server-side/fsfsfix

2013-02-22 Thread hwright
Modified: subversion/branches/ev2-export/tools/server-side/svnauthz.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/server-side/svnauthz.c?rev=1449262&r1=1449261&r2=1449262&view=diff
==
--- subversion/branches/ev2-export/tools/server-side/svnauthz.c (original)
+++ subversion/branches/ev2-export/tools/server-side/svnauthz.c Sat Feb 23 
01:25:38 2013
@@ -39,7 +39,8 @@ enum svnauthz__cmdline_options_t
   svnauthz__username,
   svnauthz__path,
   svnauthz__repos,
-  svnauthz__is
+  svnauthz__is,
+  svnauthz__groups_file
 };
 
 /* Option codes and descriptions.
@@ -66,6 +67,7 @@ static const apr_getopt_option_t options
  " "
  "   nono access\n")
   },
+  {"groups-file", svnauthz__groups_file, 1, ("path to the global groups 
file")},
   {0, 0, 0, 0}
 };
 
@@ -74,6 +76,7 @@ struct svnauthz_opt_state
   svn_boolean_t help;
   svn_boolean_t version;
   const char *authz_file;
+  const char *groups_file;
   const char *username;
   const char *fspath;
   const char *repos_name;
@@ -85,6 +88,8 @@ struct svnauthz_opt_state
 /* The name of this binary in 1.7 and earlier. */
 #define SVNAUTHZ_COMPAT_NAME "svnauthz-validate"
 
+/* Libtool command prefix */
+#define SVNAUTHZ_LT_PREFIX "lt-"
 
 
 /*** Subcommands. */
@@ -120,8 +125,9 @@ static const svn_opt_subcommand_desc2_t 
{'t'} },
   {"accessof", subcommand_accessof, {0} /* no aliases */,
("Print or test the permissions set by an authz file for a specific 
circumstance.\n"
-"usage: 1. svnauthz accessof [--username USER] TARGET\n"
-"   2. svnauthz accessof [--username USER] -t TXN REPOS_PATH 
FILE_PATH\n\n" 
+"usage: 1. svnauthz accessof [--username USER] [--groups-file GROUPS_FILE] 
TARGET\n"
+"   2. svnauthz accessof [--username USER] [--groups-file GROUPS_FILE] 
\\\n"
+"-t TXN REPOS_PATH FILE_PATH\n\n"
 "  1. Prints the access of USER based on TARGET.\n"
 " TARGET can be a path to a file or an absolute file:// URL to an 
authz\n"
 " file in a repository, but cannot be a repository relative URL 
(^/).\n\n"
@@ -129,7 +135,8 @@ static const svn_opt_subcommand_desc2_t 
 " transaction TXN in the repository at REPOS_PATH.\n\n"
 "  If the --username argument is omitted then access of an anonymous 
user\n"
 "  will be printed.  If --path argument is omitted prints if any access\n"
-"  to the repo is allowed.\n\n"
+"  to the repo is allowed.  If --groups-file is specified, the groups 
from\n"
+"  GROUPS_FILE will be used.\n\n"
 "Outputs one of the following:\n"
 " rwwrite access (which also implies read)\n"
 "  rread access\n"
@@ -140,7 +147,8 @@ static const svn_opt_subcommand_desc2_t 
 "2   operational error\n"
 "3   when --is argument doesn't match\n"
 ),
-   {'t', svnauthz__username, svnauthz__path, svnauthz__repos, svnauthz__is} },
+   {'t', svnauthz__username, svnauthz__path, svnauthz__repos, svnauthz__is,
+svnauthz__groups_file} },
   { NULL, NULL, {0}, NULL, {0} }
 };
 
@@ -176,20 +184,40 @@ subcommand_help(apr_getopt_t *os, void *
   return SVN_NO_ERROR;
 }
 
+/* Loads the fs FILENAME contents into *CONTENTS ensuring that the
+   corresponding node is a file. Using POOL for allocations. */
+static svn_error_t *
+read_file_contents(svn_stream_t **contents, const char *filename,
+   svn_fs_root_t *root, apr_pool_t *pool)
+{
+  svn_node_kind_t node_kind;
+
+  /* Make sure the path is a file */
+  SVN_ERR(svn_fs_check_path(&node_kind, root, filename, pool));
+  if (node_kind != svn_node_file)
+return svn_error_createf(SVN_ERR_FS_NOT_FILE, NULL,
+ "Path '%s' is not a file", filename);
+
+  SVN_ERR(svn_fs_file_contents(contents, root, filename, pool));
+
+  return SVN_NO_ERROR;
+}
+
 /* Loads the authz config into *AUTHZ from the file at AUTHZ_FILE
-   in repository at REPOS_PATH from the transaction TXN_NAME.  Using
-   POOL for allocations. */
+   in repository at REPOS_PATH from the transaction TXN_NAME.  If GROUPS_FILE
+   is set, the resulting *AUTHZ will be constructed from AUTHZ_FILE with
+   global groups taken from GROUPS_FILE.  Using POOL for allocations. */
 static svn_error_t *
 get_authz_from_txn(svn_authz_t **authz, const char *repos_path,
-   const char *authz_file, const char *txn_name,
-   apr_pool_t *pool)
+   const char *authz_file, const char *groups_file,
+   const char *txn_name, apr_pool_t *pool)
 {
   svn_repos_t *repos;
   svn_fs_t *fs;
   svn_fs_txn_t *txn;
   svn_fs_root_t *root;
-  svn_node_kind_t node_kind;
-  svn_stream_t *contents;
+  svn_stream_t *authz_contents;
+  svn_stream_t *groups_contents;
   svn_error_t *err;
 
   /* Open up the repository and find the transaction root */
@@ -198,14 +226,16 @@ get_authz_from_txn(svn_auth

svn commit: r1449262 [12/25] - in /subversion/branches/ev2-export: ./ build/ build/ac-macros/ build/generator/ build/generator/swig/ build/generator/templates/ build/win32/ contrib/server-side/fsfsfix

2013-02-22 Thread hwright
Modified: subversion/branches/ev2-export/subversion/libsvn_wc/update_editor.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_wc/update_editor.c?rev=1449262&r1=1449261&r2=1449262&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_wc/update_editor.c 
(original)
+++ subversion/branches/ev2-export/subversion/libsvn_wc/update_editor.c Sat Feb 
23 01:25:38 2013
@@ -284,6 +284,8 @@ remember_skipped_tree(struct edit_baton 
   return SVN_NO_ERROR;
 }
 
+/* Per directory baton. Lives in its own subpool of the parent directory
+   or of the edit baton if there is no parent directory */
 struct dir_baton
 {
   /* Basename of this directory. */
@@ -381,26 +383,10 @@ struct dir_baton
 
   /* The pool in which this baton itself is allocated. */
   apr_pool_t *pool;
-};
-
-
-/* The bump information is tracked separately from the directory batons.
-   This is a small structure kept in the edit pool, while the heavier
-   directory baton is managed by the editor driver.
-
-   In a postfix delta case, the directory batons are going to disappear.
-   The files will refer to these structures, rather than the full
-   directory baton.  */
-struct bump_dir_info
-{
-  /* ptr to the bump information for the parent directory */
-  struct bump_dir_info *parent;
 
-  /* how many entries are referring to this bump information? */
+  /* how many nodes are referring to baton? */
   int ref_count;
 
-  /* Pool that should be cleared after the dir is bumped */
-  apr_pool_t *pool;
 };
 
 
@@ -514,7 +500,6 @@ make_dir_baton(struct dir_baton **d_p,
 {
   apr_pool_t *dir_pool;
   struct dir_baton *d;
-  struct bump_dir_info *bdi;
 
   if (pb != NULL)
 dir_pool = svn_pool_create(pb->pool);
@@ -599,23 +584,13 @@ make_dir_baton(struct dir_baton **d_p,
 }
 }
 
-  /* the bump information lives in the edit pool */
-  bdi = apr_pcalloc(dir_pool, sizeof(*bdi));
-  bdi->parent = pb ? pb->bump_info : NULL;
-  bdi->ref_count = 1;
-  bdi->pool = dir_pool;
-
-  /* the parent's bump info has one more referer */
-  if (pb)
-++bdi->parent->ref_count;
-
   d->edit_baton   = eb;
   d->parent_baton = pb;
   d->pool = dir_pool;
   d->propchanges  = apr_array_make(dir_pool, 1, sizeof(svn_prop_t));
   d->obstruction_found = FALSE;
   d->add_existed  = FALSE;
-  d->bump_info= bdi;
+  d->ref_count = 1;
   d->old_revision = SVN_INVALID_REVNUM;
   d->adding_dir   = adding;
   d->changed_rev  = SVN_INVALID_REVNUM;
@@ -626,6 +601,9 @@ make_dir_baton(struct dir_baton **d_p,
 {
   d->skip_this = pb->skip_this;
   d->shadowed = pb->shadowed || pb->edit_obstructed;
+
+  /* the parent's bump info has one more referer */
+  pb->ref_count++;
 }
 
   /* The caller of this function needs to fill these in. */
@@ -663,34 +641,32 @@ do_notification(const struct edit_baton 
   (*eb->notify_func)(eb->notify_baton, notify, scratch_pool);
 }
 
-/* Decrement the bump_dir_info's reference count. If it hits zero,
+/* Decrement the directory's reference count. If it hits zero,
then this directory is "done". This means it is safe to clear its pool.
 
-   In addition, when the directory is "done", we loop onto the parent's
-   bump information to possibly mark it as done, too.
+   In addition, when the directory is "done", we recurse to possible cleanup
+   the parent directory.
 */
 static svn_error_t *
-maybe_release_dir_info(struct bump_dir_info *bdi)
+maybe_release_dir_info(struct dir_baton *db)
 {
-  /* Keep moving up the tree of directories until we run out of parents,
- or a directory is not yet "done".  */
-  while (bdi != NULL)
-{
-  apr_pool_t *destroy_pool;
+  db->ref_count--;
 
-  if (--bdi->ref_count > 0)
-break;  /* directory isn't done yet */
+  if (!db->ref_count)
+{
+  struct dir_baton *pb = db->parent_baton;
 
-  destroy_pool = bdi->pool;
-  bdi = bdi->parent;
+  svn_pool_destroy(db->pool);
 
-  svn_pool_destroy(destroy_pool);
+  if (pb)
+SVN_ERR(maybe_release_dir_info(pb));
 }
-  /* we exited the for loop because there are no more parents */
 
   return SVN_NO_ERROR;
 }
 
+/* Per file baton. Lives in its own subpool below the pool of the parent
+   directory */
 struct file_baton
 {
   /* Pool specific to this file_baton. */
@@ -842,8 +818,8 @@ make_file_baton(struct file_baton **f_p,
   f->dir_baton = pb;
   f->changed_rev   = SVN_INVALID_REVNUM;
 
-  /* the directory's bump info has one more referer now */
-  ++f->bump_info->ref_count;
+  /* the directory has one more referer now */
+  pb->ref_count++;
 
   *f_p = f;
   return SVN_NO_ERROR;
@@ -859,7 +835,7 @@ make_file_baton(struct file_baton **f_p,
  */
 static svn_error_t *
 complete_conflict(svn_skel_t *conflict,
-  const struct dir_baton *pb,
+  const struct edit_baton *eb,
   const char *local_abspath,
 

svn commit: r1449262 [15/25] - in /subversion/branches/ev2-export: ./ build/ build/ac-macros/ build/generator/ build/generator/swig/ build/generator/templates/ build/win32/ contrib/server-side/fsfsfix

2013-02-22 Thread hwright
Modified: subversion/branches/ev2-export/subversion/libsvn_wc/wc_db_wcroot.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_wc/wc_db_wcroot.c?rev=1449262&r1=1449261&r2=1449262&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_wc/wc_db_wcroot.c 
(original)
+++ subversion/branches/ev2-export/subversion/libsvn_wc/wc_db_wcroot.c Sat Feb 
23 01:25:38 2013
@@ -188,20 +188,36 @@ close_wcroot(void *data)
 svn_error_t *
 svn_wc__db_open(svn_wc__db_t **db,
 svn_config_t *config,
-svn_boolean_t auto_upgrade,
+svn_boolean_t open_without_upgrade,
 svn_boolean_t enforce_empty_wq,
 apr_pool_t *result_pool,
 apr_pool_t *scratch_pool)
 {
   *db = apr_pcalloc(result_pool, sizeof(**db));
   (*db)->config = config;
-  (*db)->auto_upgrade = auto_upgrade;
+  (*db)->verify_format = !open_without_upgrade;
   (*db)->enforce_empty_wq = enforce_empty_wq;
   (*db)->dir_data = apr_hash_make(result_pool);
 
+  (*db)->state_pool = result_pool;
+
   /* Don't need to initialize (*db)->parse_cache, due to the calloc above */
+  if (config)
+{
+  svn_error_t *err;
+  svn_boolean_t sqlite_exclusive = FALSE;
 
-  (*db)->state_pool = result_pool;
+  err = svn_config_get_bool(config, &sqlite_exclusive,
+SVN_CONFIG_SECTION_WORKING_COPY,
+SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE,
+FALSE);
+  if (err)
+{
+  svn_error_clear(err);
+}
+  else
+(*db)->exclusive = sqlite_exclusive;
+}
 
   return SVN_NO_ERROR;
 }
@@ -240,7 +256,7 @@ svn_wc__db_pdh_create_wcroot(svn_wc__db_
  svn_sqlite__db_t *sdb,
  apr_int64_t wc_id,
  int format,
- svn_boolean_t auto_upgrade,
+ svn_boolean_t verify_format,
  svn_boolean_t enforce_empty_wq,
  apr_pool_t *result_pool,
  apr_pool_t *scratch_pool)
@@ -278,7 +294,7 @@ svn_wc__db_pdh_create_wcroot(svn_wc__db_
   /* Verify that no work items exists. If they do, then our integrity is
  suspect and, thus, we cannot use this database.  */
   if (format >= SVN_WC__HAS_WORK_QUEUE
-  && (enforce_empty_wq || (format < SVN_WC__VERSION && auto_upgrade)))
+  && (enforce_empty_wq || (format < SVN_WC__VERSION && verify_format)))
 {
   svn_error_t *err = verify_no_work(sdb);
   if (err)
@@ -286,7 +302,7 @@ svn_wc__db_pdh_create_wcroot(svn_wc__db_
   /* Special message for attempts to upgrade a 1.7-dev wc with
  outstanding workqueue items. */
   if (err->apr_err == SVN_ERR_WC_CLEANUP_REQUIRED
-  && format < SVN_WC__VERSION && auto_upgrade)
+  && format < SVN_WC__VERSION && verify_format)
 err = svn_error_quick_wrap(err, _("Cleanup with an older 1.7 "
   "client before upgrading with "
   "this client"));
@@ -295,23 +311,16 @@ svn_wc__db_pdh_create_wcroot(svn_wc__db_
 }
 
   /* Auto-upgrade the SDB if possible.  */
-  if (format < SVN_WC__VERSION)
+  if (format < SVN_WC__VERSION && verify_format)
 {
-  if (auto_upgrade)
-{
-  if (format >= SVN_WC__WC_NG_VERSION)
-SVN_ERR(svn_wc__upgrade_sdb(&format, wcroot_abspath, sdb, format,
-scratch_pool));
-}
-  else
-return svn_error_createf(SVN_ERR_WC_UPGRADE_REQUIRED, NULL,
- _("The working copy at '%s'\nis too old "
-   "(format %d) to work with client version "
-   "'%s' (expects format %d). You need to "
-   "upgrade the working copy first.\n"),
-   svn_dirent_local_style(wcroot_abspath,
-   scratch_pool), format, SVN_VERSION,
-   SVN_WC__VERSION);
+  return svn_error_createf(SVN_ERR_WC_UPGRADE_REQUIRED, NULL,
+   _("The working copy at '%s'\nis too old "
+ "(format %d) to work with client version "
+ "'%s' (expects format %d). You need to "
+ "upgrade the working copy first.\n"),
+   svn_dirent_local_style(wcroot_abspath,
+  scratch_pool),
+   format, SVN_VERSION, SVN_WC__VERSION);
 }
 
   *wcroot = apr_palloc(result_pool, sizeof(**wcroot));
@@ -524,18 +533,6 @@ svn_wc__db_wcroot

svn commit: r1449262 [8/25] - in /subversion/branches/ev2-export: ./ build/ build/ac-macros/ build/generator/ build/generator/swig/ build/generator/templates/ build/win32/ contrib/server-side/fsfsfixe

2013-02-22 Thread hwright
Modified: subversion/branches/ev2-export/subversion/libsvn_repos/rev_hunt.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_repos/rev_hunt.c?rev=1449262&r1=1449261&r2=1449262&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_repos/rev_hunt.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_repos/rev_hunt.c Sat Feb 
23 01:25:38 2013
@@ -532,7 +532,7 @@ check_ancestry_of_peg_path(svn_boolean_t
 {
   svn_fs_root_t *root;
   svn_fs_history_t *history;
-  const char *path;
+  const char *path = NULL;
   svn_revnum_t revision;
   apr_pool_t *lastpool, *currpool;
 
@@ -1252,17 +1252,18 @@ find_merged_revisions(apr_array_header_t
   apr_hash_t *duplicate_path_revs,
   svn_repos_authz_func_t authz_read_func,
   void *authz_read_baton,
-  apr_pool_t *pool)
+  apr_pool_t *result_pool,
+  apr_pool_t *scratch_pool)
 {
   const apr_array_header_t *old;
   apr_array_header_t *new_merged_path_revs;
   apr_pool_t *iterpool, *last_pool;
   apr_array_header_t *merged_path_revisions =
-apr_array_make(pool, 0, sizeof(struct path_revision *));
+apr_array_make(scratch_pool, 0, sizeof(struct path_revision *));
 
   old = mainline_path_revisions;
-  iterpool = svn_pool_create(pool);
-  last_pool = svn_pool_create(pool);
+  iterpool = svn_pool_create(scratch_pool);
+  last_pool = svn_pool_create(scratch_pool);
 
   do
 {
@@ -1325,8 +1326,8 @@ find_merged_revisions(apr_array_header_t
  TRUE, TRUE,
  duplicate_path_revs,
  authz_read_func,
- authz_read_baton, pool,
- iterpool3));
+ authz_read_baton,
+ result_pool, iterpool3));
 }
   svn_pool_destroy(iterpool3);
 }
@@ -1350,7 +1351,8 @@ find_merged_revisions(apr_array_header_t
 sizeof(struct path_revision *), compare_path_revisions);
 
   /* Copy to the output array. */
-  *merged_path_revisions_out = apr_array_copy(pool, merged_path_revisions);
+  *merged_path_revisions_out = apr_array_copy(result_pool,
+  merged_path_revisions);
 
   svn_pool_destroy(iterpool);
   svn_pool_destroy(last_pool);
@@ -1447,6 +1449,114 @@ send_path_revision(struct path_revision 
   return SVN_NO_ERROR;
 }
 
+/* Similar to svn_repos_get_file_revs2() but returns paths while walking
+   history instead of after collecting all history.
+
+   This allows implementing clients to immediately start processing and
+   stop when they got the information they need. (E.g. all or a specific set
+   of lines were modified) */
+static svn_error_t *
+get_file_revs_backwards(svn_repos_t *repos,
+const char *path,
+svn_revnum_t start,
+svn_revnum_t end,
+svn_repos_authz_func_t authz_read_func,
+void *authz_read_baton,
+svn_file_rev_handler_t handler,
+void *handler_baton,
+apr_pool_t *scratch_pool)
+{
+  apr_pool_t *iterpool, *last_pool;
+  svn_fs_history_t *history;
+  svn_fs_root_t *root;
+  svn_node_kind_t kind;
+  struct send_baton sb;
+
+  /* We switch between two pools while looping and so does the path-rev
+ handler for actually reported revisions. We do this as we
+ need just information from last iteration to be available. */
+
+  iterpool = svn_pool_create(scratch_pool);
+  last_pool = svn_pool_create(scratch_pool);
+  sb.iterpool = svn_pool_create(scratch_pool);
+  sb.last_pool = svn_pool_create(scratch_pool);
+
+  /* We want the first txdelta to be against the empty file. */
+  sb.last_root = NULL;
+  sb.last_path = NULL;
+
+  /* Create an empty hash table for the first property diff. */
+  sb.last_props = apr_hash_make(sb.last_pool);
+
+  /* The path had better be a file in this revision. */
+  SVN_ERR(svn_fs_revision_root(&root, repos->fs, end, scratch_pool));
+  SVN_ERR(svn_fs_check_path(&kind, root, path, scratch_pool));
+  if (kind != svn_node_file)
+return svn_error_createf(SVN_ERR_FS_NOT_FILE, 
+ NULL, _("'%s' is not a file in revision %ld"),
+ path, end);
+
+  /* Open a history object. */
+  SVN_ERR(svn_fs_node_history(&history, root, path, scratch_pool));
+  while (1)
+{
+  struct path_revision *path_rev;
+  svn_revnum_t tmp_revnum;
+  const char *tmp_path;
+
+  svn_pool_clear(iterpool);
+
+  /* Fetch the h

svn commit: r1449262 [4/25] - in /subversion/branches/ev2-export: ./ build/ build/ac-macros/ build/generator/ build/generator/swig/ build/generator/templates/ build/win32/ contrib/server-side/fsfsfixe

2013-02-22 Thread hwright
Modified: subversion/branches/ev2-export/subversion/libsvn_client/diff_local.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/diff_local.c?rev=1449262&r1=1449261&r2=1449262&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_client/diff_local.c 
(original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/diff_local.c Sat 
Feb 23 01:25:38 2013
@@ -287,9 +287,16 @@ arbitrary_diff_walker(void *baton, const
   const apr_finfo_t *finfo,
   apr_pool_t *scratch_pool);
 
-/* Produce a diff between two arbitrary directories at LOCAL_ABSPATH1 and
- * LOCAL_ABSPATH2, using the provided diff callbacks to show file changes
- * and, for versioned nodes, property changes.
+/* Another forward declaration. */
+static svn_error_t *
+arbitrary_diff_this_dir(struct arbitrary_diff_walker_baton *b,
+const char *local_abspath,
+svn_depth_t depth,
+apr_pool_t *scratch_pool);
+
+/* Produce a diff of depth DEPTH between two arbitrary directories at
+ * LOCAL_ABSPATH1 and LOCAL_ABSPATH2, using the provided diff callbacks
+ * to show file changes and, for versioned nodes, property changes.
  *
  * If ROOT_ABSPATH1 and ROOT_ABSPATH2 are not NULL, show paths in diffs
  * relative to these roots, rather than relative to LOCAL_ABSPATH1 and
@@ -300,6 +307,7 @@ do_arbitrary_dirs_diff(const char *local
const char *local_abspath2,
const char *root_abspath1,
const char *root_abspath2,
+   svn_depth_t depth,
const svn_wc_diff_callbacks4_t *callbacks,
void *diff_baton,
svn_client_ctx_t *ctx,
@@ -331,22 +339,25 @@ do_arbitrary_dirs_diff(const char *local
NULL, svn_io_file_del_on_pool_cleanup,
scratch_pool, scratch_pool));
 
-  SVN_ERR(svn_io_dir_walk2(b.recursing_within_added_subtree ? local_abspath2
-: local_abspath1,
-   0, arbitrary_diff_walker, &b, scratch_pool));
-
+  if (depth <= svn_depth_immediates)
+SVN_ERR(arbitrary_diff_this_dir(&b, local_abspath1, depth, scratch_pool));
+  else if (depth == svn_depth_infinity)
+SVN_ERR(svn_io_dir_walk2(b.recursing_within_added_subtree ? local_abspath2
+  : local_abspath1,
+ 0, arbitrary_diff_walker, &b, scratch_pool));
   return SVN_NO_ERROR;
 }
 
-/* An implementation of svn_io_walk_func_t.
- * Note: LOCAL_ABSPATH is the path being crawled and can be on either side
+/* Produce a diff of depth DEPTH for the directory at LOCAL_ABSPATH,
+ * using information from the arbitrary_diff_walker_baton B.
+ * LOCAL_ABSPATH is the path being crawled and can be on either side
  * of the diff depending on baton->recursing_within_added_subtree. */
 static svn_error_t *
-arbitrary_diff_walker(void *baton, const char *local_abspath,
-  const apr_finfo_t *finfo,
-  apr_pool_t *scratch_pool)
+arbitrary_diff_this_dir(struct arbitrary_diff_walker_baton *b,
+const char *local_abspath,
+svn_depth_t depth,
+apr_pool_t *scratch_pool)
 {
-  struct arbitrary_diff_walker_baton *b = baton;
   const char *local_abspath1;
   const char *local_abspath2;
   svn_node_kind_t kind1;
@@ -359,12 +370,6 @@ arbitrary_diff_walker(void *baton, const
   int i;
   apr_pool_t *iterpool;
 
-  if (b->ctx->cancel_func)
-SVN_ERR(b->ctx->cancel_func(b->ctx->cancel_baton));
-
-  if (finfo->filetype != APR_DIR)
-return SVN_NO_ERROR;
-
   if (b->recursing_within_adm_dir)
 {
   if (svn_dirent_skip_ancestor(b->adm_dir_abspath, local_abspath))
@@ -398,12 +403,15 @@ arbitrary_diff_walker(void *baton, const
scratch_pool);
   SVN_ERR(svn_io_check_resolved_path(local_abspath2, &kind2, scratch_pool));
 
-  if (kind1 == svn_node_dir)
-SVN_ERR(svn_io_get_dirents3(&dirents1, local_abspath1,
-TRUE, /* only_check_type */
-scratch_pool, scratch_pool));
-  else
-dirents1 = apr_hash_make(scratch_pool);
+  if (depth > svn_depth_empty)
+{
+  if (kind1 == svn_node_dir)
+SVN_ERR(svn_io_get_dirents3(&dirents1, local_abspath1,
+TRUE, /* only_check_type */
+scratch_pool, scratch_pool));
+  else
+dirents1 = apr_hash_make(scratch_pool);
+}
 
   if (kind2 == svn_node_dir)
 {
@@ -425,14 +433,20 @@ arbitrary_diff_walker(void *baton, const
   

svn commit: r1436902 - in /subversion/branches/ev2-export: ./ subversion/libsvn_ra_serf/ subversion/libsvn_subr/ subversion/libsvn_wc/ subversion/svn/ subversion/svnserve/ subversion/tests/cmdline/ su

2013-01-22 Thread hwright
Author: hwright
Date: Tue Jan 22 13:25:17 2013
New Revision: 1436902

URL: http://svn.apache.org/viewvc?rev=1436902&view=rev
Log:
On the ev2-export branch:
Bring up-to-date with trunk.  This picks up fixes for merge test 133.

Modified:
subversion/branches/ev2-export/   (props changed)
subversion/branches/ev2-export/subversion/libsvn_ra_serf/update.c
subversion/branches/ev2-export/subversion/libsvn_subr/sqlite3wrapper.c   
(props changed)
subversion/branches/ev2-export/subversion/libsvn_wc/update_editor.c
subversion/branches/ev2-export/subversion/svn/notify.c
subversion/branches/ev2-export/subversion/svnserve/svnserve.c
subversion/branches/ev2-export/subversion/tests/cmdline/lock_tests.py
subversion/branches/ev2-export/subversion/tests/cmdline/merge_tests.py

subversion/branches/ev2-export/subversion/tests/libsvn_diff/diff-diff3-test.c
subversion/branches/ev2-export/tools/dev/fsfs-access-map.c   (props changed)
subversion/branches/ev2-export/tools/dev/fsfs-reorg.c   (props changed)
subversion/branches/ev2-export/tools/server-side/fsfs-stats.c   (props 
changed)

Propchange: subversion/branches/ev2-export/
--
  Merged /subversion/trunk:r1436684-1436886

Modified: subversion/branches/ev2-export/subversion/libsvn_ra_serf/update.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra_serf/update.c?rev=1436902&r1=1436901&r2=1436902&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_ra_serf/update.c Tue Jan 
22 13:25:17 2013
@@ -2738,6 +2738,28 @@ create_update_report_body(serf_bucket_t 
   return SVN_NO_ERROR;
 }
 
+/* Serf callback to setup update request headers. */
+static svn_error_t *
+setup_update_report_headers(serf_bucket_t *headers,
+void *baton,
+apr_pool_t *pool)
+{
+  report_context_t *report = baton;
+
+  if (report->sess->using_compression)
+{
+  serf_bucket_headers_setn(headers, "Accept-Encoding",
+   "gzip;svndiff1;q=0.9,svndiff;q=0.8");
+}
+  else
+{
+  serf_bucket_headers_setn(headers, "Accept-Encoding",
+   "svndiff1;q=0.9,svndiff;q=0.8");
+}
+
+  return SVN_NO_ERROR;
+}
+
 static svn_error_t *
 finish_report(void *report_baton,
   apr_pool_t *pool)
@@ -2783,6 +2805,9 @@ finish_report(void *report_baton,
   handler->body_delegate = create_update_report_body;
   handler->body_delegate_baton = report;
   handler->body_type = "text/xml";
+  handler->custom_accept_encoding = TRUE;
+  handler->header_delegate = setup_update_report_headers;
+  handler->header_delegate_baton = report;
   handler->conn = sess->conns[0];
   handler->session = sess;
 

Propchange: 
subversion/branches/ev2-export/subversion/libsvn_subr/sqlite3wrapper.c
--
svn:eol-style = native

Modified: subversion/branches/ev2-export/subversion/libsvn_wc/update_editor.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_wc/update_editor.c?rev=1436902&r1=1436901&r2=1436902&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_wc/update_editor.c 
(original)
+++ subversion/branches/ev2-export/subversion/libsvn_wc/update_editor.c Tue Jan 
22 13:25:17 2013
@@ -4125,11 +4125,17 @@ close_file(void *file_baton,
and we should likewise remove our cached copy of it.  */
 if (! strcmp(prop->name, SVN_PROP_ENTRY_LOCK_TOKEN))
   {
-SVN_ERR_ASSERT(prop->value == NULL);
-SVN_ERR(svn_wc__db_lock_remove(eb->db, fb->local_abspath,
-   scratch_pool));
+/* If we lose the lock, but not because we are switching to
+   another url, remove the state lock from the wc */
+if (! eb->switch_relpath 
+|| strcmp(fb->new_relpath, fb->old_repos_relpath) == 0)
+  {
+SVN_ERR_ASSERT(prop->value == NULL);
+SVN_ERR(svn_wc__db_lock_remove(eb->db, fb->local_abspath,
+   scratch_pool));
 
-lock_state = svn_wc_notify_lock_state_unlocked;
+lock_state = svn_wc_notify_lock_state_unlocked;
+  }
 break;
   }
   }

Modified: subversion/branches/ev2-export/subversion/svn/notify.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svn/notify.c?rev=1436902&

svn commit: r1436688 [12/12] - in /subversion/branches/ev2-export: ./ contrib/client-side/emacs/ notes/commit-access-templates/ subversion/bindings/javahl/native/ subversion/bindings/swig/perl/native/

2013-01-21 Thread hwright
Modified: subversion/branches/ev2-export/tools/server-side/svnpubsub/svntweet.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/server-side/svnpubsub/svntweet.py?rev=1436688&r1=1436687&r2=1436688&view=diff
==
--- subversion/branches/ev2-export/tools/server-side/svnpubsub/svntweet.py 
(original)
+++ subversion/branches/ev2-export/tools/server-side/svnpubsub/svntweet.py Mon 
Jan 21 23:37:01 2013
@@ -23,7 +23,7 @@
 #  svntweet.py  my-config.json
 #
 # With my-config.json containing stream paths and the twitter auth info:
-#{"stream": "http://svn.apache.org:2069/commits/xml";,
+#{"stream": "http://svn.apache.org:2069/commits";,
 # "username": "asfcommits",
 # "password": "MyLuggageComboIs1234"}
 #
@@ -43,8 +43,8 @@ from twisted.python import failure, log
 from twisted.web.client import HTTPClientFactory, HTTPPageDownloader
 
 from urlparse import urlparse
-from xml.sax import handler, make_parser
 import time
+import posixpath
 
 sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), 
"twitty-twister", "lib"))
 try:
@@ -81,81 +81,60 @@ class HTTPStream(HTTPClientFactory):
 def pageEnd(self):
 pass
 
-class Revision:
-def __init__(self, repos, rev):
-self.repos = repos
-self.rev = rev
-self.dirs_changed = []
-self.author = None
-self.log = None
-self.date = None
-
-class StreamHandler(handler.ContentHandler):
-def __init__(self, bdec):
-handler.ContentHandler.__init__(self)
-self.bdec =  bdec
-self.rev = None
-self.text_value = None
-
-def startElement(self, name, attrs):
-#print "start element: %s" % (name)
-"""
-
-joehni
-2009-09-16 06:00:21 + (Wed, 16 Sep 2009)
-pom.xml is not executable.
-
commons/proper/commons-parent/trunk/
-
-"""
-if name == "commit":
-self.rev = Revision(repos=attrs['repository'],
-rev=int(attrs['revision']))
-elif name == "stillalive":
-self.bdec.stillalive()
-def characters(self, data):
-if self.text_value is not None:
-self.text_value = self.text_value + data
-else:
-self.text_value = data
-
-def endElement(self, name):
-#print "end   element: %s" % (name)
-if name == "commit":
-self.bdec.commit(self.rev)
-self.rev = None
-if self.text_value is not None and self.rev is not None:
-if name == "path":
-self.rev.dirs_changed.append(self.text_value.strip())
-if name == "author":
-self.rev.author = self.text_value.strip()
-if name == "date":
-self.rev.date = self.text_value.strip()
-if name == "log":
-self.rev.log = self.text_value.strip()
-self.text_value = None
+class Commit(object):
+  def __init__(self, commit):
+self.__dict__.update(commit)
+
+class JSONRecordHandler:
+  def __init__(self, bdec):
+self.bdec = bdec
+
+  def feed(self, record):
+obj = json.loads(record)
+if 'svnpubsub' in obj:
+  actual_version = obj['svnpubsub'].get('version')
+  EXPECTED_VERSION = 1 
+  if actual_version != EXPECTED_VERSION:
+raise ValueException("Unknown svnpubsub format: %r != %d"
+ % (actual_format, expected_format))
+elif 'commit' in obj:
+  commit = Commit(obj['commit'])
+  if not hasattr(commit, 'type'):
+raise ValueException("Commit object is missing type field.")
+  if not hasattr(commit, 'format'):
+raise ValueException("Commit object is missing format field.")
+  if commit.type != 'svn' and commit.format != 1:
+raise ValueException("Unexpected type and/or format: %s:%s"
+ % (commit.type, commit.format))
+  self.bdec.commit(commit)
+elif 'stillalive' in obj:
+  self.bdec.stillalive()
 
-
-class XMLHTTPStream(HTTPStream):
+class JSONHTTPStream(HTTPStream):
 def __init__(self, url, bdec):
 HTTPStream.__init__(self, url)
 self.bdec =  bdec
-self.parser = make_parser(['xml.sax.expatreader'])
-self.handler = StreamHandler(bdec)
-self.parser.setContentHandler(self.handler)
+self.ibuffer = []
+self.parser = JSONRecordHandler(bdec)
 
-def pageStart(self, parital):
+def pageStart(self, partial):
 self.bdec.pageStart()
 
 def pagePart(self, data):
-self.parser.feed(data)
+eor = data.find("\0")
+if eor >= 0:
+self.ibuffer.append(data[0:eor])
+self.parser.feed(''.join(self.ibuffer))
+self.ibuffer = [data[eor+1:]]
+else:
+self.ibuffer.append(data)
 
 def connectTo(url, bdec):
 u = urlparse

svn commit: r1436688 [7/12] - in /subversion/branches/ev2-export: ./ contrib/client-side/emacs/ notes/commit-access-templates/ subversion/bindings/javahl/native/ subversion/bindings/swig/perl/native/t

2013-01-21 Thread hwright
Modified: 
subversion/branches/ev2-export/subversion/libsvn_wc/wc_db_update_move.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_wc/wc_db_update_move.c?rev=1436688&r1=1436687&r2=1436688&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_wc/wc_db_update_move.c 
(original)
+++ subversion/branches/ev2-export/subversion/libsvn_wc/wc_db_update_move.c Mon 
Jan 21 23:37:01 2013
@@ -21,7 +21,13 @@
  * 
  */
 
-/* This editor is used during resolution of tree conflicts.
+/* This file implements an editor and an edit driver which are used
+ * to resolve an "incoming edit, local move-away" tree conflict resulting
+ * from an update (or switch).
+ *
+ * Our goal is to be able to resolve this conflict such that the end
+ * result is just the same as if the user had run the update *before*
+ * the local move.
  *
  * When an update (or switch) produces incoming changes for a locally
  * moved-away subtree, it updates the base nodes of the moved-away tree
@@ -40,9 +46,8 @@
  * layer. The destination may have additional higher op-depths
  * representing adds, deletes, moves within the move destination. [2]
  *
- * After the intial move an update, or this editor for trees that have
- * been moved more than once, has modified the NODES in the move
- * source, and introduced a tree-conflict since the source and
+ * After the intial move an update has modified the NODES in the move
+ * source and may have introduced a tree-conflict since the source and
  * destination trees are no longer equivalent.  The source is a
  * different revision and may have text, property and tree changes
  * compared to the destination.  The driver will compare the two NODES
@@ -71,6 +76,8 @@
 
 #define SVN_WC__I_AM_WC_DB
 
+#include 
+
 #include "svn_checksum.h"
 #include "svn_dirent_uri.h"
 #include "svn_error.h"
@@ -78,6 +85,7 @@
 #include "svn_wc.h"
 #include "svn_props.h"
 #include "svn_pools.h"
+#include "svn_sorts.h"
 
 #include "private/svn_skel.h"
 #include "private/svn_sqlite.h"
@@ -115,6 +123,7 @@ struct tc_editor_baton {
  non-Ev2, depth-first, drive for this to make sense. */
   const char *conflict_root_relpath;
 
+  svn_wc_operation_t operation;
   svn_wc_conflict_version_t *old_version;
   svn_wc_conflict_version_t *new_version;
   svn_wc_notify_func2_t notify_func;
@@ -129,12 +138,15 @@ mark_tree_conflict(struct tc_editor_bato
svn_node_kind_t new_kind,
svn_wc_conflict_reason_t reason,
svn_wc_conflict_action_t action,
+   svn_skel_t *conflict,
apr_pool_t *scratch_pool)
 {
   const char *repos_relpath;
-  svn_skel_t *conflict = svn_wc__conflict_skel_create(scratch_pool);
   svn_wc_conflict_version_t *old_version, *new_version;
 
+  if (!conflict)
+conflict = svn_wc__conflict_skel_create(scratch_pool);
+
   b->conflict_root_relpath = apr_pstrdup(b->result_pool, local_relpath);
 
   SVN_ERR(svn_wc__conflict_skel_add_tree_conflict(
@@ -173,10 +185,20 @@ mark_tree_conflict(struct tc_editor_bato
 new_kind,
 scratch_pool);
 
-  /* What about switch? */
-  SVN_ERR(svn_wc__conflict_skel_set_op_update(conflict,
-  old_version, new_version,
-  scratch_pool, scratch_pool));
+  if (b->operation == svn_wc_operation_update)
+{
+  SVN_ERR(svn_wc__conflict_skel_set_op_update(
+conflict, old_version, new_version,
+scratch_pool, scratch_pool));
+}
+  else
+{
+  assert(b->operation == svn_wc_operation_switch);
+  SVN_ERR(svn_wc__conflict_skel_set_op_switch(
+  conflict, old_version, new_version,
+  scratch_pool, scratch_pool));
+}
+
   SVN_ERR(svn_wc__db_mark_conflict_internal(b->wcroot, local_relpath,
 conflict, scratch_pool));
 
@@ -194,6 +216,7 @@ check_tree_conflict(svn_boolean_t *is_co
 struct tc_editor_baton *b,
 const char *local_relpath,
 svn_node_kind_t kind,
+svn_wc_conflict_action_t action,
 apr_pool_t *scratch_pool)
 {
   svn_sqlite__stmt_t *stmt;
@@ -240,7 +263,8 @@ check_tree_conflict(svn_boolean_t *is_co
 {
   conflict_root_relpath = svn_relpath_dirname(conflict_root_relpath,
   scratch_pool);
-  old_kind = svn_node_dir;
+  old_kind = kind = svn_node_dir;
+  action = svn_wc_conflict_action_edit;
 }
 
   SVN_ERR(svn_wc__db_read_conflict_internal(&conflict, b->wcroot,
@@ -248,8 +272,22 @@ check_tree_conflict(svn_boolean_t *is_co

svn commit: r1436688 [2/12] - in /subversion/branches/ev2-export: ./ contrib/client-side/emacs/ notes/commit-access-templates/ subversion/bindings/javahl/native/ subversion/bindings/swig/perl/native/t

2013-01-21 Thread hwright
Modified: subversion/branches/ev2-export/subversion/libsvn_client/externals.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/externals.c?rev=1436688&r1=1436687&r2=1436688&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_client/externals.c 
(original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/externals.c Mon Jan 
21 23:37:01 2013
@@ -351,9 +351,6 @@ switch_file_external(const char *local_a
  svn_client_ctx_t *ctx,
  apr_pool_t *scratch_pool)
 {
-  apr_pool_t *subpool = svn_pool_create(scratch_pool);
-  const char *dir_abspath;
-  const char *target;
   svn_config_t *cfg = ctx->config ? apr_hash_get(ctx->config,
  SVN_CONFIG_CATEGORY_CONFIG,
  APR_HASH_KEY_STRING) : NULL;
@@ -361,8 +358,6 @@ switch_file_external(const char *local_a
   const char *diff3_cmd;
   const char *preserved_exts_str;
   const apr_array_header_t *preserved_exts;
-  svn_boolean_t locked_here;
-  svn_error_t *err = NULL;
   svn_node_kind_t kind, external_kind;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
@@ -377,32 +372,27 @@ switch_file_external(const char *local_a
  SVN_CONFIG_OPTION_DIFF3_CMD, NULL);
 
   if (diff3_cmd != NULL)
-SVN_ERR(svn_path_cstring_to_utf8(&diff3_cmd, diff3_cmd, subpool));
+SVN_ERR(svn_path_cstring_to_utf8(&diff3_cmd, diff3_cmd, scratch_pool));
 
   /* See which files the user wants to preserve the extension of when
  conflict files are made. */
   svn_config_get(cfg, &preserved_exts_str, SVN_CONFIG_SECTION_MISCELLANY,
  SVN_CONFIG_OPTION_PRESERVED_CF_EXTS, "");
   preserved_exts = *preserved_exts_str
-? svn_cstring_split(preserved_exts_str, "\n\r\t\v ", FALSE, subpool)
+? svn_cstring_split(preserved_exts_str, "\n\r\t\v ", FALSE, scratch_pool)
 : NULL;
 
-  svn_dirent_split(&dir_abspath, &target, local_abspath, subpool);
+  {
+const char *wcroot_abspath;
 
-  /* Try to get a access baton for the anchor using the input access
- baton.  If this fails and returns SVN_ERR_WC_NOT_LOCKED, then try
- to get a new access baton to support inserting a file external
- into a directory external. */
-  SVN_ERR(svn_wc_locked2(&locked_here, NULL, ctx->wc_ctx, dir_abspath,
- subpool));
-  if (!locked_here)
-{
-  const char *wcroot_abspath;
+SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, local_abspath,
+   scratch_pool, scratch_pool));
 
-  SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, dir_abspath,
- subpool, subpool));
+/* File externals can only be installed inside the current working copy.
+   So verify if the working copy that contains/will contain the target
+   is the defining abspath, or one of its ancestors */
 
-  if (!svn_dirent_is_ancestor(wcroot_abspath, def_dir_abspath))
+if (!svn_dirent_is_ancestor(wcroot_abspath, def_dir_abspath))
 return svn_error_createf(
 SVN_ERR_WC_BAD_PATH, NULL,
 _("Cannot insert a file external defined on '%s' "
@@ -411,18 +401,14 @@ switch_file_external(const char *local_a
scratch_pool),
 svn_dirent_local_style(wcroot_abspath,
scratch_pool));
-}
+  }
 
-  err = svn_wc_read_kind(&kind, ctx->wc_ctx, local_abspath, FALSE, subpool);
-  if (err)
-goto cleanup;
-
-  err = svn_wc__read_external_info(&external_kind, NULL, NULL, NULL, NULL,
-   ctx->wc_ctx, local_abspath, local_abspath,
-   TRUE, scratch_pool, scratch_pool);
+  SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, local_abspath, FALSE,
+   scratch_pool));
 
-  if (err)
-goto cleanup;
+  SVN_ERR(svn_wc__read_external_info(&external_kind, NULL, NULL, NULL, NULL,
+ ctx->wc_ctx, local_abspath, local_abspath,
+ TRUE, scratch_pool, scratch_pool));
 
   /* If there is a versioned item with this name, ensure it's a file
  external before working with it.  If there is no entry in the
@@ -432,35 +418,25 @@ switch_file_external(const char *local_a
 {
   if (external_kind != svn_node_file)
 {
-  if (!locked_here)
-SVN_ERR(svn_wc__release_write_lock(ctx->wc_ctx, dir_abspath,
-   subpool));
-
   return svn_error_createf(
   SVN_ERR_CLIENT_FILE_EXTERNAL_OVERWRITE_VERSIONED, 0,
  _("The file external from '%s' cannot overwrite the existing "
"versioned item at '%s'"),
-   

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

2013-01-21 Thread hwright
Author: hwright
Date: Mon Jan 21 21:14:47 2013
New Revision: 1436622

URL: http://svn.apache.org/viewvc?rev=1436622&view=rev
Log:
Followup to r1436580: Add a const to silence a compiler warning.

* subversion/libsvn_client/patch.c
  (get_hunk_info): Constify a variable.

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

Modified: subversion/trunk/subversion/libsvn_client/patch.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/patch.c?rev=1436622&r1=1436621&r2=1436622&view=diff
==
--- subversion/trunk/subversion/libsvn_client/patch.c (original)
+++ subversion/trunk/subversion/libsvn_client/patch.c Mon Jan 21 21:14:47 2013
@@ -1546,7 +1546,7 @@ get_hunk_info(hunk_info_t **hi, patch_ta
 {
   if (target->kind_on_disk == svn_node_file)
 {
-  svn_io_dirent2_t *dirent;
+  const svn_io_dirent2_t *dirent;
   SVN_ERR(svn_io_stat_dirent2(&dirent, target->local_abspath, FALSE,
   TRUE, scratch_pool, scratch_pool));
 




svn commit: r1432504 [6/6] - in /subversion/branches/ev2-export: ./ contrib/client-side/emacs/ notes/http-and-webdav/ subversion/bindings/javahl/native/ subversion/include/ subversion/include/private/

2013-01-12 Thread hwright
Modified: subversion/branches/ev2-export/tools/dev/fsfs-access-map.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/dev/fsfs-access-map.c?rev=1432504&r1=1432503&r2=1432504&view=diff
==
--- subversion/branches/ev2-export/tools/dev/fsfs-access-map.c (original)
+++ subversion/branches/ev2-export/tools/dev/fsfs-access-map.c Sat Jan 12 
20:24:12 2013
@@ -65,7 +65,7 @@ typedef struct file_stats_t
* (i.e. number of non-zero entries in read_map). */
   apr_int64_t unique_clusters_read;
 
-  /* cluster -> read count mapping (1 byte per cluster, saturated at 255) */
+  /* cluster -> read count mapping (1 word per cluster, saturated at 64k) */
   apr_array_header_t *read_map;
 
 } file_stats_t;
@@ -90,6 +90,7 @@ typedef struct handle_info_t
 
 /* useful typedef */
 typedef unsigned char byte;
+typedef unsigned short word;
 
 /* global const char * file name -> *file_info_t map */
 static apr_hash_t *files = NULL;
@@ -121,17 +122,17 @@ store_read_info(handle_info_t *handle_in
 
   /* auto-expand access map in case the file later shrunk or got deleted */
   while (handle_info->file->read_map->nelts <= last_cluster)
-APR_ARRAY_PUSH(handle_info->file->read_map, byte) = 0;
+APR_ARRAY_PUSH(handle_info->file->read_map, word) = 0;
 
   /* accumulate the accesses per cluster. Saturate and count first
* (i.e. disjoint) accesses clusters */
   handle_info->file->clusters_read += last_cluster - first_cluster + 1;
   for (i = first_cluster; i <= last_cluster; ++i)
 {
-  byte *count = &APR_ARRAY_IDX(handle_info->file->read_map, i, byte);
+  word *count = &APR_ARRAY_IDX(handle_info->file->read_map, i, word);
   if (*count == 0)
 handle_info->file->unique_clusters_read++;
-  if (*count < 255)
+  if (*count < 0x)
 ++*count;
 }
 }
@@ -173,7 +174,7 @@ open_file(const char *name, int handle)
   cluster_count = (apr_size_t)(1 + (file->size - 1) / cluster_size);
   file->read_map = apr_array_make(pool, file->size
   ? cluster_count
-  : 1, sizeof(byte));
+  : 1, sizeof(word));
 
   while (file->read_map->nelts < cluster_count)
 APR_ARRAY_PUSH(file->read_map, byte) = 0;
@@ -247,7 +248,7 @@ seek_file(int handle, apr_int64_t locati
* there will probably be a real I/O seek on the following read.
*/
   if (   handle_info->file->read_map->nelts <= cluster
-  || APR_ARRAY_IDX(handle_info->file->read_map, cluster, byte) == 0)
+  || APR_ARRAY_IDX(handle_info->file->read_map, cluster, word) == 0)
 handle_info->file->uncached_seek_count++;
 }
 }
@@ -402,33 +403,38 @@ interpolate(int y0, int x0, int y1, int 
 /* Return the BMP-encoded 24 bit COLOR for the given value.
  */
 static void
-select_color(byte color[3], byte value)
+select_color(byte color[3], word value)
 {
+  enum { COLOR_COUNT = 10 };
+
   /* value -> color table. Missing values get interpolated.
* { count, B - G - R } */
-  byte table[7][4] =
+  word table[COLOR_COUNT][4] =
 {
-  {   0, 255, 255, 255 },   /* unread -> white */
-  {   1, 128, 128,   0 },   /* read once -> turquoise  */
-  {   2,   0, 128,   0 },   /* twice  -> green */
-  {   4,   0, 192, 192 },   /*4x  -> yellow */
-  {  16,   0,   0, 192 },   /*   16x  -> red */
-  {  64, 192,   0, 128 },   /*   64x  -> purple */
-  { 255,   0,   0,   0 }/*   max  -> black */
+  { 0, 255, 255, 255 },   /* unread -> white */
+  { 1,  64, 128,   0 },   /* read once -> turquoise  */
+  { 2,   0, 128,   0 },   /* twice  -> green */
+  { 8,   0, 192, 192 },   /*8x  -> yellow */
+  {64,   0,   0, 192 },   /*   64x  -> red */
+  {   256,  64,  32, 230 },   /*  256x  -> bright red */
+  {   512, 192,   0, 128 },   /*  512x  -> purple */
+  {  1024,  96,  32,  96 },   /* 1024x  -> UV purple */
+  {  4096,  32,  16,  32 },   /* 4096x  -> EUV purple */
+  { 65535,   0,   0,   0 }/*   max  -> black */
 };
 
   /* find upper limit entry for value */
   int i;
-  for (i = 0; i < 7; ++i)
+  for (i = 0; i < COLOR_COUNT; ++i)
 if (table[i][0] >= value)
   break;
 
   /* exact match? */
   if (table[i][0] == value)
 {
-  color[0] = table[i][1];
-  color[1] = table[i][2];
-  color[2] = table[i][3];
+  color[0] = (byte)table[i][1];
+  color[1] = (byte)table[i][2];
+  color[2] = (byte)table[i][3];
 }
   else
 {
@@ -445,10 +451,11 @@ select_color(byte color[3], byte value)
 }
 }
 
-/* write the cluster read map for all files in INFO as BMP image to FILE.
+/* Writes a BMP image header to FILE for a 24-bit color picture of the
+ * given XSIZE and YSIZE dimension.
  */
 static void

svn commit: r1432504 [3/6] - in /subversion/branches/ev2-export: ./ contrib/client-side/emacs/ notes/http-and-webdav/ subversion/bindings/javahl/native/ subversion/include/ subversion/include/private/

2013-01-12 Thread hwright
Modified: subversion/branches/ev2-export/subversion/libsvn_wc/wc_db_pristine.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_wc/wc_db_pristine.c?rev=1432504&r1=1432503&r2=1432504&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_wc/wc_db_pristine.c 
(original)
+++ subversion/branches/ev2-export/subversion/libsvn_wc/wc_db_pristine.c Sat 
Jan 12 20:24:12 2013
@@ -25,6 +25,7 @@
 
 #define SVN_WC__I_AM_WC_DB
 
+#include "svn_pools.h"
 #include "svn_dirent_uri.h"
 
 #include "wc.h"
@@ -500,118 +501,84 @@ svn_wc__db_pristine_get_sha1(const svn_c
   return svn_error_trace(svn_sqlite__reset(stmt));
 }
 
-/* Transaction implementation of svn_wc__db_pristine_transfer().
-   We have a lock on DST_WCROOT and a lock on SRC_WCROOT.
-
-   Outputs:
-   *TEMPFILE_ABSPATH is the path to the source file that is to be moved
-   into place.
-   *PRISTINE_ABSPATH is the target path for the file (within the pristine
-   store).
-   *SHA1_CHECKSUM is the pristine text's SHA-1 checksum.
-   *MD5_CHECKSUM is the pristine text's MD-5 checksum.
-
-   If there is nothing to transfer (it is not found in the source, or is
-   already in the destination), then set *TEMPFILE_ABSPATH_P to NULL.
- */
+/* Handle the moving of a pristine from SRC_WCROOT to DST_WCROOT. The existing
+   pristine in SRC_WCROOT is described by CHECKSUM, MD5_CHECKSUM and SIZE */
 static svn_error_t *
-pristine_transfer_txn2(const char **tempfile_abspath,
-   const char **pristine_abspath,
-   const svn_checksum_t **sha1_checksum,
-   const svn_checksum_t **md5_checksum,
-   svn_wc__db_wcroot_t *src_wcroot,
-   svn_wc__db_wcroot_t *dst_wcroot,
-   const char *src_relpath,
-   svn_cancel_func_t cancel_func,
-   void *cancel_baton,
-   apr_pool_t *scratch_pool)
+maybe_transfer_one_pristine(svn_wc__db_wcroot_t *src_wcroot,
+svn_wc__db_wcroot_t *dst_wcroot,
+const svn_checksum_t *checksum,
+const svn_checksum_t *md5_checksum,
+apr_int64_t size,
+svn_cancel_func_t cancel_func,
+void *cancel_baton,
+apr_pool_t *scratch_pool)
 {
+  const char *pristine_abspath;
   svn_sqlite__stmt_t *stmt;
-  svn_boolean_t have_row;
+  svn_stream_t *src_stream;
+  svn_stream_t *dst_stream;
+  const char *tmp_abspath;
+  const char *src_abspath;
+  int affected_rows;
+  svn_error_t *err;
 
-  *tempfile_abspath = NULL;
+  SVN_ERR(svn_sqlite__get_statement(&stmt, dst_wcroot->sdb,
+STMT_INSERT_OR_IGNORE_PRISTINE));
+  SVN_ERR(svn_sqlite__bind_checksum(stmt, 1, checksum, scratch_pool));
+  SVN_ERR(svn_sqlite__bind_checksum(stmt, 2, md5_checksum, scratch_pool));
+  SVN_ERR(svn_sqlite__bind_int64(stmt, 3, size));
 
-  /* Get the SHA1 checksum */
-  SVN_ERR(svn_sqlite__get_statement(&stmt, src_wcroot->sdb,
-STMT_SELECT_NODE_INFO));
-  SVN_ERR(svn_sqlite__bindf(stmt, "is",
-src_wcroot->wc_id, src_relpath));
-  SVN_ERR(svn_sqlite__step(&have_row, stmt));
-  if (have_row)
-SVN_ERR(svn_sqlite__column_checksum(sha1_checksum, stmt, 6,
-scratch_pool));
-  SVN_ERR(svn_sqlite__reset(stmt));
+  SVN_ERR(svn_sqlite__update(&affected_rows, stmt));
 
-  if (! *sha1_checksum)
-return SVN_NO_ERROR; /* Nothing to transfer */
+  if (affected_rows == 0)
+return SVN_NO_ERROR;
 
-  /* Check if we have the pristine in the destination wcroot */
-  SVN_ERR(svn_sqlite__get_statement(&stmt, dst_wcroot->sdb,
-STMT_SELECT_PRISTINE));
-  SVN_ERR(svn_sqlite__bind_checksum(stmt, 1, *sha1_checksum,
-scratch_pool));
-  SVN_ERR(svn_sqlite__step(&have_row, stmt));
-  SVN_ERR(svn_sqlite__reset(stmt));
+  SVN_ERR(svn_stream_open_unique(&dst_stream, &tmp_abspath,
+ pristine_get_tempdir(dst_wcroot,
+  scratch_pool,
+  scratch_pool),
+ svn_io_file_del_on_pool_cleanup,
+ scratch_pool, scratch_pool));
 
-  /* Destination repository already has this pristine. We're done */
-  if (have_row)
-return SVN_NO_ERROR;
+  SVN_ERR(get_pristine_fname(&src_abspath, src_wcroot->abspath, checksum,
+ scratch_pool, scratch_pool));
 
-  /* Verify if the pristine actually exists and get the MD5 in one query */
-  SVN_ERR(svn_sqlite__get_statement(&stmt, src_wcroot->sdb,
-STMT_

svn commit: r1430640 - /subversion/branches/ev2-export/subversion/libsvn_client/client.h

2013-01-08 Thread hwright
Author: hwright
Date: Wed Jan  9 00:17:04 2013
New Revision: 1430640

URL: http://svn.apache.org/viewvc?rev=1430640&view=rev
Log:
On the ev2-export branch:
Add an include to fix the build.

* subversion/libsvn_client/client.h:
  Include svn_client_private.h.

Modified:
subversion/branches/ev2-export/subversion/libsvn_client/client.h

Modified: subversion/branches/ev2-export/subversion/libsvn_client/client.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/client.h?rev=1430640&r1=1430639&r2=1430640&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_client/client.h (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/client.h Wed Jan  9 
00:17:04 2013
@@ -36,6 +36,7 @@
 #include "svn_client.h"
 
 #include "private/svn_magic.h"
+#include "private/svn_editor.h"
 #include "private/svn_client_private.h"
 
 #ifdef __cplusplus




svn commit: r1430634 [7/7] - in /subversion/branches/ev2-export: ./ build/win32/ doc/ subversion/bindings/cxxhl/src/ subversion/bindings/swig/ruby/test/ subversion/include/ subversion/include/private/

2013-01-08 Thread hwright
Modified: 
subversion/branches/ev2-export/subversion/tests/cmdline/merge_tree_conflict_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/merge_tree_conflict_tests.py?rev=1430634&r1=1430633&r2=1430634&view=diff
==
--- 
subversion/branches/ev2-export/subversion/tests/cmdline/merge_tree_conflict_tests.py
 (original)
+++ 
subversion/branches/ev2-export/subversion/tests/cmdline/merge_tree_conflict_tests.py
 Tue Jan  8 23:46:00 2013
@@ -765,7 +765,7 @@ def tree_conflicts_and_obstructions(sbox
 'beta': Item(status='  ', wc_rev=3),
 })
   expected_skip = wc.State(branch_path, {
-'alpha-moved' : Item(),
+'alpha-moved' : Item(verb='Skipped'),
 })
 
   svntest.actions.run_and_verify_merge(branch_path,
@@ -1313,16 +1313,16 @@ def tree_conflicts_merge_edit_onto_missi
 })
 
   expected_skip = svntest.wc.State('', {
-'F/alpha'   : Item(),
+'F/alpha'   : Item(verb='Skipped missing target'),
 # Obstruction handling improvements in 1.7 and 1.8 added
-'DF/D1/beta': Item(),
-'DDD/D1/D2/D3/zeta' : Item(),
-'DDD/D1/D2/D3'  : Item(),
-'DDF/D1/D2/gamma'   : Item(),
-'D/D1/delta': Item(),
-'D/D1'  : Item(),
-'DD/D1/D2/epsilon'  : Item(),
-'DD/D1/D2'  : Item(),
+'DF/D1/beta': Item(verb='Skipped missing target'),
+'DDD/D1/D2/D3/zeta' : Item(verb='Skipped'),
+'DDD/D1/D2/D3'  : Item(verb='Skipped missing target'),
+'DDF/D1/D2/gamma'   : Item(verb='Skipped missing target'),
+'D/D1/delta': Item(verb='Skipped'),
+'D/D1'  : Item(verb='Skipped missing target'),
+'DD/D1/D2/epsilon'  : Item(verb='Skipped'),
+'DD/D1/D2'  : Item(verb='Skipped missing target'),
 })
 
   # Currently this test fails because some parts of the merge
@@ -1385,14 +1385,14 @@ def tree_conflicts_merge_del_onto_missin
 })
 
   expected_skip = svntest.wc.State('', {
-'F/alpha'   : Item(),
-'D/D1'  : Item(),
+'F/alpha'   : Item(verb='Skipped missing target'),
+'D/D1'  : Item(verb='Skipped missing target'),
 # Obstruction handling improvements in 1.7 and 1.8 added
-'D/D1'  : Item(),
-'DD/D1/D2'  : Item(),
-'DF/D1/beta': Item(),
-'DDD/D1/D2/D3'  : Item(),
-'DDF/D1/D2/gamma'   : Item(),
+'D/D1'  : Item(verb='Skipped missing target'),
+'DD/D1/D2'  : Item(verb='Skipped missing target'),
+'DF/D1/beta': Item(verb='Skipped missing target'),
+'DDD/D1/D2/D3'  : Item(verb='Skipped missing target'),
+'DDF/D1/D2/gamma'   : Item(verb='Skipped missing target'),
 })
 
   svntest.actions.deep_trees_run_tests_scheme_for_merge(sbox,

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/patch_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/patch_tests.py?rev=1430634&r1=1430633&r2=1430634&view=diff
==
--- subversion/branches/ev2-export/subversion/tests/cmdline/patch_tests.py 
(original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/patch_tests.py Tue 
Jan  8 23:46:00 2013
@@ -278,7 +278,7 @@ def patch_absolute_paths(sbox):
   expected_status.tweak('A/B/E/alpha', status='M ')
 
   expected_skip = wc.State('', {
-lambda_path:  Item(),
+lambda_path:  Item(verb='Skipped missing target'),
   })
 
   svntest.actions.run_and_verify_patch('.', os.path.abspath(patch_file_path),
@@ -1012,9 +1012,11 @@ def patch_add_new_dir(sbox):
'A/C'   : Item(status='D ', wc_rev=1),
   })
 
-  expected_skip = wc.State('', {A_Z_new_path : Item(),
-A_B_E_Y_new_path : Item(),
-A_C_new_path : Item()})
+  expected_skip = wc.State(
+'',
+{A_Z_new_path : Item(verb='Skipped missing target'),
+ A_B_E_Y_new_path : Item(verb='Skipped missing target'),
+ A_C_new_path : Item(verb='Skipped missing target')})
 
   svntest.actions.run_and_verify_patch(wc_dir,
os.path.abspath(patch_file_path),
@@ -2452,7 +2454,7 @@ def patch_same_twice(sbox):
 '  Skipped paths: 1\n',
   ]
 
-  expected_skip = wc.State('', {beta_path : Item()})
+  expected_skip = wc.State('', {beta_path : Item(verb='Skipped')})
 
   # See above comment about the iota patch being applied twice.
   iota_contents += "Some more bytes\n"
@@ -3973,7 +3975,9 @@ def patch_delete_and_skip(sbox):
   expected_status.tweak('A/B/E/alpha', status='D ')
   expected_status.tweak('A/B/E/beta', status='D ')
 
-  expected_skip = wc.State('', {skipped_path: Item()})
+  expected_skip = wc.State(
+'',
+{skipped_path: Item(verb='Skipped missing target')})
 
   svntest.actions.run_a

svn commit: r1430634 [1/7] - in /subversion/branches/ev2-export: ./ build/win32/ doc/ subversion/bindings/cxxhl/src/ subversion/bindings/swig/ruby/test/ subversion/include/ subversion/include/private/

2013-01-08 Thread hwright
Author: hwright
Date: Tue Jan  8 23:46:00 2013
New Revision: 1430634

URL: http://svn.apache.org/viewvc?rev=1430634&view=rev
Log:
On the ev2-export branch:
Bring up-to-date with trunk.  This introduces build breakage as a result of
r1430386 on trunk.

Added:
subversion/branches/ev2-export/subversion/include/private/svn_editor.h
  - copied unchanged from r1430567, 
subversion/trunk/subversion/include/private/svn_editor.h
subversion/branches/ev2-export/subversion/libsvn_client/diff_local.c
  - copied unchanged from r1430567, 
subversion/trunk/subversion/libsvn_client/diff_local.c
subversion/branches/ev2-export/subversion/libsvn_wc/wcroot_anchor.c
  - copied unchanged from r1430567, 
subversion/trunk/subversion/libsvn_wc/wcroot_anchor.c

subversion/branches/ev2-export/tools/hook-scripts/validate-files.conf.example
  - copied unchanged from r1430567, 
subversion/trunk/tools/hook-scripts/validate-files.conf.example
subversion/branches/ev2-export/tools/hook-scripts/validate-files.py
  - copied unchanged from r1430567, 
subversion/trunk/tools/hook-scripts/validate-files.py
subversion/branches/ev2-export/tools/server-side/svnauthz.c
  - copied unchanged from r1430567, 
subversion/trunk/tools/server-side/svnauthz.c
Removed:
subversion/branches/ev2-export/subversion/include/svn_editor.h
subversion/branches/ev2-export/tools/server-side/svnauthz-validate.c
Modified:
subversion/branches/ev2-export/   (props changed)
subversion/branches/ev2-export/Makefile.in
subversion/branches/ev2-export/autogen.sh
subversion/branches/ev2-export/build.conf
subversion/branches/ev2-export/build/win32/make_dist.py
subversion/branches/ev2-export/doc/doxygen.conf
subversion/branches/ev2-export/get-deps.sh
subversion/branches/ev2-export/subversion/bindings/cxxhl/src/exception.cpp
subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_wc.rb

subversion/branches/ev2-export/subversion/include/private/svn_client_private.h
subversion/branches/ev2-export/subversion/include/private/svn_fs_private.h
subversion/branches/ev2-export/subversion/include/private/svn_subr_private.h
subversion/branches/ev2-export/subversion/include/private/svn_wc_private.h
subversion/branches/ev2-export/subversion/include/svn_client.h
subversion/branches/ev2-export/subversion/include/svn_dav.h
subversion/branches/ev2-export/subversion/include/svn_delta.h
subversion/branches/ev2-export/subversion/include/svn_fs.h
subversion/branches/ev2-export/subversion/include/svn_repos.h
subversion/branches/ev2-export/subversion/include/svn_wc.h
subversion/branches/ev2-export/subversion/libsvn_client/client.h
subversion/branches/ev2-export/subversion/libsvn_client/commit.c
subversion/branches/ev2-export/subversion/libsvn_client/commit_util.c
subversion/branches/ev2-export/subversion/libsvn_client/copy.c
subversion/branches/ev2-export/subversion/libsvn_client/delete.c
subversion/branches/ev2-export/subversion/libsvn_client/deprecated.c
subversion/branches/ev2-export/subversion/libsvn_client/diff.c
subversion/branches/ev2-export/subversion/libsvn_client/diff_summarize.c
subversion/branches/ev2-export/subversion/libsvn_client/externals.c
subversion/branches/ev2-export/subversion/libsvn_client/info.c
subversion/branches/ev2-export/subversion/libsvn_client/merge.c
subversion/branches/ev2-export/subversion/libsvn_client/repos_diff.c
subversion/branches/ev2-export/subversion/libsvn_client/status.c
subversion/branches/ev2-export/subversion/libsvn_delta/editor.c
subversion/branches/ev2-export/subversion/libsvn_diff/diff_file.c
subversion/branches/ev2-export/subversion/libsvn_fs/editor.c
subversion/branches/ev2-export/subversion/libsvn_fs_fs/fs_fs.c
subversion/branches/ev2-export/subversion/libsvn_fs_fs/tree.c
subversion/branches/ev2-export/subversion/libsvn_ra/deprecated.h
subversion/branches/ev2-export/subversion/libsvn_ra/editor.c
subversion/branches/ev2-export/subversion/libsvn_ra_serf/options.c
subversion/branches/ev2-export/subversion/libsvn_ra_serf/ra_serf.h
subversion/branches/ev2-export/subversion/libsvn_ra_svn/editorp.c
subversion/branches/ev2-export/subversion/libsvn_repos/authz.c
subversion/branches/ev2-export/subversion/libsvn_repos/commit.c
subversion/branches/ev2-export/subversion/libsvn_subr/properties.c
subversion/branches/ev2-export/subversion/libsvn_subr/sqlite.c
subversion/branches/ev2-export/subversion/libsvn_subr/version.c
subversion/branches/ev2-export/subversion/libsvn_wc/adm_ops.c
subversion/branches/ev2-export/subversion/libsvn_wc/conflicts.c
subversion/branches/ev2-export/subversion/libsvn_wc/conflicts.h
subversion/branches/ev2-export/subversion/libsvn_wc/copy.c
subversion/branches/ev2-export/subversion/libsvn_wc/diff_editor.c
subversion/branches/ev2-export/subversion/libsvn_wc/diff_loc

svn commit: r1430634 [4/7] - in /subversion/branches/ev2-export: ./ build/win32/ doc/ subversion/bindings/cxxhl/src/ subversion/bindings/swig/ruby/test/ subversion/include/ subversion/include/private/

2013-01-08 Thread hwright
Modified: subversion/branches/ev2-export/subversion/libsvn_wc/wc.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_wc/wc.h?rev=1430634&r1=1430633&r2=1430634&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/ev2-export/subversion/libsvn_wc/wc.h Tue Jan  8 
23:46:00 2013
@@ -767,6 +767,19 @@ svn_wc__externals_find_target_dups(apr_a
apr_pool_t *pool,
apr_pool_t *scratch_pool);
 
+/* Revert tree LOCAL_ABSPATH to depth DEPTH and notify for all
+   reverts. */
+svn_error_t *
+svn_wc__revert_internal(svn_wc__db_t *db,
+const char *local_abspath,
+svn_depth_t depth,
+svn_boolean_t use_commit_times,
+svn_cancel_func_t cancel_func,
+void *cancel_baton,
+svn_wc_notify_func2_t notify_func,
+void *notify_baton,
+apr_pool_t *scratch_pool);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */




svn commit: r1428707 - /subversion/branches/1.7.x/subversion/libsvn_subr/opt.c

2013-01-03 Thread hwright
Author: hwright
Date: Fri Jan  4 03:05:28 2013
New Revision: 1428707

URL: http://svn.apache.org/viewvc?rev=1428707&view=rev
Log:
Spiritually merge r1428706 from trunk, under the obvious fix rule.

Modified:
subversion/branches/1.7.x/subversion/libsvn_subr/opt.c

Modified: subversion/branches/1.7.x/subversion/libsvn_subr/opt.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_subr/opt.c?rev=1428707&r1=1428706&r2=1428707&view=diff
==
--- subversion/branches/1.7.x/subversion/libsvn_subr/opt.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_subr/opt.c Fri Jan  4 03:05:28 
2013
@@ -1088,7 +1088,7 @@ svn_opt__print_version_info(const char *
  "   compiled %s, %s\n\n"), pgm_name,
  SVN_VERSION, __DATE__, __TIME__));
   SVN_ERR(svn_cmdline_fputs(
- _("Copyright (C) 2012 The Apache Software Foundation.\n"
+ _("Copyright (C) 2013 The Apache Software Foundation.\n"
"This software consists of contributions made by many "
"people; see the NOTICE\n"
"file for more information.\n"




svn commit: r1428706 - /subversion/trunk/subversion/libsvn_subr/version.c

2013-01-03 Thread hwright
Author: hwright
Date: Fri Jan  4 02:59:02 2013
New Revision: 1428706

URL: http://svn.apache.org/viewvc?rev=1428706&view=rev
Log:
Happy New Year.

* subversion/libsvn_subr/version.c
  (svn_version_extended): Bump copyright year.

Modified:
subversion/trunk/subversion/libsvn_subr/version.c

Modified: subversion/trunk/subversion/libsvn_subr/version.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/version.c?rev=1428706&r1=1428705&r2=1428706&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/version.c (original)
+++ subversion/trunk/subversion/libsvn_subr/version.c Fri Jan  4 02:59:02 2013
@@ -129,7 +129,7 @@ svn_version_extended(svn_boolean_t verbo
   info->build_time = __TIME__;
   info->build_host = SVN_BUILD_HOST;
   info->copyright = apr_pstrdup
-(pool, _("Copyright (C) 2012 The Apache Software Foundation.\n"
+(pool, _("Copyright (C) 2013 The Apache Software Foundation.\n"
  "This software consists of contributions made by many people;\n"
  "see the NOTICE file for more information.\n"
  "Subversion is open source software, see "




svn commit: r1425774 - /subversion/branches/ev2-export/subversion/libsvn_client/import.c

2012-12-25 Thread hwright
Author: hwright
Date: Tue Dec 25 21:15:19 2012
New Revision: 1425774

URL: http://svn.apache.org/viewvc?rev=1425774&view=rev
Log:
On the ev2-export branch:
Fix import test 7 by re-adding a snippet of code omitted when we merged the
new inherited props code from trunk.

* subversion/libsvn_client/import.c
  (import): Ignore svn:ignore on newly created directories.  While we're here,
add an iterpool.

Modified:
subversion/branches/ev2-export/subversion/libsvn_client/import.c

Modified: subversion/branches/ev2-export/subversion/libsvn_client/import.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/import.c?rev=1425774&r1=1425773&r2=1425774&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_client/import.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/import.c Tue Dec 25 
21:15:19 2012
@@ -540,20 +540,27 @@ import(const char *local_abspath,
 {
   int i;
   apr_hash_t *dirents;
+  apr_pool_t *iterpool = svn_pool_create(pool);
 
   if (dirent->kind == svn_node_dir)
 {
+  /* If we are creating a new repository directory path to import to,
+ then we disregard any svn:ignore property. */
+  if (!no_ignore && new_entries->nelts)
+local_ignores = NULL;
+
   SVN_ERR(get_filtered_children(&dirents, local_abspath, excludes,
 local_ignores, global_ignores,
 filter_callback, filter_baton,
 ctx, pool, pool));
 }
 
-
   for (i = 0; i < new_entries->nelts; i++)
 {
   apr_array_header_t *children;
   const char *component = APR_ARRAY_IDX(new_entries, i, const char *);
+
+  svn_pool_clear(iterpool);
   relpath = svn_relpath_join(relpath, component, pool);
 
   /* If this is the last path component, and we're importing a
@@ -564,12 +571,12 @@ import(const char *local_abspath,
 
   if (i < new_entries->nelts - 1)
 {
-  children = apr_array_make(pool, 1, sizeof(const char *));
+  children = apr_array_make(iterpool, 1, sizeof(const char *));
   APR_ARRAY_PUSH(children, const char *) =
APR_ARRAY_IDX(new_entries, i + 1, const char *);
 }
   else
-SVN_ERR(svn_hash_keys(&children, dirents, pool));
+SVN_ERR(svn_hash_keys(&children, dirents, iterpool));
 
   SVN_ERR(svn_editor_add_directory(editor, relpath, children, props,
SVN_INVALID_REVNUM));




svn commit: r1425235 [3/3] - in /subversion/branches/ev2-export: ./ build/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_fs/ subversion/libsvn_repos/ subv

2012-12-21 Thread hwright
Modified: subversion/branches/ev2-export/subversion/svnserve/server.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svnserve/server.h?rev=1425235&r1=1425234&r2=1425235&view=diff
==
--- subversion/branches/ev2-export/subversion/svnserve/server.h (original)
+++ subversion/branches/ev2-export/subversion/svnserve/server.h Sat Dec 22 
03:14:36 2012
@@ -42,6 +42,7 @@ typedef struct server_baton_t {
   svn_repos_t *repos;
   const char *repos_name;  /* URI-encoded name of repository (not for authz) */
   svn_fs_t *fs;/* For convenience; same as svn_repos_fs(repos) */
+  const char *base;/* Base directory for config files */
   svn_config_t *cfg;   /* Parsed repository svnserve.conf */
   svn_config_t *pwdb;  /* Parsed password database */
   svn_authz_t *authzdb;/* Parsed authz rules */
@@ -87,24 +88,15 @@ typedef struct serve_params_t {
  which forces all connections to be read-only. */
   svn_boolean_t read_only;
 
+  /* The base directory for any relative configuration files. */
+  const char *base;
+
   /* A parsed repository svnserve configuration file, ala
  svnserve.conf.  If this is NULL, then no configuration file was
  specified on the command line.  If this is non-NULL, then
  per-repository svnserve.conf are not read. */
   svn_config_t *cfg;
 
-  /* A parsed repository password database.  If this is NULL, then
- either no svnserve configuration file was specified on the
- command line, or it was specified and it did not refer to a
- password database. */
-  svn_config_t *pwdb;
-
-  /* A parsed repository authorization database.  If this is NULL,
- then either no svnserve configuration file was specified on the
- command line, or it was specified and it did not refer to a
- authorization database. */
-  svn_authz_t *authzdb;
-
   /* A filehandle open for writing logs to; possibly NULL. */
   apr_file_t *log_file;
 
@@ -145,31 +137,24 @@ typedef struct serve_params_t {
 svn_error_t *serve(svn_ra_svn_conn_t *conn, serve_params_t *params,
apr_pool_t *pool);
 
-/* Load a svnserve configuration file located at FILENAME into CFG,
-   and if such as found, then:
+/* Load the password database for the listening server based on the
+   entries in the SERVER struct. 
 
-- set *PWDB to any referenced password database,
-- set *AUTHZDB to any referenced authorization database, and
-- set *USERNAME_CASE to the enumerated value of the
-  'force-username-case' configuration value (or its default).
-
-   If MUST_EXIST is true and FILENAME does not exist, then return an
-   error.  BASE may be specified as the base path to any referenced
-   password and authorization files found in FILENAME.
-
-   If SERVER is not NULL, log the real errors with SERVER and CONN but
-   return generic errors to the client.  CONN must not be NULL if SERVER
-   is not NULL. */
-svn_error_t *load_configs(svn_config_t **cfg,
-  svn_config_t **pwdb,
-  svn_authz_t **authzdb,
-  enum username_case_type *username_case,
-  const char *filename,
-  svn_boolean_t must_exist,
-  const char *base,
-  server_baton_t *server,
-  svn_ra_svn_conn_t *conn,
-  apr_pool_t *pool);
+   SERVER and CONN must not be NULL. The real errors will be logged with
+   SERVER and CONN but return generic errors to the client. */
+svn_error_t *load_pwdb_config(server_baton_t *server,
+  svn_ra_svn_conn_t *conn,
+  apr_pool_t *pool);
+
+/* Load the authz database for the listening server based on the
+   entries in the SERVER struct.
+
+   SERVER and CONN must not be NULL. The real errors will be logged with
+   SERVER and CONN but return generic errors to the client. */
+svn_error_t *load_authz_config(server_baton_t *server,
+   svn_ra_svn_conn_t *conn,
+   const char *repos_root,
+   apr_pool_t *pool);
 
 /* Initialize the Cyrus SASL library. POOL is used for allocations. */
 svn_error_t *cyrus_init(apr_pool_t *pool);

Modified: subversion/branches/ev2-export/subversion/svnserve/svnserve.8
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svnserve/svnserve.8?rev=1425235&r1=1425234&r2=1425235&view=diff
==
--- subversion/branches/ev2-export/subversion/svnserve/svnserve.8 (original)
+++ subversion/branches/ev2-export/subversion/svnserve/svnserve.8 Sat Dec 22 
03:14:36 2012
@@ -110,12 +110,12 @@ still backgrounds itself at startup time
 .TP 5
 \fB\-\-config\-file\fP=\fIfilename\fP
 When specified, \fBsvnserve\f

svn commit: r1425234 - /subversion/trunk/subversion/libsvn_fs/editor.c

2012-12-21 Thread hwright
Author: hwright
Date: Sat Dec 22 03:01:56 2012
New Revision: 1425234

URL: http://svn.apache.org/viewvc?rev=1425234&view=rev
Log:
For the Ev2 FS commit editor: ignore NULL properties when altering a directory.

* subversion/libsvn_fs/editor.c
  (alter_directory_cb): Only alter props if given.

Modified:
subversion/trunk/subversion/libsvn_fs/editor.c

Modified: subversion/trunk/subversion/libsvn_fs/editor.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/editor.c?rev=1425234&r1=1425233&r2=1425234&view=diff
==
--- subversion/trunk/subversion/libsvn_fs/editor.c (original)
+++ subversion/trunk/subversion/libsvn_fs/editor.c Sat Dec 22 03:01:56 2012
@@ -474,7 +474,8 @@ alter_directory_cb(void *baton,
   SVN_ERR(get_root(&root, eb));
   SVN_ERR(can_modify(root, fspath, revision, scratch_pool));
 
-  SVN_ERR(alter_props(root, fspath, props, scratch_pool));
+  if (props)
+SVN_ERR(alter_props(root, fspath, props, scratch_pool));
 
   return SVN_NO_ERROR;
 }




svn commit: r1421650 - /subversion/trunk/build/ac-macros/swig.m4

2012-12-13 Thread hwright
Author: hwright
Date: Fri Dec 14 03:24:02 2012
New Revision: 1421650

URL: http://svn.apache.org/viewvc?rev=1421650&view=rev
Log:
Similar to r1421645, but for the Python bindings: filter out noisy warnings.

* build/ac-macros/swig.m4
  (SVN_FIND_SWIG): Filter some noise from the output of 'make swig-py'.

Modified:
subversion/trunk/build/ac-macros/swig.m4

Modified: subversion/trunk/build/ac-macros/swig.m4
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/swig.m4?rev=1421650&r1=1421649&r2=1421650&view=diff
==
--- subversion/trunk/build/ac-macros/swig.m4 (original)
+++ subversion/trunk/build/ac-macros/swig.m4 Fri Dec 14 03:24:02 2012
@@ -120,9 +120,13 @@ AC_DEFUN(SVN_FIND_SWIG,
 ])
 SWIG_PY_COMPILE="$ac_cv_python_compile $CFLAGS"
 
-dnl Swig-generated code results in a number of shadowed variables, so
-dnl ignore those warnings when compiling swig-py
-SWIG_PY_COMPILE=`echo "$SWIG_PY_COMPILE" | $SED -e 's/-Wshadow //'`
+dnl Swig-generated code results in a number of shadowed variables and other
+dnl warnings, so ignore them when compiling swig-py
+SVN_STRIP_FLAG(SWIG_PY_COMPILE, [-Wall])
+SVN_STRIP_FLAG(SWIG_PY_COMPILE, [-Wunused])
+SVN_STRIP_FLAG(SWIG_PY_COMPILE, [-Wshadow])
+SVN_STRIP_FLAG(SWIG_PY_COMPILE, [-Wmissing-prototypes])
+SVN_STRIP_FLAG(SWIG_PY_COMPILE, [-Wmissing-declarations])
 
 AC_CACHE_CHECK([for linking Python extensions], [ac_cv_python_link],[
   ac_cv_python_link="`$PYTHON ${abs_srcdir}/build/get-py-info.py --link`"




svn commit: r1421648 - in /subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby: swigutil_rb.c swigutil_rb.h

2012-12-13 Thread hwright
Author: hwright
Date: Fri Dec 14 03:12:29 2012
New Revision: 1421648

URL: http://svn.apache.org/viewvc?rev=1421648&view=rev
Log:
Const-ify an argument.

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c,
  subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h
  (r2c_svn_string): Constify the ctx param.

Modified:

subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c

subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h

Modified: 
subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c?rev=1421648&r1=1421647&r2=1421648&view=diff
==
--- 
subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c 
(original)
+++ 
subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c 
Fri Dec 14 03:12:29 2012
@@ -1219,7 +1219,7 @@ r2c_svn_string(VALUE value, void *ctx, a
 }
 
 void *
-svn_swig_rb_to_swig_type(VALUE value, void *ctx, apr_pool_t *pool)
+svn_swig_rb_to_swig_type(VALUE value, const void *ctx, apr_pool_t *pool)
 {
   void **result = NULL;
   result = apr_palloc(pool, sizeof(void *));

Modified: 
subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h?rev=1421648&r1=1421647&r2=1421648&view=diff
==
--- 
subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h 
(original)
+++ 
subversion/trunk/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h 
Fri Dec 14 03:12:29 2012
@@ -112,7 +112,7 @@ SVN_RB_SWIG_SWIGUTIL_EXPORT
 void svn_swig_rb_handle_svn_error(svn_error_t *error);
 
 SVN_RB_SWIG_SWIGUTIL_EXPORT
-void *svn_swig_rb_to_swig_type(VALUE value, void *ctx, apr_pool_t *pool);
+void *svn_swig_rb_to_swig_type(VALUE value, const void *ctx, apr_pool_t *pool);
 SVN_RB_SWIG_SWIGUTIL_EXPORT
 VALUE svn_swig_rb_from_swig_type(void *value, void *ctx);
 




svn commit: r1421645 - /subversion/trunk/build/ac-macros/swig.m4

2012-12-13 Thread hwright
Author: hwright
Date: Fri Dec 14 03:03:52 2012
New Revision: 1421645

URL: http://svn.apache.org/viewvc?rev=1421645&view=rev
Log:
Make the warnings issued when building the Ruby bindings *much* less verbose.
The removed warnings are the result of swig's---ahem---interesting way of
generating code.  Hopefully, this helps us find more errors, more quickly.

* build/ac-macros/swig.m4
  (SVN_FIND_SWIG): Filter out a number of compiler warnings flags for the Ruby
bindings.

Modified:
subversion/trunk/build/ac-macros/swig.m4

Modified: subversion/trunk/build/ac-macros/swig.m4
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/swig.m4?rev=1421645&r1=1421644&r2=1421645&view=diff
==
--- subversion/trunk/build/ac-macros/swig.m4 (original)
+++ subversion/trunk/build/ac-macros/swig.m4 Fri Dec 14 03:03:52 2012
@@ -214,6 +214,17 @@ AC_DEFUN(SVN_FIND_SWIG,
 ])
 SWIG_RB_COMPILE="$svn_cv_ruby_compile"
 
+dnl The swig bindings create a lot of spurious warnings with several of
+dnl our standard compiler flags, so filter them out here
+SVN_STRIP_FLAG(SWIG_RB_COMPILE, [-Wall])
+SVN_STRIP_FLAG(SWIG_RB_COMPILE, [-Wunused])
+SVN_STRIP_FLAG(SWIG_RB_COMPILE, [-Wshadow])
+SVN_STRIP_FLAG(SWIG_RB_COMPILE, [-Wstrict-prototypes])
+SVN_STRIP_FLAG(SWIG_RB_COMPILE, [-Wmissing-declarations])
+SVN_STRIP_FLAG(SWIG_RB_COMPILE, [-Wmissing-prototypes])
+SVN_STRIP_FLAG(SWIG_RB_COMPILE, [-Wredundant-decls])
+SWIG_RB_COMPILE="$SWIG_RB_COMPILE -Wno-int-to-pointer-cast"
+
 AC_CACHE_CHECK([how to link Ruby extensions], [svn_cv_ruby_link],[
   svn_cv_ruby_link="`$RUBY -e 'ARGV.shift; print ARGV.join(%q( ))' \
$rbconfig_LDSHARED`"




svn commit: r1421638 - in /subversion/trunk: build/ac-macros/svn-macros.m4 configure.ac

2012-12-13 Thread hwright
Author: hwright
Date: Fri Dec 14 02:29:24 2012
New Revision: 1421638

URL: http://svn.apache.org/viewvc?rev=1421638&view=rev
Log:
Add a helper configure macro for stripping values from compile-time flags,
and use it in a couple of places in configure.  (More uses coming soon.)

* build/ac-macros/svn-macros.m4
  (SVN_STRIP_FLAG): New.

* configure.ac:
  Use the new macro when stripping flags for clang.

Modified:
subversion/trunk/build/ac-macros/svn-macros.m4
subversion/trunk/configure.ac

Modified: subversion/trunk/build/ac-macros/svn-macros.m4
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/svn-macros.m4?rev=1421638&r1=1421637&r2=1421638&view=diff
==
--- subversion/trunk/build/ac-macros/svn-macros.m4 (original)
+++ subversion/trunk/build/ac-macros/svn-macros.m4 Fri Dec 14 02:29:24 2012
@@ -172,6 +172,16 @@ AC_DEFUN(SVN_MAYBE_ADD_TO_CFLAGS,
   fi
 ])
 
+dnl SVN_STRIP_FLAG(FLAG_VAR_NAME, FLAG)
+dnl
+dnl Remove FLAG from the variable FLAG_VAR_NAME, if it exists.  This macro
+dnl is primarily used for removing unwanted compiler flags, but is really
+dnl just a general wrapper around `sed'.
+AC_DEFUN(SVN_STRIP_FLAG,
+[
+  $1=`echo "$$1" | $SED -e 's/$2//'`
+])
+
 dnl SVN_REMOVE_STANDARD_LIB_DIRS(OPTIONS)
 dnl
 dnl Remove standard library search directories.

Modified: subversion/trunk/configure.ac
URL: 
http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1421638&r1=1421637&r2=1421638&view=diff
==
--- subversion/trunk/configure.ac (original)
+++ subversion/trunk/configure.ac Fri Dec 14 02:29:24 2012
@@ -1384,12 +1384,12 @@ AC_SUBST(JAVAHL_COMPAT_TESTS_TARGET)
 # Strip '-no-cpp-precomp' from CPPFLAGS for the clang compiler
 ### I think we get this flag from APR, so the fix probably belongs there
 if test "$CC" = "clang"; then
-  CPPFLAGS=`echo "$CPPFLAGS" | $SED -e 's/-no-cpp-precomp //'`
+  SVN_STRIP_FLAG(CPPFLAGS, [-no-cpp-precomp ])
 fi
 
 # Clang also doesn't (yet) support the '-ansi' flag
 if test "$CC" = "clang"; then
-  CFLAGS=`echo "$CFLAGS" | $SED -e 's/-ansi //'`
+  SVN_STRIP_FLAG(CFLAGS, [-ansi ])
 fi
 
 dnl Since this is used only on Unix-y systems, define the path separator as '/'




svn commit: r1421633 - in /subversion/branches/ev2-export: ./ subversion/include/ subversion/libsvn_ra_serf/ subversion/libsvn_subr/ subversion/libsvn_wc/ subversion/tests/cmdline/ tools/dist/

2012-12-13 Thread hwright
Author: hwright
Date: Fri Dec 14 01:36:28 2012
New Revision: 1421633

URL: http://svn.apache.org/viewvc?rev=1421633&view=rev
Log:
On the ev2-export branch:
Bring up-to-date with trunk.

Modified:
subversion/branches/ev2-export/   (props changed)
subversion/branches/ev2-export/configure.ac
subversion/branches/ev2-export/get-deps.sh
subversion/branches/ev2-export/subversion/include/svn_config.h
subversion/branches/ev2-export/subversion/libsvn_ra_serf/ra_serf.h
subversion/branches/ev2-export/subversion/libsvn_ra_serf/serf.c
subversion/branches/ev2-export/subversion/libsvn_ra_serf/update.c
subversion/branches/ev2-export/subversion/libsvn_subr/config_file.c
subversion/branches/ev2-export/subversion/libsvn_subr/sysinfo.c
subversion/branches/ev2-export/subversion/libsvn_wc/adm_ops.c
subversion/branches/ev2-export/subversion/tests/cmdline/davautocheck.sh
subversion/branches/ev2-export/subversion/tests/cmdline/prop_tests.py
subversion/branches/ev2-export/subversion/tests/cmdline/svnserveautocheck.sh
subversion/branches/ev2-export/tools/dist/   (props changed)

Propchange: subversion/branches/ev2-export/
--
  Merged /subversion/trunk:r1421409-1421631

Modified: subversion/branches/ev2-export/configure.ac
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/configure.ac?rev=1421633&r1=1421632&r2=1421633&view=diff
==
--- subversion/branches/ev2-export/configure.ac (original)
+++ subversion/branches/ev2-export/configure.ac Fri Dec 14 01:36:28 2012
@@ -148,9 +148,8 @@ SVN_FIND_APACHE(20020903)
 
 dnl Search for SQLite
 SQLITE_MINIMUM_VER="3.7.12"
-SQLITE_RECOMMENDED_VER="3.7.12"
-SQLITE_RECOMMENDED_VER_URL="3071200"
-SQLITE_URL="http://www.sqlite.org/sqlite-amalgamation-${SQLITE_RECOMMENDED_VER_URL}.zip";
+SQLITE_RECOMMENDED_VER="3.7.15"
+SQLITE_URL="http://www.sqlite.org/sqlite-amalgamation-$(printf %u%02u%02u%02u 
$(echo ${SQLITE_RECOMMENDED_VER} | sed -e 's/\./ /g')).zip"
 
 SVN_LIB_SQLITE(${SQLITE_MINIMUM_VER}, ${SQLITE_RECOMMENDED_VER},
${SQLITE_URL})

Modified: subversion/branches/ev2-export/get-deps.sh
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/get-deps.sh?rev=1421633&r1=1421632&r2=1421633&view=diff
==
--- subversion/branches/ev2-export/get-deps.sh (original)
+++ subversion/branches/ev2-export/get-deps.sh Fri Dec 14 01:36:28 2012
@@ -24,13 +24,13 @@
 #
 
 APR=apr-1.4.6
-APR_UTIL=apr-util-1.4.1
-SERF=serf-1.0.1
+APR_UTIL=apr-util-1.5.1
+SERF=serf-1.1.1
 ZLIB=zlib-1.2.7
-SQLITE_VERSION=3.7.12
-SQLITE=sqlite-amalgamation-$(printf %u%02u%02u%02u $(echo $SQLITE_VERSION | 
sed -e "s/\./ /g"))
+SQLITE_VERSION=3.7.15
+SQLITE=sqlite-amalgamation-$(printf %u%02u%02u%02u $(echo $SQLITE_VERSION | 
sed -e 's/\./ /g'))
 
-HTTPD=httpd-2.2.22
+HTTPD=httpd-2.4.3
 APR_ICONV=apr-iconv-1.2.1
 
 BASEDIR=`pwd`
@@ -115,7 +115,11 @@ get_deps() {
 
 if [ $# -gt 0 ]; then
   for target; do
-get_$target || usage
+if [ "$target" -ne "deps" ]; then
+  get_$target || usage
+else
+  usage
+fi
   done
 else
   get_apr

Modified: subversion/branches/ev2-export/subversion/include/svn_config.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_config.h?rev=1421633&r1=1421632&r2=1421633&view=diff
==
--- subversion/branches/ev2-export/subversion/include/svn_config.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_config.h Fri Dec 14 
01:36:28 2012
@@ -87,7 +87,9 @@ typedef struct svn_config_t svn_config_t
   "store-ssl-client-cert-pp-plaintext"
 #define SVN_CONFIG_OPTION_USERNAME  "username"
 /** @since New in 1.8. */
-#define SVN_CONFIG_OPTION_BULK_UPDATES  "bulk-updates"
+#define SVN_CONFIG_OPTION_HTTP_BULK_UPDATES "http-bulk-updates"
+/** @since New in 1.8. */
+#define SVN_CONFIG_OPTION_HTTP_MAX_CONNECTIONS  "http-max-connections"
 
 #define SVN_CONFIG_CATEGORY_CONFIG  "config"
 #define SVN_CONFIG_SECTION_AUTH "auth"
@@ -179,6 +181,7 @@ typedef struct svn_config_t svn_config_t
 #define SVN_CONFIG_DEFAULT_OPTION_STORE_SSL_CLIENT_CERT_PP   TRUE
 #define SVN_CONFIG_DEFAULT_OPTION_STORE_SSL_CLIENT_CERT_PP_PLAINTEXT \
  SVN_CONFIG_ASK
+#define SVN_CONFIG_DEFAULT_OPTION_HTTP_MAX_CONNECTIONS   4
 
 /** Read configuration information from the

svn commit: r1421631 - in /subversion/branches/ev2-export: ./ subversion/libsvn_client/commit.c subversion/libsvn_client/import.c

2012-12-13 Thread hwright
Author: hwright
Date: Fri Dec 14 01:24:55 2012
New Revision: 1421631

URL: http://svn.apache.org/viewvc?rev=1421631&view=rev
Log:
On the ev2-export branch:
Bring up-to-date with trunk@1421408, splitting the Ev2 import implementation
to follow the change on trunk.

Added:
subversion/branches/ev2-export/subversion/libsvn_client/import.c
  - copied, changed from r1421408, 
subversion/trunk/subversion/libsvn_client/import.c
Modified:
subversion/branches/ev2-export/   (props changed)
subversion/branches/ev2-export/subversion/libsvn_client/commit.c

Propchange: subversion/branches/ev2-export/
--
  Merged /subversion/trunk:r1421408

Modified: subversion/branches/ev2-export/subversion/libsvn_client/commit.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/commit.c?rev=1421631&r1=1421630&r2=1421631&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/commit.c Fri Dec 14 
01:24:55 2012
@@ -30,11 +30,8 @@
 #include 
 #include 
 #include 
-#include 
 #include "svn_wc.h"
 #include "svn_ra.h"
-#include "svn_delta.h"
-#include "svn_subst.h"
 #include "svn_client.h"
 #include "svn_string.h"
 #include "svn_pools.h"
@@ -42,612 +39,15 @@
 #include "svn_error_codes.h"
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
-#include "svn_io.h"
-#include "svn_time.h"
 #include "svn_sorts.h"
-#include "svn_props.h"
 #include "svn_hash.h"
 
 #include "client.h"
 #include "private/svn_wc_private.h"
-#include "private/svn_subr_private.h"
 #include "private/svn_ra_private.h"
-#include "private/svn_magic.h"
 
 #include "svn_private_config.h"
 
-/* Import context baton.
-
-   ### TODO:  Add the following items to this baton:
-  /` import editor/baton. `/
-  const svn_delta_editor_t *editor;
-  void *edit_baton;
-
-  /` Client context baton `/
-  svn_client_ctx_t `ctx;
-
-  /` Paths (keys) excluded from the import (values ignored) `/
-  apr_hash_t *excludes;
-*/
-typedef struct import_ctx_t
-{
-  /* Whether any changes were made to the repository */
-  svn_boolean_t repos_changed;
-
-  /* A magic cookie for mime-type detection. */
-  svn_magic__cookie_t *magic_cookie;
-
-  /* Collection of all possible configuration file dictated auto-props and
- svn:auto-props.  A hash mapping const char * file patterns to a
- second hash which maps const char * property names to const char *
- property values.  Properties which don't have a value, e.g.
- svn:executable, simply map the property name to an empty string.
- May be NULL if autoprops are disabled. */
-  apr_hash_t *autoprops;
-} import_ctx_t;
-
-
-/* Import file PATH as EDIT_PATH in the repository directory indicated
- * by DIR_BATON in EDITOR.
- *
- * Accumulate file paths and their batons in FILES, which must be
- * non-null.  (These are used to send postfix textdeltas later).
- *
- * If CTX->NOTIFY_FUNC is non-null, invoke it with CTX->NOTIFY_BATON
- * for each file.
- *
- * Use POOL for any temporary allocation.
- */
-static svn_error_t *
-import_file(svn_editor_t *editor,
-const char *local_abspath,
-const char *relpath,
-const svn_io_dirent2_t *dirent,
-import_ctx_t *import_ctx,
-svn_client_ctx_t *ctx,
-apr_pool_t *pool)
-{
-  const char *mimetype = NULL;
-  svn_stream_t *contents;
-  svn_checksum_t *checksum;
-  apr_hash_t* properties = NULL;
-
-  SVN_ERR(svn_path_check_valid(local_abspath, pool));
-
-  /* Remember that the repository was modified */
-  import_ctx->repos_changed = TRUE;
-
-  if (! dirent->special)
-{
-  /* add automatic properties */
-  SVN_ERR(svn_client__get_paths_auto_props(&properties, &mimetype,
-   local_abspath,
-   import_ctx->magic_cookie,
-   import_ctx->autoprops,
-   ctx, pool, pool));
-}
-
-  if (!properties)
-properties = apr_hash_make(pool);
-
-  if (ctx->notify_func2)
-{
-  svn_wc_notify_t *notify
-= svn_wc_create_notify(local_abspath, svn_wc_notify_commit_added,
-   pool);
-  notify->kind = svn_node_file;
-  notify->mime_type = mimetype;
-  notify->content_state = notify->prop_state
-= svn_wc_notify_state_inapplicable;
-  notify->lock_state = svn_wc_notify_lock_state_inapplicable;
-  (*ctx-

svn commit: r1421507 [6/6] - in /subversion/branches/ev2-export: ./ build/ contrib/server-side/svncutter/ subversion/bindings/swig/ subversion/bindings/swig/python/tests/ subversion/include/ subversio

2012-12-13 Thread hwright
Modified: subversion/branches/ev2-export/subversion/tests/libsvn_wc/db-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/libsvn_wc/db-test.c?rev=1421507&r1=1421506&r2=1421507&view=diff
==
--- subversion/branches/ev2-export/subversion/tests/libsvn_wc/db-test.c 
(original)
+++ subversion/branches/ev2-export/subversion/tests/libsvn_wc/db-test.c Thu Dec 
13 20:39:17 2012
@@ -391,6 +391,7 @@ test_getting_info(apr_pool_t *pool)
   const svn_checksum_t *checksum;
   const char *target;
   svn_boolean_t had_props;
+  apr_hash_t *props;
   svn_boolean_t update_root;
   svn_wc__db_lock_t *lock;
   svn_wc__db_t *db;
@@ -403,7 +404,7 @@ test_getting_info(apr_pool_t *pool)
 &status, &kind, &revision,
 &repos_relpath, &repos_root_url, &repos_uuid,
 &changed_rev, &changed_date, &changed_author,&depth, &checksum,
-&target, &lock, &had_props,
+&target, &lock, &had_props, &props,
 &update_root,
 db, local_abspath,
 pool, pool));
@@ -420,6 +421,9 @@ test_getting_info(apr_pool_t *pool)
   SVN_TEST_ASSERT(checksum == NULL);
   SVN_TEST_ASSERT(target == NULL);
   SVN_TEST_ASSERT(lock == NULL);
+  SVN_TEST_ASSERT(had_props == FALSE);
+  SVN_TEST_ASSERT(apr_hash_count(props) == 0);
+  /* SVN_TEST_ASSERT(update_root == ???); */
 
   /* Test: file-specific values. */
   SVN_ERR(svn_wc__db_base_get_info(
@@ -427,7 +431,7 @@ test_getting_info(apr_pool_t *pool)
 &repos_relpath, &repos_root_url, &repos_uuid,
 NULL, NULL, NULL, NULL,
 &checksum, NULL, NULL,
-NULL, NULL,
+NULL, NULL, NULL,
 db, svn_dirent_join(local_abspath, "A", pool),
 pool, pool));
   SVN_TEST_ASSERT(kind == svn_kind_file);
@@ -442,7 +446,7 @@ test_getting_info(apr_pool_t *pool)
 &repos_relpath, &repos_root_url, &repos_uuid,
 &changed_rev, &changed_date, &changed_author,
 &depth, &checksum, &target, &lock,
-NULL, NULL,
+NULL, NULL, NULL,
 db, svn_dirent_join(local_abspath, "B", pool),
 pool, pool));
   SVN_TEST_ASSERT(kind == svn_kind_symlink);
@@ -465,7 +469,7 @@ test_getting_info(apr_pool_t *pool)
 NULL, NULL, NULL,
 NULL, NULL, NULL,
 NULL, NULL, NULL,
-NULL, NULL, NULL,
+NULL, NULL, NULL, NULL,
 db, svn_dirent_join(local_abspath, "C", pool),
 pool, pool));
   SVN_TEST_ASSERT(kind == svn_kind_unknown);
@@ -477,7 +481,7 @@ test_getting_info(apr_pool_t *pool)
 NULL, NULL, NULL,
 NULL, NULL, NULL,
 NULL, NULL, NULL,
-NULL, NULL, NULL,
+NULL, NULL, NULL, NULL,
 db, svn_dirent_join(local_abspath, "D", pool),
 pool, pool));
   SVN_TEST_ASSERT(status == svn_wc__db_status_not_present);
@@ -488,7 +492,7 @@ test_getting_info(apr_pool_t *pool)
 NULL, NULL, NULL,
 NULL, NULL, NULL,
 NULL, NULL, NULL,
-NULL, NULL, NULL,
+NULL, NULL, NULL, NULL,
 db, svn_dirent_join(local_abspath, "E", pool),
 pool, pool));
   SVN_TEST_ASSERT(status == svn_wc__db_status_incomplete);
@@ -499,7 +503,7 @@ test_getting_info(apr_pool_t *pool)
 NULL, NULL, NULL,
 NULL, NULL, NULL,
 NULL, &checksum, NULL,
-NULL, NULL, NULL,
+NULL, NULL, NULL, NULL,
 db, svn_dirent_join(local_abspath, "F", pool),
 pool, pool));
   SVN_TEST_STRING_ASSERT(SHA1_1,
@@ -511,7 +515,7 @@ test_getting_info(apr_pool_t *pool)
 &repos_relpath, &repos_root_url, &repos_uuid,
 &changed_rev, &changed_date, &changed_author,
 NULL, NULL, NULL,
-NULL, NULL, NULL,
+NULL, NULL, NULL, NULL,
 db, svn_dirent_join(local_abspath, "G", pool),
 pool, pool));
   SVN_TEST_STRING_ASSERT(repos_relpath, "G-alt");
@@ -527,7 +531,7 @@ test_getting_info(apr_pool_t *pool)
 NULL, NULL, NULL,
 NULL, NULL, NULL,
 NULL, &checksum, &target,
-NULL, NULL, NULL,
+NULL, NULL, NULL, NULL,
 db, svn_dirent_join(local_abspath, "H", pool),
 pool, pool));
   SVN_TEST_ASSERT(checksum == NULL);
@@ -539,7 +543,7 @@ test_getting_info(apr_pool_t *pool)
 NULL, NULL, NULL,
 NULL, NULL, NULL,
 NULL, NULL, NULL,
-NULL, NULL, NULL,
+NULL, NULL, NULL, NULL,
 db, svn_dirent_join(local_abspath, "missing-file", pool),
 pool, pool);
   SVN_TEST_ASSERT(err != NULL && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND);
@@ -568,14 +572,12 @@ validate_node(svn_wc__db_t *db,
 NULL, NULL, NULL,
 NULL, NULL, NULL,

svn commit: r1421507 [3/6] - in /subversion/branches/ev2-export: ./ build/ contrib/server-side/svncutter/ subversion/bindings/swig/ subversion/bindings/swig/python/tests/ subversion/include/ subversio

2012-12-13 Thread hwright
Modified: subversion/branches/ev2-export/subversion/libsvn_wc/util.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_wc/util.c?rev=1421507&r1=1421506&r2=1421507&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_wc/util.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_wc/util.c Thu Dec 13 
20:39:17 2012
@@ -610,8 +610,9 @@ svn_wc__fetch_base_func(const char **fil
 
   err = svn_wc__db_base_get_info(NULL, NULL, NULL, NULL, NULL, NULL,
  NULL, NULL, NULL, NULL, &checksum,
- NULL, NULL, NULL, NULL, sfb->db,
- local_abspath, scratch_pool, scratch_pool);
+ NULL, NULL, NULL, NULL, NULL,
+ sfb->db, local_abspath,
+ scratch_pool, scratch_pool);
   if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
 {
   svn_error_clear(err);

Modified: subversion/branches/ev2-export/subversion/libsvn_wc/wc-metadata.sql
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_wc/wc-metadata.sql?rev=1421507&r1=1421506&r2=1421507&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_wc/wc-metadata.sql 
(original)
+++ subversion/branches/ev2-export/subversion/libsvn_wc/wc-metadata.sql Thu Dec 
13 20:39:17 2012
@@ -181,8 +181,8 @@ CREATE TABLE ACTUAL_NODE (
   PRIMARY KEY (wc_id, local_relpath)
   );
 
-CREATE INDEX I_ACTUAL_PARENT ON ACTUAL_NODE (wc_id, parent_relpath);
-CREATE INDEX I_ACTUAL_CHANGELIST ON ACTUAL_NODE (changelist);
+CREATE UNIQUE INDEX I_ACTUAL_PARENT ON ACTUAL_NODE (wc_id, parent_relpath,
+local_relpath);
 
 
 /* - */
@@ -408,8 +408,11 @@ CREATE TABLE NODES (
   /* the kind of the new node. may be "unknown" if the node is not present. */
   kind  TEXT NOT NULL,
 
-  /* serialized skel of this node's properties. NULL if we
- have no information about the properties (a non-present node). */
+  /* serialized skel of this node's properties (when presence is 'normal' or
+ 'incomplete'); an empty skel or NULL indicates no properties.  NULL if
+ we have no information about the properties (any other presence).
+ TODO: Choose & require a single representation for 'no properties'.
+  */
   properties  BLOB,
 
   /* NULL depth means "default" (typically svn_depth_infinity) */
@@ -483,7 +486,8 @@ CREATE TABLE NODES (
 
   );
 
-CREATE INDEX I_NODES_PARENT ON NODES (wc_id, parent_relpath, op_depth);
+CREATE UNIQUE INDEX I_NODES_PARENT ON NODES (wc_id, parent_relpath,
+ local_relpath, op_depth);
 /* I_NODES_MOVED is introduced in format 30 */
 CREATE UNIQUE INDEX I_NODES_MOVED ON NODES (wc_id, moved_to, op_depth);
 
@@ -553,7 +557,7 @@ CREATE TABLE EXTERNALS (
   /* Repository location fields */
   repos_id  INTEGER NOT NULL REFERENCES REPOSITORY (id),
 
-  /* Either 'normal' or 'excluded' */
+  /* Either MAP_NORMAL or MAP_EXCLUDED */
   presence  TEXT NOT NULL,
 
   /* the kind of the external. */
@@ -574,7 +578,6 @@ CREATE TABLE EXTERNALS (
   PRIMARY KEY (wc_id, local_relpath)
 );
 
-CREATE INDEX I_EXTERNALS_PARENT ON EXTERNALS (wc_id, parent_relpath);
 CREATE UNIQUE INDEX I_EXTERNALS_DEFINED ON EXTERNALS (wc_id,
   def_local_relpath,
   local_relpath);
@@ -667,6 +670,9 @@ PRAGMA user_version = 22;
 -- STMT_UPGRADE_TO_23
 PRAGMA user_version = 23;
 
+-- STMT_UPGRADE_23_HAS_WORKING_NODES
+SELECT 1 FROM nodes WHERE op_depth > 0
+LIMIT 1
 
 /* - */
 
@@ -820,6 +826,8 @@ WHERE wc_id = ?1 and local_relpath = ?2
inherited properties */
 -- STMT_UPGRADE_TO_31
 ALTER TABLE NODES ADD COLUMN inherited_props BLOB;
+DROP INDEX IF EXISTS I_ACTUAL_CHANGELIST;
+DROP INDEX IF EXISTS I_EXTERNALS_PARENT;
 
 PRAGMA user_version = 31;
 
@@ -846,6 +854,23 @@ WHERE (l.local_relpath = '' AND l.repos_
  '/'))
 
 /* - */
+/* Format 32   */
+-- STMT_UPGRADE_TO_32
+
+/* Drop old index. ### Remove this part from the upgrade to 31 once bumped */
+DROP INDEX IF EXISTS I_ACTUAL_CHANGELIST;
+DROP INDEX IF EXISTS I_EXTERNALS_PARENT;
+CREATE INDEX I_EXTERNALS_PARENT ON EXTERNALS (wc_id, parent_relpath);
+
+DROP INDEX I_NODES_PARENT;
+CREATE UNIQUE INDEX I_NODES_PARENT ON NODES (wc_id, parent_relpath,
+ local_relpath, op_depth);
+
+DROP INDEX I_ACTUAL_PARENT;
+CREATE UNIQUE INDEX I_ACTUAL_PARENT ON ACT

svn commit: r1417277 - /subversion/branches/ev2-export/BRANCH-README

2012-12-04 Thread hwright
Author: hwright
Date: Wed Dec  5 03:58:36 2012
New Revision: 1417277

URL: http://svn.apache.org/viewvc?rev=1417277&view=rev
Log:
On the ev2-export branch:
 * BRANCH-README: Bring closer to reality.

Modified:
subversion/branches/ev2-export/BRANCH-README

Modified: subversion/branches/ev2-export/BRANCH-README
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/BRANCH-README?rev=1417277&r1=1417276&r2=1417277&view=diff
==
--- subversion/branches/ev2-export/BRANCH-README (original)
+++ subversion/branches/ev2-export/BRANCH-README Wed Dec  5 03:58:36 2012
@@ -1,5 +1,4 @@
-A simple branch intended to experiment with actually using Ev2, in this case
-for export (which is dirt simple).
-
-Currently, the above is accomplished.  Someday when we're ready to implement
-Ev2 for real on trunk, this branch will be be merged there.
+This branch contains several Ev2 driver and receiver implementations for
+various client-side functions.  It is gradually getting manually merged to
+trunk, with the implementations protected by the --enable-ev2-impl configure
+flag.




svn commit: r1417271 - /subversion/trunk/subversion/libsvn_client/export.c

2012-12-04 Thread hwright
Author: hwright
Date: Wed Dec  5 03:21:24 2012
New Revision: 1417271

URL: http://svn.apache.org/viewvc?rev=1417271&view=rev
Log:
Add the Ev2 driver for file export, mostly copied from the ev2-export branch.

* subversion/libsvn_client/export.c
  (export_file_ev2): New.
  (svn_client_export5): Optionally use Ev2 to export files.

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

Modified: subversion/trunk/subversion/libsvn_client/export.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/export.c?rev=1417271&r1=1417270&r2=1417271&view=diff
==
--- subversion/trunk/subversion/libsvn_client/export.c (original)
+++ subversion/trunk/subversion/libsvn_client/export.c Wed Dec  5 03:21:24 2012
@@ -1147,6 +1147,62 @@ get_editor_ev2(const svn_delta_editor_t 
 }
 
 static svn_error_t *
+export_file_ev2(const char *from_path_or_url,
+const char *to_path,
+struct edit_baton *eb,
+svn_client__pathrev_t *loc,
+svn_ra_session_t *ra_session,
+svn_boolean_t overwrite,
+apr_pool_t *scratch_pool)
+{
+  svn_boolean_t from_is_url = svn_path_is_url(from_path_or_url);
+  apr_hash_t *props;
+  svn_stream_t *tmp_stream;
+  svn_node_kind_t to_kind;
+
+  if (svn_path_is_empty(to_path))
+{
+  if (from_is_url)
+to_path = svn_uri_basename(from_path_or_url, scratch_pool);
+  else
+to_path = svn_dirent_basename(from_path_or_url, NULL);
+  eb->root_path = to_path;
+}
+  else
+{
+  SVN_ERR(append_basename_if_dir(&to_path, from_path_or_url,
+ from_is_url, scratch_pool));
+  eb->root_path = to_path;
+}
+
+  SVN_ERR(svn_io_check_path(to_path, &to_kind, scratch_pool));
+
+  if ((to_kind == svn_node_file || to_kind == svn_node_unknown) &&
+  ! overwrite)
+return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("Destination file '%s' exists, and "
+   "will not be overwritten unless forced"),
+ svn_dirent_local_style(to_path, scratch_pool));
+  else if (to_kind == svn_node_dir)
+return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("Destination '%s' exists. Cannot "
+   "overwrite directory with non-directory"),
+ svn_dirent_local_style(to_path, scratch_pool));
+
+  tmp_stream = svn_stream_buffered(scratch_pool);
+
+  SVN_ERR(svn_ra_get_file(ra_session, "", loc->rev,
+  tmp_stream, NULL, &props, scratch_pool));
+
+  /* Since you cannot actually root an editor at a file, we manually drive
+   * a function of our editor. */
+  SVN_ERR(add_file_ev2(eb, "", NULL, tmp_stream, props, SVN_INVALID_REVNUM,
+   scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
 export_file(const char *from_path_or_url,
 const char *to_path,
 struct edit_baton *eb,
@@ -1370,8 +1426,12 @@ svn_client_export5(svn_revnum_t *result_
 
   if (kind == svn_node_file)
 {
-  SVN_ERR(export_file(from_path_or_url, to_path, eb, loc, ra_session,
-  overwrite, pool));
+  if (!ENABLE_EV2_IMPL)
+SVN_ERR(export_file(from_path_or_url, to_path, eb, loc, ra_session,
+overwrite, pool));
+  else
+SVN_ERR(export_file_ev2(from_path_or_url, to_path, eb, loc,
+ra_session, overwrite, pool));
 }
   else if (kind == svn_node_dir)
 {




svn commit: r1417270 - /subversion/trunk/subversion/libsvn_client/export.c

2012-12-04 Thread hwright
Author: hwright
Date: Wed Dec  5 02:14:40 2012
New Revision: 1417270

URL: http://svn.apache.org/viewvc?rev=1417270&view=rev
Log:
Move the file export functionality to a helper function.

* subversion/libsvn_client/export.c
  (export_file): New.
  (svn_client_export5): Call the new helper.

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

Modified: subversion/trunk/subversion/libsvn_client/export.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/export.c?rev=1417270&r1=1417269&r2=1417270&view=diff
==
--- subversion/trunk/subversion/libsvn_client/export.c (original)
+++ subversion/trunk/subversion/libsvn_client/export.c Wed Dec  5 02:14:40 2012
@@ -1147,6 +1147,89 @@ get_editor_ev2(const svn_delta_editor_t 
 }
 
 static svn_error_t *
+export_file(const char *from_path_or_url,
+const char *to_path,
+struct edit_baton *eb,
+svn_client__pathrev_t *loc,
+svn_ra_session_t *ra_session,
+svn_boolean_t overwrite,
+apr_pool_t *scratch_pool)
+{
+  apr_hash_t *props;
+  apr_hash_index_t *hi;
+  struct file_baton *fb = apr_pcalloc(scratch_pool, sizeof(*fb));
+  svn_node_kind_t to_kind;
+  svn_boolean_t from_is_url = svn_path_is_url(from_path_or_url);
+
+  if (svn_path_is_empty(to_path))
+{
+  if (from_is_url)
+to_path = svn_uri_basename(from_path_or_url, scratch_pool);
+  else
+to_path = svn_dirent_basename(from_path_or_url, NULL);
+  eb->root_path = to_path;
+}
+  else
+{
+  SVN_ERR(append_basename_if_dir(&to_path, from_path_or_url,
+ from_is_url, scratch_pool));
+  eb->root_path = to_path;
+}
+
+  SVN_ERR(svn_io_check_path(to_path, &to_kind, scratch_pool));
+
+  if ((to_kind == svn_node_file || to_kind == svn_node_unknown) &&
+  ! overwrite)
+return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("Destination file '%s' exists, and "
+   "will not be overwritten unless forced"),
+ svn_dirent_local_style(to_path, scratch_pool));
+  else if (to_kind == svn_node_dir)
+return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("Destination '%s' exists. Cannot "
+   "overwrite directory with non-directory"),
+ svn_dirent_local_style(to_path, scratch_pool));
+
+  /* Since you cannot actually root an editor at a file, we
+   * manually drive a few functions of our editor. */
+
+  /* This is the equivalent of a parentless add_file(). */
+  fb->edit_baton = eb;
+  fb->path = eb->root_path;
+  fb->url = eb->root_url;
+  fb->pool = scratch_pool;
+
+  /* Copied from apply_textdelta(). */
+  SVN_ERR(svn_stream_open_unique(&fb->tmp_stream, &fb->tmppath,
+ svn_dirent_dirname(fb->path, scratch_pool),
+ svn_io_file_del_none,
+ fb->pool, fb->pool));
+
+  /* Step outside the editor-likeness for a moment, to actually talk
+   * to the repository. */
+  /* ### note: the stream will not be closed */
+  SVN_ERR(svn_ra_get_file(ra_session, "", loc->rev,
+  fb->tmp_stream,
+  NULL, &props, scratch_pool));
+
+  /* Push the props into change_file_prop(), to update the file_baton
+   * with information. */
+  for (hi = apr_hash_first(scratch_pool, props); hi; hi = apr_hash_next(hi))
+{
+  const char *propname = svn__apr_hash_index_key(hi);
+  const svn_string_t *propval = svn__apr_hash_index_val(hi);
+
+  SVN_ERR(change_file_prop(fb, propname, propval, scratch_pool));
+}
+
+  /* And now just use close_file() to do all the keyword and EOL
+   * work, and put the file into place. */
+  SVN_ERR(close_file(fb, NULL, scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
 export_directory(const char *from_path_or_url,
  const char *to_path,
  struct edit_baton *eb,
@@ -1287,75 +1370,8 @@ svn_client_export5(svn_revnum_t *result_
 
   if (kind == svn_node_file)
 {
-  apr_hash_t *props;
-  apr_hash_index_t *hi;
-  struct file_baton *fb = apr_pcalloc(pool, sizeof(*fb));
-  svn_node_kind_t to_kind;
-
-  if (svn_path_is_empty(to_path))
-{
-  if (from_is_url)
-to_path = svn_uri_basename(from_path_or_url, pool);
-  else
-to_path = svn_dirent_basename(from_path_or_url, NULL);
-  eb->root_path = to_path;
-}
-  else
-{
-  SVN_ERR(append_basename_if_dir(&to_

svn commit: r1417266 - /subversion/trunk/subversion/libsvn_client/export.c

2012-12-04 Thread hwright
Author: hwright
Date: Wed Dec  5 01:57:16 2012
New Revision: 1417266

URL: http://svn.apache.org/viewvc?rev=1417266&view=rev
Log:
Break out the export directory functionality into a helper function.

* subversion/libsvn_client/export.c
  (export_directory): New.
  (svn_client_export5): Call the above helper.

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

Modified: subversion/trunk/subversion/libsvn_client/export.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/export.c?rev=1417266&r1=1417265&r2=1417266&view=diff
==
--- subversion/trunk/subversion/libsvn_client/export.c (original)
+++ subversion/trunk/subversion/libsvn_client/export.c Wed Dec  5 01:57:16 2012
@@ -1146,6 +1146,86 @@ get_editor_ev2(const svn_delta_editor_t 
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+export_directory(const char *from_path_or_url,
+ const char *to_path,
+ struct edit_baton *eb,
+ svn_client__pathrev_t *loc,
+ svn_ra_session_t *ra_session,
+ svn_boolean_t overwrite,
+ svn_boolean_t ignore_externals,
+ svn_boolean_t ignore_keywords,
+ svn_depth_t depth,
+ const char *native_eol,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool)
+{
+  void *edit_baton;
+  const svn_delta_editor_t *export_editor;
+  const svn_ra_reporter3_t *reporter;
+  void *report_baton;
+  svn_boolean_t use_sleep = FALSE;
+  svn_node_kind_t kind;
+
+  if (!ENABLE_EV2_IMPL)
+SVN_ERR(get_editor_ev1(&export_editor, &edit_baton, eb, ctx,
+   scratch_pool, scratch_pool));
+  else
+SVN_ERR(get_editor_ev2(&export_editor, &edit_baton, eb, ctx,
+   scratch_pool, scratch_pool));
+
+  /* Manufacture a basic 'report' to the update reporter. */
+  SVN_ERR(svn_ra_do_update2(ra_session,
+&reporter, &report_baton,
+loc->rev,
+"", /* no sub-target */
+depth,
+FALSE, /* don't want copyfrom-args */
+export_editor, edit_baton, scratch_pool));
+
+  SVN_ERR(reporter->set_path(report_baton, "", loc->rev,
+ /* Depth is irrelevant, as we're
+passing start_empty=TRUE anyway. */
+ svn_depth_infinity,
+ TRUE, /* "help, my dir is empty!" */
+ NULL, scratch_pool));
+
+  SVN_ERR(reporter->finish_report(report_baton, scratch_pool));
+
+  /* Special case: Due to our sly export/checkout method of updating an
+   * empty directory, no target will have been created if the exported
+   * item is itself an empty directory (export_editor->open_root never
+   * gets called, because there are no "changes" to make to the empty
+   * dir we reported to the repository).
+   *
+   * So we just create the empty dir manually; but we do it via
+   * open_root_internal(), in order to get proper notification.
+   */
+  SVN_ERR(svn_io_check_path(to_path, &kind, scratch_pool));
+  if (kind == svn_node_none)
+SVN_ERR(open_root_internal
+(to_path, overwrite, ctx->notify_func2,
+ ctx->notify_baton2, scratch_pool));
+
+  if (! ignore_externals && depth == svn_depth_infinity)
+{
+  const char *repos_root_url;
+  const char *to_abspath;
+
+  SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root_url,
+ scratch_pool));
+  SVN_ERR(svn_dirent_get_absolute(&to_abspath, to_path, scratch_pool));
+  SVN_ERR(svn_client__export_externals(eb->externals,
+   from_path_or_url,
+   to_abspath, repos_root_url,
+   depth, native_eol,
+   ignore_keywords, &use_sleep,
+   ctx, scratch_pool));
+}
+
+  return SVN_NO_ERROR;
+}
+
 
 
 /*** Public Interfaces ***/
@@ -1279,67 +1359,10 @@ svn_client_export5(svn_revnum_t *result_
 }
   else if (kind == svn_node_dir)
 {
-  void *edit_baton;
-  const svn_delta_editor_t *export_editor;
-  const svn_ra_reporter3_t *reporter;
-  void *report_baton;
-  svn_boolean_t use_sleep = FALSE;
-
-  if (!ENABLE_EV2_IMPL)
-SVN_ERR(get_editor_ev1(&export_editor, &edit_baton, eb, ctx,
-   pool, pool));
-  else
-SVN_ERR(get_editor_ev2(&export_editor, &a

svn commit: r1417252 - /subversion/trunk/subversion/libsvn_client/export.c

2012-12-04 Thread hwright
Author: hwright
Date: Wed Dec  5 00:49:22 2012
New Revision: 1417252

URL: http://svn.apache.org/viewvc?rev=1417252&view=rev
Log:
Manually migrate the Ev2 export implementation (in the case of recursive
directory exports) from the ev2-export branch to trunk, guarded by the
--enable-ev2-impl configure flag.

* subversion/libsvn_client/export.c
  (fetch_kind_func): Remove.
  (get_editor): Rename to...
  (get_editor_ev1): ...this.
  (add_file_ev2, add_directory_ev2, target_revision_func, get_editor_ev2): New.
  (svn_client_export5): Optionally use the Ev2 implementation for directory
exports.

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

Modified: subversion/trunk/subversion/libsvn_client/export.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/export.c?rev=1417252&r1=1417251&r2=1417252&view=diff
==
--- subversion/trunk/subversion/libsvn_client/export.c (original)
+++ subversion/trunk/subversion/libsvn_client/export.c Wed Dec  5 00:49:22 2012
@@ -43,8 +43,13 @@
 
 #include "svn_private_config.h"
 #include "private/svn_subr_private.h"
+#include "private/svn_delta_private.h"
 #include "private/svn_wc_private.h"
 
+#ifndef ENABLE_EV2_IMPL
+#define ENABLE_EV2_IMPL 0
+#endif
+
 
 /*** Code. ***/
 
@@ -859,26 +864,6 @@ close_file(void *file_baton,
 }
 
 static svn_error_t *
-fetch_kind_func(svn_kind_t *kind,
-void *baton,
-const char *path,
-svn_revnum_t base_revision,
-apr_pool_t *scratch_pool)
-{
-  /* We know the root of the edit is a directory. */
-  if (path[0] == '\0')
-*kind = svn_kind_dir;
-
-  /* ### TODO: We could possibly fetch the kind of the object in question
- from the server with a second ra_session, but right now this
- seems to work. */
-  else
-*kind = svn_kind_unknown;
-
-  return SVN_NO_ERROR;
-}
-
-static svn_error_t *
 fetch_props_func(apr_hash_t **props,
  void *baton,
  const char *path,
@@ -908,16 +893,14 @@ fetch_base_func(const char **filename,
 }
 
 static svn_error_t *
-get_editor(const svn_delta_editor_t **export_editor,
-   void **edit_baton,
-   struct edit_baton *eb,
-   svn_client_ctx_t *ctx,
-   apr_pool_t *result_pool,
-   apr_pool_t *scratch_pool)
+get_editor_ev1(const svn_delta_editor_t **export_editor,
+   void **edit_baton,
+   struct edit_baton *eb,
+   svn_client_ctx_t *ctx,
+   apr_pool_t *result_pool,
+   apr_pool_t *scratch_pool)
 {
   svn_delta_editor_t *editor = svn_delta_default_editor(result_pool);
-  svn_delta_shim_callbacks_t *shim_callbacks =
-svn_delta_shim_callbacks_default(result_pool);
   
   editor->set_target_revision = set_target_revision;
   editor->open_root = open_root;
@@ -936,19 +919,234 @@ get_editor(const svn_delta_editor_t **ex
 edit_baton,
 result_pool));
 
-  shim_callbacks->fetch_kind_func = fetch_kind_func;
-  shim_callbacks->fetch_props_func = fetch_props_func;
-  shim_callbacks->fetch_base_func = fetch_base_func;
-  shim_callbacks->fetch_baton = eb;
-
-  SVN_ERR(svn_editor__insert_shims(export_editor, edit_baton,
-   *export_editor, *edit_baton,
-   NULL, NULL, shim_callbacks,
-   result_pool, scratch_pool));
+  return SVN_NO_ERROR;
+}
+
+
+/*** The Ev2 Implementation ***/
+
+static svn_error_t *
+add_file_ev2(void *baton,
+ const char *relpath,
+ const svn_checksum_t *checksum,
+ svn_stream_t *contents,
+ apr_hash_t *props,
+ svn_revnum_t replaces_rev,
+ apr_pool_t *scratch_pool)
+{
+  struct edit_baton *eb = baton;
+  const char *full_path = svn_dirent_join(eb->root_path, relpath,
+  scratch_pool);
+  /* RELPATH is not canonicalized, i.e. it may still contain spaces etc.
+   * but EB->root_url is. */
+  const char *full_url = svn_path_url_add_component2(eb->root_url,
+ relpath,
+ scratch_pool);
+  const svn_string_t *val;
+  /* The four svn: properties we might actually care about. */
+  const svn_string_t *eol_style_val = NULL;
+  const svn_string_t *keywords_val = NULL;
+  const svn_string_t *executable_val = NULL;
+  svn_boolean_t special = FALSE;
+  /* Any keyword vals to be substituted */
+  const char *revision = NULL;
+  const char *author = NULL;
+  apr_time_t date = 0; 
+
+  /* Look at any properties for additional information. */
+  if ( (val = apr_hash_get(props, SVN_PRO

svn commit: r1414336 - /subversion/trunk/subversion/libsvn_client/export.c

2012-11-27 Thread hwright
Author: hwright
Date: Tue Nov 27 19:28:20 2012
New Revision: 1414336

URL: http://svn.apache.org/viewvc?rev=1414336&view=rev
Log:
Add a helper function for fetching an export editor.

* subversion/libsvn_client/export.c
  (get_editor): New.
  (svn_client_export5): Call the new helper.

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

Modified: subversion/trunk/subversion/libsvn_client/export.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/export.c?rev=1414336&r1=1414335&r2=1414336&view=diff
==
--- subversion/trunk/subversion/libsvn_client/export.c (original)
+++ subversion/trunk/subversion/libsvn_client/export.c Tue Nov 27 19:28:20 2012
@@ -907,6 +907,47 @@ fetch_base_func(const char **filename,
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+get_editor(const svn_delta_editor_t **export_editor,
+   void **edit_baton,
+   struct edit_baton *eb,
+   svn_client_ctx_t *ctx,
+   apr_pool_t *result_pool,
+   apr_pool_t *scratch_pool)
+{
+  svn_delta_editor_t *editor = svn_delta_default_editor(result_pool);
+  svn_delta_shim_callbacks_t *shim_callbacks =
+svn_delta_shim_callbacks_default(result_pool);
+  
+  editor->set_target_revision = set_target_revision;
+  editor->open_root = open_root;
+  editor->add_directory = add_directory;
+  editor->add_file = add_file;
+  editor->apply_textdelta = apply_textdelta;
+  editor->close_file = close_file;
+  editor->change_file_prop = change_file_prop;
+  editor->change_dir_prop = change_dir_prop;
+
+  SVN_ERR(svn_delta_get_cancellation_editor(ctx->cancel_func,
+ctx->cancel_baton,
+editor,
+eb,
+export_editor,
+edit_baton,
+result_pool));
+
+  shim_callbacks->fetch_kind_func = fetch_kind_func;
+  shim_callbacks->fetch_props_func = fetch_props_func;
+  shim_callbacks->fetch_base_func = fetch_base_func;
+  shim_callbacks->fetch_baton = eb;
+
+  SVN_ERR(svn_editor__insert_shims(export_editor, edit_baton,
+   *export_editor, *edit_baton,
+   NULL, NULL, shim_callbacks,
+   result_pool, scratch_pool));
+
+   return SVN_NO_ERROR;
+}
 
 
 /*** Public Interfaces ***/
@@ -1044,37 +1085,10 @@ svn_client_export5(svn_revnum_t *result_
   const svn_delta_editor_t *export_editor;
   const svn_ra_reporter3_t *reporter;
   void *report_baton;
-  svn_delta_editor_t *editor = svn_delta_default_editor(pool);
   svn_boolean_t use_sleep = FALSE;
-  svn_delta_shim_callbacks_t *shim_callbacks =
-svn_delta_shim_callbacks_default(pool);
 
-  editor->set_target_revision = set_target_revision;
-  editor->open_root = open_root;
-  editor->add_directory = add_directory;
-  editor->add_file = add_file;
-  editor->apply_textdelta = apply_textdelta;
-  editor->close_file = close_file;
-  editor->change_file_prop = change_file_prop;
-  editor->change_dir_prop = change_dir_prop;
-
-  SVN_ERR(svn_delta_get_cancellation_editor(ctx->cancel_func,
-ctx->cancel_baton,
-editor,
-eb,
-&export_editor,
-&edit_baton,
-pool));
-
-  shim_callbacks->fetch_kind_func = fetch_kind_func;
-  shim_callbacks->fetch_props_func = fetch_props_func;
-  shim_callbacks->fetch_base_func = fetch_base_func;
-  shim_callbacks->fetch_baton = eb;
-
-  SVN_ERR(svn_editor__insert_shims(&export_editor, &edit_baton,
-   export_editor, edit_baton,
-   NULL, NULL, shim_callbacks,
-   pool, pool));
+  SVN_ERR(get_editor(&export_editor, &edit_baton, eb, ctx,
+ pool, pool));
 
   /* Manufacture a basic 'report' to the update reporter. */
   SVN_ERR(svn_ra_do_update2(ra_session,




svn propchange: r1413197 - svn:log

2012-11-24 Thread hwright
Author: hwright
Revision: 1413197
Modified property: svn:log

Modified: svn:log at Sat Nov 24 20:20:05 2012
--
--- svn:log (original)
+++ svn:log Sat Nov 24 20:20:05 2012
@@ -1,3 +1,5 @@
+[ Note from the future: reverted in r1413255. ]
+
 Use the configure-time guard for compiling some Ev2 implementation stuffs.
 
 * subversion/libsvn_repos/replay.c



svn commit: r1413255 - /subversion/trunk/subversion/libsvn_repos/replay.c

2012-11-24 Thread hwright
Author: hwright
Date: Sat Nov 24 20:19:40 2012
New Revision: 1413255

URL: http://svn.apache.org/viewvc?rev=1413255&view=rev
Log:
Revert r1413197.  This particular section of code still isn't complete, and
I'd rather not bust things, even if it is protected by a configure flag.

Modified:
subversion/trunk/subversion/libsvn_repos/replay.c

Modified: subversion/trunk/subversion/libsvn_repos/replay.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/replay.c?rev=1413255&r1=1413254&r2=1413255&view=diff
==
--- subversion/trunk/subversion/libsvn_repos/replay.c (original)
+++ subversion/trunk/subversion/libsvn_repos/replay.c Sat Nov 24 20:19:40 2012
@@ -103,6 +103,8 @@
(though not necessarily in the same order in which they
occurred). */
 
+/* #define USE_EV2_IMPL */
+
 
 /*** Helper functions. ***/
 
@@ -455,7 +457,6 @@ fill_copyfrom(svn_fs_root_t **copyfrom_r
   return SVN_NO_ERROR;
 }
 
-#ifndef ENABLE_EV2_IMPL
 static svn_error_t *
 path_driver_cb_func(void **dir_baton,
 void *parent_baton,
@@ -779,9 +780,8 @@ path_driver_cb_func(void **dir_baton,
 
   return SVN_NO_ERROR;
 }
-#endif
 
-#ifdef ENABLE_EV2_IMPL
+#ifdef USE_EV2_IMPL
 static svn_error_t *
 fetch_kind_func(svn_kind_t *kind,
 void *baton,
@@ -840,7 +840,7 @@ svn_repos_replay2(svn_fs_root_t *root,
   void *authz_read_baton,
   apr_pool_t *pool)
 {
-#ifndef ENABLE_EV2_IMPL
+#ifndef USE_EV2_IMPL
   apr_hash_t *fs_changes;
   apr_hash_t *changed_paths;
   apr_hash_index_t *hi;




svn commit: r1413197 - /subversion/trunk/subversion/libsvn_repos/replay.c

2012-11-24 Thread hwright
Author: hwright
Date: Sat Nov 24 15:04:52 2012
New Revision: 1413197

URL: http://svn.apache.org/viewvc?rev=1413197&view=rev
Log:
Use the configure-time guard for compiling some Ev2 implementation stuffs.

* subversion/libsvn_repos/replay.c
  (USE_EV2_IMPL): Remove the commented out define, and change other instances
to ENABLE_EV2_IMPL.
  (path_driver_cb_func): Conditionally compile.

Modified:
subversion/trunk/subversion/libsvn_repos/replay.c

Modified: subversion/trunk/subversion/libsvn_repos/replay.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/replay.c?rev=1413197&r1=1413196&r2=1413197&view=diff
==
--- subversion/trunk/subversion/libsvn_repos/replay.c (original)
+++ subversion/trunk/subversion/libsvn_repos/replay.c Sat Nov 24 15:04:52 2012
@@ -103,8 +103,6 @@
(though not necessarily in the same order in which they
occurred). */
 
-/* #define USE_EV2_IMPL */
-
 
 /*** Helper functions. ***/
 
@@ -457,6 +455,7 @@ fill_copyfrom(svn_fs_root_t **copyfrom_r
   return SVN_NO_ERROR;
 }
 
+#ifndef ENABLE_EV2_IMPL
 static svn_error_t *
 path_driver_cb_func(void **dir_baton,
 void *parent_baton,
@@ -780,8 +779,9 @@ path_driver_cb_func(void **dir_baton,
 
   return SVN_NO_ERROR;
 }
+#endif
 
-#ifdef USE_EV2_IMPL
+#ifdef ENABLE_EV2_IMPL
 static svn_error_t *
 fetch_kind_func(svn_kind_t *kind,
 void *baton,
@@ -840,7 +840,7 @@ svn_repos_replay2(svn_fs_root_t *root,
   void *authz_read_baton,
   apr_pool_t *pool)
 {
-#ifndef USE_EV2_IMPL
+#ifndef ENABLE_EV2_IMPL
   apr_hash_t *fs_changes;
   apr_hash_t *changed_paths;
   apr_hash_index_t *hi;




svn commit: r1413184 - /subversion/trunk/configure.ac

2012-11-24 Thread hwright
Author: hwright
Date: Sat Nov 24 13:26:02 2012
New Revision: 1413184

URL: http://svn.apache.org/viewvc?rev=1413184&view=rev
Log:
Remove the ev2-shims configure flag, and replace it with an ev2-impl configure
flag.  Thus, a developer can specify the use of Ev2 implementation use at
configure-time, and not have to add custom compile flags or comment/decomment
a define in the source.

(This flag currently isn't used in the source, but will be shortly.)

* configure.ac
  (ev2-shims): Remove.
  (ev2-impl): Add.

Modified:
subversion/trunk/configure.ac

Modified: subversion/trunk/configure.ac
URL: 
http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1413184&r1=1413183&r2=1413184&view=diff
==
--- subversion/trunk/configure.ac (original)
+++ subversion/trunk/configure.ac Sat Nov 24 13:26:02 2012
@@ -626,16 +626,18 @@ AC_SUBST(SVN_GNOME_KEYRING_INCLUDES)
 AC_SUBST(SVN_GNOME_KEYRING_LIBS)
 
 
-dnl Ev2 experimental feature --
-dnl Note: The Ev2 compat code will be built unconditionally, but by providing
-dnl this flag, users can enforce Ev2 compliance for testing purposes
-AC_ARG_ENABLE(ev2-shims,
-  AS_HELP_STRING([--enable-ev2-shims],
- [Compile with Ev2 translation [EXPERIMENTAL]]),
-  [enable_ev2_shims=$enableval],[enable_ev2_shims=no])
-if test "$enable_ev2_shims" = "yes"; then
-  AC_DEFINE(ENABLE_EV2_SHIMS, 1,
-[Define to 1 if Ev2 should be interjected into editor stacks.])
+dnl Ev2 experimental features --
+dnl Note: The Ev2 implementations will be built unconditionally, but by
+dnl providing this flag, users can choose to use the currently-shimmed Ev2
+dnl editor implementations for various operations.  This will probably
+dnl negatively impact performance, but is useful for testing.
+AC_ARG_ENABLE(ev2-impl,
+  AS_HELP_STRING([--enable-ev2-impl],
+ [Use Ev2 implementations, where available [EXPERIMENTAL]]),
+  [enable_ev2_impl=$enableval],[enable_ev2_impl=no])
+if test "$enable_ev2_impl" = "yes"; then
+  AC_DEFINE(ENABLE_EV2_IMPL, 1,
+[Define to 1 if Ev2 implementations should be used.])
 fi
 
 




svn propchange: r1413109 - svn:log

2012-11-24 Thread hwright
Author: hwright
Revision: 1413109
Modified property: svn:log

Modified: svn:log at Sat Nov 24 12:04:23 2012
--
--- svn:log (original)
+++ svn:log Sat Nov 24 12:04:23 2012
@@ -1,4 +1,4 @@
 Cherrypick r1413107 from the ev2-export branch.  I'm going to be brave here
 and develop on trunk.  The plan is to implement the Ev2 editor in parallel
-with the existing implementation, which should negatively impact 1.8
+with the existing implementation, which should not negatively impact 1.8
 releasability.



svn commit: r1413109 - in /subversion/trunk: ./ subversion/svnrdump/svnrdump.c subversion/svnrdump/svnrdump.h

2012-11-23 Thread hwright
Author: hwright
Date: Sat Nov 24 00:39:38 2012
New Revision: 1413109

URL: http://svn.apache.org/viewvc?rev=1413109&view=rev
Log:
Cherrypick r1413107 from the ev2-export branch.  I'm going to be brave here
and develop on trunk.  The plan is to implement the Ev2 editor in parallel
with the existing implementation, which should negatively impact 1.8
releasability.

Modified:
subversion/trunk/   (props changed)
subversion/trunk/subversion/svnrdump/svnrdump.c
subversion/trunk/subversion/svnrdump/svnrdump.h

Propchange: subversion/trunk/
--
  Merged /subversion/branches/ev2-export:r1413107

Modified: subversion/trunk/subversion/svnrdump/svnrdump.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/svnrdump.c?rev=1413109&r1=1413108&r2=1413109&view=diff
==
--- subversion/trunk/subversion/svnrdump/svnrdump.c (original)
+++ subversion/trunk/subversion/svnrdump/svnrdump.c Sat Nov 24 00:39:38 2012
@@ -39,6 +39,7 @@
 #include "svnrdump.h"
 
 #include "private/svn_cmdline_private.h"
+#include "private/svn_ra_private.h"
 
 
 
@@ -248,6 +249,81 @@ replay_revend(svn_revnum_t revision,
   return SVN_NO_ERROR;
 }
 
+#ifdef USE_EV2_IMPL
+/* Print dumpstream-formatted information about REVISION.
+ * Implements the `svn_ra_replay_revstart_callback_t' interface.
+ */
+static svn_error_t *
+replay_revstart_v2(svn_revnum_t revision,
+   void *replay_baton,
+   svn_editor_t **editor,
+   apr_hash_t *rev_props,
+   apr_pool_t *pool)
+{
+  struct replay_baton *rb = replay_baton;
+  apr_hash_t *normal_props;
+  svn_stringbuf_t *propstring;
+  svn_stream_t *stdout_stream;
+  svn_stream_t *revprop_stream;
+
+  SVN_ERR(svn_stream_for_stdout(&stdout_stream, pool));
+
+  /* Revision-number: 19 */
+  SVN_ERR(svn_stream_printf(stdout_stream, pool,
+SVN_REPOS_DUMPFILE_REVISION_NUMBER
+": %ld\n", revision));
+  SVN_ERR(svn_rdump__normalize_props(&normal_props, rev_props, pool));
+  propstring = svn_stringbuf_create_ensure(0, pool);
+  revprop_stream = svn_stream_from_stringbuf(propstring, pool);
+  SVN_ERR(svn_hash_write2(normal_props, revprop_stream, "PROPS-END", pool));
+  SVN_ERR(svn_stream_close(revprop_stream));
+
+  /* Prop-content-length: 13 */
+  SVN_ERR(svn_stream_printf(stdout_stream, pool,
+SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH
+": %" APR_SIZE_T_FMT "\n", propstring->len));
+
+  /* Content-length: 29 */
+  SVN_ERR(svn_stream_printf(stdout_stream, pool,
+SVN_REPOS_DUMPFILE_CONTENT_LENGTH
+": %" APR_SIZE_T_FMT "\n\n", propstring->len));
+
+  /* Property data. */
+  SVN_ERR(svn_stream_write(stdout_stream, propstring->data,
+   &(propstring->len)));
+
+  SVN_ERR(svn_stream_puts(stdout_stream, "\n"));
+  SVN_ERR(svn_stream_close(stdout_stream));
+
+  SVN_ERR(svn_rdump__get_dump_editor_v2(editor, revision,
+rb->stdout_stream,
+rb->extra_ra_session,
+check_cancel, NULL, pool, pool));
+
+  return SVN_NO_ERROR;
+}
+
+/* Print progress information about the dump of REVISION.
+   Implements the `svn_ra_replay_revfinish_callback_t' interface. */
+static svn_error_t *
+replay_revend_v2(svn_revnum_t revision,
+ void *replay_baton,
+ svn_editor_t *editor,
+ apr_hash_t *rev_props,
+ apr_pool_t *pool)
+{
+  /* No resources left to free. */
+  struct replay_baton *rb = replay_baton;
+
+  SVN_ERR(svn_editor_complete(editor));
+
+  if (! rb->quiet)
+SVN_ERR(svn_cmdline_fprintf(stderr, pool, "* Dumped revision %lu.\n",
+revision));
+  return SVN_NO_ERROR;
+}
+#endif
+
 /* Initialize the RA layer, and set *CTX to a new client context baton
  * allocated from POOL.  Use CONFIG_DIR and pass USERNAME, PASSWORD,
  * CONFIG_DIR and NO_AUTH_CACHE to initialize the authorization baton.
@@ -391,9 +467,16 @@ replay_revisions(svn_ra_session_t *sessi
 
   if (incremental)
 {
+#ifndef USE_EV2_IMPL
   SVN_ERR(svn_ra_replay_range(session, start_revision, end_revision,
   0, TRUE, replay_revstart, replay_revend,
   replay_baton, pool));
+#else
+  SVN_ERR(svn_ra__replay_range_ev2(session, start_revision, end_revision,
+   0, TRUE, replay_revstart_v2,
+   replay_revend_v2, replay_baton,
+   

svn commit: r1413107 - in /subversion/branches/ev2-export/subversion/svnrdump: svnrdump.c svnrdump.h

2012-11-23 Thread hwright
Author: hwright
Date: Sat Nov 24 00:26:15 2012
New Revision: 1413107

URL: http://svn.apache.org/viewvc?rev=1413107&view=rev
Log:
On the ev2 export branch:
Add a bunch of boilerplate to support an Ev2 implementation of the replay_range
editor driver.  This isn't yet called by anything.

* subversion/svnrdump/svnrdump.c
  (replay_revstart_v2, replay_revend_v2): New.
  (replay_revisions): Optionally use the Ev2 versions of the ra functions.

* subversion/svnrdump/svnrdump.h
  (svn_rdump__get_dump_editor_v2): Add a declaration for an Ev2 editor
implementation.

Modified:
subversion/branches/ev2-export/subversion/svnrdump/svnrdump.c
subversion/branches/ev2-export/subversion/svnrdump/svnrdump.h

Modified: subversion/branches/ev2-export/subversion/svnrdump/svnrdump.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svnrdump/svnrdump.c?rev=1413107&r1=1413106&r2=1413107&view=diff
==
--- subversion/branches/ev2-export/subversion/svnrdump/svnrdump.c (original)
+++ subversion/branches/ev2-export/subversion/svnrdump/svnrdump.c Sat Nov 24 
00:26:15 2012
@@ -39,6 +39,7 @@
 #include "svnrdump.h"
 
 #include "private/svn_cmdline_private.h"
+#include "private/svn_ra_private.h"
 
 
 
@@ -248,6 +249,81 @@ replay_revend(svn_revnum_t revision,
   return SVN_NO_ERROR;
 }
 
+#ifdef USE_EV2_IMPL
+/* Print dumpstream-formatted information about REVISION.
+ * Implements the `svn_ra_replay_revstart_callback_t' interface.
+ */
+static svn_error_t *
+replay_revstart_v2(svn_revnum_t revision,
+   void *replay_baton,
+   svn_editor_t **editor,
+   apr_hash_t *rev_props,
+   apr_pool_t *pool)
+{
+  struct replay_baton *rb = replay_baton;
+  apr_hash_t *normal_props;
+  svn_stringbuf_t *propstring;
+  svn_stream_t *stdout_stream;
+  svn_stream_t *revprop_stream;
+
+  SVN_ERR(svn_stream_for_stdout(&stdout_stream, pool));
+
+  /* Revision-number: 19 */
+  SVN_ERR(svn_stream_printf(stdout_stream, pool,
+SVN_REPOS_DUMPFILE_REVISION_NUMBER
+": %ld\n", revision));
+  SVN_ERR(svn_rdump__normalize_props(&normal_props, rev_props, pool));
+  propstring = svn_stringbuf_create_ensure(0, pool);
+  revprop_stream = svn_stream_from_stringbuf(propstring, pool);
+  SVN_ERR(svn_hash_write2(normal_props, revprop_stream, "PROPS-END", pool));
+  SVN_ERR(svn_stream_close(revprop_stream));
+
+  /* Prop-content-length: 13 */
+  SVN_ERR(svn_stream_printf(stdout_stream, pool,
+SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH
+": %" APR_SIZE_T_FMT "\n", propstring->len));
+
+  /* Content-length: 29 */
+  SVN_ERR(svn_stream_printf(stdout_stream, pool,
+SVN_REPOS_DUMPFILE_CONTENT_LENGTH
+": %" APR_SIZE_T_FMT "\n\n", propstring->len));
+
+  /* Property data. */
+  SVN_ERR(svn_stream_write(stdout_stream, propstring->data,
+   &(propstring->len)));
+
+  SVN_ERR(svn_stream_puts(stdout_stream, "\n"));
+  SVN_ERR(svn_stream_close(stdout_stream));
+
+  SVN_ERR(svn_rdump__get_dump_editor_v2(editor, revision,
+rb->stdout_stream,
+rb->extra_ra_session,
+check_cancel, NULL, pool, pool));
+
+  return SVN_NO_ERROR;
+}
+
+/* Print progress information about the dump of REVISION.
+   Implements the `svn_ra_replay_revfinish_callback_t' interface. */
+static svn_error_t *
+replay_revend_v2(svn_revnum_t revision,
+ void *replay_baton,
+ svn_editor_t *editor,
+ apr_hash_t *rev_props,
+ apr_pool_t *pool)
+{
+  /* No resources left to free. */
+  struct replay_baton *rb = replay_baton;
+
+  SVN_ERR(svn_editor_complete(editor));
+
+  if (! rb->quiet)
+SVN_ERR(svn_cmdline_fprintf(stderr, pool, "* Dumped revision %lu.\n",
+revision));
+  return SVN_NO_ERROR;
+}
+#endif
+
 /* Initialize the RA layer, and set *CTX to a new client context baton
  * allocated from POOL.  Use CONFIG_DIR and pass USERNAME, PASSWORD,
  * CONFIG_DIR and NO_AUTH_CACHE to initialize the authorization baton.
@@ -391,9 +467,16 @@ replay_revisions(svn_ra_session_t *sessi
 
   if (incremental)
 {
+#ifndef USE_EV2_IMPL
   SVN_ERR(svn_ra_replay_range(session, start_revision, end_revision,
   0, TRUE, replay_revstart, replay_revend,
   replay_baton, pool));
+#else
+  SVN_ERR(svn_ra__replay_range_ev2(session, start_revision, end_revision,
+   0, TRUE, replay_revst

svn commit: r1413093 - in /subversion/branches/ev2-export: ./ build/ac-macros/ subversion/ subversion/svn/ subversion/svnmucc/ subversion/tests/ subversion/tests/cmdline/ subversion/tests/cmdline/svnt

2012-11-23 Thread hwright
Author: hwright
Date: Fri Nov 23 22:30:17 2012
New Revision: 1413093

URL: http://svn.apache.org/viewvc?rev=1413093&view=rev
Log:
On the ev2-export branch:
Bring up-to-date with trunk yet again (to pick up the fix for the fs-test 37
failure).

Removed:
subversion/branches/ev2-export/build/ac-macros/qsort_r.m4
Modified:
subversion/branches/ev2-export/   (props changed)
subversion/branches/ev2-export/aclocal.m4
subversion/branches/ev2-export/configure.ac
subversion/branches/ev2-export/subversion/svn/cl.h
subversion/branches/ev2-export/subversion/svn/propedit-cmd.c
subversion/branches/ev2-export/subversion/svn/props.c
subversion/branches/ev2-export/subversion/svn/propset-cmd.c
subversion/branches/ev2-export/subversion/svn_private_config.hw
subversion/branches/ev2-export/subversion/svnmucc/svnmucc.c
subversion/branches/ev2-export/subversion/tests/cmdline/prop_tests.py
subversion/branches/ev2-export/subversion/tests/cmdline/stat_tests.py
subversion/branches/ev2-export/subversion/tests/cmdline/svntest/actions.py
subversion/branches/ev2-export/subversion/tests/libsvn_fs/fs-test.c
subversion/branches/ev2-export/subversion/tests/libsvn_subr/spillbuf-test.c
subversion/branches/ev2-export/subversion/tests/svn_test_fs.c

Propchange: subversion/branches/ev2-export/
--
  Merged /subversion/trunk:r1412981-1413086

Modified: subversion/branches/ev2-export/aclocal.m4
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/aclocal.m4?rev=1413093&r1=1413092&r2=1413093&view=diff
==
--- subversion/branches/ev2-export/aclocal.m4 (original)
+++ subversion/branches/ev2-export/aclocal.m4 Fri Nov 23 22:30:17 2012
@@ -47,7 +47,6 @@ sinclude(build/ac-macros/swig.m4)
 sinclude(build/ac-macros/zlib.m4)
 sinclude(build/ac-macros/kwallet.m4)
 sinclude(build/ac-macros/macosx.m4)
-sinclude(build/ac-macros/qsort_r.m4)
 
 # Include the libtool macros
 sinclude(build/libtool.m4)

Modified: subversion/branches/ev2-export/configure.ac
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/configure.ac?rev=1413093&r1=1413092&r2=1413093&view=diff
==
--- subversion/branches/ev2-export/configure.ac (original)
+++ subversion/branches/ev2-export/configure.ac Fri Nov 23 22:30:17 2012
@@ -683,18 +683,6 @@ if test "$enable_nls" = "yes"; then
 fi
 
 AH_BOTTOM([
-/* Wrap qsort_r for cross-platform compatibility */
-#if !HAVE_QSORT_R
-#define SVN_QSORT_R(base, length, width, compare, thunk) \
-  (qsort((base), (length), (width), (compare)))
-#elif SVN_QSORT_R_NORMAL_ARG_ORDER
-#define SVN_QSORT_R qsort_r
-#else
-/* BSD changes the order of the compare and thunk arguments */
-#define SVN_QSORT_R(base, length, width, compare, thunk) \
-  (qsort_r((base), (length), (width), (thunk), (compare)))
-#endif
-
 /* Indicate to translators that string X should be translated.  Do not look
up the translation at run time; just expand to X.  This macro is suitable
for use where a constant string is required at compile time. */
@@ -882,9 +870,6 @@ AC_FUNC_VPRINTF
 dnl check for functions needed in special file handling
 AC_CHECK_FUNCS(symlink readlink)
 
-dnl check for qsor_r presence and argument ordering
-SVN_FUNC_QSORT_R
-
 dnl check for uname
 AC_CHECK_HEADERS(sys/utsname.h, [AC_CHECK_FUNCS(uname)], [])
 

Modified: subversion/branches/ev2-export/subversion/svn/cl.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svn/cl.h?rev=1413093&r1=1413092&r2=1413093&view=diff
==
--- subversion/branches/ev2-export/subversion/svn/cl.h (original)
+++ subversion/branches/ev2-export/subversion/svn/cl.h Fri Nov 23 22:30:17 2012
@@ -768,7 +768,12 @@ svn_cl__operation_str_human_readable(svn
  apr_pool_t *pool);
 
 /* If PROPNAME looks like but is not identical to one of the svn:
- * poperties, raise an error and suggest a better spelling.
+ * poperties, raise an error and suggest a better spelling. Names that
+ * raise errors look like this:
+ *
+ *   - start with svn: but do not exactly match a known property; or,
+ *   - start with a 3-letter prefix that differs in only one letter
+ * from "svn:", and the rest exactly matches a known propery.
  *
  * If REVPROP is TRUE, only check revision property names; otherwise
  * only check node property names.

Modified: subversion/branches/ev2-export/subversion/svn/propedit-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svn/propedit-cmd.c?rev=1413093&r1=1413092&r2=1413093&view=diff
==
--- subv

svn commit: r1413076 - /subversion/branches/ev2-export/subversion/libsvn_client/commit.c

2012-11-23 Thread hwright
Author: hwright
Date: Fri Nov 23 21:43:32 2012
New Revision: 1413076

URL: http://svn.apache.org/viewvc?rev=1413076&view=rev
Log:
On the ev2-export branch:
Make sure we use the right repos-relative path when importing somewhere other
than the repos root.  This fixes the 4 failing autoprop tests.

* subversion/libsvn_client/commit.c
  (import): Take and use an edit_relpath param.
  (svn_client_import5): Compute the appropriate repos relpath and provide it
to import().

Modified:
subversion/branches/ev2-export/subversion/libsvn_client/commit.c

Modified: subversion/branches/ev2-export/subversion/libsvn_client/commit.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/commit.c?rev=1413076&r1=1413075&r2=1413076&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/commit.c Fri Nov 23 
21:43:32 2012
@@ -512,6 +512,7 @@ static svn_error_t *
 import(const char *local_abspath,
const apr_array_header_t *new_entries,
svn_editor_t *editor,
+   const char *edit_relpath,
svn_depth_t depth,
apr_hash_t *excludes,
apr_hash_t *autoprops,
@@ -525,7 +526,7 @@ import(const char *local_abspath,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
 {
-  const char *relpath = "";
+  const char *relpath = edit_relpath == NULL ? "" : edit_relpath;
   import_ctx_t *import_ctx = apr_pcalloc(pool, sizeof(*import_ctx));
   const svn_io_dirent2_t *dirent;
   apr_hash_t *props = apr_hash_make(pool);
@@ -766,6 +767,8 @@ svn_client_import5(const char *path,
   apr_array_header_t *global_ignores;
   apr_hash_t *local_ignores_hash;
   apr_array_header_t *local_ignores_arr;
+  const char *edit_relpath;
+  const char *repos_root;
 
   if (svn_path_is_url(path))
 return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
@@ -915,9 +918,13 @@ svn_client_import5(const char *path,
 }
 }
 
+  SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root, scratch_pool));
+  edit_relpath = svn_uri_skip_ancestor(repos_root, url, scratch_pool);
+
   /* If an error occurred during the commit, abort the edit and return
  the error.  We don't even care if the abort itself fails.  */
-  if ((err = import(local_abspath, new_entries, editor, depth, excludes,
+  if ((err = import(local_abspath, new_entries, editor, edit_relpath,
+depth, excludes,
 autoprops, local_ignores_arr, global_ignores,
 no_ignore, no_autoprops, ignore_unknown_node_types,
 filter_callback, filter_baton, ctx, iterpool)))




svn commit: r1413049 - /subversion/trunk/subversion/tests/libsvn_fs/fs-test.c

2012-11-23 Thread hwright
Author: hwright
Date: Fri Nov 23 20:34:57 2012
New Revision: 1413049

URL: http://svn.apache.org/viewvc?rev=1413049&view=rev
Log:
* subversion/tests/libsvn_fs/fs-test.c
  (delete_fs): Rename the test repository so it better matches convention, and
will be masked by the directory svn:ignore property.

Modified:
subversion/trunk/subversion/tests/libsvn_fs/fs-test.c

Modified: subversion/trunk/subversion/tests/libsvn_fs/fs-test.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_fs/fs-test.c?rev=1413049&r1=1413048&r2=1413049&view=diff
==
--- subversion/trunk/subversion/tests/libsvn_fs/fs-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_fs/fs-test.c Fri Nov 23 20:34:57 
2012
@@ -4905,7 +4905,7 @@ delete_fs(const svn_test_opts_t *opts,
   const char *path;
   svn_node_kind_t kind;
 
-  SVN_ERR(svn_test__create_fs(&fs, "test-delete-fs", opts, pool));
+  SVN_ERR(svn_test__create_fs(&fs, "test-repo-delete-fs", opts, pool));
   path = svn_fs_path(fs, pool);
   SVN_ERR(svn_io_check_path(path, &kind, pool));
   SVN_TEST_ASSERT(kind != svn_node_none);




svn commit: r1413046 - /subversion/trunk/subversion/tests/svn_test_fs.c

2012-11-23 Thread hwright
Author: hwright
Date: Fri Nov 23 20:29:09 2012
New Revision: 1413046

URL: http://svn.apache.org/viewvc?rev=1413046&view=rev
Log:
When removing old filesystems before re-creating them for tests, we don't need
to be clean about it, so just recursively remove the directory.  This fixes
a problem when rerunning fs-test 37, as it explicitly tests fs_delete, so the
subsequent delete in this function would fail.

* subversion/tests/svn_test_fs.c
  (create_fs): Just remove the target directory, rather than just the FS.

Modified:
subversion/trunk/subversion/tests/svn_test_fs.c

Modified: subversion/trunk/subversion/tests/svn_test_fs.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/svn_test_fs.c?rev=1413046&r1=1413045&r2=1413046&view=diff
==
--- subversion/trunk/subversion/tests/svn_test_fs.c (original)
+++ subversion/trunk/subversion/tests/svn_test_fs.c Fri Nov 23 20:29:09 2012
@@ -115,7 +115,7 @@ create_fs(svn_fs_t **fs_p,
   if (apr_stat(&finfo, name, APR_FINFO_TYPE, pool) == APR_SUCCESS)
 {
   if (finfo.filetype == APR_DIR)
-SVN_ERR_W(svn_fs_delete_fs(name, pool),
+SVN_ERR_W(svn_io_remove_dir2(name, TRUE, NULL, NULL, pool),
   apr_psprintf(pool,
"cannot create fs '%s' there is already "
"a directory of that name", name));




svn commit: r1413032 - /subversion/branches/ev2-export/subversion/libsvn_client/commit.c

2012-11-23 Thread hwright
Author: hwright
Date: Fri Nov 23 19:05:27 2012
New Revision: 1413032

URL: http://svn.apache.org/viewvc?rev=1413032&view=rev
Log:
On the ev2-export branch:
Remove a bit of code added during the recent merge in r1412731.
Number of test failures is down to 7.

* subversion/libsvn_client/commit.c
  (import): Don't NULL-out the local_ignores list.

Modified:
subversion/branches/ev2-export/subversion/libsvn_client/commit.c

Modified: subversion/branches/ev2-export/subversion/libsvn_client/commit.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/commit.c?rev=1413032&r1=1413031&r2=1413032&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/commit.c Fri Nov 23 
19:05:27 2012
@@ -543,11 +543,6 @@ import(const char *local_abspath,
   int i;
   apr_hash_t *dirents;
 
-  /* If we are creating a new repository directory path to import to,
- then we disregard any svn:ignore property. */
-  if (!no_ignore && new_entries->nelts)
-local_ignores = NULL;
-
   if (dirent->kind == svn_node_dir)
 {
   SVN_ERR(get_filtered_children(&dirents, local_abspath, excludes,




svn commit: r1412731 [10/10] - in /subversion/branches/ev2-export: ./ build/ build/ac-macros/ contrib/client-side/svnmerge/ contrib/server-side/svncutter/ notes/ subversion/ subversion/bindings/javahl

2012-11-22 Thread hwright
Modified: subversion/branches/ev2-export/subversion/tests/svn_test_fs.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/svn_test_fs.c?rev=1412731&r1=1412730&r2=1412731&view=diff
==
--- subversion/branches/ev2-export/subversion/tests/svn_test_fs.c (original)
+++ subversion/branches/ev2-export/subversion/tests/svn_test_fs.c Fri Nov 23 
01:12:18 2012
@@ -115,10 +115,14 @@ create_fs(svn_fs_t **fs_p,
   if (apr_stat(&finfo, name, APR_FINFO_TYPE, pool) == APR_SUCCESS)
 {
   if (finfo.filetype == APR_DIR)
-SVN_ERR(svn_fs_delete_fs(name, pool));
+SVN_ERR_W(svn_fs_delete_fs(name, pool),
+  apr_psprintf(pool,
+   "cannot create fs '%s' there is already "
+   "a directory of that name", name));
   else
 return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
- "there is already a file named '%s'", name);
+ "cannot create fs '%s' there is already "
+ "a file of that name", name);
 }
 
   SVN_ERR(svn_fs_create(fs_p, name, fs_config, pool));

Modified: subversion/branches/ev2-export/tools/server-side/fsfs-reorg.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/server-side/fsfs-reorg.c?rev=1412731&r1=1412730&r2=1412731&view=diff
==
--- subversion/branches/ev2-export/tools/server-side/fsfs-reorg.c (original)
+++ subversion/branches/ev2-export/tools/server-side/fsfs-reorg.c Fri Nov 23 
01:12:18 2012
@@ -47,165 +47,376 @@
 
 #define ERROR_TAG "diff: "
 
+/* forward declarations */
 typedef struct noderev_t noderev_t;
 typedef struct revision_info_t revision_info_t;
 
+/* A FSFS rev file is sequence of fragments and unused space (the latter
+ * only being inserted by this tool and not during ordinary SVN operation).
+ * 
+ * This type defines the type of any fragment.
+ *
+ * Please note that the classification as "property", "dir" or "file"
+ * fragments is only to be used while determining the future placement
+ * of a representation.  If the rep is shared, the same rep may be used
+ * as *any* of the 3 kinds.
+ */
 enum fragment_kind_t
 {
+  /* the 2 number line containing changes and root node offsets */
   header_fragment,
+
+  /* list of all changes in a revision */
   changes_fragment,
-  noderep_fragment,
+
+  /* (the textual representation of) a noderev */
+  noderev_fragment,
+
+  /* a property rep (including PLAIN / DELTA header) */
   property_fragment,
+
+  /* a directory rep (including PLAIN / DELTA header) */
   dir_fragment,
+
+  /* a file rep (including PLAIN / DELTA header) */
   file_fragment
 };
 
+/* A fragment.  This is used to represent the final ordering, i.e. there
+ * will be an array containing elements of this type that basically put
+ * a fragment at some location in the target file.
+ */
 typedef struct fragment_t
 {
+  /* position in the target file */
   apr_size_t position;
-  void *data;
+
+  /* kind of fragment */
   enum fragment_kind_t kind;
+
+  /* pointer to the  fragment struct; type depends on KIND */
+  void *data;
 } fragment_t;
 
+/* Location info for a single revision.
+ */
 typedef struct revision_location_t
 {
+  /* pack file offset (manifest value), 0 for non-packed files */
   apr_size_t offset;
+  
+  /* offset of the changes list relative to OFFSET */
   apr_size_t changes;
+
+  /* length of the changes list on bytes */
   apr_size_t changes_len;
+
+  /* first offset behind the revision data in the pack file (file length
+   * for non-packed revs) */
   apr_size_t end;  
 } revision_location_t;
 
+/* Absolute position and size of some item.
+ */
 typedef struct location_t
 {
+  /* absolute offset in the file */
   apr_size_t offset;
+
+  /* item length in bytes */
   apr_size_t size;
 } location_t;
 
+/* A parsed directory entry. Note that instances of this struct may be
+ * shared between different DIRECTORY_T containers.
+ */
 typedef struct direntry_t
 {
+  /* (local) entry / path name */
   const char *name;
+
+  /* strlen (name) */
   apr_size_t name_len;
+
+  /* node rev providing ID and representation(s) */
   noderev_t *node;
 } direntry_t;
 
+/* Representation of a parsed directory content.
+ */
 typedef struct directory_t
 {
+  /* array of pointers to DIRENTRY_T */
   apr_array_header_t *entries;
+
+  /* MD5 of the textual representation. Will be set lazily as a side-effect
+   * of determining the length of this dir's textual representation. */
   unsigned char target_md5[16];
+
+  /* (expanded) length of the textual representation.
+   * Determined lazily during the write process. */
   apr_size_t size;
 } directory_t;
 
+/* A representation fragment.
+ */
 typedef struct representation_t
 {
+  /* location in the source file */
   location_t original;
+
+ 

svn commit: r1412731 [8/10] - in /subversion/branches/ev2-export: ./ build/ build/ac-macros/ contrib/client-side/svnmerge/ contrib/server-side/svncutter/ notes/ subversion/ subversion/bindings/javahl/

2012-11-22 Thread hwright
Modified: 
subversion/branches/ev2-export/subversion/tests/cmdline/svntest/sandbox.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/svntest/sandbox.py?rev=1412731&r1=1412730&r2=1412731&view=diff
==
--- subversion/branches/ev2-export/subversion/tests/cmdline/svntest/sandbox.py 
(original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/svntest/sandbox.py 
Fri Nov 23 01:12:18 2012
@@ -307,6 +307,17 @@ class Sandbox:
 raise Exception("Unexpected line '" + line + "' in proplist output" + 
str(out))
 return props
 
+  def simple_add_symlink(self, dest, target):
+"""Create a symlink TARGET pointing to DEST and add it to subversion"""
+if svntest.main.is_posix_os():
+  os.symlink(dest, self.ospath(target))
+else:
+  svntest.main.file_write(self.ospath(target), "link %s" % dest)
+self.simple_add(target)
+if not svntest.main.is_posix_os():
+  # '*' is evaluated on Windows
+  self.simple_propset('svn:special', 'X', target)
+
   def simple_copy(self, source, dest):
 """Copy SOURCE to DEST in the WC.
SOURCE and DEST are relpaths relative to the WC."""

Modified: 
subversion/branches/ev2-export/subversion/tests/cmdline/svntest/verify.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/svntest/verify.py?rev=1412731&r1=1412730&r2=1412731&view=diff
==
--- subversion/branches/ev2-export/subversion/tests/cmdline/svntest/verify.py 
(original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/svntest/verify.py 
Fri Nov 23 01:12:18 2012
@@ -362,7 +362,7 @@ def compare_and_display_lines(message, l
 
   if isinstance(actual, str):
 actual = [actual]
-  actual = [line for line in actual if not line.startswith('DBG:')]
+  actual = svntest.main.filter_dbg(actual)
 
   if not expected.matches(actual, except_re):
 expected.display_differences(message, label, actual)

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/svntest/wc.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/svntest/wc.py?rev=1412731&r1=1412730&r2=1412731&view=diff
==
--- subversion/branches/ev2-export/subversion/tests/cmdline/svntest/wc.py 
(original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/svntest/wc.py Fri 
Nov 23 01:12:18 2012
@@ -886,6 +886,14 @@ def text_base_path(file_path):
 
   raise svntest.Failure("No pristine text for " + relpath)
 
+def sqlite_stmt(wc_root_path, stmt):
+  """Execute STMT on the SQLite wc.db in WC_ROOT_PATH and return the
+ results."""
+
+  db = open_wc_db(wc_root_path)[0]
+  c = db.cursor()
+  c.execute(stmt)
+  return c.fetchall()
 
 # 
 ### probably toss these at some point. or major rework. or something.

Modified: 
subversion/branches/ev2-export/subversion/tests/cmdline/switch_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/switch_tests.py?rev=1412731&r1=1412730&r2=1412731&view=diff
==
--- subversion/branches/ev2-export/subversion/tests/cmdline/switch_tests.py 
(original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/switch_tests.py Fri 
Nov 23 01:12:18 2012
@@ -586,6 +586,11 @@ def file_dir_file(sbox):
   if not os.path.isdir(file_path):
 raise svntest.Failure
 
+  # The reason the following switch currently fails is that the node
+  # is determined to be a 'root', because it is switched against its parent.
+  # In this specific case the switch editor is designed to be rooted on the 
node
+  # itself instead of its ancestor. If you would use sbox.ospath('A') for
+  # file_path the switch works both ways.
   svntest.actions.run_and_verify_svn(None, None, [], 'switch',
  '--ignore-ancestry', file_url, file_path)
   if not os.path.isfile(file_path):
@@ -2219,8 +2224,9 @@ def switch_to_root(sbox):
 
 #--
 # Make sure that switch continue after deleting locally modified
-# directories, as it update and merge do.
+# directories, as update and merge do.
 
+@Issue(2505)
 def tolerate_local_mods(sbox):
   "tolerate deletion of a directory with local mods"
 

Modified: 
subversion/branches/ev2-export/subversion/tests/cmdline/update_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/update_tests.py?rev=1412731&r1=1412730&r2=1412731&view=diff
==
--- subversion/branches/ev2-export/subversion/tests/cmdline/update_tests.py 
(original)
+++ subversion/branches/ev2-export/subversion/tests/c

svn commit: r1412677 - in /subversion/trunk: subversion/tests/libsvn_wc/ tools/server-side/

2012-11-22 Thread hwright
Author: hwright
Date: Thu Nov 22 21:07:36 2012
New Revision: 1412677

URL: http://svn.apache.org/viewvc?rev=1412677&view=rev
Log:
Ignore a few generated binaries.

* subversion/tests/libsvn_wc
* tools/server-side
  (svn:ignore): Add generated binaries.

Modified:
subversion/trunk/subversion/tests/libsvn_wc/   (props changed)
subversion/trunk/tools/server-side/   (props changed)

Propchange: subversion/trunk/subversion/tests/libsvn_wc/
--
--- svn:ignore (original)
+++ svn:ignore Thu Nov 22 21:07:36 2012
@@ -11,3 +11,4 @@ tree-conflict-data-test
 wc-incomplete-tester
 wc-lock-tester
 wc-queries-test
+wc-test

Propchange: subversion/trunk/tools/server-side/
--
--- svn:ignore (original)
+++ svn:ignore Thu Nov 22 21:07:36 2012
@@ -3,3 +3,4 @@ svn-populate-node-origins-index
 svnauthz-validate
 svn-rep-sharing-stats
 fsfs-reorg
+fsfs-stats




svn commit: r1404846 [4/4] - in /subversion/branches/ev2-export: ./ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_delta/ subversion/libsvn_fs_fs/ subversi

2012-11-01 Thread hwright
Modified: 
subversion/branches/ev2-export/subversion/tests/cmdline/svntest/main.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/svntest/main.py?rev=1404846&r1=1404845&r2=1404846&view=diff
==
--- subversion/branches/ev2-export/subversion/tests/cmdline/svntest/main.py 
(original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/svntest/main.py Fri 
Nov  2 00:57:09 2012
@@ -174,6 +174,12 @@ work_dir = "svn-test-work"
 # Constant for the merge info property.
 SVN_PROP_MERGEINFO = "svn:mergeinfo"
 
+# Constant for the inheritabled auto-props property.
+SVN_PROP_INHERITABLE_AUTOPROPS = "svn:inheritable-auto-props"
+
+# Constant for the inheritabled ignores property.
+SVN_PROP_INHERITABLE_IGNORES = "svn:inheritable-ignores"
+
 # Where we want all the repositories and working copies to live.
 # Each test will have its own!
 general_repo_dir = os.path.join(work_dir, "repositories")
@@ -952,12 +958,16 @@ def copy_repos(src_path, dst_path, head_
 
   dump_re = re.compile(r'^\* Dumped revision (\d+)\.\r?$')
   expect_revision = 0
+  dump_failed = False
   for dump_line in dump_stderr:
 match = dump_re.match(dump_line)
 if not match or match.group(1) != str(expect_revision):
   logger.warn('ERROR:  dump failed: %s', dump_line.strip())
-  raise SVNRepositoryCopyFailure
-expect_revision += 1
+  dump_failed = True
+else:
+  expect_revision += 1
+  if dump_failed:
+raise SVNRepositoryCopyFailure
   if expect_revision != head_revision + 1:
 logger.warn('ERROR:  dump failed; did not see revision %s', head_revision)
 raise SVNRepositoryCopyFailure
@@ -1299,7 +1309,8 @@ class TestRunner:
 
   def list(self, milestones_dict=None):
 """Print test doc strings.  MILESTONES_DICT is an optional mapping
-of issue numbers to target milestones."""
+of issue numbers to an list containing target milestones and who
+the issue is assigned to."""
 if options.mode_filter.upper() == 'ALL' \
or options.mode_filter.upper() == self.pred.list_mode().upper() \
or (options.mode_filter.upper() == 'PASS' \
@@ -1309,6 +1320,7 @@ class TestRunner:
   if self.pred.issues:
 if not options.milestone_filter or milestones_dict is None:
   issues = self.pred.issues
+  tail += " [%s]" % ','.join(['#%s' % str(i) for i in issues])
 else: # Limit listing by requested target milestone(s).
   filter_issues = []
   matches_filter = False
@@ -1317,13 +1329,16 @@ class TestRunner:
   # If any one of them matches the MILESTONE_FILTER then we'll print
   # them all.
   for issue in self.pred.issues:
-# A safe starting assumption.
+# Some safe starting assumptions.
 milestone = 'unknown'
+assigned_to = 'unknown'
 if milestones_dict:
   if milestones_dict.has_key(str(issue)):
-milestone = milestones_dict[str(issue)]
+milestone = milestones_dict[str(issue)][0]
+assigned_to = milestones_dict[str(issue)][1]
 
-filter_issues.append(str(issue) + '(' + milestone + ')')
+filter_issues.append(
+  str(issue) + '(' + milestone + '/' + assigned_to + ')')
 pattern = re.compile(options.milestone_filter)
 if pattern.match(milestone):
   matches_filter = True
@@ -1331,9 +1346,12 @@ class TestRunner:
   # Did at least one of the associated issues meet our filter?
   if matches_filter:
 issues = filter_issues
-
-tail += " [%s]" % ','.join(['#%s' % str(i) for i in issues])
-
+  # Wrap the issue#/target-milestone/assigned-to string
+  # to the next line and add a line break to enhance
+  # readability.
+  tail += "\n   %s" % '\n   '.join(
+['#%s' % str(i) for i in issues])
+  tail += '\n'
   # If there is no filter or this test made if through
   # the filter then print it!
   if options.milestone_filter is None or len(issues):
@@ -1670,7 +1688,12 @@ def run_tests(test_list, serial_only = F
 
   sys.exit(execute_tests(test_list, serial_only))
 
-def get_target_milestones_for_issues(issue_numbers):
+def get_issue_details(issue_numbers):
+  """For each issue number in ISSUE_NUMBERS query the issue
+ tracker and determine what the target milestone is and
+ who the issue is assigned to.  Return this information
+ as a dictionary mapping issue numbers to a list
+ [target_milestone, assigned_to]"""
   xml_url = "http://subversion.tigris.org/issues/xml.cgi?id=";
   issue_dict = {}
 
@@ -1698,14 +1721,17 @@ def get_target_milestones_for_issues(iss
 xmldoc = xml.dom.minidom.parse(issue_xml_f)
 issue_xml_f.close()
 
-# Get the target milestone for each issue.
+# For each iss

svn commit: r1401904 - in /subversion/branches/ev2-export: ./ notes/ subversion/include/private/ subversion/libsvn_fs_fs/ subversion/libsvn_ra/ subversion/libsvn_subr/ subversion/svnserve/ tools/serve

2012-10-24 Thread hwright
Author: hwright
Date: Wed Oct 24 22:19:38 2012
New Revision: 1401904

URL: http://svn.apache.org/viewvc?rev=1401904&view=rev
Log:
On the ev2-export branch:
Bring up-to-date with trunk.

Modified:
subversion/branches/ev2-export/   (props changed)
subversion/branches/ev2-export/notes/fsfs
subversion/branches/ev2-export/subversion/include/private/svn_ra_private.h
subversion/branches/ev2-export/subversion/libsvn_fs_fs/fs.h
subversion/branches/ev2-export/subversion/libsvn_fs_fs/fs_fs.c
subversion/branches/ev2-export/subversion/libsvn_fs_fs/structure
subversion/branches/ev2-export/subversion/libsvn_ra/editor.c
subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c
subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.h
subversion/branches/ev2-export/subversion/libsvn_subr/cache-membuffer.c
subversion/branches/ev2-export/subversion/svnserve/main.c
subversion/branches/ev2-export/subversion/svnserve/serve.c
subversion/branches/ev2-export/subversion/svnserve/server.h
subversion/branches/ev2-export/tools/server-side/svnpubsub/svnwcsub.py

Propchange: subversion/branches/ev2-export/
--
  Merged /subversion/trunk:r1400559-1401903

Modified: subversion/branches/ev2-export/notes/fsfs
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/notes/fsfs?rev=1401904&r1=1401903&r2=1401904&view=diff
==
--- subversion/branches/ev2-export/notes/fsfs (original)
+++ subversion/branches/ev2-export/notes/fsfs Wed Oct 24 22:19:38 2012
@@ -234,6 +234,16 @@ repository.  The backed-up "current" fil
 new revision which wasn't copied, or which was only partially
 populated when it was copied.
 
+[ Update: as of 1.6, FSFS uses an optional SQLite DB, rep-cache.db, when
+rep-sharing is enabled.  SQLite provides no guarantee that copying live
+databases will result in copies that are uncorrupt, or that are corrupt but
+will raise an error when accessed.  'svnadmin hotcopy' avoids the problem by
+establishing an appropriate SQLite lock (see svn_sqlite__hotcopy()).  User
+code should either use an atomic filesystem snapshot (as with zfs/LVM),
+refrain from copying rep-cache.db, or stop all access to that file before
+copying it (for example, by disabling commits, by establishing a lock a la
+svn_sqlite__hotcopy(), or by using 'svnadmin freeze'). ]
+
 The "svnadmin hotcopy" command avoids this problem by copying the
 "current" file before copying the revision files.  But a backup using
 the hotcopy command isn't as efficient as a straight incremental

Modified: 
subversion/branches/ev2-export/subversion/include/private/svn_ra_private.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/private/svn_ra_private.h?rev=1401904&r1=1401903&r2=1401904&view=diff
==
--- subversion/branches/ev2-export/subversion/include/private/svn_ra_private.h 
(original)
+++ subversion/branches/ev2-export/subversion/include/private/svn_ra_private.h 
Wed Oct 24 22:19:38 2012
@@ -257,6 +257,10 @@ svn_ra__replay_range_ev2(svn_ra_session_
  svn_ra__replay_revstart_ev2_callback_t revstart_func,
  svn_ra__replay_revfinish_ev2_callback_t 
revfinish_func,
  void *replay_baton,
+ svn_ra__provide_base_cb_t provide_base_cb,
+ svn_ra__provide_props_cb_t provide_props_cb,
+ svn_ra__get_copysrc_kind_cb_t get_copysrc_kind_cb,
+ void *cb_baton,
  apr_pool_t *scratch_pool);
 
 /* Similar to svn_ra_replay(), but with an Ev2 editor. */

Modified: subversion/branches/ev2-export/subversion/libsvn_fs_fs/fs.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_fs_fs/fs.h?rev=1401904&r1=1401903&r2=1401904&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/ev2-export/subversion/libsvn_fs_fs/fs.h Wed Oct 24 
22:19:38 2012
@@ -315,6 +315,9 @@ typedef struct fs_fs_data_t
  if the node has mergeinfo, "0" if it doesn't. */
   svn_cache__t *mergeinfo_existence_cache;
 
+  /* TRUE while the we hold a lock on the write lock file. */
+  svn_boolean_t has_write_lock;
+
   /* If set, there are or have been more than one concurrent transaction */
   svn_boolean_t concurrent_transactions;
 

Modified: subversion/branches/ev2-export/subversion/libsvn_fs_fs/fs_fs.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_fs_fs/fs_fs.c?rev=1401904&r1=1401903&r2=1

svn commit: r1401901 - in /subversion/trunk/subversion: include/private/svn_ra_private.h libsvn_ra/editor.c libsvn_ra/ra_loader.c libsvn_ra/ra_loader.h

2012-10-24 Thread hwright
Author: hwright
Date: Wed Oct 24 22:06:33 2012
New Revision: 1401901

URL: http://svn.apache.org/viewvc?rev=1401901&view=rev
Log:
First cut at an RA-layer function which returns an Ev2-capable editor for use
in replay range consumers, such as svnrdump and svnsync.

Note:  This code isn't yet called anywhere or tested, so use at own risk!

* subversion/libsvn_ra/editor.c
  (fb_baton, fetch_base, wrapped_replay_baton, revstart_func_wrapper,
   revstart_end_wrapper, svn_ra__use_replay_range_shim): New.

* subversion/libsvn_ra/ra_loader.c
  (svn_ra__replay_range_ev2): Implement.

* subversion/libsvn_ra/ra_loader.h
  (svn_ra__vtable_t): Add entry for replay_range_ev2.  No implementors
currently set it.
  (svn_ra__use_replay_range_shim): New.

* subversion/include/private/svn_ra_private.h
  (svn_ra__replay_range_ev2): Add required Ev2 callbacks to parameter list.

Modified:
subversion/trunk/subversion/include/private/svn_ra_private.h
subversion/trunk/subversion/libsvn_ra/editor.c
subversion/trunk/subversion/libsvn_ra/ra_loader.c
subversion/trunk/subversion/libsvn_ra/ra_loader.h

Modified: subversion/trunk/subversion/include/private/svn_ra_private.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_ra_private.h?rev=1401901&r1=1401900&r2=1401901&view=diff
==
--- subversion/trunk/subversion/include/private/svn_ra_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_ra_private.h Wed Oct 24 
22:06:33 2012
@@ -257,6 +257,10 @@ svn_ra__replay_range_ev2(svn_ra_session_
  svn_ra__replay_revstart_ev2_callback_t revstart_func,
  svn_ra__replay_revfinish_ev2_callback_t 
revfinish_func,
  void *replay_baton,
+ svn_ra__provide_base_cb_t provide_base_cb,
+ svn_ra__provide_props_cb_t provide_props_cb,
+ svn_ra__get_copysrc_kind_cb_t get_copysrc_kind_cb,
+ void *cb_baton,
  apr_pool_t *scratch_pool);
 
 /* Similar to svn_ra_replay(), but with an Ev2 editor. */

Modified: subversion/trunk/subversion/libsvn_ra/editor.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra/editor.c?rev=1401901&r1=1401900&r2=1401901&view=diff
==
--- subversion/trunk/subversion/libsvn_ra/editor.c (original)
+++ subversion/trunk/subversion/libsvn_ra/editor.c Wed Oct 24 22:06:33 2012
@@ -42,6 +42,11 @@ struct fp_baton {
   void *cb_baton;
 };
 
+struct fb_baton {
+  svn_ra__provide_base_cb_t provide_base_cb;
+  void *cb_baton;
+};
+
 /* The shims currently want a callback that provides props for a given
REPOS_RELPATH at a given BASE_REVISION. However, the RA Ev2 interface
has a callback that provides properties for the REPOS_RELPATH from any
@@ -72,6 +77,42 @@ fetch_props(apr_hash_t **props,
result_pool, scratch_pool));
 }
 
+/* See note above regarding BASE_REVISION.
+   This also pulls down the entire contents of the file stream from the
+   RA layer and stores them in a local file, returning the path.
+*/
+static svn_error_t *
+fetch_base(const char **filename,
+   void *baton,
+   const char *repos_relpath,
+   svn_revnum_t base_revision,
+   apr_pool_t *result_pool,
+   apr_pool_t *scratch_pool)
+{
+  struct fb_baton *fbb = baton;
+  svn_revnum_t unused_revision;
+  svn_stream_t *contents;
+  svn_stream_t *file_stream;
+  const char *tmp_filename;
+
+  /* Ignored: BASE_REVISION.  */
+
+  SVN_ERR(fbb->provide_base_cb(&contents, &unused_revision, fbb->cb_baton,
+   repos_relpath, result_pool, scratch_pool));
+
+  SVN_ERR(svn_stream_open_unique(&file_stream, &tmp_filename, NULL,
+ svn_io_file_del_on_pool_cleanup,
+ scratch_pool, scratch_pool));
+  SVN_ERR(svn_stream_copy3(contents, file_stream, NULL, NULL, scratch_pool));
+
+  *filename = apr_pstrdup(result_pool, tmp_filename);
+
+ 
+
+  return SVN_NO_ERROR;
+}
+
+
 
 svn_error_t *
 svn_ra__use_commit_shim(svn_editor_t **editor,
@@ -173,3 +214,126 @@ svn_ra__use_commit_shim(svn_editor_t **e
 
   return SVN_NO_ERROR;
 }
+
+
+struct wrapped_replay_baton_t {
+  svn_ra__replay_revstart_ev2_callback_t revstart_func;
+  svn_ra__replay_revfinish_ev2_callback_t revfinish_func;
+  void *replay_baton;
+
+  svn_ra_session_t *session;
+
+  svn_ra__provide_base_cb_t provide_base_cb;
+  svn_ra__provide_props_cb_t provide_props_cb;
+  void *cb_baton;
+
+  /* This will be populated by the revstart wrapper. */
+  svn_editor_t *editor;
+};
+
+static svn_error_t *
+revstart_func_wrapper(svn_revnum_t revision,
+  void *replay

svn commit: r1400560 - in /subversion/branches/ev2-export/subversion/libsvn_client: add.c commit.c copy.c delete.c prop_commands.c

2012-10-20 Thread hwright
Author: hwright
Date: Sun Oct 21 02:37:53 2012
New Revision: 1400560

URL: http://svn.apache.org/viewvc?rev=1400560&view=rev
Log:
On the ev2-export branch: Fix build breakage introduced in the merge from
trunk in r1400559.

* subversion/libsvn_client/delete.c
  (single_repos_delete),
* subversion/libsvn_client/prop_commands.c
  (propset_on_url,
* subversion/libsvn_client/copy.c
  (repos_to_repos_copy, wc_to_repos_copy),
* subversion/libsvn_client/add.c
  (mkdir_urls),
* subversion/libsvn_client/commit.c
  (get_ra_editor, svn_client_import5): Don't pass a cancellation callback/baton
when getting an Ev2 commit editor from the RA layer.

Modified:
subversion/branches/ev2-export/subversion/libsvn_client/add.c
subversion/branches/ev2-export/subversion/libsvn_client/commit.c
subversion/branches/ev2-export/subversion/libsvn_client/copy.c
subversion/branches/ev2-export/subversion/libsvn_client/delete.c
subversion/branches/ev2-export/subversion/libsvn_client/prop_commands.c

Modified: subversion/branches/ev2-export/subversion/libsvn_client/add.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/add.c?rev=1400560&r1=1400559&r2=1400560&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_client/add.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/add.c Sun Oct 21 
02:37:53 2012
@@ -997,7 +997,6 @@ mkdir_urls(const apr_array_header_t *url
  commit_baton,
  NULL, TRUE, /* No lock tokens */
  NULL, NULL, NULL, NULL,
- ctx->cancel_func, ctx->cancel_baton,
  pool, pool));
 
   return svn_error_trace(drive_editor(editor, targets, children_hash,

Modified: subversion/branches/ev2-export/subversion/libsvn_client/commit.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/commit.c?rev=1400560&r1=1400559&r2=1400560&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/commit.c Sun Oct 21 
02:37:53 2012
@@ -677,7 +677,6 @@ get_ra_editor(svn_editor_t **editor,
  svn_client__ra_make_cb_baton(ctx->wc_ctx,
   relpath_map,
   pool),
- ctx->cancel_func, ctx->cancel_baton,
  pool, pool));
 
   return SVN_NO_ERROR;
@@ -819,7 +818,6 @@ svn_client_import5(const char *path,
  commit_revprops, commit_callback,
  commit_baton, NULL, TRUE,
  NULL, NULL, NULL, NULL,
- ctx->cancel_func, ctx->cancel_baton,
  scratch_pool, scratch_pool));
 
   /* Do the import. */

Modified: subversion/branches/ev2-export/subversion/libsvn_client/copy.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/copy.c?rev=1400560&r1=1400559&r2=1400560&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/copy.c Sun Oct 21 
02:37:53 2012
@@ -1047,7 +1047,6 @@ repos_to_repos_copy(const apr_array_head
  fetch_props_func,
  fetch_kind_func,
  path_infos,
- ctx->cancel_func, ctx->cancel_baton,
  pool, pool));
 
   return svn_error_trace(drive_editor(editor, new_dirs, path_infos, is_move,
@@ -1371,7 +1370,6 @@ wc_to_repos_copy(const apr_array_header_
  svn_client__ra_make_cb_baton(ctx->wc_ctx,
   relpath_map,
   pool),
- ctx->cancel_func, ctx->cancel_baton,
  pool, pool));
 
   /* Perform the commit. */

Modified: subversion/branches/ev2-export/subversion/libsvn_client/delete.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/delete.c?rev=1400560&r1=1400559&r2=1400560&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_client/delete.c (original)
+++ subversion/bra

svn commit: r1400559 - in /subversion/branches/ev2-export: ./ subversion/include/private/svn_ra_private.h subversion/libsvn_ra/ra_loader.c subversion/libsvn_ra/ra_loader.h

2012-10-20 Thread hwright
Author: hwright
Date: Sun Oct 21 02:30:12 2012
New Revision: 1400559

URL: http://svn.apache.org/viewvc?rev=1400559&view=rev
Log:
On the ev2-export branch:
Bring up-to-date with trunk.

(This causes build breakage to be fixed shortly.)

Modified:
subversion/branches/ev2-export/   (props changed)
subversion/branches/ev2-export/subversion/include/private/svn_ra_private.h
subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c
subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.h

Propchange: subversion/branches/ev2-export/
--
  Merged /subversion/trunk:r1400554-1400558

Modified: 
subversion/branches/ev2-export/subversion/include/private/svn_ra_private.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/private/svn_ra_private.h?rev=1400559&r1=1400558&r2=1400559&view=diff
==
--- subversion/branches/ev2-export/subversion/include/private/svn_ra_private.h 
(original)
+++ subversion/branches/ev2-export/subversion/include/private/svn_ra_private.h 
Sun Oct 21 02:30:12 2012
@@ -208,8 +208,8 @@ typedef svn_error_t *(*svn_ra__get_copys
 
CB_BATON is the baton used/shared by the above three callbacks.
 
-   CANCEL_FUNC/BATON is a standard cancellation function, and is used for
-   the returned Ev2 editor, and possibly other RA-specific operations.
+   Cancellation is handled through the callbacks provided when SESSION
+   is initially opened.
 
*EDITOR will be allocated in RESULT_POOL, and all temporary allocations
will be performed in SCRATCH_POOL.
@@ -226,8 +226,6 @@ svn_ra__get_commit_ev2(svn_editor_t **ed
svn_ra__provide_props_cb_t provide_props_cb,
svn_ra__get_copysrc_kind_cb_t get_copysrc_kind_cb,
void *cb_baton,
-   svn_cancel_func_t cancel_func,
-   void *cancel_baton,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
 

Modified: subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c?rev=1400559&r1=1400558&r2=1400559&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c Sun Oct 21 
02:30:12 2012
@@ -470,6 +470,8 @@ svn_error_t *svn_ra_open4(svn_ra_session
 
   /* Create the session object. */
   session = apr_pcalloc(sesspool, sizeof(*session));
+  session->cancel_func = callbacks->cancel_func;
+  session->cancel_baton = callback_baton;
   session->vtable = vtable;
   session->pool = sesspool;
 
@@ -1307,8 +1309,6 @@ svn_ra__get_commit_ev2(svn_editor_t **ed
svn_ra__provide_props_cb_t provide_props_cb,
svn_ra__get_copysrc_kind_cb_t get_copysrc_kind_cb,
void *cb_baton,
-   svn_cancel_func_t cancel_func,
-   void *cancel_baton,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
 {
@@ -1333,7 +1333,7 @@ svn_ra__get_commit_ev2(svn_editor_t **ed
provide_props_cb,
get_copysrc_kind_cb,
cb_baton,
-   cancel_func, cancel_baton,
+   session->cancel_func, session->cancel_baton,
result_pool, scratch_pool));
 }
 
@@ -1351,7 +1351,7 @@ svn_ra__get_commit_ev2(svn_editor_t **ed
provide_props_cb,
get_copysrc_kind_cb,
cb_baton,
-   cancel_func, cancel_baton,
+   session->cancel_func, session->cancel_baton,
result_pool, scratch_pool));
 }
 

Modified: subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.h?rev=1400559&r1=1400558&r2=1400559&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.h (original)
+++ subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.h Sun Oct 21 
02:30:12 2012
@@ -330,6 +330,10 @@ typedef struct svn_ra__vtable_t {
 struct svn_ra_session_t {
   const svn_ra__vtable_t *vtable;
 
+  /* Cancellation handlers consumers may want to use. */
+  svn_cancel_func_t cancel_func;
+  void *cancel_baton;
+
   /* Pool used to manage this session. */
   apr_pool_t *pool;
 




svn commit: r1400558 - in /subversion/trunk/subversion: include/private/svn_ra_private.h libsvn_ra/ra_loader.c libsvn_ra/ra_loader.h

2012-10-20 Thread hwright
Author: hwright
Date: Sun Oct 21 02:28:44 2012
New Revision: 1400558

URL: http://svn.apache.org/viewvc?rev=1400558&view=rev
Log:
Use the session-specific cancellation function/baton for when constructing
Ev2 wrappers in the RA layer, rather than requiring the caller to provide an
additional set.

* subversion/libsvn_ra/ra_loader.c
  (svn_ra_open4): Set the cancel callback and baton in the session.
  (svn_ra__get_commit_ev2): Remove cancel params and use the session-cached
ones.

* subversion/libsvn_ra/ra_loader.h
  (svn_ra_session_t): Add cancel func and baton members.
 
* subversion/include/private/svn_ra_private.h
  (svn_ra__get_commit_ev2): Remove params.

Modified:
subversion/trunk/subversion/include/private/svn_ra_private.h
subversion/trunk/subversion/libsvn_ra/ra_loader.c
subversion/trunk/subversion/libsvn_ra/ra_loader.h

Modified: subversion/trunk/subversion/include/private/svn_ra_private.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_ra_private.h?rev=1400558&r1=1400557&r2=1400558&view=diff
==
--- subversion/trunk/subversion/include/private/svn_ra_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_ra_private.h Sun Oct 21 
02:28:44 2012
@@ -208,8 +208,8 @@ typedef svn_error_t *(*svn_ra__get_copys
 
CB_BATON is the baton used/shared by the above three callbacks.
 
-   CANCEL_FUNC/BATON is a standard cancellation function, and is used for
-   the returned Ev2 editor, and possibly other RA-specific operations.
+   Cancellation is handled through the callbacks provided when SESSION
+   is initially opened.
 
*EDITOR will be allocated in RESULT_POOL, and all temporary allocations
will be performed in SCRATCH_POOL.
@@ -226,8 +226,6 @@ svn_ra__get_commit_ev2(svn_editor_t **ed
svn_ra__provide_props_cb_t provide_props_cb,
svn_ra__get_copysrc_kind_cb_t get_copysrc_kind_cb,
void *cb_baton,
-   svn_cancel_func_t cancel_func,
-   void *cancel_baton,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
 

Modified: subversion/trunk/subversion/libsvn_ra/ra_loader.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra/ra_loader.c?rev=1400558&r1=1400557&r2=1400558&view=diff
==
--- subversion/trunk/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/trunk/subversion/libsvn_ra/ra_loader.c Sun Oct 21 02:28:44 2012
@@ -469,6 +469,8 @@ svn_error_t *svn_ra_open4(svn_ra_session
 
   /* Create the session object. */
   session = apr_pcalloc(sesspool, sizeof(*session));
+  session->cancel_func = callbacks->cancel_func;
+  session->cancel_baton = callback_baton;
   session->vtable = vtable;
   session->pool = sesspool;
 
@@ -1306,8 +1308,6 @@ svn_ra__get_commit_ev2(svn_editor_t **ed
svn_ra__provide_props_cb_t provide_props_cb,
svn_ra__get_copysrc_kind_cb_t get_copysrc_kind_cb,
void *cb_baton,
-   svn_cancel_func_t cancel_func,
-   void *cancel_baton,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
 {
@@ -1332,7 +1332,7 @@ svn_ra__get_commit_ev2(svn_editor_t **ed
provide_props_cb,
get_copysrc_kind_cb,
cb_baton,
-   cancel_func, cancel_baton,
+   session->cancel_func, session->cancel_baton,
result_pool, scratch_pool));
 }
 
@@ -1350,7 +1350,7 @@ svn_ra__get_commit_ev2(svn_editor_t **ed
provide_props_cb,
get_copysrc_kind_cb,
cb_baton,
-   cancel_func, cancel_baton,
+   session->cancel_func, session->cancel_baton,
result_pool, scratch_pool));
 }
 

Modified: subversion/trunk/subversion/libsvn_ra/ra_loader.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra/ra_loader.h?rev=1400558&r1=1400557&r2=1400558&view=diff
==
--- subversion/trunk/subversion/libsvn_ra/ra_loader.h (original)
+++ subversion/trunk/subversion/libsvn_ra/ra_loader.h Sun Oct 21 02:28:44 2012
@@ -330,6 +330,10 @@ typedef struct svn_ra__vtable_t {
 struct svn_ra_session_t {
   const svn_ra__vtable_t *vtable;
 
+  /* Cancellation handlers consumers may want to use. */
+  svn_cancel_func_t cancel_func;
+  void *cancel_baton;
+
   /* Pool used to manage this session. */
   apr_pool_t *pool;
 




svn commit: r1400556 [29/29] - in /subversion/branches/ev2-export: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/hudson/ contrib/client-side/emacs/ contrib/client-side/s

2012-10-20 Thread hwright
Modified: 
subversion/branches/ev2-export/tools/server-side/svnpubsub/rc.d/svnwcsub.debian
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/server-side/svnpubsub/rc.d/svnwcsub.debian?rev=1400556&r1=1400555&r2=1400556&view=diff
==
--- 
subversion/branches/ev2-export/tools/server-side/svnpubsub/rc.d/svnwcsub.debian 
(original)
+++ 
subversion/branches/ev2-export/tools/server-side/svnpubsub/rc.d/svnwcsub.debian 
Sun Oct 21 02:00:31 2012
@@ -16,7 +16,7 @@ svnwcsub_user=${svnwcsub_user-"svnwc"}
 svnwcsub_group=${svnwcsub_group-"svnwc"}
 svnwcsub_pidfile=${svnwcsub_pidfile-"/var/run/svnwcsub.pid"}
 svnwcsub_config=${svnwcsub_config-"/etc/svnwcsub.conf"}
-svnwcsub_logfile=${svnwcsub_logfile-"/var/bwlog/svnwcsub/svnwcsub.log"}
+svnwcsub_logfile=${svnwcsub_logfile-"/var/log/svnwcsub/svnwcsub.log"}
 pidfile="${svnwcsub_pidfile}"
 
 SVNWCSUB_CMD="/opt/svnpubsub/svnwcsub.py \
@@ -24,6 +24,7 @@ SVNWCSUB_CMD="/opt/svnpubsub/svnwcsub.py
   --logfile=${svnwcsub_logfile} \
   --pidfile=${pidfile} \
   --uid=${svnwcsub_user} --gid=${svnwcsub_group} \
+  --umask=002 \
   ${svnwcsub_config} "
 
 RETVAL=0

Modified: 
subversion/branches/ev2-export/tools/server-side/svnpubsub/rc.d/svnwcsub.solaris
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/server-side/svnpubsub/rc.d/svnwcsub.solaris?rev=1400556&r1=1400555&r2=1400556&view=diff
==
--- 
subversion/branches/ev2-export/tools/server-side/svnpubsub/rc.d/svnwcsub.solaris
 (original)
+++ 
subversion/branches/ev2-export/tools/server-side/svnpubsub/rc.d/svnwcsub.solaris
 Sun Oct 21 02:00:31 2012
@@ -14,8 +14,8 @@ SVNWCSUB_CMD="/usr/local/svnpubsub/svnwc
   --daemon \
   --logfile=${svnwcsub_logfile} \
   --pidfile=${pidfile} \
-  --umask=002 \
   --uid=${svnwcsub_user} --gid=${svnwcsub_group} \
+  --umask=002 \
   ${svnwcsub_config}"
 
 RETVAL=0

Modified: 
subversion/branches/ev2-export/tools/server-side/svnpubsub/svnpubsub/client.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/server-side/svnpubsub/svnpubsub/client.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==
--- 
subversion/branches/ev2-export/tools/server-side/svnpubsub/svnpubsub/client.py 
(original)
+++ 
subversion/branches/ev2-export/tools/server-side/svnpubsub/svnpubsub/client.py 
Sun Oct 21 02:00:31 2012
@@ -137,13 +137,13 @@ class XMLStreamHandler(xml.sax.handler.C
 elif self.chars and self.rev:
   value = self.chars.strip()
   if name == 'path':
-self.rev.dirs_changed.append(value)
+self.rev.dirs_changed.append(value.decode('unicode_escape'))
   elif name == 'author':
-self.rev.author = value
+self.rev.author = value.decode('unicode_escape')
   elif name == 'date':
-self.rev.date = value
+self.rev.date = value.decode('unicode_escape')
   elif name == 'log':
-self.rev.log = value
+self.rev.log = value.decode('unicode_escape')
 
 # Toss out any accumulated characters for this element.
 self.chars = ''

Modified: 
subversion/branches/ev2-export/tools/server-side/svnpubsub/svnpubsub/server.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/server-side/svnpubsub/svnpubsub/server.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==
--- 
subversion/branches/ev2-export/tools/server-side/svnpubsub/svnpubsub/server.py 
(original)
+++ 
subversion/branches/ev2-export/tools/server-side/svnpubsub/svnpubsub/server.py 
Sun Oct 21 02:00:31 2012
@@ -73,12 +73,15 @@ import time
 
 class Revision:
 def __init__(self, r):
+# Don't escape the values; json handles binary values fine.
+# ET will happily emit literal control characters (eg, NUL),
+# thus creating invalid XML, so the XML code paths do escaping.
 self.rev = r.get('revision')
 self.repos = r.get('repos')
-self.dirs_changed = [x.encode('unicode_escape') for x in 
r.get('dirs_changed')]
-self.author = r.get('author').encode('unicode_escape')
-self.log = r.get('log').encode('unicode_escape')
-self.date = r.get('date').encode('unicode_escape')
+self.dirs_changed = [x for x in r.get('dirs_changed')]
+self.author = r.get('author')
+self.log = r.get('log')
+self.date = r.get('date')
 
 def render_commit(self, format):
 if format == "json":
@@ -90,13 +93,13 @@ class Revision:
   'date': self.date}}) +","
 elif format == "xml":
 c = ET.Element('commit', {'repository': self.repos, 'rev

svn commit: r1400556 [18/29] - in /subversion/branches/ev2-export: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/hudson/ contrib/client-side/emacs/ contrib/client-side/s

2012-10-20 Thread hwright
Modified: subversion/branches/ev2-export/subversion/libsvn_wc/deprecated.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_wc/deprecated.c?rev=1400556&r1=1400555&r2=1400556&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_wc/deprecated.c Sun Oct 21 
02:00:31 2012
@@ -3269,7 +3269,7 @@ svn_wc_get_update_editor4(const svn_delt
   target_revision,
   wc_ctx,
   anchor_abspath,
-  target_basename,
+  target_basename, NULL,
   use_commit_times,
   depth, depth_is_sticky,
   allow_unver_obstructions,
@@ -3455,7 +3455,7 @@ svn_wc_get_switch_editor4(const svn_delt
   target_revision,
   wc_ctx,
   anchor_abspath, target_basename,
-  switch_url,
+  switch_url, NULL,
   use_commit_times,
   depth, depth_is_sticky,
   allow_unver_obstructions,
@@ -4463,3 +4463,22 @@ svn_wc_crop_tree(svn_wc_adm_access_t *an
 
   return svn_error_trace(svn_wc_context_destroy(wc_ctx));
 }
+
+svn_error_t *
+svn_wc_move(svn_wc_context_t *wc_ctx,
+const char *src_abspath,
+const char *dst_abspath,
+svn_boolean_t metadata_only,
+svn_cancel_func_t cancel_func,
+void *cancel_baton,
+svn_wc_notify_func2_t notify_func,
+void *notify_baton,
+apr_pool_t *scratch_pool)
+{
+  return svn_error_trace(svn_wc__move2(wc_ctx, src_abspath, dst_abspath,
+   metadata_only,
+   TRUE, /* allow_mixed_revisions */
+   cancel_func, cancel_baton,
+   notify_func, notify_baton,
+   scratch_pool));
+}

Modified: subversion/branches/ev2-export/subversion/libsvn_wc/entries.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_wc/entries.c?rev=1400556&r1=1400555&r2=1400556&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_wc/entries.c Sun Oct 21 
02:00:31 2012
@@ -455,6 +455,7 @@ read_one_entry(const svn_wc_entry_t **ne
 
   SVN_ERR(svn_wc__read_conflicts(&child_conflicts,
  db, child_abspath,
+ FALSE /* create tempfiles */,
  scratch_pool, scratch_pool));
 
   for (j = 0; j < child_conflicts->nelts; j++)
@@ -874,37 +875,53 @@ read_one_entry(const svn_wc_entry_t **ne
 
   if (conflicted)
 {
-  const apr_array_header_t *conflicts;
-  int j;
-  SVN_ERR(svn_wc__read_conflicts(&conflicts, db, entry_abspath,
- scratch_pool, scratch_pool));
-
-  for (j = 0; j < conflicts->nelts; j++)
-{
-  const svn_wc_conflict_description2_t *cd;
-  cd = APR_ARRAY_IDX(conflicts, j,
- const svn_wc_conflict_description2_t *);
+  svn_skel_t *conflict;
+  svn_boolean_t text_conflicted;
+  svn_boolean_t prop_conflicted;
+  SVN_ERR(svn_wc__db_read_conflict(&conflict, db, entry_abspath,
+   scratch_pool, scratch_pool));
 
-  switch (cd->kind)
-{
-case svn_wc_conflict_kind_text:
-  if (cd->base_abspath)
-entry->conflict_old = svn_dirent_basename(cd->base_abspath,
-  result_pool);
-  if (cd->their_abspath)
-entry->conflict_new = svn_dirent_basename(cd->their_abspath,
-  result_pool);
-  if (cd->my_abspath)
-entry->conflict_wrk = svn_dirent_basename(cd->my_abspath,
-  result_pool);
-  break;
-case svn_wc_conflict_kind_property:
-  entry->prejfile = svn_dirent_basename(cd->their_abspath,
-result_pool);
-  break;
-case svn_wc_conflict_kind_tree:
-  break;
-}
+  SVN_ERR(svn_wc__conflict_read_info(NULL, NULL, &text_conflicted,
+ &prop_conflicted,

svn commit: r1400556 [2/29] - in /subversion/branches/ev2-export: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/hudson/ contrib/client-side/emacs/ contrib/client-side/sv

2012-10-20 Thread hwright
Modified: subversion/branches/ev2-export/build/generator/gen_win.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/build/generator/gen_win.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==
--- subversion/branches/ev2-export/build/generator/gen_win.py (original)
+++ subversion/branches/ev2-export/build/generator/gen_win.py Sun Oct 21 
02:00:31 2012
@@ -94,6 +94,7 @@ class GeneratorBase(gen_base.GeneratorBa
 # Instrumentation options
 self.disable_shared = None
 self.static_apr = None
+self.static_openssl = None
 self.instrument_apr_pools = None
 self.instrument_purify_quantify = None
 self.configure_apr_util = None
@@ -155,6 +156,8 @@ class GeneratorBase(gen_base.GeneratorBa
 self.disable_shared = 1
   elif opt == '--with-static-apr':
 self.static_apr = 1
+  elif opt == '--with-static-openssl':
+self.static_openssl = 1
   elif opt == '--vsnet-version':
 if val == '2002' or re.match('7(\.\d+)?', val):
   self.vs_version = '2002'
@@ -962,7 +965,11 @@ class WinGeneratorBase(GeneratorBase):
   def get_win_lib_dirs(self, target, cfg):
 "Return the list of library directories for target"
 
-libcfg = cfg.replace("Debug", "LibD").replace("Release", "LibR")
+expatlibcfg = cfg.replace("Debug", "LibD").replace("Release", "LibR")
+if self.static_apr:
+  libcfg = expatlibcfg
+else:
+  libcfg = cfg
 
 fakelibdirs = [ self.apath(self.bdb_path, "lib"),
 self.apath(self.zlib_path),
@@ -976,10 +983,10 @@ class WinGeneratorBase(GeneratorBase):
 if self.serf_lib:
   fakelibdirs.append(self.apath(msvc_path_join(self.serf_path, cfg)))
 
-fakelibdirs.append(self.apath(self.apr_path, cfg))
-fakelibdirs.append(self.apath(self.apr_util_path, cfg))
+fakelibdirs.append(self.apath(self.apr_path, libcfg))
+fakelibdirs.append(self.apath(self.apr_util_path, libcfg))
 fakelibdirs.append(self.apath(self.apr_util_path, 'xml', 'expat',
-  'lib', libcfg))
+  'lib', expatlibcfg))
 
 if isinstance(target, gen_base.TargetApacheMod):
   fakelibdirs.append(self.apath(self.httpd_path, cfg))
@@ -1160,6 +1167,8 @@ class WinGeneratorBase(GeneratorBase):
 else:
   serflib = 'serf.lib'
 
+apr_static = self.static_apr and 'APR_STATIC=1' or ''
+openssl_static = self.static_openssl and 'OPENSSL_STATIC=1' or ''
 self.move_proj_file(self.serf_path, name,
 (('serf_sources', serf_sources),
  ('serf_headers', serf_headers),
@@ -1172,7 +1181,8 @@ class WinGeneratorBase(GeneratorBase):
  ('apr_util_path', os.path.relpath(self.apr_util_path,
self.serf_path)),
  ('project_guid', self.makeguid('serf')),
- ('apr_static', self.static_apr),
+ ('apr_static', apr_static),
+ ('openssl_static', openssl_static),
  ('serf_lib', serflib),
 ))
 
@@ -1605,7 +1615,6 @@ class POFile:
   "Item class for holding po file info"
   def __init__(self, base):
 self.po = base + '.po'
-self.spo = base + '.spo'
 self.mo = base + '.mo'
 
 # MSVC paths always use backslashes regardless of current platform

Modified: 
subversion/branches/ev2-export/build/generator/templates/build_locale.ezt
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/build/generator/templates/build_locale.ezt?rev=1400556&r1=1400555&r2=1400556&view=diff
==
--- subversion/branches/ev2-export/build/generator/templates/build_locale.ezt 
(original)
+++ subversion/branches/ev2-export/build/generator/templates/build_locale.ezt 
Sun Oct 21 02:00:31 2012
@@ -18,15 +18,12 @@
 
 @echo off
 @rem **
-cd ..\..\subversion\po
+cd ..\..\..\subversion\po
 mkdir ..\..\%1\mo
 set exitcode=0
 [for pofiles]echo Running msgfmt on [pofiles.po]...
-python ..\..\build\strip-po-charset.py [pofiles.po] [pofiles.spo]
-if not errorlevel 0 goto err
-msgfmt.exe -c -o ..\..\%1\mo\[pofiles.mo] [pofiles.spo]
-if not errorlevel 0 goto err
-del [pofiles.spo]
+msgfmt.exe -c -o ..\..\%1\mo\[pofiles.mo] [pofiles.po]
+if errorlevel 1 goto err
 [end]
 goto end
 @rem **

Modified: 
subversion/branches/ev2-export/build/generator/templates/build_zlib.ezt
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/build/generator/templates/build_zlib.ezt?rev=1400556&r1=1400555&r2=1400556&view=diff
==
--- subversion/branches/ev2-exp

svn commit: r1400545 - /subversion/trunk/subversion/libsvn_ra/ra_loader.c

2012-10-20 Thread hwright
Author: hwright
Date: Sun Oct 21 01:18:26 2012
New Revision: 1400545

URL: http://svn.apache.org/viewvc?rev=1400545&view=rev
Log:
Refactor the pre-1.5 fallback code for replay_ranges into a separate function.

* subversion/libsvn_ra/ra_loader.c
  (replay_range_from_replays): New.
  (svn_ra_replay_range): Call the factored out code.

Modified:
subversion/trunk/subversion/libsvn_ra/ra_loader.c

Modified: subversion/trunk/subversion/libsvn_ra/ra_loader.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra/ra_loader.c?rev=1400545&r1=1400544&r2=1400545&view=diff
==
--- subversion/trunk/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/trunk/subversion/libsvn_ra/ra_loader.c Sun Oct 21 01:18:26 2012
@@ -1129,6 +1129,47 @@ svn_ra__replay_ev2(svn_ra_session_t *ses
   SVN__NOT_IMPLEMENTED();
 }
 
+static svn_error_t *
+replay_range_from_replays(svn_ra_session_t *session,
+  svn_revnum_t start_revision,
+  svn_revnum_t end_revision,
+  svn_revnum_t low_water_mark,
+  svn_boolean_t text_deltas,
+  svn_ra_replay_revstart_callback_t revstart_func,
+  svn_ra_replay_revfinish_callback_t revfinish_func,
+  void *replay_baton,
+  apr_pool_t *scratch_pool)
+{
+  apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+  svn_revnum_t rev;
+
+  for (rev = start_revision ; rev <= end_revision ; rev++)
+{
+  const svn_delta_editor_t *editor;
+  void *edit_baton;
+  apr_hash_t *rev_props;
+
+  svn_pool_clear(iterpool);
+
+  SVN_ERR(svn_ra_rev_proplist(session, rev, &rev_props, iterpool));
+
+  SVN_ERR(revstart_func(rev, replay_baton,
+&editor, &edit_baton,
+rev_props,
+iterpool));
+  SVN_ERR(svn_ra_replay(session, rev, low_water_mark,
+text_deltas, editor, edit_baton,
+iterpool));
+  SVN_ERR(revfinish_func(rev, replay_baton,
+ editor, edit_baton,
+ rev_props,
+ iterpool));
+}
+  svn_pool_destroy(iterpool);
+
+  return SVN_NO_ERROR;
+}
+
 svn_error_t *
 svn_ra_replay_range(svn_ra_session_t *session,
 svn_revnum_t start_revision,
@@ -1146,40 +1187,17 @@ svn_ra_replay_range(svn_ra_session_t *se
   revstart_func, revfinish_func,
   replay_baton, pool);
 
-  if (err && (err->apr_err == SVN_ERR_RA_NOT_IMPLEMENTED))
-{
-  apr_pool_t *subpool = svn_pool_create(pool);
-  svn_revnum_t rev;
-
-  svn_error_clear(err);
-  err = SVN_NO_ERROR;
-
-  for (rev = start_revision ; rev <= end_revision ; rev++)
-{
-  const svn_delta_editor_t *editor;
-  void *edit_baton;
-  apr_hash_t *rev_props;
-
-  svn_pool_clear(subpool);
-
-  SVN_ERR(svn_ra_rev_proplist(session, rev, &rev_props, subpool));
-
-  SVN_ERR(revstart_func(rev, replay_baton,
-&editor, &edit_baton,
-rev_props,
-subpool));
-  SVN_ERR(svn_ra_replay(session, rev, low_water_mark,
-text_deltas, editor, edit_baton,
-subpool));
-  SVN_ERR(revfinish_func(rev, replay_baton,
- editor, edit_baton,
- rev_props,
- subpool));
-}
-  svn_pool_destroy(subpool);
-}
+  if (err && (err->apr_err != SVN_ERR_RA_NOT_IMPLEMENTED))
+return svn_error_trace(err);
 
-  return err;
+  svn_error_clear(err);
+  return svn_error_trace(replay_range_from_replays(session, start_revision,
+   end_revision,
+   low_water_mark,
+   text_deltas,
+   revstart_func,
+   revfinish_func,
+   replay_baton, pool));
 }
 
 svn_error_t *




svn commit: r1400508 - /subversion/trunk/subversion/libsvn_repos/replay.c

2012-10-20 Thread hwright
Author: hwright
Date: Sat Oct 20 19:59:55 2012
New Revision: 1400508

URL: http://svn.apache.org/viewvc?rev=1400508&view=rev
Log:
Unconditionally compile most of the Ev2 repos replay code.

* subversion/libsvn_repos/replay.c
  (add_subdir): For one implementation, rename from this...
  (add_subdir_ev2): ...to this.
  (replay_node): Update caller.
  [elsewhere]: Remove USE_EV2_IMPL guards.

Modified:
subversion/trunk/subversion/libsvn_repos/replay.c

Modified: subversion/trunk/subversion/libsvn_repos/replay.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/replay.c?rev=1400508&r1=1400507&r2=1400508&view=diff
==
--- subversion/trunk/subversion/libsvn_repos/replay.c (original)
+++ subversion/trunk/subversion/libsvn_repos/replay.c Sat Oct 20 19:59:55 2012
@@ -150,7 +150,6 @@ struct path_driver_cb_baton
   apr_pool_t *pool;
 };
 
-#ifndef USE_EV2_IMPL
 /* Recursively traverse EDIT_PATH (as it exists under SOURCE_ROOT) emitting
the appropriate editor calls to add it and its children without any
history.  This is meant to be used when either a subset of the tree
@@ -342,7 +341,6 @@ add_subdir(svn_fs_root_t *source_root,
 
   return SVN_NO_ERROR;
 }
-#endif
 
 /* Given PATH deleted under ROOT, return in READABLE whether the path was
readable prior to the deletion.  Consult COPIES (a stack of 'struct
@@ -459,7 +457,6 @@ fill_copyfrom(svn_fs_root_t **copyfrom_r
   return SVN_NO_ERROR;
 }
 
-#ifndef USE_EV2_IMPL
 static svn_error_t *
 path_driver_cb_func(void **dir_baton,
 void *parent_baton,
@@ -784,8 +781,6 @@ path_driver_cb_func(void **dir_baton,
   return SVN_NO_ERROR;
 }
 
-#else
-
 static svn_error_t *
 fetch_kind_func(svn_kind_t *kind,
 void *baton,
@@ -829,8 +824,6 @@ fetch_props_func(apr_hash_t **props,
   return SVN_NO_ERROR;
 }
 
-#endif
-
 
 
 
@@ -1015,7 +1008,6 @@ svn_repos_replay2(svn_fs_root_t *root,
  *  Ev2 Implementation   *
  */
 
-#ifdef USE_EV2_IMPL
 /* Recursively traverse EDIT_PATH (as it exists under SOURCE_ROOT) emitting
the appropriate editor calls to add it and its children without any
history.  This is meant to be used when either a subset of the tree
@@ -1024,16 +1016,16 @@ svn_repos_replay2(svn_fs_root_t *root,
unavailable because of authz and we need to use it as the source of
a copy. */
 static svn_error_t *
-add_subdir(svn_fs_root_t *source_root,
-   svn_fs_root_t *target_root,
-   svn_editor_t *editor,
-   const char *repos_relpath,
-   const char *source_fspath,
-   svn_repos_authz_func_t authz_read_func,
-   void *authz_read_baton,
-   apr_hash_t *changed_paths,
-   apr_pool_t *result_pool,
-   apr_pool_t *scratch_pool)
+add_subdir_ev2(svn_fs_root_t *source_root,
+   svn_fs_root_t *target_root,
+   svn_editor_t *editor,
+   const char *repos_relpath,
+   const char *source_fspath,
+   svn_repos_authz_func_t authz_read_func,
+   void *authz_read_baton,
+   apr_hash_t *changed_paths,
+   apr_pool_t *result_pool,
+   apr_pool_t *scratch_pool)
 {
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   apr_hash_index_t *hi;
@@ -1137,11 +1129,11 @@ add_subdir(svn_fs_root_t *source_root,
 }
   else
 {
-  SVN_ERR(add_subdir(new_source_root, target_root,
- editor, child_relpath,
- new_source_fspath,
- authz_read_func, authz_read_baton,
- changed_paths, result_pool, iterpool));
+  SVN_ERR(add_subdir_ev2(new_source_root, target_root,
+ editor, child_relpath,
+ new_source_fspath,
+ authz_read_func, authz_read_baton,
+ changed_paths, result_pool, iterpool));
 }
 }
   else if (dent->kind == svn_node_file)
@@ -1170,7 +1162,6 @@ add_subdir(svn_fs_root_t *source_root,
 
   return SVN_NO_ERROR;
 }
-#endif
 
 static svn_error_t *
 replay_node(svn_fs_root_t *root,
@@ -1184,11 +1175,6 @@ replay_node(svn_fs_root_t *root,
 void *authz_read_baton,
 apr_pool_t *result_pool,
 apr_pool_t *scratch_pool)
-#ifndef USE_EV2_IMPL
-{
-  SVN__NOT_IMPLEMENTED();
-}
-#else
 {
   svn_fs_path_change2_t *change;
   svn_boolean_t do_add = FALSE;
@@ -1303,10 +1289,11 @@ replay_node(svn_fs_root_t *root,
  contents. */
   if (change->copyfrom_path && ! copyfrom_path)
 {
-  SVN_ERR(add

svn commit: r1399913 - /subversion/trunk/subversion/libsvn_repos/replay.c

2012-10-18 Thread hwright
Author: hwright
Date: Thu Oct 18 23:12:44 2012
New Revision: 1399913

URL: http://svn.apache.org/viewvc?rev=1399913&view=rev
Log:
* subversion/libsvn_repos/replay.c
  (replay_node): Don't grab (and thus send) text modification information
unless we really have a text mod.

Modified:
subversion/trunk/subversion/libsvn_repos/replay.c

Modified: subversion/trunk/subversion/libsvn_repos/replay.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/replay.c?rev=1399913&r1=1399912&r2=1399913&view=diff
==
--- subversion/trunk/subversion/libsvn_repos/replay.c (original)
+++ subversion/trunk/subversion/libsvn_repos/replay.c Thu Oct 18 23:12:44 2012
@@ -1443,15 +1443,18 @@ replay_node(svn_fs_root_t *root,
   if (change->node_kind == svn_node_file
   && (change->text_mod || change->prop_mod || downgraded_copy))
 {
-  svn_checksum_t *checksum;
-  svn_stream_t *contents;
+  svn_checksum_t *checksum = NULL;
+  svn_stream_t *contents = NULL;
 
-  SVN_ERR(svn_fs_file_checksum(&checksum, svn_checksum_sha1,
-   root, repos_relpath, TRUE,
-   scratch_pool));
+  if (change->text_mod)
+{
+  SVN_ERR(svn_fs_file_checksum(&checksum, svn_checksum_sha1,
+   root, repos_relpath, TRUE,
+   scratch_pool));
 
-  SVN_ERR(svn_fs_file_contents(&contents, root, repos_relpath,
-   scratch_pool));
+  SVN_ERR(svn_fs_file_contents(&contents, root, repos_relpath,
+   scratch_pool));
+}
 
   SVN_ERR(svn_editor_alter_file(editor, repos_relpath,
 SVN_INVALID_REVNUM, props, checksum,




svn commit: r1399885 - /subversion/trunk/subversion/libsvn_repos/replay.c

2012-10-18 Thread hwright
Author: hwright
Date: Thu Oct 18 22:04:51 2012
New Revision: 1399885

URL: http://svn.apache.org/viewvc?rev=1399885&view=rev
Log:
Ev2 slight improvement in fetching kind and props for replay.

* subversion/libsvn_repos/replay.c
  (fetch_kind_func, fetch_props_func): Use the base revision if valid,
otherwise default to the previous revision (which we've been using).

Modified:
subversion/trunk/subversion/libsvn_repos/replay.c

Modified: subversion/trunk/subversion/libsvn_repos/replay.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/replay.c?rev=1399885&r1=1399884&r2=1399885&view=diff
==
--- subversion/trunk/subversion/libsvn_repos/replay.c (original)
+++ subversion/trunk/subversion/libsvn_repos/replay.c Thu Oct 18 22:04:51 2012
@@ -798,12 +798,10 @@ fetch_kind_func(svn_kind_t *kind,
   svn_fs_root_t *prev_root;
   svn_fs_t *fs = svn_fs_root_fs(root);
 
-  /* ### If base_revision is valid, should we use that as the root
-   * ### revision? */
-  SVN_ERR(svn_fs_revision_root(&prev_root, fs,
-   svn_fs_revision_root_revision(root) - 1,
-   scratch_pool));
+  if (!SVN_IS_VALID_REVNUM(base_revision))
+base_revision = svn_fs_revision_root_revision(root) - 1;
 
+  SVN_ERR(svn_fs_revision_root(&prev_root, fs, base_revision, scratch_pool));
   SVN_ERR(svn_fs_check_path(&node_kind, prev_root, path, scratch_pool));
 
   *kind = svn__kind_from_node_kind(node_kind, FALSE);
@@ -822,12 +820,10 @@ fetch_props_func(apr_hash_t **props,
   svn_fs_root_t *prev_root;
   svn_fs_t *fs = svn_fs_root_fs(root);
 
-  /* ### If base_revision is valid, should we use that as the root
-   * ### revision? */
-  SVN_ERR(svn_fs_revision_root(&prev_root, fs,
-   svn_fs_revision_root_revision(root) - 1,
-   scratch_pool));
+  if (!SVN_IS_VALID_REVNUM(base_revision))
+base_revision = svn_fs_revision_root_revision(root) - 1;
 
+  SVN_ERR(svn_fs_revision_root(&prev_root, fs, base_revision, scratch_pool));
   SVN_ERR(svn_fs_node_proplist(props, prev_root, path, result_pool));
 
   return SVN_NO_ERROR;




svn commit: r1399875 - /subversion/trunk/subversion/libsvn_repos/replay.c

2012-10-18 Thread hwright
Author: hwright
Date: Thu Oct 18 21:42:13 2012
New Revision: 1399875

URL: http://svn.apache.org/viewvc?rev=1399875&view=rev
Log:
Ev2: Use a better base revision (and speculate as to an even better one) when
fetching a node's kind during replay.

* subversion/libsvn_repos/replay.c
  (fetch_kind_func): Use the previous revision, not the current revision, which
is symmetric with what we already do in fetch_props_func().
  (fetch_props_func): Add comment.

Modified:
subversion/trunk/subversion/libsvn_repos/replay.c

Modified: subversion/trunk/subversion/libsvn_repos/replay.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/replay.c?rev=1399875&r1=1399874&r2=1399875&view=diff
==
--- subversion/trunk/subversion/libsvn_repos/replay.c (original)
+++ subversion/trunk/subversion/libsvn_repos/replay.c Thu Oct 18 21:42:13 2012
@@ -795,8 +795,16 @@ fetch_kind_func(svn_kind_t *kind,
 {
   svn_fs_root_t *root = baton;
   svn_node_kind_t node_kind;
+  svn_fs_root_t *prev_root;
+  svn_fs_t *fs = svn_fs_root_fs(root);
+
+  /* ### If base_revision is valid, should we use that as the root
+   * ### revision? */
+  SVN_ERR(svn_fs_revision_root(&prev_root, fs,
+   svn_fs_revision_root_revision(root) - 1,
+   scratch_pool));
 
-  SVN_ERR(svn_fs_check_path(&node_kind, root, path, scratch_pool));
+  SVN_ERR(svn_fs_check_path(&node_kind, prev_root, path, scratch_pool));
 
   *kind = svn__kind_from_node_kind(node_kind, FALSE);
   return SVN_NO_ERROR;
@@ -814,6 +822,8 @@ fetch_props_func(apr_hash_t **props,
   svn_fs_root_t *prev_root;
   svn_fs_t *fs = svn_fs_root_fs(root);
 
+  /* ### If base_revision is valid, should we use that as the root
+   * ### revision? */
   SVN_ERR(svn_fs_revision_root(&prev_root, fs,
svn_fs_revision_root_revision(root) - 1,
scratch_pool));




svn commit: r1399494 - /subversion/trunk/subversion/bindings/javahl/native/

2012-10-17 Thread hwright
Author: hwright
Date: Thu Oct 18 00:36:04 2012
New Revision: 1399494

URL: http://svn.apache.org/viewvc?rev=1399494&view=rev
Log:
JavaHL: Update many C-style casts to use the C++ static cast.

* subversion/bindings/javahl/native:
  : Update casts to use static_cast<>(Foo *) where appropriate.

Modified:
subversion/trunk/subversion/bindings/javahl/native/BlameCallback.cpp
subversion/trunk/subversion/bindings/javahl/native/ChangelistCallback.cpp
subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp
subversion/trunk/subversion/bindings/javahl/native/CommitCallback.cpp
subversion/trunk/subversion/bindings/javahl/native/CommitMessage.cpp
subversion/trunk/subversion/bindings/javahl/native/DiffSummaryReceiver.cpp
subversion/trunk/subversion/bindings/javahl/native/ImportFilterCallback.cpp
subversion/trunk/subversion/bindings/javahl/native/InfoCallback.cpp
subversion/trunk/subversion/bindings/javahl/native/InputStream.cpp
subversion/trunk/subversion/bindings/javahl/native/ListCallback.cpp
subversion/trunk/subversion/bindings/javahl/native/LogMessageCallback.cpp
subversion/trunk/subversion/bindings/javahl/native/OutputStream.cpp
subversion/trunk/subversion/bindings/javahl/native/PatchCallback.cpp
subversion/trunk/subversion/bindings/javahl/native/Prompter.cpp
subversion/trunk/subversion/bindings/javahl/native/ProplistCallback.cpp
subversion/trunk/subversion/bindings/javahl/native/ReposNotifyCallback.cpp
subversion/trunk/subversion/bindings/javahl/native/SVNRepos.cpp
subversion/trunk/subversion/bindings/javahl/native/StatusCallback.cpp

Modified: subversion/trunk/subversion/bindings/javahl/native/BlameCallback.cpp
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/BlameCallback.cpp?rev=1399494&r1=1399493&r2=1399494&view=diff
==
--- subversion/trunk/subversion/bindings/javahl/native/BlameCallback.cpp 
(original)
+++ subversion/trunk/subversion/bindings/javahl/native/BlameCallback.cpp Thu 
Oct 18 00:36:04 2012
@@ -61,11 +61,9 @@ BlameCallback::callback(void *baton,
 apr_pool_t *pool)
 {
   if (baton)
-return ((BlameCallback *)baton)->singleLine(start_revnum, end_revnum,
-line_no, revision, rev_props,
-merged_revision,
-merged_rev_props, merged_path,
-line, local_change, pool);
+return static_cast(baton)->singleLine(start_revnum,
+end_revnum, line_no, revision, rev_props, merged_revision,
+merged_rev_props, merged_path, line, local_change, pool);
 
   return SVN_NO_ERROR;
 }

Modified: 
subversion/trunk/subversion/bindings/javahl/native/ChangelistCallback.cpp
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/ChangelistCallback.cpp?rev=1399494&r1=1399493&r2=1399494&view=diff
==
--- subversion/trunk/subversion/bindings/javahl/native/ChangelistCallback.cpp 
(original)
+++ subversion/trunk/subversion/bindings/javahl/native/ChangelistCallback.cpp 
Thu Oct 18 00:36:04 2012
@@ -53,7 +53,8 @@ ChangelistCallback::callback(void *baton
  apr_pool_t *pool)
 {
   if (baton)
-((ChangelistCallback *)baton)->doChangelist(path, changelist, pool);
+static_cast(baton)->doChangelist(path, changelist,
+pool);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp?rev=1399494&r1=1399493&r2=1399494&view=diff
==
--- subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp 
(original)
+++ subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp Thu 
Oct 18 00:36:04 2012
@@ -324,7 +324,7 @@ ClientContext::cancelOperation()
 svn_error_t *
 ClientContext::checkCancel(void *cancelBaton)
 {
-ClientContext *that = (ClientContext *)cancelBaton;
+ClientContext *that = static_cast(cancelBaton);
 if (that->m_cancelOperation)
 return svn_error_create(SVN_ERR_CANCELLED, NULL,
 _("Operation cancelled"));

Modified: subversion/trunk/subversion/bindings/javahl/native/CommitCallback.cpp
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/CommitCallback.cpp?rev=1399494&r1=1399493&r2=1399494&view=diff
==
--- subversion/trunk/subversion/bindings/javahl/native/CommitCallback.cpp 
(

svn commit: r1399486 - in /subversion/trunk/subversion/bindings/javahl: native/ src/org/apache/subversion/javahl/ src/org/apache/subversion/javahl/callback/

2012-10-17 Thread hwright
Author: hwright
Date: Thu Oct 18 00:01:03 2012
New Revision: 1399486

URL: http://svn.apache.org/viewvc?rev=1399486&view=rev
Log:
JavaHL: Update bindings to the most recent import API.  This adds a filter
function callback to the Java side, and punches it through to the C layer.
This builds, but has not been fully tested.

[ in subversion/bindings/javahl/ ]
* native/ImportFilterCallback.cpp,
  native/ImportFilterCallback.h: New.

* native/SVNClient.h,
  native/SVNClient.cpp
  (doImport): Add ImportFilterCallback argument, and update API.

* native/org_apache_subversion_javahl_SVNClient.cpp
  (Java_org_apache_subversion_javahl_SVNClient_doImport): Add the import filter
callback and pass it down the bindings stack.

* src/org/apache/subversion/javahl/ISVNClient.java,
  src/org/apache/subversion/javahl/SVNClient.java
  (doImport): New version of the import API.

* src/org/apache/subversion/javahl/callback/ImportFilterCallback.java: New.

Added:
subversion/trunk/subversion/bindings/javahl/native/ImportFilterCallback.cpp 
  (with props)
subversion/trunk/subversion/bindings/javahl/native/ImportFilterCallback.h   
(with props)

subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ImportFilterCallback.java
   (with props)
Modified:
subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp
subversion/trunk/subversion/bindings/javahl/native/SVNClient.h

subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp

subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java

subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java

Added: 
subversion/trunk/subversion/bindings/javahl/native/ImportFilterCallback.cpp
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/ImportFilterCallback.cpp?rev=1399486&view=auto
==
--- subversion/trunk/subversion/bindings/javahl/native/ImportFilterCallback.cpp 
(added)
+++ subversion/trunk/subversion/bindings/javahl/native/ImportFilterCallback.cpp 
Thu Oct 18 00:01:03 2012
@@ -0,0 +1,118 @@
+/**
+ * @copyright
+ * 
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ * 
+ * @endcopyright
+ *
+ * @file ImportFilterCallback.cpp
+ * @brief Implementation of the class ImportFilterCallback
+ */
+
+#include "ImportFilterCallback.h"
+#include "EnumMapper.h"
+#include "CreateJ.h"
+#include "JNIUtil.h"
+#include "svn_time.h"
+
+/**
+ * Create a ImportFilterCallback object
+ * @param jcallback the Java callback object.
+ */
+ImportFilterCallback::ImportFilterCallback(jobject jcallback)
+{
+  m_callback = jcallback;
+}
+
+/**
+ * Destroy a ImportFilterCallback object
+ */
+ImportFilterCallback::~ImportFilterCallback()
+{
+  // The m_callback does not need to be destroyed, because it is the passed
+  // in parameter to the Java SVNClient.list method.
+}
+
+svn_error_t *
+ImportFilterCallback::callback(void *baton,
+   svn_boolean_t *filtered,
+   const char *local_abspath,
+   const svn_io_dirent2_t *dirent,
+   apr_pool_t *pool)
+{
+  if (baton)
+return ((ImportFilterCallback *)baton)->doImportFilter(filtered,
+local_abspath, dirent, pool);
+
+  return SVN_NO_ERROR;
+}
+
+/**
+ * Callback called for each directory entry.
+ */
+svn_error_t *
+ImportFilterCallback::doImportFilter(svn_boolean_t *filtered,
+ const char *local_abspath,
+ const svn_io_dirent2_t *dirent,
+ apr_pool_t *pool)
+{
+  JNIEnv *env = JNIUtil::getEnv();
+
+  // Create a local frame for our references
+  env->PushLocalFrame(LOCAL_FRAME_SIZE);
+  if (JNIUtil::isJavaExceptionThrown())
+return

svn commit: r1399072 - in /subversion/trunk/subversion/bindings/javahl: native/SVNRepos.cpp native/SVNRepos.h native/org_apache_subversion_javahl_SVNRepos.cpp src/org/apache/subversion/javahl/ISVNRepo

2012-10-16 Thread hwright
Author: hwright
Date: Wed Oct 17 01:53:10 2012
New Revision: 1399072

URL: http://svn.apache.org/viewvc?rev=1399072&view=rev
Log:
JavaHL: Update hotcopy interface to use the latest version of the C libraries.

[ in subversion/bindings/javahl/ ]
* native/SVNRepos.h,
  native/SVNRepos.cpp
  (SVNRepos::hotcopy): Add incremental parameter, use svn_repos_hotcopy2().

* native/org_apache_subversion_javahl_SVNRepos.cpp
  (Java_org_apache_subversion_javahl_SVNRepos_hotcopy): Add incremental param,
and pass it down to the C++ layer.

* src/org/apache/subversion/javahl/ISVNRepos.java,
  src/org/apache/subversion/javahl/SVNRepos.java
  (hotcopy): New overload.

Modified:
subversion/trunk/subversion/bindings/javahl/native/SVNRepos.cpp
subversion/trunk/subversion/bindings/javahl/native/SVNRepos.h

subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp

subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java

subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java

Modified: subversion/trunk/subversion/bindings/javahl/native/SVNRepos.cpp
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNRepos.cpp?rev=1399072&r1=1399071&r2=1399072&view=diff
==
--- subversion/trunk/subversion/bindings/javahl/native/SVNRepos.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNRepos.cpp Wed Oct 17 
01:53:10 2012
@@ -248,7 +248,7 @@ void SVNRepos::dump(File &path, OutputSt
 }
 
 void SVNRepos::hotcopy(File &path, File &targetPath,
-   bool cleanLogs)
+   bool cleanLogs, bool incremental)
 {
   SVN::Pool requestPool;
 
@@ -264,9 +264,12 @@ void SVNRepos::hotcopy(File &path, File 
   return;
 }
 
-  SVN_JNI_ERR(svn_repos_hotcopy(path.getInternalStyle(requestPool),
-targetPath.getInternalStyle(requestPool),
-cleanLogs, requestPool.getPool()), );
+  SVN_JNI_ERR(svn_repos_hotcopy2(path.getInternalStyle(requestPool),
+ targetPath.getInternalStyle(requestPool),
+ cleanLogs, incremental,
+ checkCancel, this /* cancel callback/baton */,
+ requestPool.getPool()),
+ );
 }
 
 static void

Modified: subversion/trunk/subversion/bindings/javahl/native/SVNRepos.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNRepos.h?rev=1399072&r1=1399071&r2=1399072&view=diff
==
--- subversion/trunk/subversion/bindings/javahl/native/SVNRepos.h (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNRepos.h Wed Oct 17 
01:53:10 2012
@@ -58,7 +58,7 @@ class SVNRepos : public SVNBase
   void listUnusedDBLogs(File &path,
 MessageReceiver &messageReceiver);
   void listDBLogs(File &path, MessageReceiver &messageReceiver);
-  void hotcopy(File &path, File &targetPath, bool cleanLogs);
+  void hotcopy(File &path, File &targetPath, bool cleanLogs, bool incremental);
   void dump(File &path, OutputStream &dataOut, Revision &revsionStart,
 Revision &RevisionEnd, bool incremental, bool useDeltas,
 ReposNotifyCallback *notifyCallback);

Modified: 
subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp?rev=1399072&r1=1399071&r2=1399072&view=diff
==
--- 
subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp
 (original)
+++ 
subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp
 Wed Oct 17 01:53:10 2012
@@ -170,7 +170,7 @@ Java_org_apache_subversion_javahl_SVNRep
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNRepos_hotcopy
 (JNIEnv *env, jobject jthis, jobject jpath, jobject jtargetPath,
- jboolean jcleanLogs)
+ jboolean jcleanLogs, jboolean jincremental)
 {
   JNIEntry(SVNRepos, hotcopy);
   SVNRepos *cl = SVNRepos::getCppObject(jthis);
@@ -188,7 +188,8 @@ Java_org_apache_subversion_javahl_SVNRep
   if (JNIUtil::isExceptionThrown())
 return;
 
-  cl->hotcopy(path, targetPath, jcleanLogs ? true : false);
+  cl->hotcopy(path, targetPath, jcleanLogs ? true : false,
+  jincremental ? true : false);
 }
 
 JNIEXPORT void JNICALL

Modified: 
subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java
URL: 
http://svn.apa

svn commit: r1399068 - /subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp

2012-10-16 Thread hwright
Author: hwright
Date: Wed Oct 17 01:30:18 2012
New Revision: 1399068

URL: http://svn.apache.org/viewvc?rev=1399068&view=rev
Log:
* subversion/bindings/javahl/native/SVNClient.cpp
  (SVNClient::blame): Remove variable overshadowing.

Modified:
subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp

Modified: subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp?rev=1399068&r1=1399067&r2=1399068&view=diff
==
--- subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp Wed Oct 17 
01:30:18 2012
@@ -1188,7 +1188,6 @@ void SVNClient::blame(const char *path, 
 {
 SVN::Pool subPool(pool);
 SVN_JNI_NULL_PTR_EX(path, "path", );
-apr_pool_t *pool = subPool.getPool();
 Path intPath(path, subPool);
 SVN_JNI_ERR(intPath.error_occured(), );
 
@@ -1196,13 +1195,12 @@ void SVNClient::blame(const char *path, 
 if (ctx == NULL)
 return;
 
-SVN_JNI_ERR(svn_client_blame5(intPath.c_str(), pegRevision.revision(),
-  revisionStart.revision(),
-  revisionEnd.revision(),
-  svn_diff_file_options_create(pool),
-  ignoreMimeType, includeMergedRevisions,
-  BlameCallback::callback, callback, ctx,
-  pool),
+SVN_JNI_ERR(svn_client_blame5(
+  intPath.c_str(), pegRevision.revision(), revisionStart.revision(),
+  revisionEnd.revision(),
+  svn_diff_file_options_create(subPool.getPool()), ignoreMimeType,
+  includeMergedRevisions, BlameCallback::callback, callback, ctx,
+  subPool.getPool()),
 );
 }
 




svn commit: r1399064 - in /subversion/trunk/subversion/bindings/javahl: native/ src/org/apache/subversion/javahl/

2012-10-16 Thread hwright
Author: hwright
Date: Wed Oct 17 01:19:21 2012
New Revision: 1399064

URL: http://svn.apache.org/viewvc?rev=1399064&view=rev
Log:
JavaHL: Punch additional changelist parameter for property fetching to
the Java layer.

[ in subversion/bindings/javahl/ ]
* native/SVNClient.cpp,
  native/SVNClient.h
  (SVNClient::propertyGet): Add changelists param.

* native/org_apache_subversion_javahl_SVNClient.cpp
  (Java_org_apache_subversion_javahl_SVNClient_propertyGet):
Add changelists param, pass to C++ layer.

* src/org/apache/subversion/javahl/ISVNClient.java,
  src/org/apache/subversion/javahl/SVNClient.java
  (propertyGet): Add overload to accept changelists param.

Modified:
subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp
subversion/trunk/subversion/bindings/javahl/native/SVNClient.h

subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp

subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java

subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java

Modified: subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp?rev=1399064&r1=1399063&r2=1399064&view=diff
==
--- subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp Wed Oct 17 
01:19:21 2012
@@ -816,7 +816,8 @@ void SVNClient::getMergeinfoLog(int type
  * Get a property.
  */
 jbyteArray SVNClient::propertyGet(const char *path, const char *name,
-  Revision &revision, Revision &pegRevision)
+  Revision &revision, Revision &pegRevision,
+  StringArray &changelists)
 {
 SVN::Pool subPool(pool);
 SVN_JNI_NULL_PTR_EX(path, "path", NULL);
@@ -829,11 +830,11 @@ jbyteArray SVNClient::propertyGet(const 
 return NULL;
 
 apr_hash_t *props;
-SVN_JNI_ERR(svn_client_propget4(&props, name,
+SVN_JNI_ERR(svn_client_propget5(&props, NULL, name,
 intPath.c_str(), pegRevision.revision(),
 revision.revision(), NULL, svn_depth_empty,
-NULL, ctx, subPool.getPool(),
-subPool.getPool()),
+changelists.array(subPool), ctx,
+subPool.getPool(), subPool.getPool()),
 NULL);
 
 apr_hash_index_t *hi;

Modified: subversion/trunk/subversion/bindings/javahl/native/SVNClient.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNClient.h?rev=1399064&r1=1399063&r2=1399064&view=diff
==
--- subversion/trunk/subversion/bindings/javahl/native/SVNClient.h (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNClient.h Wed Oct 17 
01:19:21 2012
@@ -171,7 +171,8 @@ class SVNClient :public SVNBase
  bool lastChanged);
   void upgrade(const char *path);
   jbyteArray propertyGet(const char *path, const char *name,
- Revision &revision, Revision &pegRevision);
+ Revision &revision, Revision &pegRevision,
+ StringArray &changelists);
   void diff(const char *target1, Revision &revision1,
 const char *target2, Revision &revision2,
 const char *relativeToDir, OutputStream &outputStream,

Modified: 
subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1399064&r1=1399063&r2=1399064&view=diff
==
--- 
subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
 (original)
+++ 
subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
 Wed Oct 17 01:19:21 2012
@@ -1080,7 +1080,7 @@ Java_org_apache_subversion_javahl_SVNCli
 JNIEXPORT jbyteArray JNICALL
 Java_org_apache_subversion_javahl_SVNClient_propertyGet
 (JNIEnv *env, jobject jthis, jstring jpath, jstring jname, jobject jrevision,
- jobject jpegRevision)
+ jobject jpegRevision, jobject jchangelists)
 {
   JNIEntry(SVNClient, propertyGet);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1105,7 +1105,11 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
 return NULL;
 
-  retur

svn commit: r1398941 - /subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp

2012-10-16 Thread hwright
Author: hwright
Date: Tue Oct 16 19:31:01 2012
New Revision: 1398941

URL: http://svn.apache.org/viewvc?rev=1398941&view=rev
Log:
* subversion/bindings/javahl/native/ClientContext.cpp
  (ClientContext::ClientContext): Update to latest client API.

Modified:
subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp

Modified: subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp?rev=1398941&r1=1398940&r2=1398941&view=diff
==
--- subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp 
(original)
+++ subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp Tue 
Oct 16 19:31:01 2012
@@ -71,7 +71,8 @@ ClientContext::ClientContext(jobject jsv
 
 env->DeleteLocalRef(jctx);
 
-SVN_JNI_ERR(svn_client_create_context(&m_context, pool.getPool()),
+SVN_JNI_ERR(svn_client_create_context2(&m_context, NULL,
+   pool.getPool()),
 );
 
 /* Clear the wc_ctx as we don't want to maintain this unconditionally




svn commit: r1398939 - /subversion/trunk/subversion/include/svn_client.h

2012-10-16 Thread hwright
Author: hwright
Date: Tue Oct 16 19:27:53 2012
New Revision: 1398939

URL: http://svn.apache.org/viewvc?rev=1398939&view=rev
Log:
* subversion/include/svn_client.h
  (svn_client_create_context2): Update docstring.

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

Modified: subversion/trunk/subversion/include/svn_client.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1398939&r1=1398938&r2=1398939&view=diff
==
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Tue Oct 16 19:27:53 2012
@@ -992,7 +992,8 @@ typedef struct svn_client_ctx_t
  * Set @a *ctx to a client context object, allocated in @a pool, that
  * represents a particular instance of an svn client. @a cfg_hash is used
  * to initialise the config member of the returned context object and should
- * remain valid for the lifetime of the object.
+ * remain valid for the lifetime of the object. @a cfg_hash may be @c NULL,
+ * in which case it is ignored.
  *
  * In order to avoid backwards compatibility problems, clients must
  * use this function to initialize and allocate the




svn commit: r1398319 - /subversion/trunk/subversion/libsvn_delta/compat.c

2012-10-15 Thread hwright
Author: hwright
Date: Mon Oct 15 15:01:33 2012
New Revision: 1398319

URL: http://svn.apache.org/viewvc?rev=1398319&view=rev
Log:
Ev2: Make sure that copyfrom paths in the compat shims are absolute.

* subversion/libsvn_delta/compat.c
  (apply_change): When given a relative copyfrom path, make it absolute.

Modified:
subversion/trunk/subversion/libsvn_delta/compat.c

Modified: subversion/trunk/subversion/libsvn_delta/compat.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1398319&r1=1398318&r2=1398319&view=diff
==
--- subversion/trunk/subversion/libsvn_delta/compat.c (original)
+++ subversion/trunk/subversion/libsvn_delta/compat.c Mon Oct 15 15:01:33 2012
@@ -1637,9 +1637,12 @@ apply_change(void **dir_baton,
change->copyfrom_path,
scratch_pool);
   else
-/* ### prefix with "/" ?  */
 copyfrom_url = change->copyfrom_path;
 
+  /* Make this an FS path by prepending "/" */
+  if (copyfrom_url[0] != '/')
+copyfrom_url = apr_pstrcat(scratch_pool, "/", copyfrom_url, NULL);
+
   copyfrom_rev = change->copyfrom_rev;
 }
 




svn commit: r1397425 - /subversion/trunk/subversion/libsvn_wc/conflicts.c

2012-10-11 Thread hwright
Author: hwright
Date: Fri Oct 12 03:43:57 2012
New Revision: 1397425

URL: http://svn.apache.org/viewvc?rev=1397425&view=rev
Log:
Fix a bug leaving part of a struct uninitialized, and another part overwritten
with invalid data.

* subversion/libsvn_wc/conflicts.c
  (read_prop_conflicts): Set the correct field with the conflict reason.

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

Modified: subversion/trunk/subversion/libsvn_wc/conflicts.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/conflicts.c?rev=1397425&r1=1397424&r2=1397425&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_wc/conflicts.c Fri Oct 12 03:43:57 2012
@@ -2000,9 +2000,9 @@ read_prop_conflicts(apr_array_header_t *
   if (my_value == NULL)
 desc->reason = svn_wc_conflict_reason_deleted;
   else if (their_value == NULL)
-desc->action = svn_wc_conflict_reason_added;
+desc->reason = svn_wc_conflict_reason_added;
   else
-desc->action = svn_wc_conflict_reason_edited;
+desc->reason = svn_wc_conflict_reason_edited;
 
   /* ### This should be changed. The prej file should be stored
* ### separately from the other files. We need to rev the




svn commit: r1397331 - /subversion/trunk/subversion/libsvn_fs_fs/tree.c

2012-10-11 Thread hwright
Author: hwright
Date: Thu Oct 11 21:55:52 2012
New Revision: 1397331

URL: http://svn.apache.org/viewvc?rev=1397331&view=rev
Log:
Followup to r1396826 by using the correct revision number type, rather than
apr_uint64_t unconditionally.

* subversion/libsvn_fs_fs/tree.c
  (cache_entry_t, cache_lookup): Use long int for the hash value.

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

Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.c?rev=1397331&r1=1397330&r2=1397331&view=diff
==
--- subversion/trunk/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/tree.c Thu Oct 11 21:55:52 2012
@@ -148,7 +148,7 @@ typedef struct cache_entry_t
 {
   /* hash value derived from PATH, REVISION.
  Used to short-circuit failed lookups. */
-  apr_uint64_t hash_value;
+  long int hash_value;
 
   /* revision to which the NODE belongs */
   svn_revnum_t revision;
@@ -337,7 +337,7 @@ cache_lookup( fs_fs_dag_cache_t *cache
 {
   apr_size_t i, bucket_index;
   apr_size_t path_len = strlen(path);
-  apr_uint64_t hash_value = revision;
+  long int hash_value = revision;
 
   /* optimistic lookup: hit the same bucket again? */
   cache_entry_t *result = &cache->buckets[cache->last_hit];




svn commit: r1397148 - in /subversion/trunk/subversion: include/private/svn_string_private.h libsvn_subr/string.c

2012-10-11 Thread hwright
Author: hwright
Date: Thu Oct 11 16:26:41 2012
New Revision: 1397148

URL: http://svn.apache.org/viewvc?rev=1397148&view=rev
Log:
Fix copy-pasto.

* subversion/libsvn_subr/string.c
  (svn__ui64toa_sep),
* subversion/include/private/svn_string_private.h
  (svn__ui64toa_sep): Fix first param to be a signed integer.

Modified:
subversion/trunk/subversion/include/private/svn_string_private.h
subversion/trunk/subversion/libsvn_subr/string.c

Modified: subversion/trunk/subversion/include/private/svn_string_private.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_string_private.h?rev=1397148&r1=1397147&r2=1397148&view=diff
==
--- subversion/trunk/subversion/include/private/svn_string_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_string_private.h Thu Oct 11 
16:26:41 2012
@@ -88,7 +88,7 @@ svn__ui64toa_sep(apr_uint64_t number, ch
  * the @a seperator at each third place.
  */
 char *
-svn__i64toa_sep(apr_uint64_t number, char seperator, apr_pool_t *pool);
+svn__i64toa_sep(apr_int64_t number, char seperator, apr_pool_t *pool);
 
 /** @} */
 

Modified: subversion/trunk/subversion/libsvn_subr/string.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/string.c?rev=1397148&r1=1397147&r2=1397148&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/string.c (original)
+++ subversion/trunk/subversion/libsvn_subr/string.c Thu Oct 11 16:26:41 2012
@@ -1120,7 +1120,7 @@ svn__ui64toa_sep(apr_uint64_t number, ch
 }
 
 char *
-svn__i64toa_sep(apr_uint64_t number, char seperator, apr_pool_t *pool)
+svn__i64toa_sep(apr_int64_t number, char seperator, apr_pool_t *pool)
 {
   char buffer[2 * SVN_INT64_BUFFER_SIZE];
   if (number < 0)




svn commit: r1396826 - /subversion/trunk/subversion/libsvn_fs_fs/tree.c

2012-10-10 Thread hwright
Author: hwright
Date: Wed Oct 10 22:05:34 2012
New Revision: 1396826

URL: http://svn.apache.org/viewvc?rev=1396826&view=rev
Log:
Avoid integer size mismatch warning.

* subversion/libsvn_fs_fs/tree.c
  (cache_entry_t, cache_lookup): Adjust hash_value to match the size of the
revision number, which is an input to the hash value.

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

Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.c?rev=1396826&r1=1396825&r2=1396826&view=diff
==
--- subversion/trunk/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/tree.c Wed Oct 10 22:05:34 2012
@@ -148,7 +148,7 @@ typedef struct cache_entry_t
 {
   /* hash value derived from PATH, REVISION.
  Used to short-circuit failed lookups. */
-  apr_uint32_t hash_value;
+  apr_uint64_t hash_value;
 
   /* revision to which the NODE belongs */
   svn_revnum_t revision;
@@ -337,7 +337,7 @@ cache_lookup( fs_fs_dag_cache_t *cache
 {
   apr_size_t i, bucket_index;
   apr_size_t path_len = strlen(path);
-  apr_uint32_t hash_value = revision;
+  apr_uint64_t hash_value = revision;
 
   /* optimistic lookup: hit the same bucket again? */
   cache_entry_t *result = &cache->buckets[cache->last_hit];




svn commit: r1396577 - in /subversion/trunk/subversion: libsvn_client/cleanup.c libsvn_client/merge.c svn/propedit-cmd.c

2012-10-10 Thread hwright
Author: hwright
Date: Wed Oct 10 12:52:49 2012
New Revision: 1396577

URL: http://svn.apache.org/viewvc?rev=1396577&view=rev
Log:
Remove deprecated function use, bump callers from svn_client_propget4() to
svn_client_propget5().

* subversion/svn/propedit-cmd.c
  (svn_cl__propedit),
* subversion/libsvn_client/merge.c
  (get_wc_explicit_mergeinfo_catalog),
* subversion/libsvn_client/cleanup.c
  (svn_client_upgrade):
Use svn_client_propget5(), but don't fetch inherited properties.

Modified:
subversion/trunk/subversion/libsvn_client/cleanup.c
subversion/trunk/subversion/libsvn_client/merge.c
subversion/trunk/subversion/svn/propedit-cmd.c

Modified: subversion/trunk/subversion/libsvn_client/cleanup.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/cleanup.c?rev=1396577&r1=1396576&r2=1396577&view=diff
==
--- subversion/trunk/subversion/libsvn_client/cleanup.c (original)
+++ subversion/trunk/subversion/libsvn_client/cleanup.c Wed Oct 10 12:52:49 2012
@@ -144,8 +144,9 @@ svn_client_upgrade(const char *path,
  upgrade to avoid that errors in the externals causes the wc upgrade to
  fail. Thanks to caching the performance penalty of walking the wc a
  second time shouldn't be too severe */
-  SVN_ERR(svn_client_propget4(&externals, SVN_PROP_EXTERNALS, local_abspath,
-  &rev, &rev, NULL, svn_depth_infinity, NULL, ctx,
+  SVN_ERR(svn_client_propget5(&externals, NULL, SVN_PROP_EXTERNALS,
+  local_abspath, &rev, &rev, NULL,
+  svn_depth_infinity, NULL, ctx,
   scratch_pool, scratch_pool));
 
   iterpool = svn_pool_create(scratch_pool);

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1396577&r1=1396576&r2=1396577&view=diff
==
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Wed Oct 10 12:52:49 2012
@@ -5733,10 +5733,10 @@ get_wc_explicit_mergeinfo_catalog(apr_ha
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   apr_hash_index_t *hi;
 
-  SVN_ERR(svn_client_propget4(subtrees_with_mergeinfo, SVN_PROP_MERGEINFO,
-  target_abspath, &working_revision,
-  &working_revision, NULL, depth, NULL,
-  ctx, result_pool, scratch_pool));
+  SVN_ERR(svn_client_propget5(subtrees_with_mergeinfo, NULL,
+  SVN_PROP_MERGEINFO, target_abspath,
+  &working_revision, &working_revision, NULL,
+  depth, NULL, ctx, result_pool, scratch_pool));
 
   /* Convert property values to svn_mergeinfo_t. */
   for (hi = apr_hash_first(scratch_pool, *subtrees_with_mergeinfo);

Modified: subversion/trunk/subversion/svn/propedit-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/propedit-cmd.c?rev=1396577&r1=1396576&r2=1396577&view=diff
==
--- subversion/trunk/subversion/svn/propedit-cmd.c (original)
+++ subversion/trunk/subversion/svn/propedit-cmd.c Wed Oct 10 12:52:49 2012
@@ -228,7 +228,7 @@ svn_cl__propedit(apr_getopt_t *os,
   peg_revision.kind = svn_opt_revision_unspecified;
 
   /* Fetch the current property. */
-  SVN_ERR(svn_client_propget4(&props, pname_utf8, abspath_or_url,
+  SVN_ERR(svn_client_propget5(&props, NULL, pname_utf8, abspath_or_url,
   &peg_revision,
   &(opt_state->start_revision),
   &base_rev, svn_depth_empty,




svn commit: r1396564 - /subversion/trunk/subversion/libsvn_subr/path.c

2012-10-10 Thread hwright
Author: hwright
Date: Wed Oct 10 12:39:31 2012
New Revision: 1396564

URL: http://svn.apache.org/viewvc?rev=1396564&view=rev
Log:
Only define a private function on platforms where we actually use it.
All the other callers are protected by similar define guards.

* subversion/libsvn_subr/path.c
  (get_path_encoding): Only define on !WIN32 && !DARWIN.

Modified:
subversion/trunk/subversion/libsvn_subr/path.c

Modified: subversion/trunk/subversion/libsvn_subr/path.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/path.c?rev=1396564&r1=1396563&r2=1396564&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/path.c (original)
+++ subversion/trunk/subversion/libsvn_subr/path.c Wed Oct 10 12:39:31 2012
@@ -1100,7 +1100,7 @@ svn_path_get_absolute(const char **pabso
 }
 
 
-
+#if !defined(WIN32) && !defined(DARWIN)
 /** Get APR's internal path encoding. */
 static svn_error_t *
 get_path_encoding(svn_boolean_t *path_is_utf8, apr_pool_t *pool)
@@ -1119,6 +1119,7 @@ get_path_encoding(svn_boolean_t *path_is
   *path_is_utf8 = (encoding_style == APR_FILEPATH_ENCODING_UTF8);
   return SVN_NO_ERROR;
 }
+#endif
 
 
 svn_error_t *




svn commit: r1396534 - /subversion/trunk/subversion/libsvn_subr/gpg_agent.c

2012-10-10 Thread hwright
Author: hwright
Date: Wed Oct 10 10:24:33 2012
New Revision: 1396534

URL: http://svn.apache.org/viewvc?rev=1396534&view=rev
Log:
* subversion/libsvn_subr/gpg_agent.c
  (password_get_gpg_agent): Don't superfluously set a variable.

Modified:
subversion/trunk/subversion/libsvn_subr/gpg_agent.c

Modified: subversion/trunk/subversion/libsvn_subr/gpg_agent.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/gpg_agent.c?rev=1396534&r1=1396533&r2=1396534&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/gpg_agent.c (original)
+++ subversion/trunk/subversion/libsvn_subr/gpg_agent.c Wed Oct 10 10:24:33 2012
@@ -326,7 +326,6 @@ password_get_gpg_agent(svn_boolean_t *do
   display = getenv("DISPLAY");
   if (display != NULL)
 {
-  request = apr_psprintf(pool, "OPTION display=%s\n", display);
   if (!send_option(sd, buffer, BUFFER_SIZE, "display", display, pool))
 {
   close(sd);




  1   2   3   4   5   6   7   8   9   10   >