You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2011/07/20 01:06:07 UTC

svn commit: r1148581 [7/12] - in /subversion/branches/gpg-agent-password-store: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ contrib/hook-scripts/ contrib/hook-scripts/enforcer/ contrib/server-side/ contrib/server-side/fsfsfix...

Propchange: subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/hash.c
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Jul 19 23:05:44 2011
@@ -0,0 +1,56 @@
+/subversion/branches/1.5.x-r30215/subversion/libsvn_subr/hash.c:870312
+/subversion/branches/atomic-revprop/subversion/libsvn_subr/hash.c:965046-1000689
+/subversion/branches/bdb-reverse-deltas/subversion/libsvn_subr/hash.c:872050-872529
+/subversion/branches/diff-callbacks3/subversion/libsvn_subr/hash.c:870059-870761
+/subversion/branches/diff-optimizations/subversion/libsvn_subr/hash.c:1031270-1037352
+/subversion/branches/diff-optimizations-bytes/subversion/libsvn_subr/hash.c:1037353-1067789
+/subversion/branches/dont-save-plaintext-passwords-by-default/subversion/libsvn_subr/hash.c:870728-871118
+/subversion/branches/double-delete/subversion/libsvn_subr/hash.c:870511-872970
+/subversion/branches/explore-wc/subversion/libsvn_subr/hash.c: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/subversion/libsvn_subr/hash.c:871779-873302
+/subversion/branches/fs-rep-sharing/subversion/libsvn_subr/hash.c:869036-873803
+/subversion/branches/fsfs-pack/subversion/libsvn_subr/hash.c:873717-874575
+/subversion/branches/gnome-keyring/subversion/libsvn_subr/hash.c:870558-871410
+/subversion/branches/http-protocol-v2/subversion/libsvn_subr/hash.c:874395-876041
+/subversion/branches/in-memory-cache/subversion/libsvn_subr/hash.c:869829-871452
+/subversion/branches/integrate-cache-item-serialization/subversion/libsvn_subr/hash.c:1068724-1068739
+/subversion/branches/integrate-cache-membuffer/subversion/libsvn_subr/hash.c:998649-998852
+/subversion/branches/integrate-compression-level/subversion/libsvn_subr/hash.c:1068651-1072287
+/subversion/branches/integrate-io-improvements/subversion/libsvn_subr/hash.c:1068684-1072297
+/subversion/branches/integrate-is-cachable/subversion/libsvn_subr/hash.c:1072568-1074082
+/subversion/branches/integrate-partial-getter/subversion/libsvn_subr/hash.c:1072558-1076552
+/subversion/branches/integrate-readline-speedup/subversion/libsvn_subr/hash.c:1072553-1072555
+/subversion/branches/integrate-stream-api-extensions/subversion/libsvn_subr/hash.c:1068695-1072516
+/subversion/branches/integrate-txdelta-caching/subversion/libsvn_subr/hash.c:1072541-1078213
+/subversion/branches/issue-2779-dev/subversion/libsvn_subr/hash.c:965496-984198
+/subversion/branches/issue-2843-dev/subversion/libsvn_subr/hash.c:871432-874179
+/subversion/branches/issue-3000/subversion/libsvn_subr/hash.c:871713,871716-871719,871721-871726,871728,871734
+/subversion/branches/issue-3067-deleted-subtrees/subversion/libsvn_subr/hash.c:873375-874084
+/subversion/branches/issue-3148-dev/subversion/libsvn_subr/hash.c:875193-875204
+/subversion/branches/issue-3220-dev/subversion/libsvn_subr/hash.c:872210-872226
+/subversion/branches/issue-3242-dev/subversion/libsvn_subr/hash.c:879653-896436
+/subversion/branches/issue-3334-dirs/subversion/libsvn_subr/hash.c:875156-875867
+/subversion/branches/issue-3668-3669/subversion/libsvn_subr/hash.c:1031000-1035744
+/subversion/branches/kwallet/subversion/libsvn_subr/hash.c:870785-871314
+/subversion/branches/log-g-performance/subversion/libsvn_subr/hash.c:870941-871032
+/subversion/branches/merge-skips-obstructions/subversion/libsvn_subr/hash.c:874525-874615
+/subversion/branches/nfc-nfd-aware-client/subversion/libsvn_subr/hash.c:870276,870376
+/subversion/branches/performance/subversion/libsvn_subr/hash.c:979193,980118,981087,981090,981189,981194,981287,981684,981827,982043,982355,983398,983406,983430,983474,983488,983490,983760,983764,983766,983770,984927,984973,984984,985014,985037,985046,985472,985477,985482,985487-985488,985493,985497,985500,985514,985601,985603,985606,985669,985695,986453,986465,986485,986491-986492,986517,986521,986605,986608,986817,986832,987865,987868-987869,987872,987886-987888,987893,988319,988898,990330,990533,990535-990537,990541,990568,990572,990574-990575,990600,990759,992899,992904,992911,993127,993141,994956,995478,995507,995603,998012,998858,999098,1001413,1001417,1004291,1022668,1022670,1022676,1022715,1022719,1025660,1025672,1027193,1027203,1027206,1027214,1027227,1028077,1028092,1028094,1028104,1028107,1028111,1028354,1029038,1029042-1029043,1029054-1029055,1029062-1029063,1029078,1029080,1029090,1029092-1029093,1029111,1029151,1029158,1029229-1029230,1029232,1029335-1029336,10
 29339-1029340,1029342,1029344,1030763,1030827,1031203,1031235,1032285,1032333,1033040,1033057,1033294,1035869,1035882,1039511,1043705,1053735,1056015,1066452,1067683,1067697-1078365
+/subversion/branches/py-tests-as-modules/subversion/libsvn_subr/hash.c:956579-1033052
+/subversion/branches/ra_serf-digest-authn/subversion/libsvn_subr/hash.c:875693-876404
+/subversion/branches/reintegrate-improvements/subversion/libsvn_subr/hash.c:873853-874164
+/subversion/branches/revprop-packing/subversion/libsvn_subr/hash.c:1143907,1143971,1143997,1144017,1144499,1144565,1144568,1146145
+/subversion/branches/subtree-mergeinfo/subversion/libsvn_subr/hash.c:876734-878766
+/subversion/branches/svn-mergeinfo-enhancements/subversion/libsvn_subr/hash.c:870119-870195,870197-870288
+/subversion/branches/svn-patch-improvements/subversion/libsvn_subr/hash.c:918519-934609
+/subversion/branches/svnpatch-diff/subversion/libsvn_subr/hash.c:865738-876477
+/subversion/branches/svnraisetc/subversion/libsvn_subr/hash.c:874709-875149
+/subversion/branches/svnserve-logging/subversion/libsvn_subr/hash.c:869828-870893
+/subversion/branches/tc-issue-3334/subversion/libsvn_subr/hash.c:874697-874773
+/subversion/branches/tc-merge-notify/subversion/libsvn_subr/hash.c:874017-874062
+/subversion/branches/tc-resolve/subversion/libsvn_subr/hash.c:874191-874239
+/subversion/branches/tc_url_rev/subversion/libsvn_subr/hash.c:874351-874483
+/subversion/branches/tree-conflicts/subversion/libsvn_subr/hash.c:868291-873154
+/subversion/branches/tree-conflicts-notify/subversion/libsvn_subr/hash.c:873926-874008
+/subversion/branches/uris-as-urls/subversion/libsvn_subr/hash.c:1060426-1064427
+/subversion/trunk/subversion/libsvn_subr/hash.c:1005036-1148548

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/io.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/io.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/io.c Tue Jul 19 23:05:44 2011
@@ -2252,7 +2252,7 @@ svn_io_get_dir_filenames(apr_hash_t **di
                          apr_pool_t *pool)
 {
   return svn_error_trace(svn_io_get_dirents3(dirents, path, TRUE,
-                                              pool, pool));
+                                             pool, pool));
 }
 
 svn_io_dirent2_t *
@@ -4014,8 +4014,8 @@ temp_file_create(apr_file_t **new_file,
 
   /* Translate the returned path back to utf-8 before returning it */
   return svn_error_trace(svn_path_cstring_to_utf8(new_file_name,
-                                                   templ_apr,
-                                                   result_pool));
+                                                  templ_apr,
+                                                  result_pool));
 #else
   /* The Windows implementation of apr_file_mktemp doesn't handle access
      denied errors correctly. Therefore we implement our own temp file

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/magic.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/magic.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/magic.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/magic.c Tue Jul 19 23:05:44 2011
@@ -122,35 +122,35 @@ svn_magic__detect_binary_mimetype(const 
           if (strncmp(magic_mimetype, "text/", 5) == 0)
             magic_mimetype = NULL;
           else
-           {
-             svn_error_t *err;
+            {
+              svn_error_t *err;
 #ifndef MAGIC_MIME_TYPE
-             char *p;
+              char *p;
 
-             /* Strip off trailing stuff like " charset=ascii". */
-             p = strchr(magic_mimetype, ' ');
-             if (p)
-              *p = '\0';
+              /* Strip off trailing stuff like " charset=ascii". */
+              p = strchr(magic_mimetype, ' ');
+              if (p)
+                *p = '\0';
 #endif
