You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2012/11/30 15:19:55 UTC

svn commit: r1415649 [1/2] - in /subversion/branches/in-repo-authz: ./ subversion/include/ subversion/libsvn_client/ subversion/libsvn_fs_fs/ subversion/libsvn_ra_serf/ subversion/libsvn_subr/ subversion/libsvn_wc/ subversion/mod_dav_svn/ subversion/sv...

Author: breser
Date: Fri Nov 30 14:19:48 2012
New Revision: 1415649

URL: http://svn.apache.org/viewvc?rev=1415649&view=rev
Log:
Sync the 'in-repo-authz' branch with recent trunk changes.
(Merged /subversion/trunk:r1414854-r1415646)


Added:
    subversion/branches/in-repo-authz/subversion/svn/svn.c
      - copied unchanged from r1415646, subversion/trunk/subversion/svn/svn.c
    subversion/branches/in-repo-authz/subversion/svnadmin/svnadmin.c
      - copied unchanged from r1415646, subversion/trunk/subversion/svnadmin/svnadmin.c
    subversion/branches/in-repo-authz/subversion/svndumpfilter/svndumpfilter.c
      - copied unchanged from r1415646, subversion/trunk/subversion/svndumpfilter/svndumpfilter.c
    subversion/branches/in-repo-authz/subversion/svnlook/svnlook.c
      - copied unchanged from r1415646, subversion/trunk/subversion/svnlook/svnlook.c
    subversion/branches/in-repo-authz/subversion/svnserve/svnserve.c
      - copied unchanged from r1415646, subversion/trunk/subversion/svnserve/svnserve.c
    subversion/branches/in-repo-authz/subversion/svnsync/svnsync.c
      - copied unchanged from r1415646, subversion/trunk/subversion/svnsync/svnsync.c
    subversion/branches/in-repo-authz/subversion/svnversion/svnversion.c
      - copied unchanged from r1415646, subversion/trunk/subversion/svnversion/svnversion.c
    subversion/branches/in-repo-authz/tools/client-side/svn-bench/svn-bench.c
      - copied unchanged from r1415646, subversion/trunk/tools/client-side/svn-bench/svn-bench.c
    subversion/branches/in-repo-authz/tools/dev/svnraisetreeconflict/svnraisetreeconflict.c
      - copied unchanged from r1415646, subversion/trunk/tools/dev/svnraisetreeconflict/svnraisetreeconflict.c
Removed:
    subversion/branches/in-repo-authz/subversion/svn/main.c
    subversion/branches/in-repo-authz/subversion/svnadmin/main.c
    subversion/branches/in-repo-authz/subversion/svndumpfilter/main.c
    subversion/branches/in-repo-authz/subversion/svnlook/main.c
    subversion/branches/in-repo-authz/subversion/svnserve/main.c
    subversion/branches/in-repo-authz/subversion/svnsync/main.c
    subversion/branches/in-repo-authz/subversion/svnversion/main.c
    subversion/branches/in-repo-authz/tools/client-side/svn-bench/main.c
    subversion/branches/in-repo-authz/tools/dev/svnraisetreeconflict/main.c
Modified:
    subversion/branches/in-repo-authz/   (props changed)
    subversion/branches/in-repo-authz/subversion/include/svn_client.h
    subversion/branches/in-repo-authz/subversion/include/svn_props.h
    subversion/branches/in-repo-authz/subversion/include/svn_string.h
    subversion/branches/in-repo-authz/subversion/include/svn_wc.h
    subversion/branches/in-repo-authz/subversion/libsvn_client/add.c
    subversion/branches/in-repo-authz/subversion/libsvn_client/merge.c
    subversion/branches/in-repo-authz/subversion/libsvn_client/mergeinfo.c
    subversion/branches/in-repo-authz/subversion/libsvn_client/mergeinfo.h
    subversion/branches/in-repo-authz/subversion/libsvn_client/prop_commands.c
    subversion/branches/in-repo-authz/subversion/libsvn_fs_fs/tree.c
    subversion/branches/in-repo-authz/subversion/libsvn_ra_serf/update.c
    subversion/branches/in-repo-authz/subversion/libsvn_subr/properties.c
    subversion/branches/in-repo-authz/subversion/libsvn_wc/adm_ops.c
    subversion/branches/in-repo-authz/subversion/libsvn_wc/diff_editor.c
    subversion/branches/in-repo-authz/subversion/libsvn_wc/diff_local.c
    subversion/branches/in-repo-authz/subversion/libsvn_wc/props.c
    subversion/branches/in-repo-authz/subversion/libsvn_wc/props.h
    subversion/branches/in-repo-authz/subversion/libsvn_wc/translate.c
    subversion/branches/in-repo-authz/subversion/libsvn_wc/update_editor.c
    subversion/branches/in-repo-authz/subversion/libsvn_wc/wc_db.c
    subversion/branches/in-repo-authz/subversion/mod_dav_svn/repos.c
    subversion/branches/in-repo-authz/subversion/svn/info-cmd.c
    subversion/branches/in-repo-authz/subversion/svn/list-cmd.c
    subversion/branches/in-repo-authz/subversion/svn/props.c
    subversion/branches/in-repo-authz/subversion/tests/cmdline/info_tests.py
    subversion/branches/in-repo-authz/subversion/tests/cmdline/merge_tests.py
    subversion/branches/in-repo-authz/subversion/tests/cmdline/svntest/actions.py
    subversion/branches/in-repo-authz/tools/server-side/svnauthz-validate.c

Propchange: subversion/branches/in-repo-authz/
------------------------------------------------------------------------------
  Merged /subversion/branches/issue-4194-dev:r1410507-1414880
  Merged /subversion/trunk:r1414854-1415646

Modified: subversion/branches/in-repo-authz/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/include/svn_client.h?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/include/svn_client.h (original)
+++ subversion/branches/in-repo-authz/subversion/include/svn_client.h Fri Nov 30 14:19:48 2012
@@ -5394,7 +5394,7 @@ svn_client_export(svn_revnum_t *result_r
  * externals, and will always finish listing an external before listing
  * the next one.
 
- * @a pool may be used for temporary allocations.
+ * @a scratch_pool may be used for temporary allocations.
  *
  * @since New in 1.8.
  */
@@ -5406,7 +5406,7 @@ typedef svn_error_t *(*svn_client_list_f
   const char *abs_path,
   const char *external_parent_url,
   const char *external_target,
-  apr_pool_t *pool);
+  apr_pool_t *scratch_pool);
 
 /**
  * Similar to #svn_client_list_func2_t, but without any information about

Modified: subversion/branches/in-repo-authz/subversion/include/svn_props.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/include/svn_props.h?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/include/svn_props.h (original)
+++ subversion/branches/in-repo-authz/subversion/include/svn_props.h Fri Nov 30 14:19:48 2012
@@ -187,14 +187,17 @@ svn_property_kind(int *prefix_len,
 
 
 /** Return @c TRUE iff @a prop_name represents the name of a Subversion
- * property.
+ * property.  That is, any property name in Subversion's name space for
+ * versioned or unversioned properties, regardless whether the particular
+ * property name is recognized.
  */
 svn_boolean_t
 svn_prop_is_svn_prop(const char *prop_name);
 
 
 /** Return @c TRUE iff @a props has at least one property whose name
- * represents the name of a Subversion property.
+ * represents the name of a Subversion property, in the sense of
+ * svn_prop_is_svn_prop().
  *
  * @since New in 1.5.
  */
