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

2012-04-05 Thread julianfoad
Author: julianfoad
Date: Thu Apr  5 08:47:20 2012
New Revision: 1309696

URL: http://svn.apache.org/viewvc?rev=1309696view=rev
Log:
* subversion/svndumpfilter/main.c:
  (write_prop_to_stringbuf): Remove a redundant level of indirection of the
stringbuf parameter.  No functional change.
  (output_revision, set_node_property): Adjust the calls.

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

Modified: subversion/trunk/subversion/svndumpfilter/main.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svndumpfilter/main.c?rev=1309696r1=1309695r2=1309696view=diff
==
--- subversion/trunk/subversion/svndumpfilter/main.c (original)
+++ subversion/trunk/subversion/svndumpfilter/main.c Thu Apr  5 08:47:20 2012
@@ -79,7 +79,7 @@ create_stdio_stream(svn_stream_t **strea
 
 /* Writes a property in dumpfile format to given stringbuf. */
 static void
-write_prop_to_stringbuf(svn_stringbuf_t **strbuf,
+write_prop_to_stringbuf(svn_stringbuf_t *strbuf,
 const char *name,
 const svn_string_t *value)
 {
@@ -89,24 +89,24 @@ write_prop_to_stringbuf(svn_stringbuf_t 
 
   /* Output name length, then name. */
   namelen = strlen(name);
-  svn_stringbuf_appendbytes(*strbuf, K , 2);
+  svn_stringbuf_appendbytes(strbuf, K , 2);
 
   bytes_used = apr_snprintf(buf, sizeof(buf), % APR_SIZE_T_FMT, namelen);
-  svn_stringbuf_appendbytes(*strbuf, buf, bytes_used);
-  svn_stringbuf_appendbyte(*strbuf, '\n');
+  svn_stringbuf_appendbytes(strbuf, buf, bytes_used);
+  svn_stringbuf_appendbyte(strbuf, '\n');
 
-  svn_stringbuf_appendbytes(*strbuf, name, namelen);
-  svn_stringbuf_appendbyte(*strbuf, '\n');
+  svn_stringbuf_appendbytes(strbuf, name, namelen);
+  svn_stringbuf_appendbyte(strbuf, '\n');
 
   /* Output value length, then value. */
-  svn_stringbuf_appendbytes(*strbuf, V , 2);
+  svn_stringbuf_appendbytes(strbuf, V , 2);
 
   bytes_used = apr_snprintf(buf, sizeof(buf), % APR_SIZE_T_FMT, value-len);
-  svn_stringbuf_appendbytes(*strbuf, buf, bytes_used);
-  svn_stringbuf_appendbyte(*strbuf, '\n');
+  svn_stringbuf_appendbytes(strbuf, buf, bytes_used);
+  svn_stringbuf_appendbyte(strbuf, '\n');
 
-  svn_stringbuf_appendbytes(*strbuf, value-data, value-len);
-  svn_stringbuf_appendbyte(*strbuf, '\n');
+  svn_stringbuf_appendbytes(strbuf, value-data, value-len);
+  svn_stringbuf_appendbyte(strbuf, '\n');
 }
 
 
@@ -364,7 +364,7 @@ output_revision(struct revision_baton_t 
   const char *pname = svn__apr_hash_index_key(hi);
   const svn_string_t *pval = svn__apr_hash_index_val(hi);
 
-  write_prop_to_stringbuf(props, pname, pval);
+  write_prop_to_stringbuf(props, pname, pval);
 }
   svn_stringbuf_appendcstr(props, PROPS-END\n);
   svn_stringbuf_appendcstr(rb-header,
@@ -804,7 +804,7 @@ set_node_property(void *node_baton,
   value = filtered_mergeinfo;
 }
 
-  write_prop_to_stringbuf((nb-props), name, value);
+  write_prop_to_stringbuf(nb-props, name, value);
 
   return SVN_NO_ERROR;
 }




svn commit: r1309730 - in /subversion/trunk/subversion: include/svn_string.h libsvn_subr/svn_string.c

2012-04-05 Thread julianfoad
Author: julianfoad
Date: Thu Apr  5 09:53:30 2012
New Revision: 1309730

URL: http://svn.apache.org/viewvc?rev=1309730view=rev
Log:
Tweak the recently introduced svn_stringbuf_create_empty() function.

Unlike with svn_string_create_empty() which produces an immutable string,
the resulting string buffer is often going to have data appended to it.  The
initial implementation created a non-standard buffer that claimed that no
space was allocated, not even for the null terminator, which was strictly
incorrect and meant it would always need reallocation before appending any
data.  By calling the standard create function, we ensure the class
invariants are maintained without any tricks, and also ensure there is
enough space for a little expansion before reallocation is required, without
sacrificing any significant space or speed.

* subversion/include/svn_string.h
  (svn_stringbuf_create_empty): Don't claim that the allocated size will be
zero.

* subversion/libsvn_subr/svn_string.c
  (empty_buffer): Make this 'const' now that we can because it's only used
for svn_string_t and not svn_stringbuf_t. Add a doc string.
  (create_stringbuf): Add a doc string and assertions.
  (svn_stringbuf_create_empty): Call svn_stringbuf_create_ensure() instead
of constructing a non-standard, very empty stringbuf.

Modified:
subversion/trunk/subversion/include/svn_string.h
subversion/trunk/subversion/libsvn_subr/svn_string.c

Modified: subversion/trunk/subversion/include/svn_string.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_string.h?rev=1309730r1=1309729r2=1309730view=diff
==
--- subversion/trunk/subversion/include/svn_string.h (original)
+++ subversion/trunk/subversion/include/svn_string.h Thu Apr  5 09:53:30 2012
@@ -200,7 +200,7 @@ svn_stringbuf_create(const char *cstring
 svn_stringbuf_t *
 svn_stringbuf_ncreate(const char *bytes, apr_size_t size, apr_pool_t *pool);
 
-/** Create a truely empty string object (length and blocksize are 0)
+/** Create a new, empty bytestring.
  * @since New in 1.8.
  */
 svn_stringbuf_t *

Modified: subversion/trunk/subversion/libsvn_subr/svn_string.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/svn_string.c?rev=1309730r1=1309729r2=1309730view=diff
==
--- subversion/trunk/subversion/libsvn_subr/svn_string.c (original)
+++ subversion/trunk/subversion/libsvn_subr/svn_string.c Thu Apr  5 09:53:30 
2012
@@ -132,7 +132,9 @@ create_string(const char *data, apr_size
   return new_string;
 }
 
-static char empty_buffer[1] = {0};
+/* A data buffer for a zero-length string (just a null terminator).  Many
+ * svn_string_t instances may share this same buffer. */
+static const char empty_buffer[1] = {0};
 
 svn_string_t *
 svn_string_create_empty(apr_pool_t *pool)
@@ -281,6 +283,9 @@ svn_stringbuf__morph_into_string(svn_str
 
 /* svn_stringbuf functions */
 
+/* Create a stringbuf referring to (not copying) an existing block of memory
+ * at DATA, of which SIZE bytes are the user data and BLOCKSIZE bytes are
+ * allocated in total.  DATA[SIZE] must be a zero byte. */
 static svn_stringbuf_t *
 create_stringbuf(char *data, apr_size_t size, apr_size_t blocksize,
  apr_pool_t *pool)
@@ -289,6 +294,9 @@ create_stringbuf(char *data, apr_size_t 
 
   new_string = apr_palloc(pool, sizeof(*new_string));
 
+  SVN_ERR_ASSERT_NO_RETURN(size  blocksize);
+  SVN_ERR_ASSERT_NO_RETURN(data[size] == '\0');
+
   new_string-data = data;
   new_string-len = size;
   new_string-blocksize = blocksize;
@@ -300,12 +308,7 @@ create_stringbuf(char *data, apr_size_t 
 svn_stringbuf_t *
 svn_stringbuf_create_empty(apr_pool_t *pool)
 {
-  /* All instances share the same zero-length buffer.
-   * Some algorithms, however, assume that they may write
-   * the terminating zero. So, empty_buffer must be writable
-   * (a simple (char *) will cause SEGFAULTs). */
-
-  return create_stringbuf(empty_buffer, 0, 0, pool);
+  return svn_stringbuf_create_ensure(0, pool);
 }
 
 svn_stringbuf_t *




[Subversion Wiki] Update of AuthenticationCredentialCacheStorageOverhaul by CMichaelPilato

2012-04-05 Thread Apache subversion Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Subversion Wiki for 
change notification.

The AuthenticationCredentialCacheStorageOverhaul page has been changed by 
CMichaelPilato:
http://wiki.apache.org/subversion/AuthenticationCredentialCacheStorageOverhaul?action=diffrev1=2rev2=3

Comment:
Add info about how we interact with third-party keychain-type providers.

  = Authentication Credential Cache Storage Overhaul =
  Subversion 1.7 and older uses, primarily, an on-disk storage solution for 
cached authentication credentials.  Bits of the more private information may be 
outsourced for storage to various OS keyring provider mechanisms as (see 
EncryptedPasswordStorage), but certainly the primary storage container are the 
on-disk serialized hash files stored in 
`${HOME}/.subversion/auth/${PROVIDERTYPE}/${REALMSTRING_MD5}`.  As we look to 
improve the client authentication subsystem in the future -- especially when 
considering major overhauls such as the master passphrase in-house encryption 
feature (see MasterPassphrase), one area that stands out as in need of 
attention is the storage of cached authentication credentials.
  
+ == Disk Cache ==
  Here's an attempt at summarizing what type of information is currently stored 
on disk for each credential type:
- 
  ||'''Provider Type''' ||'''Subversion Realmstring (Key) Components''' 
||'''What Else Gets Cached''' ||
  ||svn.username ||repos UUID ||username ||
  ||svn.simple ||server root URL (scheme, hostname, port), realm string 
||username, password ||
- ||svn.ssl.client-cert || || ||
+ ||svn.ssl.client-cert || || ||
  ||svn.ssl.client-passphrase ||certificate file path ||password ||
- ||svn.ssl.client-passphrase (PKCS#11 PINs) ||static string containing PIN 
token and slot || ||
+ ||svn.ssl.client-passphrase (PKCS#11 PINs) ||static string containing PIN 
token and slot || ||
  ||svn.ssl.server ||server root URL (scheme, hostname, port) ||ASCII 
certificate, bitmask of acceptable failures ||
  
  Also interesting is that individual RA implementations do not necessarily 
agree on the realmstring.  ra_neon builds realmstrings for itself to use.  
ra_serf builds some realmstrings for itself, but offloads some of that work to 
Serf (in the most common cases, even).
  
+ == Outsourced Secure Cache ==
+ 
+ Here's a table describing the keys and values (of sorts) used when storing 
and retrieving passwords from third-party secure storage providers.
+ ||'''Keyring''' ||'''Keys''' ||'''Values''' ||
+ ||Win32 CryptoAPI ||static description string ||password ||
+ ||MacOS X Keychain ||realmstring, username ||password ||
+ ||Gnome Keyring ||realmstring, username ||password ||
+ ||KDE Wallet ||realmstring, username ||password ||
+ ||GPG Agent ||realmstring ||password ||
+ 


svn commit: r1309865 - in /subversion/trunk/subversion: libsvn_client/diff.c tests/cmdline/log_tests.py

2012-04-05 Thread stsp
Author: stsp
Date: Thu Apr  5 14:07:02 2012
New Revision: 1309865

URL: http://svn.apache.org/viewvc?rev=1309865view=rev
Log:
Fix issue #4153, svn log --diff on moved file gives not found.

* subversion/libsvn_client/diff.c
  (resolve_pegged_diff_target_url): New helper function to wrap an
   svn_client__repos_locations() call with some extra error handling.
  (diff_prepare_repos_repos): When resolving URLs for pegged diff targets,
   resolve each URL separately. This is required to properly handle the case
   where the diff target lives at a different location in the operative
   revision range _and_ only exists at one side of the operative range.
   Attempting to resolve both pegged targets with a single call to
   svn_client__repos_locations() can only tell us that one of the targets
   does not exist, it does not tell us _which_ target does not exist.
   And it causes svn_client__repos_locations() to throw an error rather
   than at least returning the correct URL to use for the existing target.
   So we were using the URL the user passed in even though it is incorrect
   to use this URL in the operative range of the diff.

* subversion/tests/cmdline/log_tests.py
  (log_diff_moved): Remove XFail marker.

Modified:
subversion/trunk/subversion/libsvn_client/diff.c
subversion/trunk/subversion/tests/cmdline/log_tests.py

Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1309865r1=1309864r2=1309865view=diff
==
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Thu Apr  5 14:07:02 2012
@@ -1494,6 +1494,44 @@ check_diff_target_exists(const char *url
   return SVN_NO_ERROR;
 }
 
+
+/* Resolve PATH_OR_URL@PEG_REVISION to a possibly different *RESOLVED_URL
+ * which the corresponding object has in REVISION. If the object has no
+ * location in REVISION, set *RESOLVED_URL to NULL. */
+static svn_error_t *
+resolve_pegged_diff_target_url(const char **resolved_url,
+   svn_ra_session_t *ra_session,
+   const char *path_or_url,
+   const svn_opt_revision_t *peg_revision,
+   const svn_opt_revision_t *revision,
+   svn_client_ctx_t *ctx,
+   apr_pool_t *scratch_pool)
+{
+  svn_error_t *err;
+
+  /* Check if the PATH_OR_URL exists at REVISION. */
+  err = svn_client__repos_locations(resolved_url, NULL,
+NULL, NULL,
+ra_session,
+path_or_url,
+peg_revision,
+revision,
+NULL,
+ctx, scratch_pool);
+  if (err)
+{
+  if (err-apr_err == SVN_ERR_CLIENT_UNRELATED_RESOURCES)
+{
+  svn_error_clear(err);
+  *resolved_url = NULL;
+}
+  else
+return svn_error_trace(err);
+}
+
+  return SVN_NO_ERROR;
+}
+
 /** Prepare a repos repos diff between PATH_OR_URL1 and
  * PATH_OR_URL2@PEG_REVISION, in the revision range REVISION1:REVISION2.
  * Return URLs and peg revisions in *URL1, *REV1 and in *URL2, *REV2.
@@ -1560,34 +1598,38 @@ diff_prepare_repos_repos(const char **ur
  actual URLs will be. */
   if (peg_revision-kind != svn_opt_revision_unspecified)
 {
-  svn_error_t *err;
+  const char *resolved_url1;
+  const char *resolved_url2;
 
-  err = svn_client__repos_locations(url1, NULL,
-url2, NULL,
-*ra_session,
-path_or_url2,
-peg_revision,
-revision1,
-revision2,
-ctx, pool);
-  if (err)
+  SVN_ERR(resolve_pegged_diff_target_url(resolved_url2, *ra_session,
+ path_or_url2, peg_revision,
+ revision2, ctx, pool));
+
+  SVN_ERR(svn_ra_reparent(*ra_session, *url1, pool));
+  SVN_ERR(resolve_pegged_diff_target_url(resolved_url1, *ra_session,
+ path_or_url1, peg_revision,
+ revision1, ctx, pool));
+
+  /* Either or both URLs might have changed as a result of resolving
+   * the PATH_OR_URL@PEG_REVISION's history. If only one of the URLs
+   * could be resolved, use the same URL for URL1 and URL2, so we can
+   * show diff that 'adds' the object (see issue #4153). */
+  if (resolved_url2)
 {
-  if (err-apr_err 

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

2012-04-05 Thread stsp
Author: stsp
Date: Thu Apr  5 14:18:45 2012
New Revision: 1309873

URL: http://svn.apache.org/viewvc?rev=1309873view=rev
Log:
* subversion/libsvn_client/diff.c
  (resolve_pegged_diff_target_url): Improve docstring.

Suggested by: rhuijben

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=1309873r1=1309872r2=1309873view=diff
==
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Thu Apr  5 14:18:45 2012
@@ -1495,9 +1495,9 @@ check_diff_target_exists(const char *url
 }
 
 
-/* Resolve PATH_OR_URL@PEG_REVISION to a possibly different *RESOLVED_URL
- * which the corresponding object has in REVISION. If the object has no
- * location in REVISION, set *RESOLVED_URL to NULL. */
+/* Return in *RESOLVED_URL the URL which PATH_OR_URL@PEG_REVISION has in
+ * REVISION. If the object has no location in REVISION, set *RESOLVED_URL
+ * to NULL. */
 static svn_error_t *
 resolve_pegged_diff_target_url(const char **resolved_url,
svn_ra_session_t *ra_session,




[Subversion Wiki] Update of SymmetricMerge by JulianFoad

2012-04-05 Thread Apache subversion Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Subversion Wiki for 
change notification.

The SymmetricMerge page has been changed by JulianFoad:
http://wiki.apache.org/subversion/SymmetricMerge?action=diffrev1=76rev2=77

  For a given merge request (from a source URL at a given revision to a target 
WC), apply that same request separately to each subtree.  In principle, that 
means every subtree in the tree.  In implementation, we can first work out 
which subtrees will need a different set of merges, and then treat just those 
subtrees specially.
  
  The merge required for a subtree might have its base after or before the base 
of the parent's merge.  It might even have its base on the opposite branch from 
the parent's merge.
+ 
+ === Significant and Insignificant Subtree Merging ===
+ Often, Subversion creates subtree mergeinfo when the user performs a merge of 
a subtree (even a single file) knowing that that subtree contains all the 
changes that there were in the selected revisions.  In these cases, mergeinfo 
on the root of the branch would be equivalent.
+ 
+ OTOH, when the subtree contains some changes, but other changes exist outside 
it, that's ''significant'' subtree merge.
+ 
+ 
  
  == Cherry-pick Merges ==
  [Note: This section is rather long, and should be considered more as  
reference material than an introduction, as it aims to set out all the  
possible cases.]


svn commit: r1309891 - /subversion/trunk/subversion/tests/cmdline/log_tests.py

2012-04-05 Thread stsp
Author: stsp
Date: Thu Apr  5 15:03:44 2012
New Revision: 1309891

URL: http://svn.apache.org/viewvc?rev=1309891view=rev
Log:
* subversion/tests/cmdline/log_tests.py
  (log_diff_moved): This test is still failing over DAV, because the diff
   printed contains the wrong path over DAV ('mu' vs. the expected 'A/mu').
   Mark the test as XFail over DAV until this is fixed.

Modified:
subversion/trunk/subversion/tests/cmdline/log_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/log_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/log_tests.py?rev=1309891r1=1309890r2=1309891view=diff
==
--- subversion/trunk/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/log_tests.py Thu Apr  5 15:03:44 
2012
@@ -2218,6 +2218,7 @@ def log_xml_old(sbox):
 
 
 @Issue(4153)
+@XFail(svntest.main.is_ra_type_dav)
 def log_diff_moved(sbox):
   log --diff on moved file
 




svn commit: r1309894 - /subversion/branches/1.7.x-issue4153/

2012-04-05 Thread stsp
Author: stsp
Date: Thu Apr  5 15:14:25 2012
New Revision: 1309894

URL: http://svn.apache.org/viewvc?rev=1309894view=rev
Log:
Create a backport branch for 1.7.x issue #4153 fix.

Added:
subversion/branches/1.7.x-issue4153/   (props changed)
  - copied from r1309893, subversion/branches/1.7.x/

Propchange: subversion/branches/1.7.x-issue4153/
--
--- bugtraq:logregex (added)
+++ bugtraq:logregex Thu Apr  5 15:14:25 2012
@@ -0,0 +1,2 @@
+[Ii]ssues?:?(\s*(,|and)?\s*#\d+)+
+(\d+)

Propchange: subversion/branches/1.7.x-issue4153/
--
bugtraq:url = http://subversion.tigris.org/issues/show_bug.cgi?id=%BUGID%

Propchange: subversion/branches/1.7.x-issue4153/
--
--- svn:ignore (added)
+++ svn:ignore Thu Apr  5 15:14:25 2012
@@ -0,0 +1,50 @@
+ChangeLog*
+Makefile
+config.cache
+config.log
+config.nice
+config.status
+configure
+libtool
+.gdb_history
+.swig_checked
+*.orig
+*.rej
+TAGS
+tags
+neon
+build-outputs.mk
+autogen-standalone.mk
+autom4te.cache
+gen-make.opts
+tests.log*
+fails.log
+db4-win32
+db
+*.o
+*~
+.*~
+apr
+apr-util
+apr-iconv
+Release
+Debug
+ipch
+subversion_msvc.dsw
+subversion_msvc.ncb
+subversion_msvc.opt
+subversion_msvc.plg
+subversion_vcnet.sln
+subversion_vcnet.ncb
+subversion_vcnet.suo
+subversion_vcnet.sdf
+subversion_vcnet.opensdf
+mkmf.log
+.project
+.classpath
+.cdtproject
+.settings
+.cproject
+zlib
+sqlite-amalgamation
+serf

Propchange: subversion/branches/1.7.x-issue4153/
--
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Apr  5 15:14:25 2012
@@ -0,0 +1,84 @@
+/subversion/1.7.x-issue4059:1239661-1239744
+/subversion/branches/1.5.x-r30215:870312
+/subversion/branches/1.7.x-JavaHL-pools:1158684-1158722
+/subversion/branches/1.7.x-issue3888:1148937-1149162
+/subversion/branches/1.7.x-issue3975:1160761-1161546
+/subversion/branches/1.7.x-issue3976:1161731-1165397
+/subversion/branches/1.7.x-issue4032:1186668-1186784
+/subversion/branches/1.7.x-issue4035:1186202-1186315
+/subversion/branches/1.7.x-issue4035-r1185738:1186316-1186778
+/subversion/branches/1.7.x-issue4059:1239745-1242661
+/subversion/branches/1.7.x-issue4093:1229839-1230236
+/subversion/branches/1.7.x-issue4102:1292401-1295402
+/subversion/branches/1.7.x-issue4123:1293358-1293812
+/subversion/branches/1.7.x-issue4144:1305854-1306143
+/subversion/branches/1.7.x-issue4k:1166502-1167193
+/subversion/branches/1.7.x-log-diff:1295670-1295699
+/subversion/branches/1.7.x-neon-default:1148803-1158680
+/subversion/branches/1.7.x-r1152189:1152759-1154249
+/subversion/branches/1.7.x-r1155160:1158704-1159223
+/subversion/branches/1.7.x-r1159093:1159097-1159230
+/subversion/branches/1.7.x-r1163557:1163574-1170648
+/subversion/branches/1.7.x-r1173425:1173429-1176454
+/subversion/branches/1.7.x-r1180154:1186224-1186351
+/subversion/branches/1.7.x-r1201824:1202121-1207333
+/subversion/branches/1.7.x-r1210147:1213310-1293110
+/subversion/branches/1.7.x-r1213331:1213684-1213756
+/subversion/branches/1.7.x-r1232221:1232358-1238008
+/subversion/branches/1.7.x-r1236343:1236628-1239394
+/subversion/branches/1.7.x-svn-patch-eol-fixes:1207511-1235924
+/subversion/branches/atomic-revprop:965046-1000689
+/subversion/branches/bdb-reverse-deltas:872050-872529
+/subversion/branches/diff-callbacks3:870059-870761
+/subversion/branches/diff-optimizations:1031270-1037352
+/subversion/branches/diff-optimizations-bytes:1037353-1067789
+/subversion/branches/dont-save-plaintext-passwords-by-default:870728-871118
+/subversion/branches/double-delete:870511-872970
+/subversion/branches/explore-wc:875486,875493,875497,875507,875511,875514,875559,875580-875581,875584,875587,875611,875627,875647,875667-875668,875711-875712,875733-875734,875736,875744-875748,875751,875758,875782,875795-875796,875830,875836,875838,875842,875852,875855,875864,875870,875873,875880,875885-875888,875890,875897-875898,875905,875907-875909,875935,875943-875944,875946,875979,875982-875983,875985-875986,875990,875997
+/subversion/branches/file-externals:871779-873302
+/subversion/branches/fs-rep-sharing:869036-873803
+/subversion/branches/fsfs-pack:873717-874575
+/subversion/branches/gnome-keyring:870558-871410
+/subversion/branches/http-protocol-v2:874395-876041
+/subversion/branches/in-memory-cache:869829-871452
+/subversion/branches/integrate-cache-item-serialization:1068724-1068739
+/subversion/branches/integrate-cache-membuffer:998649-998852
+/subversion/branches/integrate-compression-level:1068651-1072287
+/subversion/branches/integrate-io-improvements:1068684-1072297
+/subversion/branches/integrate-is-cachable:1072568-1074082
+/subversion/branches/integrate-partial-getter:1072558-1076552
+/subversion/branches/integrate-readline-speedup:1072553-1072555

svn commit: r1309896 - in /subversion/branches/1.7.x-issue4153: ./ subversion/libsvn_client/diff.c subversion/tests/cmdline/log_tests.py

2012-04-05 Thread stsp
Author: stsp
Date: Thu Apr  5 15:17:06 2012
New Revision: 1309896

URL: http://svn.apache.org/viewvc?rev=1309896view=rev
Log:
On the 1.7.x-issue4153 branch, merge r1306275 and r1309865, resolving conflicts.
This is not a complete backport yet. The regression test currently fails to run.
It relies on helper functions which the 1.7.x test suite does not have.
However, manual testing shows that the fix itself works.

Modified:
subversion/branches/1.7.x-issue4153/   (props changed)
subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c
subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/log_tests.py

Propchange: subversion/branches/1.7.x-issue4153/
--
  Merged /subversion/trunk:r1306275,1309865

Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c?rev=1309896r1=1309895r2=1309896view=diff
==
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c 
(original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c Thu Apr 
 5 15:17:06 2012
@@ -1483,6 +1483,47 @@ check_diff_target_exists(const char *url
   return SVN_NO_ERROR;
 }
 
+/* Resolve PATH_OR_URL@PEG_REVISION to a possibly different *RESOLVED_URL
+ * which the corresponding object has in REVISION. If the object has no
+ * location in REVISION, set *RESOLVED_URL to NULL. */
+static svn_error_t *
+resolve_pegged_diff_target_url(const char **resolved_url,
+   svn_ra_session_t *ra_session,
+   const char *path_or_url,
+   const svn_opt_revision_t *peg_revision,
+   const svn_opt_revision_t *revision,
+   svn_client_ctx_t *ctx,
+   apr_pool_t *scratch_pool)
+{
+  svn_opt_revision_t *start_rev_ignore, *end_rev_ignore;
+  const char *end_url_ignore;
+  static const svn_opt_revision_t unspecified_rev =
+{ svn_opt_revision_unspecified, { 0 } };
+  svn_error_t *err;
+
+  /* Check if the PATH_OR_URL exists at REVISION. */
+  err = svn_client__repos_locations(resolved_url, start_rev_ignore,
+end_url_ignore, end_rev_ignore,
+ra_session,
+path_or_url,
+peg_revision,
+revision,
+unspecified_rev,
+ctx, scratch_pool);
+  if (err)
+{
+  if (err-apr_err == SVN_ERR_CLIENT_UNRELATED_RESOURCES)
+{
+  svn_error_clear(err);
+  *resolved_url = NULL;
+}
+  else
+return svn_error_trace(err);
+}
+
+  return SVN_NO_ERROR;
+}
+
 /** Prepare a repos repos diff between PATH1 and PATH2@PEG_REVISION,
  * in the revision range REVISION1:REVISION2.
  * Return URLs and peg revisions in *URL1, *REV1 and in *URL2, *REV2.
@@ -1549,35 +1590,38 @@ diff_prepare_repos_repos(const char **ur
  actual URLs will be. */
   if (peg_revision-kind != svn_opt_revision_unspecified)
 {
-  svn_opt_revision_t *start_ignore, *end_ignore;
-  svn_error_t *err;
+  const char *resolved_url1;
+  const char *resolved_url2;
 
-  err = svn_client__repos_locations(url1, start_ignore,
-url2, end_ignore,
-*ra_session,
-path2,
-peg_revision,
-revision1,
-revision2,
-ctx, pool);
-  if (err)
+  SVN_ERR(resolve_pegged_diff_target_url(resolved_url2, *ra_session,
+ path2, peg_revision,
+ revision2, ctx, pool));
+
+  SVN_ERR(svn_ra_reparent(*ra_session, *url1, pool));
+  SVN_ERR(resolve_pegged_diff_target_url(resolved_url1, *ra_session,
+ path1, peg_revision,
+ revision1, ctx, pool));
+
+  /* Either or both URLs might have changed as a result of resolving
+   * the PATH_OR_URL@PEG_REVISION's history. If only one of the URLs
+   * could be resolved, use the same URL for URL1 and URL2, so we can
+   * show diff that 'adds' the object (see issue #4153). */
+  if (resolved_url2)
 {
-  if (err-apr_err == SVN_ERR_CLIENT_UNRELATED_RESOURCES)
-{
-  /* Don't give up just yet. A missing path might translate
-   * into an addition in the diff. Below, we verify that 

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

2012-04-05 Thread stsp
Author: stsp
Date: Thu Apr  5 16:09:37 2012
New Revision: 1309919

URL: http://svn.apache.org/viewvc?rev=1309919view=rev
Log:
* subversion/libsvn_client/diff.c
  (diff_prepare_repos_repos): Improve a comment.

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=1309919r1=1309918r2=1309919view=diff
==
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Thu Apr  5 16:09:37 2012
@@ -1613,7 +1613,7 @@ diff_prepare_repos_repos(const char **ur
   /* Either or both URLs might have changed as a result of resolving
* the PATH_OR_URL@PEG_REVISION's history. If only one of the URLs
* could be resolved, use the same URL for URL1 and URL2, so we can
-   * show diff that 'adds' the object (see issue #4153). */
+   * show a diff that adds or removes the object (see issue #4153). */
   if (resolved_url2)
 {
   *url2 = resolved_url2;




svn commit: r1309951 - /subversion/trunk/subversion/libsvn_client/copy.c

2012-04-05 Thread hwright
Author: hwright
Date: Thu Apr  5 17:11:23 2012
New Revision: 1309951

URL: http://svn.apache.org/viewvc?rev=1309951view=rev
Log:
Ev2 shims: When doing a wc-repos copy, calculate the proper common wc path
for use in the shim callbacks.

Current number of failing Ev2 DAV tests: 1

* subversion/libsvn_client/copy.c
  (wc_to_repos_copy): Calculate and use the common wc abspath.

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

Modified: subversion/trunk/subversion/libsvn_client/copy.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/copy.c?rev=1309951r1=1309950r2=1309951view=diff
==
--- subversion/trunk/subversion/libsvn_client/copy.c (original)
+++ subversion/trunk/subversion/libsvn_client/copy.c Thu Apr  5 17:11:23 2012
@@ -1182,6 +1182,7 @@ wc_to_repos_copy(const apr_array_header_
   const char *top_src_abspath;
   svn_ra_session_t *ra_session;
   const svn_delta_editor_t *editor;
+  const char *common_wc_abspath = NULL;
   void *edit_baton;
   svn_client__committables_t *committables;
   apr_array_header_t *commit_items;
@@ -1406,6 +1407,19 @@ wc_to_repos_copy(const apr_array_header_
   SVN_ERR(svn_client__condense_commit_items(top_dst_url,
 commit_items, pool));
 
+#if ENABLE_EV2_SHIMS
+  common_wc_abspath = APR_ARRAY_IDX(commit_items, 0,
+svn_client_commit_item3_t *)-path;
+  for (i = 1; i  commit_items-nelts; i++)
+{
+  svn_client_commit_item3_t *item =
+APR_ARRAY_IDX(commit_items, i, svn_client_commit_item3_t *);
+
+  common_wc_abspath = svn_dirent_get_longest_ancestor(common_wc_abspath,
+  item-path, pool);
+}
+#endif
+
   /* Open an RA session to DST_URL. */
   SVN_ERR(svn_client__open_ra_session_internal(ra_session, NULL, top_dst_url,
NULL, commit_items,
@@ -1414,7 +1428,8 @@ wc_to_repos_copy(const apr_array_header_
   /* Fetch RA commit editor. */
   SVN_ERR(svn_ra__register_editor_shim_callbacks(ra_session,
 svn_client__get_shim_callbacks(ctx-wc_ctx,
-   NULL, pool)));
+   common_wc_abspath,
+   pool)));
   SVN_ERR(svn_ra_get_commit_editor3(ra_session, editor, edit_baton,
 commit_revprops,
 commit_callback,




svn commit: r1309978 - /subversion/branches/1.7.x/STATUS

2012-04-05 Thread danielsh
Author: danielsh
Date: Thu Apr  5 17:55:43 2012
New Revision: 1309978

URL: http://svn.apache.org/viewvc?rev=1309978view=rev
Log:
* STATUS: Update vetoes to refer to issue #4157.

Modified:
subversion/branches/1.7.x/STATUS

Modified: subversion/branches/1.7.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1309978r1=1309977r2=1309978view=diff
==
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Thu Apr  5 17:55:43 2012
@@ -141,14 +141,14 @@ Veto-blocked changes:
Justification:
  Allow testing against current stable httpd.
Votes:
- -1: danielsh (hangs with bdb)
+ -1: danielsh (needs issue #4157 to work on bdb)
 
  * r1232267
Allow building mod_dav_svn against httpd-2.4.
Justification:
  Support current stable httpd.
Votes:
- -1: danielsh (davautocheck hangs with bdb)
+ -1: danielsh (needs issue #4157 to work on bdb)
 
 Approved changes:
 =




svn commit: r1309992 - /subversion/trunk/contrib/client-side/emacs/dsvn.el

2012-04-05 Thread mattiase
Author: mattiase
Date: Thu Apr  5 18:23:42 2012
New Revision: 1309992

URL: http://svn.apache.org/viewvc?rev=1309992view=rev
Log:
Parse svn status -v output correctly even when the revision numbers have
more than 6 digits (and thus change the start of the file name column).

* contrib/client-side/emacs/dsvn.el
  (svn-status-v-filter): Update regexp and get rid of unused capture groups.

Modified:
subversion/trunk/contrib/client-side/emacs/dsvn.el

Modified: subversion/trunk/contrib/client-side/emacs/dsvn.el
URL: 
http://svn.apache.org/viewvc/subversion/trunk/contrib/client-side/emacs/dsvn.el?rev=1309992r1=1309991r2=1309992view=diff
==
--- subversion/trunk/contrib/client-side/emacs/dsvn.el (original)
+++ subversion/trunk/contrib/client-side/emacs/dsvn.el Thu Apr  5 18:23:42 2012
@@ -1092,9 +1092,9 @@ outside.
   (insert str)
   (goto-char svn-output-marker)
   (while (looking-at
-  \\([ ACDGIMRX?!~][ CM][ L][ +][ S][ KOTB]\\)[ C]? \\([* ]\\) 
\\(\\) \\(\\) \\(\\) \\([^ ].*\\)\n)
-(let ((status (match-string 1))
-  (filename (svn-normalise-path (match-string 6
+  \\(?:\\(\\?.\\)\\|\\([ ACDGIMRX!~][ CM][ L][ +][ S][ 
KOTB]\\)[ C]? [* ] +[^ ]+ +[^ ]+ +[^ ]+\\) +\\([^ ].*\\)\n)
+(let ((status (or (match-string 1) (match-string 2)))
+  (filename (svn-normalise-path (match-string 3
   (delete-region (match-beginning 0)
  (match-end 0))
  (when (or (not svn-file-filter)




svn commit: r1309995 - /subversion/trunk/subversion/libsvn_client/copy.c

2012-04-05 Thread hwright
Author: hwright
Date: Thu Apr  5 18:28:52 2012
New Revision: 1309995

URL: http://svn.apache.org/viewvc?rev=1309995view=rev
Log:
Ev2 shims: Followup to r1309951 by skipping commit items without local paths.

Current number of failing Ev2 tests over neon: 11
Current number of failing Ev2 tests over serf: 10

* subversion/libsvn_client/copy.c
  (wc_to_repos_copy): Skip commit items without paths (e.g., directories
inserted as a result of 'cp --parents').

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

Modified: subversion/trunk/subversion/libsvn_client/copy.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/copy.c?rev=1309995r1=1309994r2=1309995view=diff
==
--- subversion/trunk/subversion/libsvn_client/copy.c (original)
+++ subversion/trunk/subversion/libsvn_client/copy.c Thu Apr  5 18:28:52 2012
@@ -1408,13 +1408,20 @@ wc_to_repos_copy(const apr_array_header_
 commit_items, pool));
 
 #if ENABLE_EV2_SHIMS
-  common_wc_abspath = APR_ARRAY_IDX(commit_items, 0,
-svn_client_commit_item3_t *)-path;
-  for (i = 1; i  commit_items-nelts; i++)
+  for (i = 0; !common_wc_abspath  i  commit_items-nelts; i++)
+{
+  common_wc_abspath = APR_ARRAY_IDX(commit_items, i,
+svn_client_commit_item3_t *)-path;
+}
+
+  for (; i  commit_items-nelts; i++)
 {
   svn_client_commit_item3_t *item =
 APR_ARRAY_IDX(commit_items, i, svn_client_commit_item3_t *);
 
+  if (!item-path)
+continue;
+
   common_wc_abspath = svn_dirent_get_longest_ancestor(common_wc_abspath,
   item-path, pool);
 }




svn commit: r1310001 - in /subversion/branches/ev2-export: ./ contrib/client-side/emacs/ subversion/include/ subversion/libsvn_client/ subversion/libsvn_delta/ subversion/libsvn_fs_base/bdb/ subversio

2012-04-05 Thread hwright
Author: hwright
Date: Thu Apr  5 18:36:50 2012
New Revision: 1310001

URL: http://svn.apache.org/viewvc?rev=1310001view=rev
Log:
On the ev2-export branch:
Bring up-to-date with trunk (which should fix a test failure in a patch I have
for this branch).

Modified:
subversion/branches/ev2-export/   (props changed)
subversion/branches/ev2-export/contrib/client-side/emacs/dsvn.el
subversion/branches/ev2-export/subversion/include/svn_string.h
subversion/branches/ev2-export/subversion/libsvn_client/copy.c
subversion/branches/ev2-export/subversion/libsvn_client/diff.c
subversion/branches/ev2-export/subversion/libsvn_delta/compat.c
subversion/branches/ev2-export/subversion/libsvn_fs_base/bdb/env.c
subversion/branches/ev2-export/subversion/libsvn_subr/crypto.c
subversion/branches/ev2-export/subversion/libsvn_subr/svn_string.c
subversion/branches/ev2-export/subversion/svndumpfilter/main.c
subversion/branches/ev2-export/subversion/tests/cmdline/log_tests.py

Propchange: subversion/branches/ev2-export/
--
  Merged /subversion/trunk:r1309470-1309995

Modified: subversion/branches/ev2-export/contrib/client-side/emacs/dsvn.el
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/contrib/client-side/emacs/dsvn.el?rev=1310001r1=131r2=1310001view=diff
==
--- subversion/branches/ev2-export/contrib/client-side/emacs/dsvn.el (original)
+++ subversion/branches/ev2-export/contrib/client-side/emacs/dsvn.el Thu Apr  5 
18:36:50 2012
@@ -1092,9 +1092,9 @@ outside.
   (insert str)
   (goto-char svn-output-marker)
   (while (looking-at
-  \\([ ACDGIMRX?!~][ CM][ L][ +][ S][ KOTB]\\)[ C]? \\([* ]\\) 
\\(\\) \\(\\) \\(\\) \\([^ ].*\\)\n)
-(let ((status (match-string 1))
-  (filename (svn-normalise-path (match-string 6
+  \\(?:\\(\\?.\\)\\|\\([ ACDGIMRX!~][ CM][ L][ +][ S][ 
KOTB]\\)[ C]? [* ] +[^ ]+ +[^ ]+ +[^ ]+\\) +\\([^ ].*\\)\n)
+(let ((status (or (match-string 1) (match-string 2)))
+  (filename (svn-normalise-path (match-string 3
   (delete-region (match-beginning 0)
  (match-end 0))
  (when (or (not svn-file-filter)

Modified: subversion/branches/ev2-export/subversion/include/svn_string.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_string.h?rev=1310001r1=131r2=1310001view=diff
==
--- subversion/branches/ev2-export/subversion/include/svn_string.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_string.h Thu Apr  5 
18:36:50 2012
@@ -200,7 +200,7 @@ svn_stringbuf_create(const char *cstring
 svn_stringbuf_t *
 svn_stringbuf_ncreate(const char *bytes, apr_size_t size, apr_pool_t *pool);
 
-/** Create a truely empty string object (length and blocksize are 0)
+/** Create a new, empty bytestring.
  * @since New in 1.8.
  */
 svn_stringbuf_t *

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=1310001r1=131r2=1310001view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/copy.c Thu Apr  5 
18:36:50 2012
@@ -1182,6 +1182,7 @@ wc_to_repos_copy(const apr_array_header_
   const char *top_src_abspath;
   svn_ra_session_t *ra_session;
   const svn_delta_editor_t *editor;
+  const char *common_wc_abspath = NULL;
   void *edit_baton;
   svn_client__committables_t *committables;
   apr_array_header_t *commit_items;
@@ -1406,6 +1407,26 @@ wc_to_repos_copy(const apr_array_header_
   SVN_ERR(svn_client__condense_commit_items(top_dst_url,
 commit_items, pool));
 
+#if ENABLE_EV2_SHIMS
+  for (i = 0; !common_wc_abspath  i  commit_items-nelts; i++)
+{
+  common_wc_abspath = APR_ARRAY_IDX(commit_items, i,
+svn_client_commit_item3_t *)-path;
+}
+
+  for (; i  commit_items-nelts; i++)
+{
+  svn_client_commit_item3_t *item =
+APR_ARRAY_IDX(commit_items, i, svn_client_commit_item3_t *);
+
+  if (!item-path)
+continue;
+
+  common_wc_abspath = svn_dirent_get_longest_ancestor(common_wc_abspath,
+  item-path, pool);
+}
+#endif
+
   /* Open an RA session to DST_URL. */
   SVN_ERR(svn_client__open_ra_session_internal(ra_session, NULL, top_dst_url,
NULL, commit_items,
@@ -1414,7 +1435,8 @@ wc_to_repos_copy(const apr_array_header_
   

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

2012-04-05 Thread hwright
Author: hwright
Date: Thu Apr  5 18:43:20 2012
New Revision: 1310005

URL: http://svn.apache.org/viewvc?rev=1310005view=rev
Log:
On the ev2-export branch:
Use an Ev2-style driver to handle repos-repos copies.

Part of this commit is rather bogus, namely the bit where we still do a
delete+add.  This *should* be a move, and will be adjusted to such in a
future commit, but the fact that it doesn't cause any tests to fail as
currently implemented is somewhat strange (the Ev2 internal checks should
catch this, methinks).

* subversion/libsvn_client/copy.c
  (path_driver_cb_baton, path_driver_cb_func): Remove.
  (fetch_remote_kind_func, fetch_remote_props_func, drive_single_path,
   drive_editor): New.
  (repos_to_repos_copy): Delegate the driving of editors to the helper
function.

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

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=1310005r1=1310004r2=1310005view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/copy.c Thu Apr  5 
18:43:20 2012
@@ -537,117 +537,6 @@ typedef struct path_driver_info_t
 } path_driver_info_t;
 
 
-/* The baton used with the path_driver_cb_func() callback for a copy
-   or move operation. */
-struct path_driver_cb_baton
-{
-  /* The editor (and its state) used to perform the operation. */
-  const svn_delta_editor_t *editor;
-  void *edit_baton;
-
-  /* A hash of path - path_driver_info_t *'s. */
-  apr_hash_t *action_hash;
-
-  /* Whether the operation is a move or copy. */
-  svn_boolean_t is_move;
-};
-
-static svn_error_t *
-path_driver_cb_func(void **dir_baton,
-void *parent_baton,
-void *callback_baton,
-const char *path,
-apr_pool_t *pool)
-{
-  struct path_driver_cb_baton *cb_baton = callback_baton;
-  svn_boolean_t do_delete = FALSE, do_add = FALSE;
-  path_driver_info_t *path_info = apr_hash_get(cb_baton-action_hash,
-   path,
-   APR_HASH_KEY_STRING);
-
-  /* Initialize return value. */
-  *dir_baton = NULL;
-
-  /* This function should never get an empty PATH.  We can neither
- create nor delete the empty PATH, so if someone is calling us
- with such, the code is just plain wrong. */
-  SVN_ERR_ASSERT(! svn_path_is_empty(path));
-
-  /* Check to see if we need to add the path as a directory. */
-  if (path_info-dir_add)
-{
-  return cb_baton-editor-add_directory(path, parent_baton, NULL,
- SVN_INVALID_REVNUM, pool,
- dir_baton);
-}
-
-  /* If this is a resurrection, we know the source and dest paths are
- the same, and that our driver will only be calling us once.  */
-  if (path_info-resurrection)
-{
-  /* If this is a move, we do nothing.  Otherwise, we do the copy.  */
-  if (! cb_baton-is_move)
-do_add = TRUE;
-}
-  /* Not a resurrection. */
-  else
-{
-  /* If this is a move, we check PATH to see if it is the source
- or the destination of the move. */
-  if (cb_baton-is_move)
-{
-  if (strcmp(path_info-src_path, path) == 0)
-do_delete = TRUE;
-  else
-do_add = TRUE;
-}
-  /* Not a move?  This must just be the copy addition. */
-  else
-{
-  do_add = TRUE;
-}
-}
-
-  if (do_delete)
-{
-  SVN_ERR(cb_baton-editor-delete_entry(path, SVN_INVALID_REVNUM,
- parent_baton, pool));
-}
-  if (do_add)
-{
-  SVN_ERR(svn_path_check_valid(path, pool));
-
-  if (path_info-src_kind == svn_node_file)
-{
-  void *file_baton;
-  SVN_ERR(cb_baton-editor-add_file(path, parent_baton,
- path_info-src_url,
- path_info-src_revnum,
- pool, file_baton));
-  if (path_info-mergeinfo)
-SVN_ERR(cb_baton-editor-change_file_prop(file_baton,
-   SVN_PROP_MERGEINFO,
-   path_info-mergeinfo,
-   pool));
-  SVN_ERR(cb_baton-editor-close_file(file_baton, NULL, pool));
-}
-  else
-{
-  SVN_ERR(cb_baton-editor-add_directory(path, parent_baton,
-  path_info-src_url,
-  path_info-src_revnum,
-  

svn commit: r1310031 - /subversion/trunk/subversion/libsvn_subr/win32_crypto.c

2012-04-05 Thread cmpilato
Author: cmpilato
Date: Thu Apr  5 19:36:04 2012
New Revision: 1310031

URL: http://svn.apache.org/viewvc?rev=1310031view=rev
Log:
Some logic abstraction / API isolation.

Reviewed by: pburba

* subversion/libsvn_subr/win32_crypto.c
  (encrypt_data, decrypt_data): New helper functions which isolate the
actual interaction with the Win32 Crypto API, abstracted from ...
  (windows_password_encrypter, windows_ssl_client_cert_pw_encrypter,
  windows_password_decrypter, windows_ssl_client_cert_pw_decrypter): 
... these functions, which now defer to the new helpers.

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

Modified: subversion/trunk/subversion/libsvn_subr/win32_crypto.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/win32_crypto.c?rev=1310031r1=1310030r2=1310031view=diff
==
--- subversion/trunk/subversion/libsvn_subr/win32_crypto.c (original)
+++ subversion/trunk/subversion/libsvn_subr/win32_crypto.c Thu Apr  5 19:36:04 
2012
@@ -28,28 +28,77 @@
 /*** Includes. ***/
 
 #include apr_pools.h
+#include apr_base64.h
 #include svn_auth.h
 #include svn_error.h
 #include svn_utf.h
 #include svn_config.h
 #include svn_user.h
+#include svn_base64.h
 
 #include private/svn_auth_private.h
 
 #include svn_private_config.h
 
 #include wincrypt.h
-#include apr_base64.h
-
-/*---*/
-/* Windows simple provider, encrypts the password on Win2k and later.*/
-/*---*/
 
+
 /* The description string that's combined with unencrypted data by the
Windows CryptoAPI. Used during decryption to verify that the
encrypted data were valid. */
 static const WCHAR description[] = Lauth_svn.simple.wincrypt;
 
+
+/* Return a copy of ORIG, encrypted using the Windows CryptoAPI and
+   allocated from POOL. */
+const svn_string_t *
+encrypt_data(const svn_string_t *orig,
+ apr_pool_t *pool)
+{
+  DATA_BLOB blobin;
+  DATA_BLOB blobout;
+  const svn_string_t *crypted = NULL;
+
+  blobin.cbData = orig-len;
+  blobin.pbData = (BYTE *)orig-data;
+  if (CryptProtectData(blobin, description, NULL, NULL, NULL,
+   CRYPTPROTECT_UI_FORBIDDEN, blobout))
+{
+  crypted = svn_string_ncreate(blobout.pbData, blobout.cbData, pool);
+  LocalFree(blobout.pbData);
+}
+  return crypted;
+}
+
+/* Return a copy of CRYPTED, decrypted using the Windows CryptoAPI and
+   allocated from POOL. */
+const svn_string_t *
+decrypt_data(const svn_string_t *crypted,
+ apr_pool_t *pool)
+{
+  DATA_BLOB blobin;
+  DATA_BLOB blobout;
+  LPWSTR descr;
+  const svn_string_t *orig = NULL;
+
+  blobin.cbData = crypted-len;
+  blobin.pbData = (BYTE *)crypted-data;
+  if (CryptUnprotectData(blobin, descr, NULL, NULL, NULL,
+ CRYPTPROTECT_UI_FORBIDDEN, blobout))
+{
+  if (0 == lstrcmpW(descr, description))
+orig = svn_string_ncreate(blobout.pbData, blobout.cbData, pool);
+  LocalFree(blobout.pbData);
+  LocalFree(descr);
+}
+  return orig;
+}
+
+
+/*---*/
+/* Windows simple provider, encrypts the password on Win2k and later.*/
+/*---*/
+
 /* Implementation of svn_auth__password_set_t that encrypts
the incoming password using the Windows CryptoAPI. */
 static svn_error_t *
@@ -62,22 +111,15 @@ windows_password_encrypter(svn_boolean_t
svn_boolean_t non_interactive,
apr_pool_t *pool)
 {
-  DATA_BLOB blobin;
-  DATA_BLOB blobout;
-  svn_boolean_t crypted;
+  const svn_string_t *coded;
 
-  blobin.cbData = strlen(in);
-  blobin.pbData = (BYTE*) in;
-  crypted = CryptProtectData(blobin, description, NULL, NULL, NULL,
- CRYPTPROTECT_UI_FORBIDDEN, blobout);
-  if (crypted)
+  coded = encrypt_data(svn_string_create(in, pool), pool);
+  if (coded)
 {
-  char *coded = apr_palloc(pool, apr_base64_encode_len(blobout.cbData));
-  apr_base64_encode(coded, (const char*)blobout.pbData, blobout.cbData);
+  coded = svn_base64_encode_string2(coded, FALSE, pool);
   SVN_ERR(svn_auth__simple_password_set(done, creds, realmstring, username,
-coded, parameters,
+coded-data, parameters,
 non_interactive, pool));
-  LocalFree(blobout.pbData);
 }
 
   return SVN_NO_ERROR;
@@ -96,33 +138,25 @@ windows_password_decrypter(svn_boolean_t
svn_boolean_t non_interactive,
apr_pool_t *pool)
 {
-  DATA_BLOB blobin;
-  DATA_BLOB blobout;
-  LPWSTR descr;
-  svn_boolean_t decrypted;
-  char *in;
+  

svn commit: r1310042 [2/2] - in /subversion/branches/master-passphrase: ./ contrib/client-side/emacs/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_delta/

2012-04-05 Thread cmpilato
Modified: 
subversion/branches/master-passphrase/subversion/libsvn_subr/win32_crypto.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_subr/win32_crypto.c?rev=1310042r1=1310041r2=1310042view=diff
==
--- subversion/branches/master-passphrase/subversion/libsvn_subr/win32_crypto.c 
(original)
+++ subversion/branches/master-passphrase/subversion/libsvn_subr/win32_crypto.c 
Thu Apr  5 20:08:20 2012
@@ -28,28 +28,77 @@
 /*** Includes. ***/
 
 #include apr_pools.h
+#include apr_base64.h
 #include svn_auth.h
 #include svn_error.h
 #include svn_utf.h
 #include svn_config.h
 #include svn_user.h
+#include svn_base64.h
 
 #include private/svn_auth_private.h
 
 #include svn_private_config.h
 
 #include wincrypt.h
-#include apr_base64.h
-
-/*---*/
-/* Windows simple provider, encrypts the password on Win2k and later.*/
-/*---*/
 
+
 /* The description string that's combined with unencrypted data by the
Windows CryptoAPI. Used during decryption to verify that the
encrypted data were valid. */
 static const WCHAR description[] = Lauth_svn.simple.wincrypt;
 
+
+/* Return a copy of ORIG, encrypted using the Windows CryptoAPI and
+   allocated from POOL. */
+const svn_string_t *
+encrypt_data(const svn_string_t *orig,
+ apr_pool_t *pool)
+{
+  DATA_BLOB blobin;
+  DATA_BLOB blobout;
+  const svn_string_t *crypted = NULL;
+
+  blobin.cbData = orig-len;
+  blobin.pbData = (BYTE *)orig-data;
+  if (CryptProtectData(blobin, description, NULL, NULL, NULL,
+   CRYPTPROTECT_UI_FORBIDDEN, blobout))
+{
+  crypted = svn_string_ncreate(blobout.pbData, blobout.cbData, pool);
+  LocalFree(blobout.pbData);
+}
+  return crypted;
+}
+
+/* Return a copy of CRYPTED, decrypted using the Windows CryptoAPI and
+   allocated from POOL. */
+const svn_string_t *
+decrypt_data(const svn_string_t *crypted,
+ apr_pool_t *pool)
+{
+  DATA_BLOB blobin;
+  DATA_BLOB blobout;
+  LPWSTR descr;
+  const svn_string_t *orig = NULL;
+
+  blobin.cbData = crypted-len;
+  blobin.pbData = (BYTE *)crypted-data;
+  if (CryptUnprotectData(blobin, descr, NULL, NULL, NULL,
+ CRYPTPROTECT_UI_FORBIDDEN, blobout))
+{
+  if (0 == lstrcmpW(descr, description))
+orig = svn_string_ncreate(blobout.pbData, blobout.cbData, pool);
+  LocalFree(blobout.pbData);
+  LocalFree(descr);
+}
+  return orig;
+}
+
+
+/*---*/
+/* Windows simple provider, encrypts the password on Win2k and later.*/
+/*---*/
+
 /* Implementation of svn_auth__password_set_t that encrypts
the incoming password using the Windows CryptoAPI. */
 static svn_error_t *
@@ -62,22 +111,15 @@ windows_password_encrypter(svn_boolean_t
svn_boolean_t non_interactive,
apr_pool_t *pool)
 {
-  DATA_BLOB blobin;
-  DATA_BLOB blobout;
-  svn_boolean_t crypted;
+  const svn_string_t *coded;
 
-  blobin.cbData = strlen(in);
-  blobin.pbData = (BYTE*) in;
-  crypted = CryptProtectData(blobin, description, NULL, NULL, NULL,
- CRYPTPROTECT_UI_FORBIDDEN, blobout);
-  if (crypted)
+  coded = encrypt_data(svn_string_create(in, pool), pool);
+  if (coded)
 {
-  char *coded = apr_palloc(pool, apr_base64_encode_len(blobout.cbData));
-  apr_base64_encode(coded, (const char*)blobout.pbData, blobout.cbData);
+  coded = svn_base64_encode_string2(coded, FALSE, pool);
   SVN_ERR(svn_auth__simple_password_set(done, creds, realmstring, username,
-coded, parameters,
+coded-data, parameters,
 non_interactive, pool));
-  LocalFree(blobout.pbData);
 }
 
   return SVN_NO_ERROR;
@@ -96,33 +138,25 @@ windows_password_decrypter(svn_boolean_t
svn_boolean_t non_interactive,
apr_pool_t *pool)
 {
-  DATA_BLOB blobin;
-  DATA_BLOB blobout;
-  LPWSTR descr;
-  svn_boolean_t decrypted;
-  char *in;
+  const svn_string_t *orig;
+  const char *in;
 
   SVN_ERR(svn_auth__simple_password_get(done, in, creds, realmstring, 
username,
 parameters, non_interactive, pool));
   if (!done)
 return SVN_NO_ERROR;
 
-  blobin.cbData = strlen(in);
-  blobin.pbData = apr_palloc(pool, apr_base64_decode_len(in));
-  apr_base64_decode((char*)blobin.pbData, in);
-  decrypted = CryptUnprotectData(blobin, descr, NULL, NULL, NULL,
- CRYPTPROTECT_UI_FORBIDDEN, blobout);
-  if (decrypted)
+  orig = 

svn commit: r1310047 - /subversion/trunk/subversion/libsvn_ra/compat.c

2012-04-05 Thread hwright
Author: hwright
Date: Thu Apr  5 20:15:41 2012
New Revision: 1310047

URL: http://svn.apache.org/viewvc?rev=1310047view=rev
Log:
* subversion/libsvn_ra/compat.c
  (prev_log_path): Another integer-width mismatch fix.

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

Modified: subversion/trunk/subversion/libsvn_ra/compat.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra/compat.c?rev=1310047r1=1310046r2=1310047view=diff
==
--- subversion/trunk/subversion/libsvn_ra/compat.c (original)
+++ subversion/trunk/subversion/libsvn_ra/compat.c Thu Apr  5 20:15:41 2012
@@ -141,7 +141,7 @@ prev_log_path(const char **prev_path_p,
   svn_sort__item_t item = APR_ARRAY_IDX(paths,
 i - 1, svn_sort__item_t);
   const char *ch_path = item.key;
-  int len = strlen(ch_path);
+  size_t len = strlen(ch_path);
 
   /* See if our path is the child of this change path.  If
  not, keep looking.  */




svn commit: r1310085 - in /subversion/branches/ev2-export/subversion: include/svn_ra.h libsvn_client/add.c libsvn_ra/ra_loader.c

2012-04-05 Thread hwright
Author: hwright
Date: Thu Apr  5 21:45:42 2012
New Revision: 1310085

URL: http://svn.apache.org/viewvc?rev=1310085view=rev
Log:
On the ev2-export branch:
(this branch is going way beyond export, perhaps it should be renamed)

Add svn_ra_get_commit_editor4(), which returns an Ev2 commit editor.  We
don't currently marshall Ev2 actions across the wire, this just wraps the
Ev1 editor within the RA layer.

* subversion/include/svn_ra.h
  (svn_ra_get_commit_editor4): New.
  (svn_ra_get_commit_editor3): Deprecate.

* subversion/libsvn_client/add.c
  (drive_editor): Take an Ev2 editor, and drive it directly, rather than
wrapping an Ev1 editor.
  (mkdir_urls): Request an Ev2 editor from the RA layer.
 
* subversion/libsvn_ra/ra_loader.c
  (svn_ra_get_commit_editor4): New.

Modified:
subversion/branches/ev2-export/subversion/include/svn_ra.h
subversion/branches/ev2-export/subversion/libsvn_client/add.c
subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c

Modified: subversion/branches/ev2-export/subversion/include/svn_ra.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_ra.h?rev=1310085r1=1310084r2=1310085view=diff
==
--- subversion/branches/ev2-export/subversion/include/svn_ra.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_ra.h Thu Apr  5 
21:45:42 2012
@@ -865,8 +865,28 @@ svn_ra_rev_prop(svn_ra_session_t *sessio
  *
  * Use @a pool for memory allocation.
  *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_ra_get_commit_editor4(svn_ra_session_t *session,
+  svn_editor_t **editor,
+  apr_hash_t *revprop_table,
+  svn_commit_callback2_t callback,
+  void *callback_baton,
+  apr_hash_t *lock_tokens,
+  svn_boolean_t keep_locks,
+  svn_cancel_func_t cancel_func,
+  void *cancel_baton,
+  apr_pool_t *scratch_pool,
+  apr_pool_t *result_pool);
+
+/**
+ * Same as svn_ra_get_commit_editor4(), but returns a #svn_delta_editor_t.
+ *
  * @since New in 1.5.
+ * @deprecated Provided for backward compatibility with the 1.7 API.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_ra_get_commit_editor3(svn_ra_session_t *session,
   const svn_delta_editor_t **editor,

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=1310085r1=1310084r2=1310085view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_client/add.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/add.c Thu Apr  5 
21:45:42 2012
@@ -740,35 +740,16 @@ add_url_parents(svn_ra_session_t *ra_ses
 }
 
 static svn_error_t *
-drive_editor(const svn_delta_editor_t *deditor,
- void *dedit_baton,
+drive_editor(svn_editor_t *editor,
  apr_array_header_t *targets,
  apr_hash_t *children_hash,
- svn_cancel_func_t cancel_func,
- void *cancel_baton,
  apr_pool_t *scratch_pool)
 {
-  svn_editor_t *editor;
-  struct svn_delta__extra_baton *exb;
-  svn_delta_unlock_func_t unlock_func;
-  void *unlock_baton;
-  svn_boolean_t send_abs_paths;
   apr_hash_t *empty_props = apr_hash_make(scratch_pool);
   apr_pool_t *iterpool;
   svn_error_t *err;
   int i;
 
-  /* Create the Ev2 editor from the Ev1 editor provided by the RA layer. */
-  SVN_ERR(svn_delta__editor_from_delta(editor, exb,
-   unlock_func, unlock_baton,
-   deditor, dedit_baton, send_abs_paths,
-   cancel_func, cancel_baton,
-   NULL, NULL, NULL, NULL,
-   scratch_pool, scratch_pool));
-
-  if (exb-start_edit)
-SVN_ERR(exb-start_edit(exb-baton, SVN_INVALID_REVNUM));
-
   iterpool = svn_pool_create(scratch_pool);
   for (i = 0; i  targets-nelts; i++)
 {
@@ -811,8 +792,7 @@ mkdir_urls(const apr_array_header_t *url
apr_pool_t *pool)
 {
   svn_ra_session_t *ra_session = NULL;
-  const svn_delta_editor_t *editor;
-  void *edit_baton;
+  svn_editor_t *editor;
   const char *log_msg;
   apr_array_header_t *targets;
   apr_hash_t *targets_hash;
@@ -969,16 +949,15 @@ mkdir_urls(const apr_array_header_t *url
   SVN_ERR(svn_ra__register_editor_shim_callbacks(ra_session,
 svn_client__get_shim_callbacks(ctx-wc_ctx,
NULL, pool)));
-  SVN_ERR(svn_ra_get_commit_editor3(ra_session, editor, edit_baton,
+  SVN_ERR(svn_ra_get_commit_editor4(ra_session, editor,