-            /* Make sure we got a valid mime type. */
-            err = svn_mime_type_validate(magic_mimetype, scratch_pool);
-            if (err)
-              {
-                if (err->apr_err == SVN_ERR_BAD_MIME_TYPE)
-                  {
-                    svn_error_clear(err);
-                    magic_mimetype = NULL;
-                  }
-                else
-                  return svn_error_trace(err);
-              }
-            else
-              {
-                /* The string is allocated from memory managed by libmagic
-                 * so we must copy it to the result pool. */
-                magic_mimetype = apr_pstrdup(result_pool, magic_mimetype);
-              }
-           }
+              /* Make sure we got a valid mime type. */
+              err = svn_mime_type_validate(magic_mimetype, scratch_pool);
+              if (err)
+                {
+                  if (err->apr_err == SVN_ERR_BAD_MIME_TYPE)
+                    {
+                      svn_error_clear(err);
+                      magic_mimetype = NULL;
+                    }
+                  else
+                    return svn_error_trace(err);
+                }
+              else
+                {
+                  /* The string is allocated from memory managed by libmagic
+                   * so we must copy it to the result pool. */
+                  magic_mimetype = apr_pstrdup(result_pool, magic_mimetype);
+                }
+            }
         }
     }
 #endif

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/mergeinfo.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/mergeinfo.c Tue Jul 19 23:05:44 2011
@@ -371,7 +371,6 @@ combine_with_lastrange(const svn_merge_r
                       svn_merge_range_t *r2 = svn_merge_range_dup(new_range,
                                                                   result_pool);
                       svn_merge_range_t *r3 = NULL;
-                      svn_revnum_t tmp_revnum;
 
                       /* Pop off *LASTRANGE to make our manipulations
                          easier. */
@@ -395,6 +394,8 @@ combine_with_lastrange(const svn_merge_r
                         }
                       else if (r1->start == r2->start)
                         {
+                          svn_revnum_t tmp_revnum;
+
                           /* *LASTRANGE and NEW_RANGE share an end point. */
                           tmp_revnum = r1->end;
                           r1->end = r2->end;

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/simple_providers.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/simple_providers.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/simple_providers.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/simple_providers.c Tue Jul 19 23:05:44 2011
@@ -161,7 +161,6 @@ svn_auth__simple_first_creds_helper(void
   apr_hash_t *creds_hash = NULL;
   svn_error_t *err;
   svn_string_t *str;
-  svn_boolean_t have_passtype = FALSE;
 
   /* Try to load credentials from a file on disk, based on the
      realmstring.  Don't throw an error, though: if something went
@@ -178,6 +177,8 @@ svn_auth__simple_first_creds_helper(void
   else if (creds_hash)
     {
       /* We have something in the auth cache for this realm. */
+      svn_boolean_t have_passtype = FALSE;
+
       /* The password type in the auth data must match the
          mangler's type, otherwise the password must be
          interpreted by another provider. */

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/sqlite.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/sqlite.c Tue Jul 19 23:05:44 2011
@@ -133,13 +133,18 @@ struct svn_sqlite__value_t
 } while (0)
 
 
+/* Convenience wrapper around exec_sql2(). */
+#define exec_sql(db, sql) exec_sql2((db), (sql), SQLITE_OK)
+
+/* Run the statement SQL on DB, ignoring SQLITE_OK and IGNORED_ERR.
+   (Note: the IGNORED_ERR parameter itself is not ignored.) */
 static svn_error_t *
-exec_sql(svn_sqlite__db_t *db, const char *sql)
+exec_sql2(svn_sqlite__db_t *db, const char *sql, int ignored_err)
 {
   char *err_msg;
   int sqlite_err = sqlite3_exec(db->db3, sql, NULL, NULL, &err_msg);
 
-  if (sqlite_err != SQLITE_OK)
+  if (sqlite_err != SQLITE_OK && sqlite_err != ignored_err)
     {
       svn_error_t *err = svn_error_createf(SQLITE_ERROR_CODE(sqlite_err), NULL,
                                            _("%s, executing statement '%s'"),
@@ -418,9 +423,9 @@ svn_sqlite__bind_properties(svn_sqlite__
                                      scratch_pool));
   properties = svn_skel__unparse(skel, scratch_pool);
   return svn_error_trace(svn_sqlite__bind_blob(stmt,
-                                                slot,
-                                                properties->data,
-                                                properties->len));
+                                               slot,
+                                               properties->data,
+                                               properties->len));
 }
 
 svn_error_t *
@@ -718,7 +723,7 @@ check_format(svn_sqlite__db_t *db,
       ub.upgrade_sql = upgrade_sql;
 
       return svn_error_trace(svn_sqlite__with_transaction(
-                                db, upgrade_format, &ub, scratch_pool));
+                               db, upgrade_format, &ub, scratch_pool));
     }
 
   return svn_error_createf(SVN_ERR_SQLITE_UNSUPPORTED_SCHEMA, NULL,
@@ -909,8 +914,28 @@ svn_sqlite__open(svn_sqlite__db_t **db, 
   sqlite3_profile((*db)->db3, sqlite_profiler, (*db)->db3);
 #endif
 
+  /* Work around a bug in SQLite 3.7.7.  The bug was fixed in SQLite 3.7.7.1.
+
+     See:
+
+       Date: Sun, 26 Jun 2011 18:52:14 -0400
+       From: Richard Hipp <dr...@sqlite.org>
+       To: General Discussion of SQLite Database <sq...@sqlite.org>
+       Cc: dev@subversion.apache.org
+       Subject: Re: [sqlite] PRAGMA bug in 3.7.7 (but fine in 3.7.6.3)
+       Message-ID: <BA...@mail.gmail.com>
+   */
+  {
+    int ignored_err = SQLITE_OK;
+#if !SQLITE_VERSION_AT_LEAST(3,7,8) && defined(SQLITE_SCHEMA)
+    if (!strcmp(sqlite3_libversion(), "3.7.7"))
+      ignored_err = SQLITE_SCHEMA;
+#endif
+
+    SVN_ERR(exec_sql2(*db, "PRAGMA case_sensitive_like=1;", ignored_err));
+  }
+
   SVN_ERR(exec_sql(*db,
-              "PRAGMA case_sensitive_like=1;"
               /* Disable synchronization to disable the explicit disk flushes
                  that make Sqlite up to 50 times slower; especially on small
                  transactions.
@@ -1059,7 +1084,7 @@ svn_sqlite__with_transaction(svn_sqlite_
 {
   SVN_ERR(exec_sql(db, "BEGIN TRANSACTION;"));
   return svn_error_trace(with_transaction(db, cb_func, cb_baton,
-                                           scratch_pool));
+                                          scratch_pool));
 }
 
 svn_error_t *
@@ -1071,7 +1096,7 @@ svn_sqlite__with_immediate_transaction(
 {
   SVN_ERR(exec_sql(db, "BEGIN IMMEDIATE TRANSACTION;"));
   return svn_error_trace(with_transaction(db, cb_func, cb_baton,
-                                           scratch_pool));
+                                          scratch_pool));
 }
 
 svn_error_t *

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/stream.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/stream.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/stream.c Tue Jul 19 23:05:44 2011
@@ -462,7 +462,7 @@ svn_stream_readline(svn_stream_t *stream
                     apr_pool_t *pool)
 {
   return svn_error_trace(stream_readline(stringbuf, eof, eol, stream,
-                                          pool));
+                                         pool));
 }
 
 svn_error_t *svn_stream_copy3(svn_stream_t *from, svn_stream_t *to,

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/subst.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/subst.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/subst.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/subst.c Tue Jul 19 23:05:44 2011
@@ -1701,14 +1701,14 @@ svn_subst_copy_and_translate4(const char
             }
 
           return svn_error_trace(create_special_file_from_stream(src_stream,
-                                                                  dst, pool));
+                                                                 dst, pool));
         }
       /* else !expand */
 
       return svn_error_trace(detranslate_special_file(src, dst,
-                                                       cancel_func,
-                                                       cancel_baton,
-                                                       pool));
+                                                      cancel_func,
+                                                      cancel_baton,
+                                                      pool));
     }
 
   /* The easy way out:  no translation needed, just copy. */

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/svn_base64.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/svn_base64.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/svn_base64.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/svn_base64.c Tue Jul 19 23:05:44 2011
@@ -33,12 +33,21 @@
 #include "svn_io.h"
 #include "svn_error.h"
 #include "svn_base64.h"
+#include "private/svn_string_private.h"
 
-
+/* When asked to format the the base64-encoded output as multiple lines,
+   we put this many chars in each line (plus one new line char) unless
+   we run out of data.
+   It is vital for some of the optimizations below that this value is
+   a multiple of 4. */
 #define BASE64_LINELEN 76
-static const char base64tab[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-                                "abcdefghijklmnopqrstuvwxyz0123456789+/";
 
+/* This number of bytes is encoded in a line of base64 chars. */
+#define BYTES_PER_LINE (BASE64_LINELEN / 4 * 3)
+
+/* Value -> base64 char mapping table (2^6 entries) */
+static const char base64tab[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \
+                                "abcdefghijklmnopqrstuvwxyz0123456789+/";
 
 
 /* Binary input --> base64-encoded output */
@@ -59,19 +68,55 @@ struct encode_baton {
 static APR_INLINE void
 encode_group(const unsigned char *in, char *out)
 {
-  out[0] = base64tab[in[0] >> 2];
-  out[1] = base64tab[((in[0] & 0x3) << 4) | (in[1] >> 4)];
-  out[2] = base64tab[((in[1] & 0xf) << 2) | (in[2] >> 6)];
-  out[3] = base64tab[in[2] & 0x3f];
-}
-
+  /* Expand input bytes to machine word length (with zero extra cost
+     on x86/x64) ... */
+  apr_size_t part0 = in[0];
+  apr_size_t part1 = in[1];
+  apr_size_t part2 = in[2];
+
+  /* ... to prevent these arithmetic operations from being limited to
+     byte size.  This saves non-zero cost conversions of the result when
+     calculating the addresses within base64tab. */
+  out[0] = base64tab[part0 >> 2];
+  out[1] = base64tab[((part0 & 3) << 4) | (part1 >> 4)];
+  out[2] = base64tab[((part1 & 0xf) << 2) | (part2 >> 6)];
+  out[3] = base64tab[part2 & 0x3f];
+}
+
+/* Base64-encode a line, i.e. BYTES_PER_LINE bytes from DATA into
+   BASE64_LINELEN chars and append it to STR.  It does not assume that
+   a new line char will be appended, though.
+   The code in this function will simply transform the data without
+   performing any boundary checks.  Therefore, DATA must have at least
+   BYTES_PER_LINE left and space for at least another BASE64_LINELEN
+   chars must have been pre-allocated in STR before calling this
+   function. */
+static void
+encode_line(svn_stringbuf_t *str, const char *data)
+{
+  /* Translate directly from DATA to STR->DATA. */
+  const unsigned char *in = (const unsigned char *)data;
+  char *out = str->data + str->len;
+  char *end = out + BASE64_LINELEN;
+
+  /* We assume that BYTES_PER_LINE is a multiple of 3 and BASE64_LINELEN
+     a multiple of 4. */
+  for ( ; out != end; in += 3, out += 4)
+    encode_group(in, out);
+
+  /* Expand and terminate the string. */
+  *out = '\0';
+  str->len += BASE64_LINELEN;
+}
+
+/* (Continue to) Base64-encode the byte string DATA (of length LEN)
+   into STR. Include newlines every so often if BREAK_LINES is true.
+   INBUF, INBUFLEN, and LINELEN are used internally; the caller shall
+   make INBUF have room for three characters and initialize *INBUFLEN
+   and *LINELEN to 0.
 
-/* Base64-encode a byte string which may or may not be the totality of
-   the data being encoded.  INBUF and *INBUFLEN carry the leftover
-   data from call to call, and *LINELEN carries the length of the
-   current output line.  Make INBUF have room for three characters and
-   initialize *INBUFLEN and *LINELEN to 0.  Output will be appended to
-   STR.  Include newlines every so often if BREAK_LINES is true. */
+   INBUF and *INBUFLEN carry the leftover data from call to call, and
+   *LINELEN carries the length of the current output line. */
 static void
 encode_bytes(svn_stringbuf_t *str, const void *data, apr_size_t len,
              unsigned char *inbuf, size_t *inbuflen, size_t *linelen,
@@ -82,24 +127,45 @@ encode_bytes(svn_stringbuf_t *str, const
   apr_size_t buflen;
 
   /* Resize the stringbuf to make room for the (approximate) size of
-     output, to avoid repeated resizes later. */
+     output, to avoid repeated resizes later.
+     Please note that our optimized code relies on the fact that STR
+     never needs to be resized until we leave this function. */
   buflen = len * 4 / 3 + 4;
   if (break_lines)
     {
       /* Add an extra space for line breaks. */
-      buflen = buflen + buflen / BASE64_LINELEN;
+      buflen += buflen / BASE64_LINELEN;
     }
-  svn_stringbuf_ensure(str, buflen);
+  svn_stringbuf_ensure(str, str->len + buflen);
 
   /* Keep encoding three-byte groups until we run out.  */
   while (*inbuflen + (end - p) >= 3)
     {
-      memcpy(inbuf + *inbuflen, p, 3 - *inbuflen);
-      p += (3 - *inbuflen);
-      encode_group(inbuf, group);
-      svn_stringbuf_appendbytes(str, group, 4);
-      *inbuflen = 0;
-      *linelen += 4;
+      /* May we encode BYTES_PER_LINE bytes without caring about
+         line breaks, data in the temporary INBUF or running out
+         of data? */
+      if (   *inbuflen == 0
+          && (*linelen == 0 || !break_lines)
+          && (end - p >= BYTES_PER_LINE))
+        {
+          /* Yes, we can encode a whole chunk of data at once. */
+          encode_line(str, p);
+          p += BYTES_PER_LINE;
+          *linelen += BASE64_LINELEN;
+        }
+      else
+        {
+          /* No, this is one of a number of special cases.
+             Encode the data byte by byte. */
+          memcpy(inbuf + *inbuflen, p, 3 - *inbuflen);
+          p += (3 - *inbuflen);
+          encode_group(inbuf, group);
+          svn_stringbuf_appendbytes(str, group, 4);
+          *inbuflen = 0;
+          *linelen += 4;
+        }
+
+      /* Add line breaks as necessary. */
       if (break_lines && *linelen == BASE64_LINELEN)
         {
           svn_stringbuf_appendbyte(str, '\n');
@@ -202,7 +268,6 @@ svn_base64_encode_string2(const svn_stri
                           apr_pool_t *pool)
 {
   svn_stringbuf_t *encoded = svn_stringbuf_create("", pool);
-  svn_string_t *retval = apr_pcalloc(pool, sizeof(*retval));
   unsigned char ingroup[3];
   size_t ingrouplen = 0;
   size_t linelen = 0;
@@ -211,9 +276,7 @@ svn_base64_encode_string2(const svn_stri
                break_lines);
   encode_partial_group(encoded, ingroup, ingrouplen, linelen,
                        break_lines);
-  retval->data = encoded->data;
-  retval->len = encoded->len;
-  return retval;
+  return svn_stringbuf__morph_into_string(encoded);
 }
 
 const svn_string_t *
@@ -238,7 +301,7 @@ struct decode_baton {
 /* Base64-decode a group.  IN needs to have four bytes and OUT needs
    to have room for three bytes.  The input bytes must already have
    been decoded from base64tab into the range 0..63.  The four
-   six-byte values are pasted together to form three eight-bit bytes.  */
+   six-bit values are pasted together to form three eight-bit bytes.  */
 static APR_INLINE void
 decode_group(const unsigned char *in, char *out)
 {
@@ -269,26 +332,96 @@ static const signed char reverse_base64[
 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
 };
 
-/* Decode a byte string which may or may not be the total amount of
-   data being decoded.  INBUF and *INBUFLEN carry the leftover bytes
-   from call to call, and *DONE keeps track of whether we've seen an
-   '=' which terminates the encoded data.  Have room for four bytes in
-   INBUF and initialize *INBUFLEN to 0 and *DONE to FALSE.  Output
-   will be appended to STR.  */
+/* Similar to decode_group but this function also translates the
+   6-bit values from the IN buffer before translating them.
+   Return FALSE if a non-base64 char (e.g. '=' or new line)
+   has been encountered. */
+static APR_INLINE svn_boolean_t
+decode_group_directly(const unsigned char *in, char *out)
+{
+  /* Translate the base64 chars in values [0..63, 0xff] */
+  apr_size_t part0 = (unsigned char)reverse_base64[(unsigned char)in[0]];
+  apr_size_t part1 = (unsigned char)reverse_base64[(unsigned char)in[1]];
+  apr_size_t part2 = (unsigned char)reverse_base64[(unsigned char)in[2]];
+  apr_size_t part3 = (unsigned char)reverse_base64[(unsigned char)in[3]];
+
+  /* Pack 4x6 bits into 3x8.*/
+  out[0] = (char)((part0 << 2) | (part1 >> 4));
+  out[1] = (char)(((part1 & 0xf) << 4) | (part2 >> 2));
+  out[2] = (char)(((part2 & 0x3) << 6) | part3);
+
+  /* FALSE, iff any part is 0xff. */
+  return (part0 | part1 | part2 | part3) != (unsigned char)(-1);
+}
+
+/* Base64-encode up to BASE64_LINELEN chars from *DATA and append it to
+   STR.  After the function returns, *DATA will point to the first char
+   that has not been translated, yet.  Returns TRUE if all BASE64_LINELEN
+   chars could be translated, i.e. no special char has been encountered
+   in between.
+   The code in this function will simply transform the data without
+   performing any boundary checks.  Therefore, DATA must have at least
+   BASE64_LINELEN left and space for at least another BYTES_PER_LINE
+   chars must have been pre-allocated in STR before calling this
+   function. */
+static svn_boolean_t
+decode_line(svn_stringbuf_t *str, const char **data)
+{
+  /* Decode up to BYTES_PER_LINE bytes directly from *DATA into STR->DATA. */
+  const unsigned char *p = *(const unsigned char **)data;
+  char *out = str->data + str->len;
+  char *end = out + BYTES_PER_LINE;
+
+  /* We assume that BYTES_PER_LINE is a multiple of 3 and BASE64_LINELEN
+     a multiple of 4.  Stop translation as soon as we encounter a special
+     char.  Leave the entire group untouched in that case. */
+  for (; out < end; p += 4, out += 3)
+    if (!decode_group_directly(p, out))
+      break;
+
+  /* Update string sizes and positions. */
+  str->len = out - str->data;
+  *out = '\0';
+  *data = (const char *)p;
+
+  /* Return FALSE, if the caller should continue the decoding process
+     using the slow standard method. */
+  return out == end;
+}
+
+
+/* (Continue to) Base64-decode the byte string DATA (of length LEN)
+   into STR. INBUF, INBUFLEN, and DONE are used internally; the
+   caller shall have room for four bytes in INBUF and initialize
+   *INBUFLEN to 0 and *DONE to FALSE.
+
+   INBUF and *INBUFLEN carry the leftover bytes from call to call, and
+   *DONE keeps track of whether we've seen an '=' which terminates the
+   encoded data. */
 static void
 decode_bytes(svn_stringbuf_t *str, const char *data, apr_size_t len,
              unsigned char *inbuf, int *inbuflen, svn_boolean_t *done)
 {
-  const char *p;
+  const char *p = data;
   char group[3];
   signed char find;
+  const char *end = data + len;
 
   /* Resize the stringbuf to make room for the (approximate) size of
-     output, to avoid repeated resizes later. */
-  svn_stringbuf_ensure(str, (len / 4) * 3 + 3);
+     output, to avoid repeated resizes later.
+     The optimizations in decode_line rely on no resizes being necessary! */
+  svn_stringbuf_ensure(str, str->len + (len / 4) * 3 + 3);
 
-  for (p = data; !*done && p < data + len; p++)
+  while ( !*done && p < end )
     {
+      /* If no data is left in temporary INBUF and there is at least
+         one line-sized chunk left to decode, we may use the optimized
+         code path. */
+      if ((*inbuflen == 0) && (p + BASE64_LINELEN <= end))
+        if (decode_line(str, &p))
+          continue;
+
+      /* A special case or decode_line encountered a special char. */
       if (*p == '=')
         {
           /* We are at the end and have to decode a partial group.  */
@@ -303,6 +436,8 @@ decode_bytes(svn_stringbuf_t *str, const
       else
         {
           find = reverse_base64[(unsigned char)*p];
+          ++p;
+
           if (find >= 0)
             inbuf[(*inbuflen)++] = find;
           if (*inbuflen == 4)
@@ -373,15 +508,12 @@ const svn_string_t *
 svn_base64_decode_string(const svn_string_t *str, apr_pool_t *pool)
 {
   svn_stringbuf_t *decoded = svn_stringbuf_create("", pool);
-  svn_string_t *retval = apr_pcalloc(pool, sizeof(*retval));
   unsigned char ingroup[4];
   int ingrouplen = 0;
   svn_boolean_t done = FALSE;
 
   decode_bytes(decoded, str->data, str->len, ingroup, &ingrouplen, &done);
-  retval->data = decoded->data;
-  retval->len = decoded->len;
-  return retval;
+  return svn_stringbuf__morph_into_string(decoded);
 }
 
 

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/svn_string.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/svn_string.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/svn_string.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/svn_string.c Tue Jul 19 23:05:44 2011
@@ -783,7 +783,7 @@ svn_error_t *
 svn_cstring_atoui64(apr_uint64_t *n, const char *str)
 {
   return svn_error_trace(svn_cstring_strtoui64(n, str, 0,
-                                                APR_UINT64_MAX, 10));
+                                               APR_UINT64_MAX, 10));
 }
 
 svn_error_t *
@@ -827,7 +827,7 @@ svn_error_t *
 svn_cstring_atoi64(apr_int64_t *n, const char *str)
 {
   return svn_error_trace(svn_cstring_strtoi64(n, str, APR_INT64_MIN,
-                                               APR_INT64_MAX, 10));
+                                              APR_INT64_MAX, 10));
 }
 
 svn_error_t *

Propchange: subversion/branches/gpg-agent-password-store/subversion/libsvn_subr/svn_temp_serializer.c
            ('svn:mergeinfo' removed)

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/adm_crawler.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/adm_crawler.c Tue Jul 19 23:05:44 2011
@@ -131,7 +131,9 @@ svn_wc_restore(svn_wc_context_t *wc_ctx,
   if (status != svn_wc__db_status_normal
       && status != svn_wc__db_status_copied
       && status != svn_wc__db_status_moved_here
-      && !(status == svn_wc__db_status_added && kind == svn_wc__db_kind_dir))
+      && !(kind == svn_wc__db_kind_dir
+           && (status == svn_wc__db_status_added
+               || status == svn_wc__db_status_incomplete)))
     {
       return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
                                _("The node '%s' can not be restored."),
@@ -192,12 +194,11 @@ restore_node(svn_wc__db_t *db,
 /* The recursive crawler that describes a mixed-revision working
    copy to an RA layer.  Used to initiate updates.
 
-   This is a depth-first recursive walk of DIR_ABSPATH using DB.  Look
-   at each entry and check if its revision is different than DIR_REV.
-   If so, report this fact to REPORTER.  If an entry is.  If a node has
-   a different URL than expected, report that to REPORTER.  If an
-   entry has a different depth than its parent, report that to
-   REPORTER.
+   This is a depth-first recursive walk of the children of DIR_ABSPATH
+   (not including DIR_ABSPATH itself) using DB.  Look at each node and
+   check if its revision is different than DIR_REV.  If so, report this
+   fact to REPORTER.  If a node has a different URL than expected, or
+   a different depth than its parent, report that to REPORTER.
 
    Report DIR_ABSPATH to the reporter as REPORT_RELPATH.
 
@@ -389,7 +390,10 @@ report_revisions_and_depths(svn_wc__db_t
 
           if (wrk_status == svn_wc__db_status_normal
               || wrk_status == svn_wc__db_status_copied
-              || wrk_status == svn_wc__db_status_moved_here)
+              || wrk_status == svn_wc__db_status_moved_here
+              || (wrk_kind == svn_wc__db_kind_dir
+                  && (wrk_status == svn_wc__db_status_added
+                      || wrk_status == svn_wc__db_status_incomplete)))
             {
               svn_node_kind_t dirent_kind;
 
@@ -495,6 +499,16 @@ report_revisions_and_depths(svn_wc__db_t
           is_incomplete = (ths->status == svn_wc__db_status_incomplete);
           start_empty = is_incomplete;
 
+          /* When a <= 1.6 working copy is upgraded without some of its
+             subdirectories we miss some information in the database. If we
+             report the revision as -1, the update editor will receive an
+             add_directory() while it still knows the directory.
+
+             This would raise strange tree conflicts and probably assertions
+             as it would a BASE vs BASE conflict */
+          if (is_incomplete && !SVN_IS_VALID_REVNUM(ths->revnum))
+            ths->revnum = dir_rev;
+
           if (depth_compatibility_trick
               && ths->depth <= svn_depth_files
               && depth > ths->depth)
@@ -636,9 +650,8 @@ svn_wc_crawl_revisions5(svn_wc_context_t
   svn_depth_t report_depth;
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
-  /* The first thing we do is get the base_rev from the working copy's
-     ROOT_DIRECTORY.  This is the first revnum that entries will be
-     compared to. */
+  /* Get the base rev, which is the first revnum that entries will be
+     compared to, and some other WC info about the target. */
   err = svn_wc__db_base_get_info(&status, &target_kind, &target_rev,
                                  &repos_relpath, &repos_root_url,
                                  NULL, NULL, NULL, NULL, &target_depth,
@@ -716,6 +729,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
         {
           svn_error_clear(err);
           wrk_status = svn_wc__db_status_not_present;
+          wrk_kind = svn_wc__db_kind_file;
         }
       else
         SVN_ERR(err);
@@ -728,7 +742,10 @@ svn_wc_crawl_revisions5(svn_wc_context_t
 
       if (wrk_status == svn_wc__db_status_normal
           || wrk_status == svn_wc__db_status_copied
-          || wrk_status == svn_wc__db_status_moved_here)
+          || wrk_status == svn_wc__db_status_moved_here
+          || (wrk_kind == svn_wc__db_kind_dir
+              && (wrk_status == svn_wc__db_status_added
+                  || wrk_status == svn_wc__db_status_incomplete)))
         {
           SVN_ERR(restore_node(wc_ctx->db, local_abspath,
                                wrk_kind, use_commit_times,

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/adm_files.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/adm_files.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/adm_files.c Tue Jul 19 23:05:44 2011
@@ -316,7 +316,7 @@ svn_wc__open_adm_stream(svn_stream_t **s
 
   local_abspath = svn_wc__adm_child(dir_abspath, fname, scratch_pool);
   return svn_error_trace(svn_stream_open_readonly(stream, local_abspath,
-                                                   result_pool, scratch_pool));
+                                                  result_pool, scratch_pool));
 }
 
 
@@ -450,8 +450,8 @@ svn_wc__internal_ensure_adm(svn_wc__db_t
      just create one. */
   if (format == 0)
     return svn_error_trace(init_adm(db, local_abspath,
-                                     repos_relpath, repos_root_url, repos_uuid,
-                                     revision, depth, scratch_pool));
+                                    repos_relpath, repos_root_url, repos_uuid,
+                                    revision, depth, scratch_pool));
 
   SVN_ERR(svn_wc__db_read_info(&status, NULL,
                                &db_revision, &db_repos_relpath,

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/adm_ops.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/adm_ops.c Tue Jul 19 23:05:44 2011
@@ -849,7 +849,6 @@ check_can_add_node(svn_node_kind_t *kind
   const char *base_name = svn_dirent_basename(local_abspath, scratch_pool);
   svn_boolean_t is_wc_root;
   svn_node_kind_t kind;
-  svn_boolean_t exists;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
   SVN_ERR_ASSERT(!copyfrom_url || (svn_uri_is_canonical(copyfrom_url,
@@ -886,6 +885,7 @@ check_can_add_node(svn_node_kind_t *kind
   {
     svn_wc__db_status_t status;
     svn_boolean_t conflicted;
+    svn_boolean_t exists;
     svn_error_t *err
       = svn_wc__db_read_info(&status, NULL, NULL, NULL, NULL, NULL, NULL,
                              NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -1289,7 +1289,7 @@ revert_restore(svn_wc__db_t *db,
   svn_wc__db_status_t status;
   svn_wc__db_kind_t kind;
   svn_node_kind_t on_disk;
-  svn_boolean_t special, notify_required;
+  svn_boolean_t notify_required;
   const char *conflict_old;
   const char *conflict_new;
   const char *conflict_working;
@@ -1297,6 +1297,9 @@ revert_restore(svn_wc__db_t *db,
   svn_filesize_t recorded_size;
   apr_time_t recorded_mod_time;
   apr_finfo_t finfo;
+#ifdef HAVE_SYMLINK
+  svn_boolean_t special;
+#endif
 
   if (cancel_func)
     SVN_ERR(cancel_func(cancel_baton));
@@ -1345,7 +1348,9 @@ revert_restore(svn_wc__db_t *db,
     {
       svn_error_clear(err);
       on_disk = svn_node_none;
+#ifdef HAVE_SYMLINK
       special = FALSE;
+#endif
     }
   else
     {
@@ -1356,7 +1361,9 @@ revert_restore(svn_wc__db_t *db,
       else
         on_disk = svn_node_unknown;
 
+#ifdef HAVE_SYMLINK
       special = (finfo.filetype == APR_LNK);
+#endif
     }
 
   /* If we expect a versioned item to be present then check that any
@@ -1385,15 +1392,17 @@ revert_restore(svn_wc__db_t *db,
           svn_boolean_t executable;
           svn_boolean_t read_only;
           apr_hash_t *props;
+#ifdef HAVE_SYMLINK
           svn_string_t *special_prop;
+#endif
 
           SVN_ERR(svn_wc__db_read_pristine_props(&props, db, local_abspath,
                                                  scratch_pool, scratch_pool));
 
+#ifdef HAVE_SYMLINK
           special_prop = apr_hash_get(props, SVN_PROP_SPECIAL,
                                       APR_HASH_KEY_STRING);
 
-#ifdef HAVE_SYMLINK
           if ((special_prop != NULL) != special)
             {
               /* File/symlink mismatch. */
@@ -1777,19 +1786,19 @@ svn_wc_revert4(svn_wc_context_t *wc_ctx,
       SVN_ERR(svn_hash_from_cstring_keys(&changelist_hash, changelist_filter,
                                          scratch_pool));
       return svn_error_trace(new_revert_changelist(wc_ctx->db, local_abspath,
-                                                    depth, use_commit_times,
-                                                    changelist_hash,
-                                                    cancel_func, cancel_baton,
-                                                    notify_func, notify_baton,
-                                                    scratch_pool));
+                                                   depth, use_commit_times,
+                                                   changelist_hash,
+                                                   cancel_func, cancel_baton,
+                                                   notify_func, notify_baton,
+                                                   scratch_pool));
     }
 
   if (depth == svn_depth_empty || depth == svn_depth_infinity)
     return svn_error_trace(new_revert_internal(wc_ctx->db, local_abspath,
-                                                depth, use_commit_times,
-                                                cancel_func, cancel_baton,
-                                                notify_func, notify_baton,
-                                                scratch_pool));
+                                               depth, use_commit_times,
+                                               cancel_func, cancel_baton,
+                                               notify_func, notify_baton,
+                                               scratch_pool));
 
   /* The user may expect svn_depth_files/svn_depth_immediates to work
      on copied dirs with one level of children.  It doesn't, the user
@@ -1799,10 +1808,10 @@ svn_wc_revert4(svn_wc_context_t *wc_ctx,
 
   if (depth == svn_depth_files || depth == svn_depth_immediates)
     return svn_error_trace(new_revert_partial(wc_ctx->db, local_abspath,
-                                               depth, use_commit_times,
-                                               cancel_func, cancel_baton,
-                                               notify_func, notify_baton,
-                                               scratch_pool));
+                                              depth, use_commit_times,
+                                              cancel_func, cancel_baton,
+                                              notify_func, notify_baton,
+                                              scratch_pool));
 
   /* Bogus depth. Tell the caller.  */
   return svn_error_create(SVN_ERR_WC_INVALID_OPERATION_DEPTH, NULL, NULL);
@@ -1863,10 +1872,10 @@ svn_wc_get_pristine_contents2(svn_stream
                               apr_pool_t *scratch_pool)
 {
   return svn_error_trace(svn_wc__get_pristine_contents(contents, NULL,
-                                                        wc_ctx->db,
-                                                        local_abspath,
-                                                        result_pool,
-                                                        scratch_pool));
+                                                       wc_ctx->db,
+                                                       local_abspath,
+                                                       result_pool,
+                                                       scratch_pool));
 }
 
 

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/conflicts.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/conflicts.c Tue Jul 19 23:05:44 2011
@@ -330,12 +330,12 @@ svn_wc__resolve_text_conflict(svn_wc__db
   svn_boolean_t ignored_result;
 
   return svn_error_trace(resolve_conflict_on_node(
-                            db, local_abspath,
-                            TRUE /* resolve_text */,
-                            FALSE /* resolve_props */,
-                            svn_wc_conflict_choose_merged,
-                            &ignored_result,
-                            scratch_pool));
+                           db, local_abspath,
+                           TRUE /* resolve_text */,
+                           FALSE /* resolve_props */,
+                           svn_wc_conflict_choose_merged,
+                           &ignored_result,
+                           scratch_pool));
 }
 
 
@@ -629,15 +629,15 @@ svn_wc_resolved_conflict5(svn_wc_context
     depth = svn_depth_infinity;
 
   return svn_error_trace(recursive_resolve_conflict(
-                            wc_ctx->db,
-                            local_abspath,
-                            conflicted,
-                            depth,
-                            resolve_text,
-                            resolve_prop,
-                            resolve_tree,
-                            conflict_choice,
-                            cancel_func, cancel_baton,
-                            notify_func, notify_baton,
-                            scratch_pool));
+                           wc_ctx->db,
+                           local_abspath,
+                           conflicted,
+                           depth,
+                           resolve_text,
+                           resolve_prop,
+                           resolve_tree,
+                           conflict_choice,
+                           cancel_func, cancel_baton,
+                           notify_func, notify_baton,
+                           scratch_pool));
 }

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/copy.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/copy.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/copy.c Tue Jul 19 23:05:44 2011
@@ -169,36 +169,15 @@ copy_pristine_text_if_necessary(svn_wc__
   return SVN_NO_ERROR;
 }
 
-/* Copy the versioned node SRC_ABSPATH in DB to the path DST_ABSPATH in DB.
-
-   This is a specific variant of copy_versioned_file and copy_versioned_dir
-   specifically handling deleted nodes.
- */
-static svn_error_t *
-copy_deleted_node(svn_wc__db_t *db,
-                  const char *src_abspath,
-                  const char *dst_abspath,
-                  const char *dst_op_root_abspath,
-                  svn_cancel_func_t cancel_func,
-                  void *cancel_baton,
-                  svn_wc_notify_func2_t notify_func,
-                  void *notify_baton,
-                  apr_pool_t *scratch_pool)
-{
-  SVN_ERR(svn_wc__db_op_copy(db, src_abspath, dst_abspath, dst_op_root_abspath,
-                             NULL, scratch_pool));
-
-  /* Don't recurse on children while all we do is creating not-present
-     children */
-
-  return SVN_NO_ERROR;
-}
 
 /* Copy the versioned file SRC_ABSPATH in DB to the path DST_ABSPATH in DB.
    If METADATA_ONLY is true, copy only the versioned metadata,
    otherwise copy both the versioned metadata and the filesystem node (even
    if it is the wrong kind, and recursively if it is a dir).
 
+   If IS_MOVE is true, record move information in working copy meta
+   data in addition to copying the file.
+
    If the versioned file has a text conflict, and the .mine file exists in
    the filesystem, copy the .mine file to DST_ABSPATH.  Otherwise, copy the
    versioned file itself.
@@ -214,6 +193,7 @@ copy_versioned_file(svn_wc__db_t *db,
                     const svn_checksum_t *checksum,
                     svn_boolean_t metadata_only,
                     svn_boolean_t conflicted,
+                    svn_boolean_t is_move,
                     svn_cancel_func_t cancel_func,
                     void *cancel_baton,
                     svn_wc_notify_func2_t notify_func,
@@ -332,8 +312,14 @@ copy_versioned_file(svn_wc__db_t *db,
 
   /* Copy the (single) node's metadata, and move the new filesystem node
      into place. */
-  SVN_ERR(svn_wc__db_op_copy(db, src_abspath, dst_abspath, dst_op_root_abspath,
-                             work_items, scratch_pool));
+  if (is_move)
+    SVN_ERR(svn_wc__db_op_move(db, src_abspath, dst_abspath,
+                               dst_op_root_abspath, work_items,
+                               scratch_pool));
+  else
+    SVN_ERR(svn_wc__db_op_copy(db, src_abspath, dst_abspath,
+                               dst_op_root_abspath, work_items,
+                               scratch_pool));
   SVN_ERR(svn_wc__wq_run(db, dir_abspath,
                          cancel_func, cancel_baton, scratch_pool));
 
@@ -351,7 +337,9 @@ copy_versioned_file(svn_wc__db_t *db,
 /* Copy the versioned dir SRC_ABSPATH in DB to the path DST_ABSPATH in DB,
    recursively.  If METADATA_ONLY is true, copy only the versioned metadata,
    otherwise copy both the versioned metadata and the filesystem nodes (even
-   if they are the wrong kind, and including unversioned children). */
+   if they are the wrong kind, and including unversioned children).
+   If IS_MOVE is true, record move information in working copy meta
+   data in addition to copying the directory. */
 static svn_error_t *
 copy_versioned_dir(svn_wc__db_t *db,
                    const char *src_abspath,
@@ -359,6 +347,7 @@ copy_versioned_dir(svn_wc__db_t *db,
                    const char *dst_op_root_abspath,
                    const char *tmpdir_abspath,
                    svn_boolean_t metadata_only,
+                   svn_boolean_t is_move,
                    svn_cancel_func_t cancel_func,
                    void *cancel_baton,
                    svn_wc_notify_func2_t notify_func,
@@ -394,8 +383,14 @@ copy_versioned_dir(svn_wc__db_t *db,
 
   /* Copy the (single) node's metadata, and move the new filesystem node
      into place. */
-  SVN_ERR(svn_wc__db_op_copy(db, src_abspath, dst_abspath, dst_op_root_abspath,
-                             work_items, scratch_pool));
+  if (is_move)
+    SVN_ERR(svn_wc__db_op_move(db, src_abspath, dst_abspath,
+                               dst_op_root_abspath, work_items,
+                               scratch_pool));
+  else
+    SVN_ERR(svn_wc__db_op_copy(db, src_abspath, dst_abspath,
+                               dst_op_root_abspath, work_items,
+                               scratch_pool));
   SVN_ERR(svn_wc__wq_run(db, dir_abspath,
                          cancel_func, cancel_baton, scratch_pool));
 
@@ -480,6 +475,7 @@ copy_versioned_dir(svn_wc__db_t *db,
                                             dst_op_root_abspath,
                                             tmpdir_abspath, checksum,
                                             metadata_only, conflicted,
+                                            is_move,
                                             cancel_func, cancel_baton,
                                             NULL, NULL,
                                             iterpool));
@@ -488,7 +484,7 @@ copy_versioned_dir(svn_wc__db_t *db,
             SVN_ERR(copy_versioned_dir(db,
                                        child_src_abspath, child_dst_abspath,
                                        dst_op_root_abspath, tmpdir_abspath,
-                                       metadata_only,
+                                       metadata_only, is_move,
                                        cancel_func, cancel_baton, NULL, NULL,
                                        iterpool));
           else
@@ -503,11 +499,17 @@ copy_versioned_dir(svn_wc__db_t *db,
         {
           /* This will be copied as some kind of deletion. Don't touch
              any actual files */
-          SVN_ERR(copy_deleted_node(db,
-                                    child_src_abspath, child_dst_abspath,
-                                    dst_op_root_abspath,
-                                    cancel_func, cancel_baton, NULL, NULL,
-                                    iterpool));
+          if (is_move)
+            SVN_ERR(svn_wc__db_op_move(db, child_src_abspath,
+                                       child_dst_abspath, dst_op_root_abspath,
+                                       NULL, scratch_pool));
+          else
+            SVN_ERR(svn_wc__db_op_copy(db, child_src_abspath,
+                                       child_dst_abspath, dst_op_root_abspath,
+                                       NULL, iterpool));
+
+          /* Don't recurse on children while all we do is creating not-present
+             children */
         }
       else
         {
@@ -586,13 +588,15 @@ copy_versioned_dir(svn_wc__db_t *db,
 }
 
 
-/* Public Interface */
-
-svn_error_t *
-svn_wc_copy3(svn_wc_context_t *wc_ctx,
+/* The guts of svn_wc_copy3() and svn_wc_move().
+ * The additional parameter IS_MOVE indicates whether this is a copy or
+ * a move operation. */
+static svn_error_t *
+copy_or_move(svn_wc_context_t *wc_ctx,
              const char *src_abspath,
              const char *dst_abspath,
              svn_boolean_t metadata_only,
+             svn_boolean_t is_move,
              svn_cancel_func_t cancel_func,
              void *cancel_baton,
              svn_wc_notify_func2_t notify_func,
@@ -767,7 +771,7 @@ svn_wc_copy3(svn_wc_context_t *wc_ctx,
     {
       SVN_ERR(copy_versioned_file(db, src_abspath, dst_abspath, dst_abspath,
                                   tmpdir_abspath, checksum,
-                                  metadata_only, conflicted,
+                                  metadata_only, conflicted, is_move,
                                   cancel_func, cancel_baton,
                                   notify_func, notify_baton,
                                   scratch_pool));
@@ -776,7 +780,7 @@ svn_wc_copy3(svn_wc_context_t *wc_ctx,
     {
       SVN_ERR(copy_versioned_dir(db, src_abspath, dst_abspath, dst_abspath,
                                  tmpdir_abspath,
-                                 metadata_only,
+                                 metadata_only, is_move,
                                  cancel_func, cancel_baton,
                                  notify_func, notify_baton,
                                  scratch_pool));
@@ -785,6 +789,28 @@ svn_wc_copy3(svn_wc_context_t *wc_ctx,
   return SVN_NO_ERROR;
 }
 
+
+/* Public Interface */
+
+svn_error_t *
+svn_wc_copy3(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(copy_or_move(wc_ctx, src_abspath, dst_abspath,
+                                      metadata_only, FALSE /* is_move */,
+                                      cancel_func, cancel_baton,
+                                      notify_func, notify_baton,
+                                      scratch_pool));
+}
+
+
 /* Remove the conflict markers of NODE_ABSPATH, that were left over after
    copying NODE_ABSPATH from SRC_ABSPATH.
 
@@ -945,8 +971,9 @@ svn_wc_move(svn_wc_context_t *wc_ctx,
             apr_pool_t *scratch_pool)
 {
   svn_wc__db_t *db = wc_ctx->db;
-  SVN_ERR(svn_wc_copy3(wc_ctx, src_abspath, dst_abspath,
+  SVN_ERR(copy_or_move(wc_ctx, src_abspath, dst_abspath,
                        TRUE /* metadata_only */,
+                       TRUE /* is_move */,
                        cancel_func, cancel_baton,
                        notify_func, notify_baton,
                        scratch_pool));

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/crop.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/crop.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/crop.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/crop.c Tue Jul 19 23:05:44 2011
@@ -283,16 +283,16 @@ svn_wc_exclude(svn_wc_context_t *wc_ctx,
                                     cancel_func, cancel_baton,
                                     scratch_pool));
 
-  SVN_ERR(svn_wc__db_base_add_absent_node(wc_ctx->db,
-                                          local_abspath,
-                                          repos_relpath,
-                                          repos_root,
-                                          repos_uuid,
-                                          revision,
-                                          kind,
-                                          svn_wc__db_status_excluded,
-                                          NULL, NULL,
-                                          scratch_pool));
+  SVN_ERR(svn_wc__db_base_add_excluded_node(wc_ctx->db,
+                                            local_abspath,
+                                            repos_relpath,
+                                            repos_root,
+                                            repos_uuid,
+                                            revision,
+                                            kind,
+                                            svn_wc__db_status_excluded,
+                                            NULL, NULL,
+                                            scratch_pool));
 
   if (notify_func)
     {

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/deprecated.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/deprecated.c Tue Jul 19 23:05:44 2011
@@ -2360,11 +2360,10 @@ svn_wc_prop_list(apr_hash_t **props,
     {
       *props = apr_hash_make(pool);
       svn_error_clear(err);
+      err = NULL;
     }
-  else if (err)
-    return svn_error_trace(err);
 
-  return svn_error_trace(svn_wc_context_destroy(wc_ctx));
+  return svn_error_compose_create(err, svn_wc_context_destroy(wc_ctx));
 }
 
 svn_error_t *
@@ -2386,11 +2385,13 @@ svn_wc_prop_get(const svn_string_t **val
   err = svn_wc_prop_get2(value, wc_ctx, local_abspath, name, pool, pool);
 
   if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
-    svn_error_clear(err);
-  else
-    SVN_ERR(err);
+    {
+      *value = NULL;
+      svn_error_clear(err);
+      err = NULL;
+    }
 
-  return svn_error_trace(svn_wc_context_destroy(wc_ctx));
+  return svn_error_compose_create(err, svn_wc_context_destroy(wc_ctx));
 }
 
 /* baton for conflict_func_1to2_wrapper */
@@ -2414,7 +2415,7 @@ conflict_func_1to2_wrapper(svn_wc_confli
                                                         scratch_pool);
 
   return svn_error_trace(btn->inner_func(result, cd, btn->inner_baton,
-                                          result_pool));
+                                         result_pool));
 }
 
 svn_error_t *
@@ -2630,10 +2631,15 @@ svn_wc_get_status_editor4(const svn_delt
       swb->anchor_relpath = NULL;
     }
 
+  /* Before subversion 1.7 status always handled depth as sticky. 1.7 made
+     the output of svn status by default match the result of what would be
+     updated by a similar svn update. (Following the documentation) */
+
   SVN_ERR(svn_wc_get_status_editor5(editor, edit_baton, set_locks_baton,
                                     edit_revision, wc_ctx, anchor_abspath,
                                     target, depth, get_all,
                                     no_ignore,
+                                    (depth != svn_depth_unknown) /*as_sticky*/,
                                     FALSE /* server_performs_filtering */,
                                     ignore_patterns,
                                     status4_wrapper_func, swb,

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/diff_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/diff_editor.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/diff_editor.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/diff_editor.c Tue Jul 19 23:05:44 2011
@@ -481,12 +481,7 @@ get_empty_file(struct edit_baton *b,
 static const char *
 get_prop_mimetype(apr_hash_t *props)
 {
-  const svn_string_t *mimetype_val;
-
-  mimetype_val = apr_hash_get(props,
-                              SVN_PROP_MIME_TYPE,
-                              strlen(SVN_PROP_MIME_TYPE));
-  return (mimetype_val) ? mimetype_val->data : NULL;
+  return svn_prop_get_value(props, SVN_PROP_MIME_TYPE);
 }
 
 

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/diff_local.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/diff_local.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/diff_local.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/diff_local.c Tue Jul 19 23:05:44 2011
@@ -113,12 +113,7 @@ get_empty_file(struct diff_baton *eb,
 static const char *
 get_prop_mimetype(apr_hash_t *props)
 {
-  const svn_string_t *mimetype_val;
-
-  mimetype_val = apr_hash_get(props,
-                              SVN_PROP_MIME_TYPE,
-                              strlen(SVN_PROP_MIME_TYPE));
-  return (mimetype_val) ? mimetype_val->data : NULL;
+  return svn_prop_get_value(props, SVN_PROP_MIME_TYPE);
 }
 
 

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/entries.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/entries.c Tue Jul 19 23:05:44 2011
@@ -637,7 +637,10 @@ read_one_entry(const svn_wc_entry_t **ne
           /* ### scan_addition may need to be updated to avoid returning
              ### status_copied in this case.  */
         }
-      else if (work_status == svn_wc__db_status_copied)
+      /* For backwards-compatiblity purposes we treat moves just like
+       * regular copies. */
+      else if (work_status == svn_wc__db_status_copied ||
+               work_status == svn_wc__db_status_moved_here)
         {
           entry->copied = TRUE;
 
@@ -662,7 +665,8 @@ read_one_entry(const svn_wc_entry_t **ne
           svn_boolean_t is_copied_child;
           svn_boolean_t is_mixed_rev = FALSE;
 
-          SVN_ERR_ASSERT(work_status == svn_wc__db_status_copied);
+          SVN_ERR_ASSERT(work_status == svn_wc__db_status_copied ||
+                         work_status == svn_wc__db_status_moved_here);
 
           /* If this node inherits copyfrom information from an
              ancestor node, then it must be a copied child.  */
@@ -1093,12 +1097,12 @@ read_entries(apr_hash_t **entries,
 
   if (wc_format < SVN_WC__WC_NG_VERSION)
     return svn_error_trace(svn_wc__read_entries_old(entries,
-                                                     wcroot_abspath,
-                                                     result_pool,
-                                                     scratch_pool));
+                                                    wcroot_abspath,
+                                                    result_pool,
+                                                    scratch_pool));
 
   return svn_error_trace(read_entries_new(entries, db, wcroot_abspath,
-                                           result_pool, scratch_pool));
+                                          result_pool, scratch_pool));
 }
 
 
@@ -1538,7 +1542,7 @@ struct write_baton {
    ### time being, we'll need both parameters. */
 static svn_error_t *
 write_entry(struct write_baton **entry_node,
-            struct write_baton *parent_node,
+            const struct write_baton *parent_node,
             svn_wc__db_t *db,
             svn_sqlite__db_t *sdb,
             apr_int64_t wc_id,
@@ -1883,6 +1887,12 @@ write_entry(struct write_baton **entry_n
                   && strcmp(entry->name, SVN_WC_ENTRY_THIS_DIR))
                 {
                   base_node->presence = svn_wc__db_status_incomplete;
+
+                  /* Store the most likely revision in the node to avoid
+                     base nodes without a valid revision. Of course
+                     we remember that the data is still incomplete. */
+                  if (parent_node->base)
+                    base_node->revision = parent_node->base->revision;
                 }
               else if (entry->incomplete)
                 {

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/info.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/info.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/info.c Tue Jul 19 23:05:44 2011
@@ -71,7 +71,7 @@ svn_wc_info_dup(const svn_wc_info_t *inf
    metadata of LOCAL_ABSPATH.  Pointer fields are copied by reference, not
    dup'd. */
 static svn_error_t *
-build_info_for_entry(svn_wc__info2_t **info,
+build_info_for_node(svn_wc__info2_t **info,
                      svn_wc__db_t *db,
                      const char *local_abspath,
                      svn_node_kind_t kind,
@@ -186,6 +186,8 @@ build_info_for_entry(svn_wc__info2_t **i
     }
   else if (status == svn_wc__db_status_deleted)
     {
+      const char *work_del_abspath;
+
       SVN_ERR(svn_wc__db_read_pristine_info(NULL, NULL,
                                             &tmpinfo->last_changed_rev,
                                             &tmpinfo->last_changed_date,
@@ -196,51 +198,57 @@ build_info_for_entry(svn_wc__info2_t **i
                                             db, local_abspath,
                                             result_pool, scratch_pool));
 
-      SVN_ERR(svn_wc__internal_get_repos_info(&tmpinfo->repos_root_URL,
-                                              &tmpinfo->repos_UUID,
-                                              db, local_abspath,
-                                              result_pool, scratch_pool));
+      /* And now fetch the url and revision of what will be deleted */
+      SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL,
+                                       &work_del_abspath,
+                                       db, local_abspath,
+                                       scratch_pool, scratch_pool));
+      if (work_del_abspath != NULL)
+        {
+          /* This is a deletion within a copied subtree. Get the copied-from
+           * revision. */
+          const char *added_abspath = svn_dirent_dirname(work_del_abspath,
+                                                         scratch_pool);
 
-      SVN_ERR(svn_wc__db_read_url(&tmpinfo->URL, db, local_abspath,
-                                result_pool, scratch_pool));
+          SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, &repos_relpath,
+                                           &tmpinfo->repos_root_URL,
+                                           &tmpinfo->repos_UUID,
+                                           NULL, NULL, NULL,
+                                           &tmpinfo->rev,
+                                           db, added_abspath,
+                                           result_pool, scratch_pool));
 
-      /* And now fetch the revision of what will be deleted */
-      {
-        const char *work_del_abspath;
-
-        SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL,
-                                         &work_del_abspath,
-                                         db, local_abspath,
-                                         scratch_pool, scratch_pool));
-        if (work_del_abspath != NULL)
-          {
-            /* This is a deletion within a copied subtree. Get the copied-from
-             * revision. */
-            SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, NULL, NULL, NULL,
-                                             NULL, NULL, NULL,
-                                             &tmpinfo->rev,
-                                             db,
-                                             svn_dirent_dirname(
-                                                  work_del_abspath,
-                                                  scratch_pool),
-                                             result_pool, scratch_pool));
-          }
-        else
+          tmpinfo->URL = svn_path_url_add_component2(
+                              tmpinfo->repos_root_URL,
+                              svn_relpath_join(repos_relpath,
+                                    svn_dirent_skip_ancestor(added_abspath,
+                                                             local_abspath),
+                                    scratch_pool),
+                              result_pool);
+        }
+      else
+        {
           SVN_ERR(svn_wc__db_base_get_info(NULL, NULL, &tmpinfo->rev,
-                                           NULL, NULL, NULL, NULL, NULL, NULL,
-                                           NULL, NULL, NULL, NULL, NULL, NULL,
+                                           &repos_relpath,
+                                           &tmpinfo->repos_root_URL,
+                                           &tmpinfo->repos_UUID, NULL, NULL,
+                                           NULL, NULL, NULL, NULL,
+                                           NULL, NULL, NULL,
                                            db, local_abspath,
                                            result_pool, scratch_pool));
-      }
+
+          tmpinfo->URL = svn_path_url_add_component2(tmpinfo->repos_root_URL,
+                                                     repos_relpath,
+                                                     result_pool);
+        }
+
       wc_info->schedule = svn_wc_schedule_delete;
     }
   else if (status == svn_wc__db_status_not_present
            || status == svn_wc__db_status_server_excluded)
     {
-      return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
-                               _("The node '%s' was not found."),
-                               svn_dirent_local_style(local_abspath,
-                                                      scratch_pool));
+      *info = NULL;
+      return SVN_NO_ERROR;
     }
   else
     {
@@ -293,18 +301,24 @@ build_info_for_unversioned(svn_wc__info2
                            apr_pool_t *pool)
 {
   svn_wc__info2_t *tmpinfo = apr_pcalloc(pool, sizeof(*tmpinfo));
-  tmpinfo->wc_info = apr_pcalloc(pool, sizeof (*tmpinfo->wc_info));
+  svn_wc_info_t *wc_info = apr_pcalloc(pool, sizeof (*wc_info));
 
   tmpinfo->URL                  = NULL;
-  tmpinfo->rev                  = SVN_INVALID_REVNUM;
-  tmpinfo->kind                 = svn_node_none;
   tmpinfo->repos_UUID           = NULL;
   tmpinfo->repos_root_URL       = NULL;
+  tmpinfo->rev                  = SVN_INVALID_REVNUM;
+  tmpinfo->kind                 = svn_node_none;
+  tmpinfo->size                 = SVN_INVALID_FILESIZE;
   tmpinfo->last_changed_rev     = SVN_INVALID_REVNUM;
   tmpinfo->last_changed_date    = 0;
   tmpinfo->last_changed_author  = NULL;
   tmpinfo->lock                 = NULL;
-  tmpinfo->size                 = SVN_INVALID_FILESIZE;
+
+  tmpinfo->wc_info = wc_info;
+
+  wc_info->copyfrom_rev = SVN_INVALID_REVNUM;
+  wc_info->depth = svn_depth_unknown;
+  wc_info->recorded_size = SVN_INVALID_FILESIZE;
 
   *info = tmpinfo;
   return SVN_NO_ERROR;
@@ -316,9 +330,12 @@ struct found_entry_baton
   svn_wc__info_receiver2_t receiver;
   void *receiver_baton;
   svn_wc__db_t *db;
+  svn_boolean_t actual_only;
+  svn_boolean_t first;
   /* The set of tree conflicts that have been found but not (yet) visited by
    * the tree walker.  Map of abspath -> svn_wc_conflict_description2_t. */
   apr_hash_t *tree_conflicts;
+  apr_pool_t *pool;
 };
 
 /* Call WALK_BATON->receiver with WALK_BATON->receiver_baton, passing to it
@@ -328,37 +345,52 @@ static svn_error_t *
 info_found_node_callback(const char *local_abspath,
                          svn_node_kind_t kind,
                          void *walk_baton,
-                         apr_pool_t *pool)
+                         apr_pool_t *scratch_pool)
 {
   struct found_entry_baton *fe_baton = walk_baton;
   svn_wc__info2_t *info;
 
-  SVN_ERR(build_info_for_entry(&info, fe_baton->db, local_abspath,
-                               kind, pool, pool));
+  SVN_ERR(build_info_for_node(&info, fe_baton->db, local_abspath,
+                               kind, scratch_pool, scratch_pool));
 
-  SVN_ERR_ASSERT(info != NULL && info->wc_info != NULL);
+  if (info == NULL)
+    {
+      if (!fe_baton->first)
+        return SVN_NO_ERROR; /* not present or server excluded descendant */
+
+      /* If the info root is not found, that is an error */
+      return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
+                               _("The node '%s' was not found."),
+                               svn_dirent_local_style(local_abspath,
+                                                      scratch_pool));
+    }
+
+  fe_baton->first = FALSE;
+
+  SVN_ERR_ASSERT(info->wc_info != NULL);
   SVN_ERR(fe_baton->receiver(fe_baton->receiver_baton, local_abspath,
-                             info, pool));
+                             info, scratch_pool));
 
   /* If this node is a versioned directory, make a note of any tree conflicts
    * on all immediate children.  Some of these may be visited later in this
    * walk, at which point they will be removed from the list, while any that
    * are not visited will remain in the list. */
-  if (kind == svn_node_dir)
+  if (fe_baton->actual_only && kind == svn_node_dir)
     {
       apr_hash_t *conflicts;
       apr_hash_index_t *hi;
 
       SVN_ERR(svn_wc__db_op_read_all_tree_conflicts(
                 &conflicts, fe_baton->db, local_abspath,
-                apr_hash_pool_get(fe_baton->tree_conflicts), pool));
-      for (hi = apr_hash_first(pool, conflicts); hi;
+                fe_baton->pool, scratch_pool));
+      for (hi = apr_hash_first(scratch_pool, conflicts); hi;
            hi = apr_hash_next(hi))
         {
           const char *this_basename = svn__apr_hash_index_key(hi);
 
           apr_hash_set(fe_baton->tree_conflicts,
-                       svn_dirent_join(local_abspath, this_basename, pool),
+                       svn_dirent_join(local_abspath, this_basename,
+                                       fe_baton->pool),
                        APR_HASH_KEY_STRING, svn__apr_hash_index_val(hi));
         }
     }
@@ -396,9 +428,11 @@ svn_error_t *
 svn_wc__get_info(svn_wc_context_t *wc_ctx,
                  const char *local_abspath,
                  svn_depth_t depth,
+                 svn_boolean_t fetch_excluded,
+                 svn_boolean_t fetch_actual_only,
+                 const apr_array_header_t *changelist_filter,
                  svn_wc__info_receiver2_t receiver,
                  void *receiver_baton,
-                 const apr_array_header_t *changelist_filter,
                  svn_cancel_func_t cancel_func,
                  void *cancel_baton,
                  apr_pool_t *scratch_pool)
@@ -412,19 +446,27 @@ svn_wc__get_info(svn_wc_context_t *wc_ct
   fe_baton.receiver = receiver;
   fe_baton.receiver_baton = receiver_baton;
   fe_baton.db = wc_ctx->db;
+  fe_baton.actual_only = fetch_actual_only;
+  fe_baton.first = TRUE;
   fe_baton.tree_conflicts = apr_hash_make(scratch_pool);
+  fe_baton.pool = scratch_pool;
 
-  SVN_ERR(svn_wc__db_op_read_tree_conflict(&root_tree_conflict,
-                                           wc_ctx->db, local_abspath,
-                                           scratch_pool, scratch_pool));
-  if (root_tree_conflict)
+  if (fetch_actual_only)
     {
-      apr_hash_set(fe_baton.tree_conflicts, local_abspath, APR_HASH_KEY_STRING,
-                   root_tree_conflict);
+      SVN_ERR(svn_wc__db_op_read_tree_conflict(&root_tree_conflict,
+                                               wc_ctx->db, local_abspath,
+                                               scratch_pool, scratch_pool));
+      if (root_tree_conflict)
+        {
+          apr_hash_set(fe_baton.tree_conflicts, local_abspath,
+                       APR_HASH_KEY_STRING, root_tree_conflict);
+        }
     }
+  else
+    root_tree_conflict = FALSE;
 
   err = svn_wc__internal_walk_children(wc_ctx->db, local_abspath,
-                                       FALSE /* show_hidden */,
+                                       fetch_excluded,
                                        changelist_filter,
                                        info_found_node_callback,
                                        &fe_baton, depth,
@@ -452,7 +494,7 @@ svn_wc__get_info(svn_wc_context_t *wc_ct
       svn_pool_clear(iterpool);
 
       if (depth_includes(local_abspath, depth, tree_conflict->local_abspath,
-                         tree_conflict->kind, iterpool))
+                         tree_conflict->node_kind, iterpool))
         {
           apr_array_header_t *conflicts = apr_array_make(iterpool,
             1, sizeof(const svn_wc_conflict_description2_t *));

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/lock.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/lock.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/lock.c Tue Jul 19 23:05:44 2011
@@ -786,8 +786,8 @@ svn_wc_adm_open3(svn_wc_adm_access_t **a
     }
 
   return svn_error_trace(open_all(adm_access, path, db, db_provided,
-                                   write_lock, levels_to_lock,
-                                   cancel_func, cancel_baton, pool));
+                                  write_lock, levels_to_lock,
+                                  cancel_func, cancel_baton, pool));
 }
 
 
@@ -1322,9 +1322,9 @@ svn_wc_adm_open_anchor(svn_wc_adm_access
                        apr_pool_t *pool)
 {
   return svn_error_trace(open_anchor(anchor_access, target_access, target,
-                                      NULL, FALSE, path, write_lock,
-                                      levels_to_lock, cancel_func,
-                                      cancel_baton, pool));
+                                     NULL, FALSE, path, write_lock,
+                                     levels_to_lock, cancel_func,
+                                     cancel_baton, pool));
 }
 
 
@@ -1380,7 +1380,7 @@ do_close(svn_wc_adm_access_t *adm_access
     }
 
   return svn_error_trace(close_single(adm_access, preserve_lock,
-                                       scratch_pool));
+                                      scratch_pool));
 }
 
 

Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/merge.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/merge.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/merge.c Tue Jul 19 23:05:44 2011
@@ -161,11 +161,10 @@ detranslate_wc_file(const char **detrans
   const char *eol;
   apr_hash_t *keywords;
   svn_boolean_t special;
-  const svn_string_t *mime_value;
-  mime_value = apr_hash_get(mt->actual_props, SVN_PROP_MIME_TYPE,
-                            APR_HASH_KEY_STRING);
+  const char *mime_value = svn_prop_get_value(mt->actual_props,
+                                              SVN_PROP_MIME_TYPE);
 
-  is_binary = (mime_value && svn_mime_type_is_binary(mime_value->data));
+  is_binary = (mime_value && svn_mime_type_is_binary(mime_value));
 
   /* See if we need to do a straight copy:
      - old and new mime-types are binary, or
@@ -1349,11 +1348,10 @@ svn_wc__internal_merge(svn_skel_t **work
     is_binary = svn_mime_type_is_binary(mimeprop->value->data);
   else
     {
-      const svn_string_t *value = apr_hash_get(mt.actual_props,
-                                               SVN_PROP_MIME_TYPE,
-                                               APR_HASH_KEY_STRING);
+      const char *value = svn_prop_get_value(mt.actual_props,
+                                             SVN_PROP_MIME_TYPE);
 
-      is_binary = value && svn_mime_type_is_binary(value->data);
+      is_binary = value && svn_mime_type_is_binary(value);
     }
 
   SVN_ERR(detranslate_wc_file(&detranslated_target_abspath, &mt,