@@ -210,6 +213,57 @@ svn_prop_has_svn_prop(const apr_hash_t *
 svn_boolean_t
 svn_prop_is_boolean(const char *prop_name);
 
+/** Return @c TRUE iff @a prop_name is in the "svn:" name space and is a
+ * known revision property.  For example, svn:log or svn:date.
+ *
+ * This will return FALSE for any property name that is not known by this
+ * version of the library, even though the name may be known to other (for
+ * example, later) Subversion software.
+ *
+ * @since New in 1.8
+ */
+svn_boolean_t
+svn_prop_is_known_svn_rev_prop(const char *prop_name);
+
+/** Return @c TRUE iff @a prop_name is in the "svn:" name space and is a
+ * known versioned property that is allowed on a file and/or on a directory.
+ * For example, svn:eol-style or svn:ignore or svn:mergeinfo.
+ *
+ * This will return FALSE for any property name that is not known by this
+ * version of the library, even though the name may be known to other (for
+ * example, later) Subversion software.
+ *
+ * @since New in 1.8
+ */
+svn_boolean_t
+svn_prop_is_known_svn_node_prop(const char *prop_name);
+
+/** Return @c TRUE iff @a prop_name is in the "svn:" name space and is a
+ * known versioned property that is allowed on a file.  For example,
+ * svn:eol-style or svn:mergeinfo.
+ *
+ * This will return FALSE for any property name that is not known by this
+ * version of the library, even though the name may be known to other (for
+ * example, later) Subversion software.
+ *
+ * @since New in 1.8
+ */
+svn_boolean_t
+svn_prop_is_known_svn_file_prop(const char *prop_name);
+
+/** Return @c TRUE iff @a prop_name represents the name of a Subversion
+ * known versioned property that is allowed on a directory.  For example,
+ * svn:ignore or svn:mergeinfo.
+ *
+ * This will return FALSE for any property name that is not known by this
+ * version of the library, even though the name may be known to other (for
+ * example, later) Subversion software.
+ *
+ * @since New in 1.8
+ */
+svn_boolean_t
+svn_prop_is_known_svn_dir_prop(const char *prop_name);
+
 /** If @a prop_name requires that its value be stored as UTF8/LF in the
  * repository, then return @c TRUE.  Else return @c FALSE.  This is for
  * users of libsvn_client or libsvn_fs, since it their responsibility
@@ -357,19 +411,21 @@ svn_prop_name_is_valid(const char *prop_
 
 /** Describes external items to check out into this directory.
  *
- * The format is a series of lines, such as:
- *
- * <pre reason="Should use 'verbatim' instead, but Doxygen v1.6.1 & v1.7.1
- *              then doesn't recognize the #define; presumably a bug.">
-     localdir1           http://url.for.external.source/etc/
-     localdir1/foo       http://url.for.external.source/foo
-     localdir1/bar       http://blah.blah.blah/repositories/theirproj
-     localdir1/bar/baz   http://blorg.blorg.blorg/basement/code
-     localdir2           http://another.url/blah/blah/blah
-     localdir3           http://and.so.on/and/so/forth </pre>
- *
- * The subdir names on the left side are relative to the directory on
- * which this property is set.
+ * The format is a series of lines, each in the following format:
+ *   [-r REV] URL[@PEG] LOCALPATH
+ * LOCALPATH is relative to the directory having this property.
+ * REV pins the external to revision REV.
+ * URL may be a full URL or a relative URL starting with one of:
+ *   ../  to the parent directory of the extracted external
+ *   ^/   to the repository root
+ *   /    to the server root
+ *   //   to the URL scheme
+ * The following format is supported for interoperability with
+ * Subversion 1.4 and earlier clients:
+ *   LOCALPATH [-r PEG] URL
+ * The ambiguous format 'relative_path relative_path' is taken as
+ * 'relative_url relative_path' with peg revision support.
+ * Lines starting with a '#' character are ignored.
  */
 #define SVN_PROP_EXTERNALS  SVN_PROP_PREFIX "externals"
 
@@ -449,7 +505,7 @@ svn_prop_name_is_valid(const char *prop_
                                 SVN_PROP_TEXT_TIME, \
                                 SVN_PROP_OWNER, \
                                 SVN_PROP_GROUP, \
-                                SVN_PROP_UNIX_MODE
+                                SVN_PROP_UNIX_MODE,
 
 /** @} */
 
@@ -545,25 +601,37 @@ svn_prop_name_is_valid(const char *prop_
 /* More reserved revision props in the 'svn:' namespace, used by the
    svnsync tool:   */
 
-/** Prefix for all svnsync custom properties. */
+/** Prefix for all svnsync custom properties.
+ * @since New in 1.4.
+ */
 #define SVNSYNC_PROP_PREFIX             SVN_PROP_PREFIX "sync-"
 
 /* The following revision properties are set on revision 0 of
  * destination repositories by svnsync:
  */
 
-/** Used to enforce mutually exclusive destination repository access. */
+/** Used to enforce mutually exclusive destination repository access.
+ * @since New in 1.4.
+ */
 #define SVNSYNC_PROP_LOCK               SVNSYNC_PROP_PREFIX "lock"
 
-/** Identifies the repository's source URL. */
+/** Identifies the repository's source URL.
+ * @since New in 1.4.
+ */
 #define SVNSYNC_PROP_FROM_URL           SVNSYNC_PROP_PREFIX "from-url"
-/** Identifies the repository's source UUID. */
+/** Identifies the repository's source UUID.
+ * @since New in 1.4.
+ */
 #define SVNSYNC_PROP_FROM_UUID          SVNSYNC_PROP_PREFIX "from-uuid"
 
-/** Identifies the last completely mirrored revision. */
+/** Identifies the last completely mirrored revision.
+ * @since New in 1.4.
+ */
 #define SVNSYNC_PROP_LAST_MERGED_REV    SVNSYNC_PROP_PREFIX "last-merged-rev"
 
-/** Identifies the revision currently being copied. */
+/** Identifies the revision currently being copied.
+ * @since New in 1.4.
+ */
 #define SVNSYNC_PROP_CURRENTLY_COPYING  SVNSYNC_PROP_PREFIX "currently-copying"
 
 

Modified: subversion/branches/in-repo-authz/subversion/include/svn_string.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/include/svn_string.h?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/include/svn_string.h (original)
+++ subversion/branches/in-repo-authz/subversion/include/svn_string.h Fri Nov 30 14:19:48 2012
@@ -54,13 +54,13 @@
  *
  *      Note that an @c svn_string(buf)_t may contain binary data,
  *      which means that strlen(s->data) does not have to equal @c
- *      s->len. The NULL terminator is provided to make it easier to
+ *      s->len. The null terminator is provided to make it easier to
  *      pass @c s->data to C string interfaces.
  *
  *
  *   2. Non-NULL input:
  *
- *      All the functions assume their input data is non-NULL,
+ *      All the functions assume their input data pointer is non-NULL,
  *      unless otherwise documented, and may seg fault if passed
  *      NULL.  The input data may *contain* null bytes, of course, just
  *      the data pointer itself must not be NULL.
@@ -125,40 +125,46 @@ typedef struct svn_stringbuf_t
  * @{
  */
 
-/** Create a new bytestring containing a C string (NULL-terminated). */
+/** Create a new string copied from the null-terminated C string @a cstring.
+ */
 svn_string_t *
 svn_string_create(const char *cstring, apr_pool_t *pool);
 
-/** Create a truely empty string object (length is 0)
+/** Create a new, empty string.
+ *
  * @since New in 1.8.
  */
 svn_string_t *
 svn_string_create_empty(apr_pool_t *pool);
 
-/** Create a new bytestring containing a generic string of bytes
- * (NOT NULL-terminated) */
+/** Create a new string copied from a generic string of bytes, @a bytes, of
+ * length @a size bytes.  @a bytes is NOT assumed to be null-terminated, but
+ * the new string will be.
+ */
 svn_string_t *
 svn_string_ncreate(const char *bytes, apr_size_t size, apr_pool_t *pool);
 
-/** Create a new string with the contents of the given stringbuf */
+/** Create a new string copied from the stringbuf @a strbuf.
+ */
 svn_string_t *
 svn_string_create_from_buf(const svn_stringbuf_t *strbuf, apr_pool_t *pool);
 
-/** Create a new bytestring by formatting @a cstring (NULL-terminated)
- * from varargs, which are as appropriate for apr_psprintf().
+/** Create a new string by printf-style formatting using @a fmt and the
+ * variable arguments, which are as appropriate for apr_psprintf().
  */
 svn_string_t *
 svn_string_createf(apr_pool_t *pool, const char *fmt, ...)
   __attribute__((format(printf, 2, 3)));
 
-/** Create a new bytestring by formatting @a cstring (NULL-terminated)
- * from a @c va_list (see svn_stringbuf_createf()).
+/** Create a new string by printf-style formatting using @c fmt and @a ap.
+ * This is the same as svn_string_createf() except for the different
+ * way of passing the variable arguments.
  */
 svn_string_t *
 svn_string_createv(apr_pool_t *pool, const char *fmt, va_list ap)
   __attribute__((format(printf, 2, 0)));
 
-/** Return TRUE if a bytestring is empty (has length zero). */
+/** Return TRUE if @a str is empty (has length zero). */
 svn_boolean_t
 svn_string_isempty(const svn_string_t *str);
 
@@ -190,23 +196,27 @@ svn_string_find_char_backward(const svn_
  * @{
  */
 
-/** Create a new bytestring containing a C string (NULL-terminated). */
+/** Create a new stringbuf copied from the null-terminated C string
+ * @a cstring.
+ */
 svn_stringbuf_t *
 svn_stringbuf_create(const char *cstring, apr_pool_t *pool);
 
-/** Create a new bytestring containing a generic string of bytes
- * (NON-NULL-terminated)
+/** Create a new stringbuf copied from the generic string of bytes, @a bytes,
+ * of length @a size bytes.  @a bytes is NOT assumed to be null-terminated,
+ * but the new stringbuf will be.
  */
 svn_stringbuf_t *
 svn_stringbuf_ncreate(const char *bytes, apr_size_t size, apr_pool_t *pool);
 
-/** Create a new, empty bytestring.
+/** Create a new, empty stringbuf.
+ *
  * @since New in 1.8.
  */
 svn_stringbuf_t *
 svn_stringbuf_create_empty(apr_pool_t *pool);
 
-/** Create a new empty bytestring with at least @a minimum_size bytes of
+/** Create a new, empty stringbuf with at least @a minimum_size bytes of
  * space available in the memory block.
  *
  * The allocated string buffer will be at least one byte larger than
@@ -217,25 +227,27 @@ svn_stringbuf_create_empty(apr_pool_t *p
 svn_stringbuf_t *
 svn_stringbuf_create_ensure(apr_size_t minimum_size, apr_pool_t *pool);
 
-/** Create a new stringbuf with the contents of the given string */
+/** Create a new stringbuf copied from the string @a str.
+ */
 svn_stringbuf_t *
 svn_stringbuf_create_from_string(const svn_string_t *str, apr_pool_t *pool);
 
-/** Create a new bytestring by formatting @a cstring (NULL-terminated)
- * from varargs, which are as appropriate for apr_psprintf().
+/** Create a new stringbuf by printf-style formatting using @a fmt and the
+ * variable arguments, which are as appropriate for apr_psprintf().
  */
 svn_stringbuf_t *
 svn_stringbuf_createf(apr_pool_t *pool, const char *fmt, ...)
   __attribute__((format(printf, 2, 3)));
 
-/** Create a new bytestring by formatting @a cstring (NULL-terminated)
- * from a @c va_list (see svn_stringbuf_createf()).
+/** Create a new stringbuf by printf-style formatting using @c fmt and @a ap.
+ * This is the same as svn_stringbuf_createf() except for the different
+ * way of passing the variable arguments.
  */
 svn_stringbuf_t *
 svn_stringbuf_createv(apr_pool_t *pool, const char *fmt, va_list ap)
   __attribute__((format(printf, 2, 0)));
 
-/** Make sure that the stringbuf @a str has at least @a minimum_size
+/** Make sure that @a str has at least @a minimum_size
  * bytes of space available in the memory block.
  *
  * The allocated string buffer will be at least one byte larger than
@@ -249,15 +261,15 @@ svn_stringbuf_createv(apr_pool_t *pool, 
 void
 svn_stringbuf_ensure(svn_stringbuf_t *str, apr_size_t minimum_size);
 
-/** Set a bytestring @a str to @a value */
+/** Set @a str to a copy of the null-terminated C string @a value. */
 void
 svn_stringbuf_set(svn_stringbuf_t *str, const char *value);
 
-/** Set a bytestring @a str to empty (0 length). */
+/** Set @a str to empty (zero length). */
 void
 svn_stringbuf_setempty(svn_stringbuf_t *str);
 
-/** Return @c TRUE if a bytestring is empty (has length zero). */
+/** Return @c TRUE if @a str is empty (has length zero). */
 svn_boolean_t
 svn_stringbuf_isempty(const svn_stringbuf_t *str);
 
@@ -265,11 +277,12 @@ svn_stringbuf_isempty(const svn_stringbu
 void
 svn_stringbuf_chop(svn_stringbuf_t *str, apr_size_t nbytes);
 
-/** Fill bytestring @a str with character @a c. */
+/** Fill @a str with character @a c. */
 void
 svn_stringbuf_fillchar(svn_stringbuf_t *str, unsigned char c);
 
-/** Append a single character @a byte onto @a targetstr.
+/** Append the single character @a byte onto @a targetstr.
+ *
  * This is an optimized version of svn_stringbuf_appendbytes()
  * that is much faster to call and execute. Gains vary with the ABI.
  * The advantages extend beyond the actual call because the reduced
@@ -291,7 +304,7 @@ svn_stringbuf_appendbytes(svn_stringbuf_
                           const char *bytes,
                           apr_size_t count);
 
-/** Append an @c svn_stringbuf_t onto @a targetstr.
+/** Append the stringbuf @c appendstr onto @a targetstr.
  *
  * reallocs if necessary. @a targetstr is affected, nothing else is.
  */
@@ -299,7 +312,7 @@ void
 svn_stringbuf_appendstr(svn_stringbuf_t *targetstr,
                         const svn_stringbuf_t *appendstr);
 
-/** Append a C string onto @a targetstr.
+/** Append the C string @a cstr onto @a targetstr.
  *
  * reallocs if necessary. @a targetstr is affected, nothing else is.
  */

Modified: subversion/branches/in-repo-authz/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/include/svn_wc.h?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/include/svn_wc.h (original)
+++ subversion/branches/in-repo-authz/subversion/include/svn_wc.h Fri Nov 30 14:19:48 2012
@@ -6174,8 +6174,14 @@ typedef svn_error_t *(*svn_wc_canonicali
  *
  * If the property is not appropriate for a node of kind @a kind, or
  * is otherwise invalid, throw an error.  Otherwise, set @a *propval_p
- * to a canonicalized version of the property value.  If @a
- * skip_some_checks is TRUE, only some validity checks are taken.
+ * to a canonicalized version of the property value.
+ *
+ * If @a skip_some_checks is TRUE, some validity checks and
+ * canonicalizations are skipped. Presently, these are:
+ *   - For svn:eol-style: strip white space; check value is recognized;
+ *       check file content matches value.
+ *   - For svn:mime-type: strip white space; check value has reasonable
+ *       syntax.
  *
  * Some validity checks require access to the contents and MIME type
  * of the target if it is a file; they will call @a prop_getter with @a

Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/add.c?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/add.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/add.c Fri Nov 30 14:19:48 2012
@@ -922,7 +922,9 @@ svn_error_t *svn_client__get_all_ignores
                                 scratch_pool, scratch_pool);
       if (err)
         {
-          if (err->apr_err != SVN_ERR_UNVERSIONED_RESOURCE)
+          /* Unversioned and deleted nodes don't have properties */
+          if (err->apr_err != SVN_ERR_UNVERSIONED_RESOURCE
+              && err->apr_err != SVN_ERR_WC_PATH_UNEXPECTED_STATUS)
             return svn_error_trace(err);
 
           svn_error_clear(err);

Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/merge.c?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/merge.c Fri Nov 30 14:19:48 2012
@@ -286,9 +286,11 @@ typedef struct merge_cmd_baton_t {
      dry_run mode. */
   apr_hash_t *dry_run_deletions;
 
-  /* The list of paths for entries we've added, used only when in
-     dry_run mode. */
+  /* The list of paths for entries we've added and the most
+     recently added directory.  The latter may be NULL.
+     Both are used only when in dry_run mode. */
   apr_hash_t *dry_run_added;
+  const char *dry_run_last_added_dir;
 
   /* The list of any paths which remained in conflict after a
      resolution attempt was made.  We track this in-memory, rather
@@ -303,9 +305,10 @@ typedef struct merge_cmd_baton_t {
      meet the criteria or DRY_RUN is true. */
   apr_hash_t *paths_with_new_mergeinfo;
 
-  /* A list of absolute paths which had explicit mergeinfo prior to the merge
-     but had this mergeinfo deleted by the merge.  This is populated by
-     merge_change_props() and is allocated in POOL so it is subject to the
+  /* A list of absolute paths whose mergeinfo doesn't need updating after
+     the merge. This can be caused by the removal of mergeinfo by the merge
+     or by deleting the node itself.  This is populated by merge_change_props()
+     and the delete callbacks and is allocated in POOL so it is subject to the
      lifetime limitations of POOL.  Is NULL if no paths are found which
      meet the criteria or DRY_RUN is true. */
   apr_hash_t *paths_with_deleted_mergeinfo;
@@ -487,32 +490,45 @@ dry_run_added_p(const merge_cmd_baton_t 
                        APR_HASH_KEY_STRING) != NULL);
 }
 
-/* Return true iff we're in dry-run mode and a parent of EDIT_RELPATH
-   would have been added by now if we weren't in dry-run mode.
-   Used to avoid spurious notifications (e.g. conflicts) from a merge
-   attempt into an existing target which would have been deleted if we
-   weren't in dry_run mode (issue #2584).  Assumes that WCPATH is
-   still versioned (e.g. has an associated entry). */
+/* Return true iff we're in dry-run mode and a parent of
+   LOCAL_RELPATH/LOCAL_ABSPATH would have been added by now if we
+   weren't in dry-run mode.  Used to avoid spurious notifications
+   (e.g. conflicts) from a merge attempt into an existing target which
+   would have been deleted if we weren't in dry_run mode (issue
+   #2584).  Assumes that WCPATH is still versioned (e.g. has an
+   associated entry). */
 static svn_boolean_t
 dry_run_added_parent_p(const merge_cmd_baton_t *merge_b,
-                       const char *edit_relpath,
+                       const char *local_relpath,
+                       const char *local_abspath,
                        apr_pool_t *scratch_pool)
 {
+  const char *abspath = local_abspath;
   int i;
-  const char *abspath;
 
   if (!merge_b->dry_run)
     return FALSE;
 
-  abspath = svn_dirent_join(merge_b->target->abspath, edit_relpath,
-                            scratch_pool);
-  for (i = 0; i < (svn_path_component_count(edit_relpath) - 1); i++)
+  /* See if LOCAL_ABSPATH is a child of the most recently added
+     directory.  This is an optimization over searching through
+     dry_run_added that plays to the strengths of the editor's drive
+     ordering constraints.  In fact, we need the fallback approach
+     below only because of ra_serf's insufficiencies in this area.  */
+  if (merge_b->dry_run_last_added_dir
+      && svn_dirent_is_child(merge_b->dry_run_last_added_dir,
+                             local_abspath, NULL))
+    return TRUE;
+
+  /* The fallback:  see if any of LOCAL_ABSPATH's parents have been
+     added in this merge so far. */
+  for (i = 0; i < (svn_path_component_count(local_relpath) - 1); i++)
     {
       abspath = svn_dirent_dirname(abspath, scratch_pool);
       if (apr_hash_get(merge_b->dry_run_added, abspath,
                        APR_HASH_KEY_STRING))
         return TRUE;
     }
+
   return FALSE;
 }
 
@@ -1884,7 +1900,8 @@ merge_file_added(svn_wc_notify_state_t *
     if (obstr_state != svn_wc_notify_state_inapplicable)
       {
         if (merge_b->dry_run 
-            && dry_run_added_parent_p(merge_b, mine_relpath, scratch_pool))
+            && dry_run_added_parent_p(merge_b, mine_relpath,
+                                      mine_abspath, scratch_pool))
           {
             if (content_state)
               *content_state = svn_wc_notify_state_changed;
@@ -2217,6 +2234,15 @@ merge_file_deleted(svn_wc_notify_state_t
                                           merge_b->ctx, scratch_pool));
             if (state)
               *state = svn_wc_notify_state_changed;
+
+            /* Record that we might have deleted mergeinfo */
+            if (!merge_b->paths_with_deleted_mergeinfo)
+              merge_b->paths_with_deleted_mergeinfo =
+                                                apr_hash_make(merge_b->pool);
+
+            apr_hash_set(merge_b->paths_with_deleted_mergeinfo,
+                         apr_pstrdup(merge_b->pool, mine_abspath),
+                         APR_HASH_KEY_STRING, mine_abspath);
           }
         else
           {
@@ -2281,6 +2307,24 @@ merge_file_deleted(svn_wc_notify_state_t
   return SVN_NO_ERROR;
 }
 
+/* Upate dry run list of added directories.
+
+   If the merge is a dry run, then set MERGE_B->DRY_RUN_LAST_ADDED_DIR to a
+   copy of ADDED_DIR_ABSPATH, allocated in MERGE_B->POOL. Add the same copy
+   to MERGE_B->DRY_RUN_ADDED. Do nothing if the merge is not a dry run. */
+static void
+cache_last_added_dir(merge_cmd_baton_t *merge_b,
+                     const char *added_dir_abspath)
+{
+  if (merge_b->dry_run)
+    {
+      merge_b->dry_run_last_added_dir = apr_pstrdup(merge_b->pool,
+                                                   added_dir_abspath);
+      apr_hash_set(merge_b->dry_run_added, merge_b->dry_run_last_added_dir,
+                  APR_HASH_KEY_STRING, merge_b->dry_run_last_added_dir);
+    }
+}
+
 /* An svn_wc_diff_callbacks4_t function. */
 static svn_error_t *
 merge_dir_added(svn_wc_notify_state_t *state,
@@ -2364,7 +2408,8 @@ merge_dir_added(svn_wc_notify_state_t *s
     if (obstr_state != svn_wc_notify_state_inapplicable)
       {
         if (state && merge_b->dry_run
-            && dry_run_added_parent_p(merge_b, local_relpath, scratch_pool))
+            && dry_run_added_parent_p(merge_b, local_relpath,
+                                      local_abspath, scratch_pool))
           {
             *state = svn_wc_notify_state_changed;
           }
@@ -2386,10 +2431,7 @@ merge_dir_added(svn_wc_notify_state_t *s
       /* Unversioned or schedule-delete */
       if (merge_b->dry_run)
         {
-          const char *added_path = apr_pstrdup(merge_b->pool,
-                                               local_abspath);
-          apr_hash_set(merge_b->dry_run_added, added_path,
-                       APR_HASH_KEY_STRING, added_path);
+          cache_last_added_dir(merge_b, local_abspath);
         }
       else
         {
@@ -2425,10 +2467,7 @@ merge_dir_added(svn_wc_notify_state_t *s
             }
           else
             {
-              const char *added_path = apr_pstrdup(merge_b->pool,
-                                                   local_abspath);
-              apr_hash_set(merge_b->dry_run_added, added_path,
-                           APR_HASH_KEY_STRING, added_path);
+              cache_last_added_dir(merge_b, local_abspath);
             }
           if (state)
             *state = svn_wc_notify_state_changed;
@@ -2467,6 +2506,9 @@ merge_dir_added(svn_wc_notify_state_t *s
         }
       break;
     case svn_node_file:
+      if (merge_b->dry_run)
+        merge_b->dry_run_last_added_dir = NULL;
+
       if (is_versioned && dry_run_deleted_p(merge_b, local_abspath))
         {
           /* ### TODO: Retain record of this dir being added to
@@ -2488,6 +2530,8 @@ merge_dir_added(svn_wc_notify_state_t *s
         }
       break;
     default:
+      if (merge_b->dry_run)
+        merge_b->dry_run_last_added_dir = NULL;
       if (state)
         *state = svn_wc_notify_state_unknown;
       break;
@@ -2591,6 +2635,15 @@ merge_dir_deleted(svn_wc_notify_state_t 
                 if (state)
                   *state = svn_wc_notify_state_changed;
               }
+
+            /* Record that we might have deleted mergeinfo */
+            if (!merge_b->paths_with_deleted_mergeinfo)
+              merge_b->paths_with_deleted_mergeinfo =
+                                                apr_hash_make(merge_b->pool);
+
+            apr_hash_set(merge_b->paths_with_deleted_mergeinfo,
+                         apr_pstrdup(merge_b->pool, local_abspath),
+                         APR_HASH_KEY_STRING, local_abspath);
           }
         else
           {
@@ -6657,7 +6710,6 @@ normalize_merge_sources_internal(apr_arr
                   new_segment->path = original_repos_relpath;
                   new_segment->range_start = original_revision;
                   new_segment->range_end = original_revision;
-                  segment->range_start = original_revision + 1;
                   svn_sort__array_insert(&new_segment, segments, 0);
                 }
             }
@@ -9199,6 +9251,7 @@ do_merge(apr_hash_t **modified_subtrees,
         dry_run ? apr_hash_make(iterpool) : NULL;
       merge_cmd_baton.dry_run_added =
         dry_run ? apr_hash_make(iterpool) : NULL;
+      merge_cmd_baton.dry_run_last_added_dir = NULL;
       merge_cmd_baton.conflicted_paths = NULL;
       merge_cmd_baton.paths_with_new_mergeinfo = NULL;
       merge_cmd_baton.paths_with_deleted_mergeinfo = NULL;

Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/mergeinfo.c?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/mergeinfo.c Fri Nov 30 14:19:48 2012
@@ -911,18 +911,15 @@ elide_mergeinfo(svn_mergeinfo_t parent_m
 
 
 svn_error_t *
-svn_client__elide_mergeinfo(const char *target_wcpath,
-                            const char *wc_elision_limit_path,
+svn_client__elide_mergeinfo(const char *target_abspath,
+                            const char *wc_elision_limit_abspath,
                             svn_client_ctx_t *ctx,
                             apr_pool_t *pool)
 {
-  const char *target_abspath;
-  const char *limit_abspath = NULL;
+  const char *limit_abspath = wc_elision_limit_abspath;
 
-  SVN_ERR(svn_dirent_get_absolute(&target_abspath, target_wcpath, pool));
-  if (wc_elision_limit_path)
-    SVN_ERR(svn_dirent_get_absolute(&limit_abspath, wc_elision_limit_path,
-                                    pool));
+  SVN_ERR_ASSERT(svn_dirent_is_absolute(target_abspath));
+  SVN_ERR_ASSERT(!wc_elision_limit_abspath || svn_dirent_is_absolute(wc_elision_limit_abspath));
 
   /* Check for first easy out: We are already at the limit path. */
   if (!limit_abspath
@@ -985,12 +982,12 @@ svn_client__elide_mergeinfo(const char *
       /* If TARGET_WCPATH inherited no mergeinfo from the WC and we are
          not limiting our search to the working copy then check if it
          inherits any from the repos. */
-      if (!mergeinfo && !wc_elision_limit_path)
+      if (!mergeinfo && !wc_elision_limit_abspath)
         {
           err = svn_client__get_wc_or_repos_mergeinfo(
             &mergeinfo, NULL, NULL, TRUE,
             svn_mergeinfo_nearest_ancestor,
-            NULL, target_wcpath, ctx, pool);
+            NULL, target_abspath, ctx, pool);
           if (err)
             {
               if (err->apr_err == SVN_ERR_MERGEINFO_PARSE_ERROR)
@@ -1009,7 +1006,7 @@ svn_client__elide_mergeinfo(const char *
 
       /* If there is nowhere to elide TARGET_WCPATH's mergeinfo to and
          the elision is limited, then we are done.*/
-      if (!mergeinfo && wc_elision_limit_path)
+      if (!mergeinfo && wc_elision_limit_abspath)
         return SVN_NO_ERROR;
 
       SVN_ERR(elide_mergeinfo(mergeinfo, target_mergeinfo, target_abspath,

Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/mergeinfo.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/mergeinfo.h?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/mergeinfo.h (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/mergeinfo.h Fri Nov 30 14:19:48 2012
@@ -345,42 +345,42 @@ svn_client__record_wc_mergeinfo_catalog(
                                         svn_client_ctx_t *ctx,
                                         apr_pool_t *scratch_pool);
 
-/* Elide any svn:mergeinfo set on TARGET_WCPATH to its nearest working
+/* Elide any svn:mergeinfo set on TARGET_ABSPATH to its nearest working
    copy (or possibly repository) ancestor with equivalent mergeinfo.
 
-   If WC_ELISION_LIMIT_PATH is NULL check up to the root of the
+   If WC_ELISION_LIMIT_ABSPATH is NULL check up to the root of the
    working copy or the nearest switched parent for an elision
    destination, if none is found check the repository, otherwise check
-   as far as WC_ELISION_LIMIT_PATH within the working copy.
-   TARGET_WCPATH and WC_ELISION_LIMIT_PATH, if it exists, must both be
+   as far as WC_ELISION_LIMIT_ABSPATH within the working copy.
+   TARGET_WCPATH and WC_ELISION_LIMIT_ABSPATH, if it exists, must both be
    absolute or relative to the working directory.
 
    Elision occurs if:
 
-     A) TARGET_WCPATH has empty mergeinfo and no parent path with
+     A) TARGET_ABSPATH has empty mergeinfo and no parent path with
         explicit mergeinfo can be found in either the WC or the
         repository (WC_ELISION_LIMIT_PATH must be NULL for this to
         occur).
 
-     B) TARGET_WCPATH has empty mergeinfo and its nearest parent also
+     B) TARGET_ABSPATH has empty mergeinfo and its nearest parent also
         has empty mergeinfo.
 
-     C) TARGET_WCPATH has the same mergeinfo as its nearest parent
+     C) TARGET_ABSPATH has the same mergeinfo as its nearest parent
         when that parent's mergeinfo is adjusted for the path
         difference between the two, e.g.:
 
-           TARGET_WCPATH                = A_COPY/D/H
-           TARGET_WCPATH's mergeinfo    = '/A/D/H:3'
-           TARGET_WCPATH nearest parent = A_COPY
-           Parent's mergeinfo           = '/A:3'
-           Path differece               = 'D/H'
-           Parent's adjusted mergeinfo  = '/A/D/H:3'
+           TARGET_ABSPATH                = A_COPY/D/H
+           TARGET_ABSPATH's mergeinfo    = '/A/D/H:3'
+           TARGET_ABSPATH nearest parent = A_COPY
+           Parent's mergeinfo            = '/A:3'
+           Path difference               = 'D/H'
+           Parent's adjusted mergeinfo   = '/A/D/H:3'
 
    If Elision occurs remove the svn:mergeinfo property from
-   TARGET_WCPATH. */
+   TARGET_ABSPATH. */
 svn_error_t *
-svn_client__elide_mergeinfo(const char *target_wcpath,
-                            const char *wc_elision_limit_path,
+svn_client__elide_mergeinfo(const char *target_abspath,
+                            const char *wc_elision_limit_abspath,
                             svn_client_ctx_t *ctx,
                             apr_pool_t *pool);
 

Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/prop_commands.c?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/prop_commands.c Fri Nov 30 14:19:48 2012
@@ -48,29 +48,6 @@
 
 /*** Code. ***/
 
-/* Check whether NAME is a revision property name.
- *
- * Return TRUE if it is.
- * Return FALSE if it is not.
- */
-static svn_boolean_t
-is_revision_prop_name(const char *name)
-{
-  apr_size_t i;
-  static const char *revision_props[] =
-    {
-      SVN_PROP_REVISION_ALL_PROPS
-    };
-
-  for (i = 0; i < sizeof(revision_props) / sizeof(revision_props[0]); i++)
-    {
-      if (strcmp(name, revision_props[i]) == 0)
-        return TRUE;
-    }
-  return FALSE;
-}
-
-
 /* Return an SVN_ERR_CLIENT_PROPERTY_NAME error if NAME is a wcprop,
    else return SVN_NO_ERROR. */
 static svn_error_t *
@@ -285,7 +262,7 @@ static svn_error_t *
 check_prop_name(const char *propname,
                 const svn_string_t *propval)
 {
-  if (is_revision_prop_name(propname))
+  if (svn_prop_is_known_svn_rev_prop(propname))
     return svn_error_createf(SVN_ERR_CLIENT_PROPERTY_NAME, NULL,
                              _("Revision property '%s' not allowed "
                                "in this context"), propname);

Modified: subversion/branches/in-repo-authz/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_fs_fs/tree.c?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_fs_fs/tree.c Fri Nov 30 14:19:48 2012
@@ -3243,7 +3243,7 @@ prev_location(const char **prev_path,
   */
   SVN_ERR(fs_copied_from(&copy_src_rev, &copy_src_path,
                          copy_root, copy_path, pool));
-  remainder_path = svn_relpath_skip_ancestor(copy_path, path);
+  remainder_path = svn_fspath__skip_ancestor(copy_path, path);
   *prev_path = svn_fspath__join(copy_src_path, remainder_path, pool);
   *prev_rev = copy_src_rev;
   return SVN_NO_ERROR;

Modified: subversion/branches/in-repo-authz/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_ra_serf/update.c?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_ra_serf/update.c Fri Nov 30 14:19:48 2012
@@ -357,6 +357,10 @@ struct report_context_t {
 
   /* completed PROPFIND requests (contains svn_ra_serf__handler_t) */
   svn_ra_serf__list_t *done_propfinds;
+  svn_ra_serf__list_t *done_dir_propfinds;
+
+  /* list of outstanding prop changes (contains report_dir_t) */
+  svn_ra_serf__list_t *active_dir_propfinds;
 
   /* list of files that only have prop changes (contains report_info_t) */
   svn_ra_serf__list_t *file_propchanges_only;
@@ -1347,6 +1351,27 @@ maybe_close_dir_chain(report_dir_t *dir)
     {
       report_dir_t *parent = cur_dir->parent_dir;
       report_context_t *report_context = cur_dir->report_context;
+      svn_boolean_t propfind_in_done_list = FALSE;
+      svn_ra_serf__list_t *done_list;
+
+      /* Make sure there are no references to this dir in the
+         active_dir_propfinds list.  If there are, don't close the
+         directory -- which would delete the pool from which the
+         relevant active_dir_propfinds list item is allocated -- and
+         of course don't crawl upward to check the parents for
+         a closure opportunity, either.  */
+      done_list = report_context->active_dir_propfinds;
+      while (done_list)
+        {
+          if (done_list->data == cur_dir)
+            {
+              propfind_in_done_list = TRUE;
+              break;
+            }
+          done_list = done_list->next;
+        }
+      if (propfind_in_done_list)
+        break;
 
       SVN_ERR(close_dir(cur_dir));
       if (parent)
@@ -1377,6 +1402,10 @@ handle_propchange_only(report_info_t *in
 
   info->dir->ref_count--;
 
+  /* See if the parent directory of this file (and perhaps even
+     parents of that) can be closed now.  */
+  SVN_ERR(maybe_close_dir_chain(info->dir));
+
   return SVN_NO_ERROR;
 }
 
@@ -1401,6 +1430,10 @@ handle_local_content(report_info_t *info
 
   info->dir->ref_count--;
 
+  /* See if the parent directory of this fetched item (and
+     perhaps even parents of that) can be closed now. */
+  SVN_ERR(maybe_close_dir_chain(info->dir));
+
   return SVN_NO_ERROR;
 }
 
@@ -1565,12 +1598,7 @@ fetch_file(report_context_t *ctx, report
     }
   else
     {
-      /* No propfind or GET request.  Just handle the prop changes now.
-
-         Note: we'll use INFO->POOL for the scratch_pool here since it will
-         be destroyed at the end of handle_propchange_only(). That pool
-         would be quite fine, but it is unclear how long INFO->POOL will
-         stick around since its lifetime and usage are unclear.  */
+      /* No propfind or GET request.  Just handle the prop changes now. */
       SVN_ERR(handle_propchange_only(info, info->pool));
     }
 
@@ -2126,13 +2154,15 @@ end_report(svn_ra_serf__xml_parser_t *pa
        */
       if (info->dir->fetch_props)
         {
+          svn_ra_serf__list_t *list_item;
+ 
           SVN_ERR(svn_ra_serf__deliver_props(&info->dir->propfind_handler,
                                              info->dir->props, ctx->sess,
                                              get_best_connection(ctx),
                                              info->dir->url,
                                              ctx->target_rev, "0",
                                              all_props,
-                                             &ctx->done_propfinds,
+                                             &ctx->done_dir_propfinds,
                                              info->dir->pool));
           SVN_ERR_ASSERT(info->dir->propfind_handler);
 
@@ -2141,6 +2171,11 @@ end_report(svn_ra_serf__xml_parser_t *pa
 
           ctx->num_active_propfinds++;
 
+          list_item = apr_pcalloc(info->dir->pool, sizeof(*list_item));
+          list_item->data = info->dir;
+          list_item->next = ctx->active_dir_propfinds;
+          ctx->active_dir_propfinds = list_item;
+
           if (ctx->num_active_fetches + ctx->num_active_propfinds
               > REQUEST_COUNT_TO_PAUSE)
             ctx->parser_ctx->paused = TRUE;
@@ -2150,6 +2185,12 @@ end_report(svn_ra_serf__xml_parser_t *pa
           info->dir->propfind_handler = NULL;
         }
 
+      /* See if this directory (and perhaps even parents of that) can
+         be closed now.  This is likely to be the case only if we
+         didn't need to contact the server for supplemental
+         information required to handle any of this directory's
+         children.  */
+      SVN_ERR(maybe_close_dir_chain(info->dir));
       svn_ra_serf__xml_pop_state(parser);
     }
   else if (state == OPEN_FILE && strcmp(name.name, "open-file") == 0)
@@ -2695,10 +2736,12 @@ finish_report(void *report_baton,
         SVN_ERR(open_connection_if_needed(sess, report->num_active_fetches +
                                           report->num_active_propfinds));
 
-      /* prune our propfind list if they are done. */
+      /* Prune completed file PROPFINDs. */
       done_list = report->done_propfinds;
       while (done_list)
         {
+          svn_ra_serf__list_t *next_done = done_list->next;
+
           svn_pool_clear(iterpool_inner);
 
           report->num_active_propfinds--;
@@ -2733,39 +2776,46 @@ finish_report(void *report_baton,
                 {
                   report_info_t *info = cur->data;
 
-                  /* If we've got cached file content for this file,
-                     take care of the locally collected properties and
-                     file content at once.  Otherwise, just deal with
-                     the collected properties. */
-                  if (info->cached_contents)
+                  if (!prev)
                     {
-                      SVN_ERR(handle_local_content(info, iterpool_inner));
+                      report->file_propchanges_only = cur->next;
                     }
                   else
                     {
-                      SVN_ERR(handle_propchange_only(info, iterpool_inner));
+                      prev->next = cur->next;
                     }
 
-                  if (!prev)
+                  /* If we've got cached file content for this file,
+                     take care of the locally collected properties and
+                     file content at once.  Otherwise, just deal with
+                     the collected properties.
+
+                     NOTE:  These functions below could delete
+                     info->dir->pool (via maybe_close_dir_chain()),
+                     from which is allocated the list item in
+                     report->file_propchanges_only.
+                  */
+                  if (info->cached_contents)
                     {
-                      report->file_propchanges_only = cur->next;
+                      SVN_ERR(handle_local_content(info, iterpool_inner));
                     }
                   else
                     {
-                      prev->next = cur->next;
+                      SVN_ERR(handle_propchange_only(info, iterpool_inner));
                     }
                 }
             }
 
-          done_list = done_list->next;
+          done_list = next_done;
         }
       report->done_propfinds = NULL;
 
-      /* Prune completely fetches from our list. */
+      /* Prune completed fetches from our list. */
       done_list = report->done_fetches;
       while (done_list)
         {
           report_fetch_t *done_fetch = done_list->data;
+          svn_ra_serf__list_t *next_done = done_list->next;
           report_dir_t *cur_dir;
 
           /* Decrease the refcount in the parent directory of the file
@@ -2776,14 +2826,77 @@ finish_report(void *report_baton,
           /* Decrement our active fetch count. */
           report->num_active_fetches--;
 
-          done_list = done_list->next;
-
           /* See if the parent directory of this fetched item (and
-             perhaps even parents of that) can be closed now. */
+             perhaps even parents of that) can be closed now. 
+
+             NOTE:  This could delete cur_dir->pool, from which is
+             allocated the list item in report->done_fetches.
+          */
           SVN_ERR(maybe_close_dir_chain(cur_dir));
+
+          done_list = next_done;
         }
       report->done_fetches = NULL;
 
+      /* Prune completed directory PROPFINDs. */
+      done_list = report->done_dir_propfinds;
+      while (done_list)
+        {
+          svn_ra_serf__list_t *next_done = done_list->next;
+
+          report->num_active_propfinds--;
+
+          if (report->active_dir_propfinds)
+            {
+              svn_ra_serf__list_t *cur, *prev;
+
+              prev = NULL;
+              cur = report->active_dir_propfinds;
+
+              while (cur)
+                {
+                  report_dir_t *item = cur->data;
+
+                  if (item->propfind_handler == done_list->data)
+                    {
+                      break;
+                    }
+
+                  prev = cur;
+                  cur = cur->next;
+                }
+              SVN_ERR_ASSERT(cur); /* we expect to find a matching propfind! */
+
+              /* If we found a match, set the new props and remove this
+               * propchange from our list.
+               */
+              if (cur)
+                {
+                  report_dir_t *cur_dir = cur->data;
+
+                  if (!prev)
+                    {
+                      report->active_dir_propfinds = cur->next;
+                    }
+                  else
+                    {
+                      prev->next = cur->next;
+                    }
+
+                  /* See if this directory (and perhaps even parents of that)
+                     can be closed now.
+
+                     NOTE:  This could delete cur_dir->pool, from which is
+                     allocated the list item in report->active_dir_propfinds.
+                  */
+                  SVN_ERR(maybe_close_dir_chain(cur_dir));
+                }
+            }
+
+          done_list = next_done;
+        }
+      report->done_dir_propfinds = NULL;
+
       /* If the parser is paused, and the number of active requests has
          dropped far enough, then resume parsing.  */
       if (parser_ctx->paused

Modified: subversion/branches/in-repo-authz/subversion/libsvn_subr/properties.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_subr/properties.c?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_subr/properties.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_subr/properties.c Fri Nov 30 14:19:48 2012
@@ -33,6 +33,90 @@
 #include "svn_ctype.h"
 
 
+/* All Subversion-specific versioned node properties
+ * known to this client, that are applicable to both a file and a dir.
+ */
+#define SVN_PROP__NODE_COMMON_PROPS SVN_PROP_MERGEINFO, \
+                                    SVN_PROP_TEXT_TIME, \
+                                    SVN_PROP_OWNER, \
+                                    SVN_PROP_GROUP, \
+                                    SVN_PROP_UNIX_MODE,
+
+/* All Subversion-specific versioned node properties
+ * known to this client, that are applicable to a dir only.
+ */
+#define SVN_PROP__NODE_DIR_ONLY_PROPS SVN_PROP_IGNORE, \
+                                      SVN_PROP_INHERITABLE_IGNORES, \
+                                      SVN_PROP_INHERITABLE_AUTO_PROPS, \
+                                      SVN_PROP_EXTERNALS,
+
+/* All Subversion-specific versioned node properties
+ * known to this client, that are applicable to a file only.
+ */
+#define SVN_PROP__NODE_FILE_ONLY_PROPS SVN_PROP_MIME_TYPE, \
+                                       SVN_PROP_EOL_STYLE, \
+                                       SVN_PROP_KEYWORDS, \
+                                       SVN_PROP_EXECUTABLE, \
+                                       SVN_PROP_NEEDS_LOCK, \
+                                       SVN_PROP_SPECIAL,
+
+static const char *const known_rev_props[]
+ = { SVN_PROP_REVISION_ALL_PROPS
+     NULL };
+
+static const char *const known_node_props[]
+ = { SVN_PROP__NODE_COMMON_PROPS
+     SVN_PROP__NODE_DIR_ONLY_PROPS
+     SVN_PROP__NODE_FILE_ONLY_PROPS
+     NULL };
+
+static const char *const known_dir_props[]
+ = { SVN_PROP__NODE_COMMON_PROPS
+     SVN_PROP__NODE_DIR_ONLY_PROPS
+     NULL };
+
+static const char *const known_file_props[]
+ = { SVN_PROP__NODE_COMMON_PROPS
+     SVN_PROP__NODE_FILE_ONLY_PROPS
+     NULL };
+
+static svn_boolean_t
+is_known_prop(const char *prop_name,
+              const char *const *known_props)
+{
+  while (*known_props)
+    {
+      if (strcmp(prop_name, *known_props++) == 0)
+        return TRUE;
+    }
+  return FALSE;
+}
+
+svn_boolean_t
+svn_prop_is_known_svn_rev_prop(const char *prop_name)
+{
+  return is_known_prop(prop_name, known_rev_props);
+}
+
+svn_boolean_t
+svn_prop_is_known_svn_node_prop(const char *prop_name)
+{
+  return is_known_prop(prop_name, known_node_props);
+}
+
+svn_boolean_t
+svn_prop_is_known_svn_file_prop(const char *prop_name)
+{
+  return is_known_prop(prop_name, known_file_props);
+}
+
+svn_boolean_t
+svn_prop_is_known_svn_dir_prop(const char *prop_name)
+{
+  return is_known_prop(prop_name, known_dir_props);
+}
+
+
 svn_boolean_t
 svn_prop_is_svn_prop(const char *prop_name)
 {

Modified: subversion/branches/in-repo-authz/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_wc/adm_ops.c?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_wc/adm_ops.c Fri Nov 30 14:19:48 2012
@@ -2446,9 +2446,19 @@ svn_wc_add_lock2(svn_wc_context_t *wc_ct
     }
 
   /* if svn:needs-lock is present, then make the file read-write. */
-  SVN_ERR(svn_wc__internal_propget(&needs_lock, wc_ctx->db, local_abspath,
-                                   SVN_PROP_NEEDS_LOCK, scratch_pool,
-                                   scratch_pool));
+  err = svn_wc__internal_propget(&needs_lock, wc_ctx->db, local_abspath,
+                                 SVN_PROP_NEEDS_LOCK, scratch_pool,
+                                 scratch_pool);
+
+  if (err && err->apr_err == SVN_ERR_WC_PATH_UNEXPECTED_STATUS)
+    {
+      /* The node has non wc representation (e.g. deleted), so
+         we don't want to touch the in-wc file */
+      svn_error_clear(err);
+      return SVN_NO_ERROR;
+    }
+  SVN_ERR(err);
+
   if (needs_lock)
     SVN_ERR(svn_io_set_file_read_write(local_abspath, FALSE, scratch_pool));
 

Modified: subversion/branches/in-repo-authz/subversion/libsvn_wc/diff_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_wc/diff_editor.c?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_wc/diff_editor.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_wc/diff_editor.c Fri Nov 30 14:19:48 2012
@@ -610,8 +610,8 @@ file_diff(struct edit_baton *eb,
       apr_hash_t *baseprops;
 
       /* Get svn:mime-type from pristine props (in BASE or WORKING) of PATH. */
-      SVN_ERR(svn_wc__get_pristine_props(&baseprops, db, local_abspath,
-                                         scratch_pool, scratch_pool));
+      SVN_ERR(svn_wc__db_read_pristine_props(&baseprops, db, local_abspath,
+                                             scratch_pool, scratch_pool));
       if (baseprops)
         base_mimetype = get_prop_mimetype(baseprops);
       else
@@ -731,8 +731,8 @@ file_diff(struct edit_baton *eb,
                          || status == svn_wc__db_status_copied
                          || status == svn_wc__db_status_moved_here);
 
-          SVN_ERR(svn_wc__get_pristine_props(&baseprops, db, local_abspath,
-                                             scratch_pool, scratch_pool));
+          SVN_ERR(svn_wc__db_read_pristine_props(&baseprops, db, local_abspath,
+                                                 scratch_pool, scratch_pool));
 
           /* baseprops will be NULL for added nodes */
           if (!baseprops)
@@ -984,8 +984,8 @@ report_wc_file_as_added(struct edit_bato
   emptyprops = apr_hash_make(scratch_pool);
 
   if (eb->use_text_base)
-    SVN_ERR(svn_wc__get_pristine_props(&wcprops, db, local_abspath,
-                                       scratch_pool, scratch_pool));
+    SVN_ERR(svn_wc__db_read_pristine_props(&wcprops, db, local_abspath,
+                                           scratch_pool, scratch_pool));
   else
     SVN_ERR(svn_wc__get_actual_props(&wcprops, db, local_abspath,
                                      scratch_pool, scratch_pool));
@@ -996,16 +996,21 @@ report_wc_file_as_added(struct edit_bato
 
 
   if (eb->use_text_base)
-    SVN_ERR(get_pristine_file(&source_file, db, local_abspath,
-                              FALSE, scratch_pool, scratch_pool));
+    {
+      SVN_ERR(get_pristine_file(&source_file, db, local_abspath,
+                                FALSE, scratch_pool, scratch_pool));
+      translated_file = source_file; /* No translation needed */
+    }
   else
-    source_file = local_abspath;
+    {
+      source_file = local_abspath;
 
-  SVN_ERR(svn_wc__internal_translated_file(
+      SVN_ERR(svn_wc__internal_translated_file(
            &translated_file, source_file, db, local_abspath,
            SVN_WC_TRANSLATE_TO_NF | SVN_WC_TRANSLATE_USE_GLOBAL_TMP,
            eb->cancel_func, eb->cancel_baton,
            scratch_pool, scratch_pool));
+    }
 
   SVN_ERR(eb->callbacks->file_added(NULL, NULL, NULL,
                                     path,
@@ -1054,8 +1059,8 @@ report_wc_directory_as_added(struct edit
                                         eb->changelist_hash, scratch_pool))
     {
       if (eb->use_text_base)
-        SVN_ERR(svn_wc__get_pristine_props(&wcprops, db, local_abspath,
-                                           scratch_pool, scratch_pool));
+        SVN_ERR(svn_wc__db_read_pristine_props(&wcprops, db, local_abspath,
+                                               scratch_pool, scratch_pool));
       else
         SVN_ERR(svn_wc__get_actual_props(&wcprops, db, local_abspath,
                                          scratch_pool, scratch_pool));
@@ -1227,8 +1232,9 @@ delete_entry(const char *path,
           SVN_ERR(get_pristine_file(&textbase, db, local_abspath,
                                     eb->use_text_base, pool, pool));
 
-          SVN_ERR(svn_wc__get_pristine_props(&baseprops, eb->db, local_abspath,
-                                             pool, pool));
+          SVN_ERR(svn_wc__db_read_pristine_props(&baseprops,
+                                                 eb->db, local_abspath,
+                                                 pool, pool));
           base_mimetype = get_prop_mimetype(baseprops);
 
           SVN_ERR(eb->callbacks->file_deleted(NULL, NULL, path,
@@ -1349,9 +1355,10 @@ close_directory(void *dir_baton,
         {
           if (db->eb->use_text_base)
             {
-              SVN_ERR(svn_wc__get_pristine_props(&originalprops,
-                                                 eb->db, db->local_abspath,
-                                                 scratch_pool, scratch_pool));
+              SVN_ERR(svn_wc__db_read_pristine_props(&originalprops,
+                                                     eb->db, db->local_abspath,
+                                                     scratch_pool,
+                                                     scratch_pool));
             }
           else
             {
@@ -1362,9 +1369,9 @@ close_directory(void *dir_baton,
                                                scratch_pool, scratch_pool));
 
               /* Load the BASE and repository directory properties. */
-              SVN_ERR(svn_wc__get_pristine_props(&base_props,
-                                                 eb->db, db->local_abspath,
-                                                 scratch_pool, scratch_pool));
+              SVN_ERR(svn_wc__db_base_get_props(&base_props,
+                                                eb->db, db->local_abspath,
+                                                scratch_pool, scratch_pool));
 
               repos_props = apply_propchanges(base_props, db->propchanges);
 

Modified: subversion/branches/in-repo-authz/subversion/libsvn_wc/diff_local.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_wc/diff_local.c?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_wc/diff_local.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_wc/diff_local.c Fri Nov 30 14:19:48 2012
@@ -239,8 +239,8 @@ file_diff(struct diff_baton *eb,
           /* We show a deletion of what was actually deleted */
           SVN_ERR_ASSERT(status == svn_wc__db_status_deleted);
 
-          SVN_ERR(svn_wc__get_pristine_props(&del_props, db, local_abspath,
-                                             scratch_pool, scratch_pool));
+          SVN_ERR(svn_wc__db_read_pristine_props(&del_props, db, local_abspath,
+                                                 scratch_pool, scratch_pool));
 
           SVN_ERR(svn_wc__db_read_pristine_info(NULL, NULL, NULL, NULL, NULL,
                                                 NULL, &del_checksum, NULL,
@@ -513,9 +513,7 @@ diff_status_callback(void *baton,
       /* Report the prop change. */
       /* ### This case should probably be extended for git-diff, but this
              is what the old diff code provided */
-      if (status->node_status == svn_wc_status_deleted
-          || status->node_status == svn_wc_status_replaced
-          || status->prop_status == svn_wc_status_modified)
+      if (status->prop_status == svn_wc_status_modified)
         {
           apr_array_header_t *propchanges;
           apr_hash_t *baseprops;

Modified: subversion/branches/in-repo-authz/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_wc/props.c?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_wc/props.c Fri Nov 30 14:19:48 2012
@@ -280,8 +280,8 @@ svn_wc__perform_props_merge(svn_wc_notif
     }
 
   if (had_props)
-    SVN_ERR(svn_wc__get_pristine_props(&pristine_props, db, local_abspath,
-                                       scratch_pool, scratch_pool));
+    SVN_ERR(svn_wc__db_read_pristine_props(&pristine_props, db, local_abspath,
+                                           scratch_pool, scratch_pool));
   if (pristine_props == NULL)
     pristine_props = apr_hash_make(scratch_pool);
 
@@ -1513,13 +1513,13 @@ svn_wc__prop_retrieve_recursive(apr_hash
 }
 
 svn_error_t *
-svn_wc__get_pristine_props(apr_hash_t **props,
-                           svn_wc__db_t *db,
-                           const char *local_abspath,
-                           apr_pool_t *result_pool,
-                           apr_pool_t *scratch_pool)
+svn_wc_get_pristine_props(apr_hash_t **props,
+                          svn_wc_context_t *wc_ctx,
+                          const char *local_abspath,
+                          apr_pool_t *result_pool,
+                          apr_pool_t *scratch_pool)
 {
-  svn_wc__db_status_t status;
+  svn_error_t *err;
 
   SVN_ERR_ASSERT(props != NULL);
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
@@ -1527,60 +1527,23 @@ svn_wc__get_pristine_props(apr_hash_t **
   /* Certain node stats do not have properties defined on them. Check the
      state, and return NULL for these situations.  */
 
-  SVN_ERR(svn_wc__db_read_info(&status, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL,
-                               db, local_abspath,
-                               scratch_pool, scratch_pool));
-  if (status == svn_wc__db_status_added)
-    {
-      /* Resolve the status. copied and moved_here arrive with properties,
-         while a simple add does not.  */
-      SVN_ERR(svn_wc__db_scan_addition(&status, NULL,
-                                       NULL, NULL, NULL,
-                                       NULL, NULL, NULL, NULL, NULL, NULL,
-                                       db, local_abspath,
-                                       scratch_pool, scratch_pool));
-    }
-  if (status == svn_wc__db_status_added
-#if 0
-      /* ### the update editor needs to fetch properties while the directory
-         ### is still marked incomplete  */
-      || status == svn_wc__db_status_incomplete
-#endif
-      || status == svn_wc__db_status_excluded
-      || status == svn_wc__db_status_server_excluded
-      || status == svn_wc__db_status_not_present)
-    {
-      *props = NULL;
-      return SVN_NO_ERROR;
-    }
+  err = svn_wc__db_read_pristine_props(props, wc_ctx->db, local_abspath,
+                                       result_pool, scratch_pool);
 
-  /* status: normal, moved_here, copied, deleted  */
+  if (err)
+    {
+      if (err->apr_err != SVN_ERR_WC_PATH_UNEXPECTED_STATUS)
+        return svn_error_trace(err);
 
-  /* After the above checks, these pristines should always be present.  */
-  return svn_error_trace(
-               svn_wc__db_read_pristine_props(props, db, local_abspath,
-                                              result_pool, scratch_pool));
-}
+      svn_error_clear(err);
 
+      /* Documented behavior is to set *PROPS to NULL */
+      *props = NULL;
+    }
 
-svn_error_t *
-svn_wc_get_pristine_props(apr_hash_t **props,
-                          svn_wc_context_t *wc_ctx,
-                          const char *local_abspath,
-                          apr_pool_t *result_pool,
-                          apr_pool_t *scratch_pool)
-{
-  return svn_error_trace(svn_wc__get_pristine_props(props,
-                                                    wc_ctx->db,
-                                                    local_abspath,
-                                                    result_pool,
-                                                    scratch_pool));
+  return SVN_NO_ERROR;
 }
 
-
 svn_error_t *
 svn_wc_prop_get2(const svn_string_t **value,
                  svn_wc_context_t *wc_ctx,
@@ -1590,6 +1553,7 @@ svn_wc_prop_get2(const svn_string_t **va
                  apr_pool_t *scratch_pool)
 {
   enum svn_prop_kind kind = svn_property_kind2(name);
+  svn_error_t *err;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
@@ -1600,8 +1564,18 @@ svn_wc_prop_get2(const svn_string_t **va
                                _("Property '%s' is an entry property"), name);
     }
 
-  SVN_ERR(svn_wc__internal_propget(value, wc_ctx->db, local_abspath, name,
-                                   result_pool, scratch_pool));
+  err = svn_wc__internal_propget(value, wc_ctx->db, local_abspath, name,
+                                 result_pool, scratch_pool);
+
+  if (err)
+    {
+      if (err->apr_err != SVN_ERR_WC_PATH_UNEXPECTED_STATUS)
+        return svn_error_trace(err);
+
+      svn_error_clear(err);
+      /* Documented behavior is to set *VALUE to NULL */
+      *value = NULL;
+    }
 
   return SVN_NO_ERROR;
 }
@@ -1616,35 +1590,15 @@ svn_wc__internal_propget(const svn_strin
 {
   apr_hash_t *prophash = NULL;
   enum svn_prop_kind kind = svn_property_kind2(name);
-  svn_boolean_t hidden;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
   SVN_ERR_ASSERT(kind != svn_prop_entry_kind);
 
-  /* This returns SVN_ERR_WC_PATH_NOT_FOUND for unversioned paths for us */
-  SVN_ERR(svn_wc__db_node_hidden(&hidden, db, local_abspath, scratch_pool));
-  if (hidden)
-    {
-      /* The node is not present, or not really "here". Therefore, the
-         property is not present.  */
-      *value = NULL;
-      return SVN_NO_ERROR;
-    }
-
   if (kind == svn_prop_wc_kind)
     {
-      svn_error_t *err;
-      /* If no dav cache can be found, just set VALUE to NULL (for
-         compatibility with pre-WC-NG code). */
-      err = svn_wc__db_base_get_dav_cache(&prophash, db, local_abspath,
-                                          result_pool, scratch_pool);
-      if (err && (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND))
-        {
-          *value = NULL;
-          svn_error_clear(err);
-          return SVN_NO_ERROR;
-        }
-      SVN_ERR_W(err, _("Failed to load properties"));
+      SVN_ERR_W(svn_wc__db_base_get_dav_cache(&prophash, db, local_abspath,
+                                              result_pool, scratch_pool),
+                _("Failed to load properties"));
     }
   else
     {
@@ -1665,47 +1619,38 @@ svn_wc__internal_propget(const svn_strin
 
 /* The special Subversion properties are not valid for all node kinds.
    Return an error if NAME is an invalid Subversion property for PATH which
-   is of kind NODE_KIND. */
+   is of kind NODE_KIND.  NAME must be in the "svn:" name space.
+
+   Note that we only disallow the property if we're sure it's one that
+   already has a meaning for a different node kind.  We don't disallow
+   setting an *unknown* svn: prop here, at this level; a higher level
+   should disallow that if desired.
+  */
 static svn_error_t *
 validate_prop_against_node_kind(const char *name,
                                 const char *path,
                                 svn_node_kind_t node_kind,
                                 apr_pool_t *pool)
 {
-
-  const char *file_prohibit[] = { SVN_PROP_IGNORE,
-                                  SVN_PROP_EXTERNALS,
-                                  SVN_PROP_INHERITABLE_AUTO_PROPS,
-                                  SVN_PROP_INHERITABLE_IGNORES,
-                                  NULL };
-  const char *dir_prohibit[] = { SVN_PROP_EXECUTABLE,
-                                 SVN_PROP_KEYWORDS,
-                                 SVN_PROP_EOL_STYLE,
-                                 SVN_PROP_MIME_TYPE,
-                                 SVN_PROP_NEEDS_LOCK,
-                                 NULL };
-  const char **node_kind_prohibit;
   const char *path_display
     = svn_path_is_url(path) ? path : svn_dirent_local_style(path, pool);
 
   switch (node_kind)
     {
     case svn_node_dir:
-      node_kind_prohibit = dir_prohibit;
-      while (*node_kind_prohibit)
-        if (strcmp(name, *node_kind_prohibit++) == 0)
-          return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
-                                   _("Cannot set '%s' on a directory ('%s')"),
-                                   name, path_display);
+      if (! svn_prop_is_known_svn_dir_prop(name)
+          && svn_prop_is_known_svn_file_prop(name))
+        return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                                 _("Cannot set '%s' on a directory ('%s')"),
+                                 name, path_display);
       break;
     case svn_node_file:
-      node_kind_prohibit = file_prohibit;
-      while (*node_kind_prohibit)
-        if (strcmp(name, *node_kind_prohibit++) == 0)
-          return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
-                                   _("Cannot set '%s' on a file ('%s')"),
-                                   name,
-                                   path_display);
+      if (! svn_prop_is_known_svn_file_prop(name)
+          && svn_prop_is_known_svn_dir_prop(name))
+        return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                                 _("Cannot set '%s' on a file ('%s')"),
+                                 name,
+                                 path_display);
       break;
     default:
       return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
@@ -1952,6 +1897,7 @@ do_propset(svn_wc__db_t *db,
                                                      notify_action,
                                                      scratch_pool);
       notify->prop_name = name;
+      notify->kind = kind;
 
       (*notify_func)(notify_baton, notify, scratch_pool);
     }

Modified: subversion/branches/in-repo-authz/subversion/libsvn_wc/props.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_wc/props.h?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_wc/props.h (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_wc/props.h Fri Nov 30 14:19:48 2012
@@ -127,15 +127,6 @@ svn_wc__props_modified(svn_boolean_t *mo
                        const char *local_abspath,
                        apr_pool_t *scratch_pool);
 
-/* Internal version of svn_wc_get_pristine_props().  */
-svn_error_t *
-svn_wc__get_pristine_props(apr_hash_t **props,
-                           svn_wc__db_t *db,
-                           const char *local_abspath,
-                           apr_pool_t *result_pool,
-                           apr_pool_t *scratch_pool);
-
-
 /* Internal version of svn_wc_prop_list2().  */
 svn_error_t *
 svn_wc__get_actual_props(apr_hash_t **props,

Modified: subversion/branches/in-repo-authz/subversion/libsvn_wc/translate.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_wc/translate.c?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_wc/translate.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_wc/translate.c Fri Nov 30 14:19:48 2012
@@ -409,8 +409,8 @@ svn_wc__sync_flags_with_props(svn_boolea
          set the file read_only just yet.  That happens upon commit. */
       apr_hash_t *pristine_props;
 
-      SVN_ERR(svn_wc__get_pristine_props(&pristine_props, db, local_abspath,
-                                         scratch_pool, scratch_pool));
+      SVN_ERR(svn_wc__db_read_pristine_props(&pristine_props, db, local_abspath,
+                                             scratch_pool, scratch_pool));
 
       if (pristine_props
             && apr_hash_get(pristine_props,

Modified: subversion/branches/in-repo-authz/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_wc/update_editor.c?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_wc/update_editor.c Fri Nov 30 14:19:48 2012
@@ -2394,9 +2394,9 @@ close_directory(void *dir_baton,
   if (db->add_existed)
     {
       /* This node already exists. Grab the current pristine properties. */
-      SVN_ERR(svn_wc__get_pristine_props(&base_props,
-                                         eb->db, db->local_abspath,
-                                         scratch_pool, scratch_pool));
+      SVN_ERR(svn_wc__db_read_pristine_props(&base_props,
+                                             eb->db, db->local_abspath,
+                                             scratch_pool, scratch_pool));
     }
   else if (!db->adding_dir)
     {
@@ -4077,9 +4077,9 @@ close_file(void *file_baton,
   if (fb->add_existed)
     {
       /* This node already exists. Grab the current pristine properties. */
-      SVN_ERR(svn_wc__get_pristine_props(&current_base_props,
-                                         eb->db, fb->local_abspath,
-                                         scratch_pool, scratch_pool));
+      SVN_ERR(svn_wc__db_read_pristine_props(&current_base_props,
+                                             eb->db, fb->local_abspath,
+                                             scratch_pool, scratch_pool));
       current_actual_props = local_actual_props;
     }
   else if (!fb->adding_file)

Modified: subversion/branches/in-repo-authz/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_wc/wc_db.c?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_wc/wc_db.c Fri Nov 30 14:19:48 2012
@@ -321,6 +321,7 @@ static svn_error_t *
 db_read_pristine_props(apr_hash_t **props,
                        svn_wc__db_wcroot_t *wcroot,
                        const char *local_relpath,
+                       svn_boolean_t deleted_ok,
                        apr_pool_t *result_pool,
                        apr_pool_t *scratch_pool);
 
@@ -3652,7 +3653,7 @@ cross_db_copy(svn_wc__db_wcroot_t *src_w
                     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                     src_wcroot, src_relpath, scratch_pool, scratch_pool));
 
-  SVN_ERR(db_read_pristine_props(&props, src_wcroot, src_relpath,
+  SVN_ERR(db_read_pristine_props(&props, src_wcroot, src_relpath, FALSE,
                                  scratch_pool, scratch_pool));
 
   blank_iwb(&iwb);
@@ -5101,7 +5102,7 @@ set_props_txn(void *baton,
   /* Check if the props are modified. If no changes, then wipe out the
      ACTUAL props.  PRISTINE_PROPS==NULL means that any
      ACTUAL props are okay as provided, so go ahead and set them.  */
-  SVN_ERR(db_read_pristine_props(&pristine_props, wcroot, local_relpath,
+  SVN_ERR(db_read_pristine_props(&pristine_props, wcroot, local_relpath, FALSE,
                                  scratch_pool, scratch_pool));
   if (spb->props && pristine_props)
     {
@@ -8841,7 +8842,7 @@ db_read_props(void *baton,
     return SVN_NO_ERROR;
 
   /* No local changes. Return the pristine props for this node.  */
-  SVN_ERR(db_read_pristine_props(&rpb->props, wcroot, local_relpath,
+  SVN_ERR(db_read_pristine_props(&rpb->props, wcroot, local_relpath, FALSE,
                                  rpb->result_pool, scratch_pool));
   if (rpb->props == NULL)
     {
@@ -8889,6 +8890,7 @@ static svn_error_t *
 db_read_pristine_props(apr_hash_t **props,
                        svn_wc__db_wcroot_t *wcroot,
                        const char *local_relpath,
+                       svn_boolean_t deleted_ok,
                        apr_pool_t *result_pool,
                        apr_pool_t *scratch_pool)
 {
@@ -8916,9 +8918,8 @@ db_read_pristine_props(apr_hash_t **prop
   presence = svn_sqlite__column_token(stmt, 1, presence_map);
 
   /* For "base-deleted", it is obvious the pristine props are located
-     in the BASE table. Fall through to fetch them.
-     ### BH: Is this really the behavior we want here? */
-  if (presence == svn_wc__db_status_base_deleted)
+     below the current node. Fetch the NODE from the next record. */
+  if (presence == svn_wc__db_status_base_deleted && deleted_ok)
     {
       SVN_ERR(svn_sqlite__step(&have_row, stmt));
 
@@ -8944,8 +8945,13 @@ db_read_pristine_props(apr_hash_t **prop
       return SVN_NO_ERROR;
     }
 
-  *props = NULL;
-  return svn_error_trace(svn_sqlite__reset(stmt));
+  return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS,
+                           svn_sqlite__reset(stmt),
+                           _("The node '%s' has a status that"
+                             " has no properties."),
+                           path_for_error_message(wcroot,
+                                                  local_relpath,
+                                                  scratch_pool));
 }
 
 
@@ -8965,7 +8971,7 @@ svn_wc__db_read_pristine_props(apr_hash_
                               local_abspath, scratch_pool, scratch_pool));
   VERIFY_USABLE_WCROOT(wcroot);
 
-  SVN_ERR(db_read_pristine_props(props, wcroot, local_relpath,
+  SVN_ERR(db_read_pristine_props(props, wcroot, local_relpath, TRUE,
                                  result_pool, scratch_pool));
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/in-repo-authz/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/mod_dav_svn/repos.c?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/in-repo-authz/subversion/mod_dav_svn/repos.c Fri Nov 30 14:19:48 2012
@@ -2596,121 +2596,6 @@ is_parent_resource(const dav_resource *r
 }
 
 
-#if 0
-/* Given an apache request R and a ROOT_PATH to the svn location
-   block, set *KIND to the node-kind of the URI's associated
-   (revision, path) pair, if possible.
-
-   Public uris, baseline collections, version resources, and working
-   (non-baseline) resources all have associated (revision, path)
-   pairs, and thus one of {svn_node_file, svn_node_dir, svn_node_none}
-   will be returned.
-
-   If URI is something more abstract, then set *KIND to
-   svn_node_unknown.  This is true for baselines, working baselines,
-   version controled configurations, activities, histories, and other
-   private resources.
-*/
-static dav_error *
-resource_kind(request_rec *r,
-              const char *uri,
-              const char *root_path,
-              svn_node_kind_t *kind)
-{
-  dav_error *derr;
-  svn_error_t *serr;
-  dav_resource *resource;
-  svn_revnum_t base_rev;
-  svn_fs_root_t *base_rev_root;
-  char *saved_uri;
-
-  /* Temporarily insert the uri that the user actually wants us to
-     convert into a resource.  Typically, this is already r->uri, so
-     this is usually a no-op.  But sometimes the caller may pass in
-     the Destination: header uri.
-
-     ### WHAT WE REALLY WANT here is to refactor get_resource,
-     so that some alternate interface actually allows us to specify
-     the URI to process, i.e. not always process r->uri.
-  */
-  saved_uri = r->uri;
-  r->uri = apr_pstrdup(r->pool, uri);
-
-  /* parse the uri and prep the associated resource. */
-  derr = get_resource(r, root_path,
-                      /* ### I can't believe that every single
-                         parser ignores the LABEL and USE_CHECKED_IN
-                         args below!! */
-                      "ignored_label", 1,
-                      &resource);
-  /* Restore r back to normal. */
-  r->uri = saved_uri;
-
-  if (derr)
-    return derr;
-
-  if (resource->type == DAV_RESOURCE_TYPE_REGULAR)
-    {
-      /* Either a public URI or a bc.  In both cases, prep_regular()
-         has already set the 'exists' and 'collection' flags by
-         querying the appropriate revision root and path.  */
-      if (! resource->exists)
-        *kind = svn_node_none;
-      else
-        *kind = resource->collection ? svn_node_dir : svn_node_file;
-    }
-
-  else if (resource->type == DAV_RESOURCE_TYPE_VERSION)
-    {
-      if (resource->baselined)  /* bln */
-        *kind = svn_node_unknown;
-
-      else /* ver */
-        {
-          derr = fs_check_path(kind, resource->info->root.root,
-                               resource->info->repos_path, r->pool);
-          if (derr != NULL)
-            return derr;
-        }
-    }
-
-  else if (resource->type == DAV_RESOURCE_TYPE_WORKING)
-    {
-      if (resource->baselined) /* wbl */
-        *kind = svn_node_unknown;
-
-      else /* wrk */
-        {
-          /* don't call fs_check_path on the txn, but on the original
-             revision that the txn is based on. */
-          base_rev = svn_fs_txn_base_revision(resource->info->root.txn);
-          serr = svn_fs_revision_root(&base_rev_root,
-                                      resource->info->repos->fs,
-                                      base_rev, r->pool);
-          if (serr)
-            return dav_svn__convert_err
-              (serr, HTTP_INTERNAL_SERVER_ERROR,
-               apr_psprintf(r->pool,
-                            "Could not open root of revision %ld",
-                            base_rev),
-               r->pool);
-
-          derr = fs_check_path(kind, base_rev_root,
-                               resource->info->repos_path, r->pool);
-          if (derr != NULL)
-            return derr;
-        }
-    }
-
-  else
-    /* act, his, vcc, or some other private resource */
-    *kind = svn_node_unknown;
-
-  return NULL;
-}
-#endif
-
-
 static dav_error *
 open_stream(const dav_resource *resource,
             dav_stream_mode mode,
@@ -2730,14 +2615,13 @@ open_stream(const dav_resource *resource
         }
     }
 
-#if 1
+  /* ### TODO:  Can we support range writes someday? */
   if (mode == DAV_MODE_WRITE_SEEKABLE)
     {
       return dav_svn__new_error(resource->pool, HTTP_NOT_IMPLEMENTED, 0,
                                 "Resource body writes cannot use ranges "
                                 "(at this time).");
     }
-#endif
 
   /* start building the stream structure */
   *stream = apr_pcalloc(resource->pool, sizeof(**stream));

Modified: subversion/branches/in-repo-authz/subversion/svn/info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/svn/info-cmd.c?rev=1415649&r1=1415648&r2=1415649&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/svn/info-cmd.c (original)
+++ subversion/branches/in-repo-authz/subversion/svn/info-cmd.c Fri Nov 30 14:19:48 2012
@@ -102,8 +102,22 @@ print_info_xml(void *baton,
                         "revision", rev_str,
                         NULL);
 
+  /* "<url> xx </url>" */
   svn_cl__xml_tagged_cdata(&sb, pool, "url", info->URL);
 
+  if (info->repos_root_URL)
+    {
+      /* "<relative-url> xx </relative-url>" */
+      svn_cl__xml_tagged_cdata(&sb, pool, "relative-url",
+                               apr_pstrcat(pool, "^/",
+                                           svn_path_uri_encode(
+                                               svn_uri_skip_ancestor(
+                                                   info->repos_root_URL,
+                                                   info->URL, pool),
+                                               pool),
+                                           NULL));
+    }
+
   if (info->repos_root_URL || info->repos_UUID)
     {
       /* "<repository>" */
@@ -308,6 +322,13 @@ print_info(void *baton,
   if (info->URL)
     SVN_ERR(svn_cmdline_printf(pool, _("URL: %s\n"), info->URL));
 
+  if (info->URL && info->repos_root_URL)
+    SVN_ERR(svn_cmdline_printf(pool, _("Relative URL: ^/%s\n"),
+                               svn_path_uri_encode(
+                                   svn_uri_skip_ancestor(info->repos_root_URL,
+                                                         info->URL, pool),
+                                   pool)));
+
   if (info->repos_root_URL)
     SVN_ERR(svn_cmdline_printf(pool, _("Repository Root: %s\n"),
                                info->repos_root_URL));