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

svn commit: r1066152 [1/3] - in /subversion/branches/ignore-mergeinfo-log: ./ notes/ subversion/include/ subversion/include/private/ subversion/libsvn_ra_local/ subversion/libsvn_ra_svn/ subversion/libsvn_repos/ subversion/libsvn_subr/ subversion/libsv...

Author: hwright
Date: Tue Feb  1 19:19:52 2011
New Revision: 1066152

URL: http://svn.apache.org/viewvc?rev=1066152&view=rev
Log:
On the ignore-mergeinfo-log branch:
Bring up-to-date with trunk (resolving a conflict).

Modified:
    subversion/branches/ignore-mergeinfo-log/   (props changed)
    subversion/branches/ignore-mergeinfo-log/CHANGES
    subversion/branches/ignore-mergeinfo-log/COMMITTERS
    subversion/branches/ignore-mergeinfo-log/notes/variance-adjusted-patching.html
    subversion/branches/ignore-mergeinfo-log/subversion/include/private/svn_adler32.h   (props changed)
    subversion/branches/ignore-mergeinfo-log/subversion/include/svn_dirent_uri.h
    subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_local/ra_plugin.c
    subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_svn/protocol
    subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/log.c
    subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/adler32.c   (props changed)
    subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/dirent_uri.c
    subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/target.c
    subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/adm_ops.c
    subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/update_editor.c
    subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/workqueue.c
    subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/workqueue.h
    subversion/branches/ignore-mergeinfo-log/subversion/mod_authz_svn/mod_authz_svn.c
    subversion/branches/ignore-mergeinfo-log/subversion/mod_dav_svn/mirror.c
    subversion/branches/ignore-mergeinfo-log/subversion/mod_dav_svn/mod_dav_svn.c
    subversion/branches/ignore-mergeinfo-log/subversion/po/fr.po
    subversion/branches/ignore-mergeinfo-log/subversion/svnserve/serve.c
    subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_subr/dirent_uri-test.c
    subversion/branches/ignore-mergeinfo-log/tools/client-side/bash_completion

Propchange: subversion/branches/ignore-mergeinfo-log/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb  1 19:19:52 2011
@@ -41,4 +41,4 @@
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
 /subversion/branches/uris-as-urls:1060426-1064427
-/subversion/trunk:1054732-1064731
+/subversion/trunk:1054732-1066149

Modified: subversion/branches/ignore-mergeinfo-log/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/CHANGES?rev=1066152&r1=1066151&r2=1066152&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/CHANGES (original)
+++ subversion/branches/ignore-mergeinfo-log/CHANGES Tue Feb  1 19:19:52 2011
@@ -12,7 +12,7 @@ http://svn.apache.org/repos/asf/subversi
             This has been tracked as CVE-2010-4644
    * prevent crash in mod_dav_svn when using SVNParentPath (r1033166)
             This has been tracked as CVE-2010-4539
-   * allow 'log -g' to continue in the face of invalid mergeinfo (r1028108)
+   * allow 'log -g' to continue in the face of invalid mergeinfo (issue #3270)
    * filter unreadable paths for 'svn ls' and 'svn co' (r997026, -070, -474)
    * fix abort in 'svn blame -g' (issue #3666)
    * fix file handle leak in ruby bindings (issue #3512)

Modified: subversion/branches/ignore-mergeinfo-log/COMMITTERS
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/COMMITTERS?rev=1066152&r1=1066151&r2=1066152&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/COMMITTERS [UTF-8] (original)
+++ subversion/branches/ignore-mergeinfo-log/COMMITTERS [UTF-8] Tue Feb  1 19:19:52 2011
@@ -56,6 +56,7 @@ Blanket commit access:
        sbutler   Stephen Butler <sb...@elego.de>
         dannas   Daniel Näslund <da...@dannas.name>
        stefan2   Stefan Fuhrmann <st...@alice-dsl.de>
+       jcorvel   Johan Corveleyn <jc...@gmail.com>
 
 [[END ACTIVE FULL COMMITTERS.  LEAVE THIS LINE HERE; SCRIPTS LOOK FOR IT.]]
 
@@ -175,7 +176,8 @@ Commit access for specific areas:
           lark   Wang Jian <la...@linux.net.cn>               (po: zh_CN) [EMAIL
                                                              IS BOUNCING]
 giorgio_valoti   Giorgio Valoti <gi...@mac.com>          (po: it)
-        nebiac   Federico Nebiacolombo <ci...@amsjv.it>      (po: it)
+        nebiac   Federico Nebiacolombo <ci...@amsjv.it>      (po: it) [EMAIL
+                                                             IS BOUNCING]
         fabien   Fabien Coelho <fa...@coelho.net>           (po: fr)
        marcelg   Marcel Gosselin <ma...@polymtl.ca> (po: fr)
 
@@ -183,6 +185,7 @@ giorgio_valoti   Giorgio Valoti <giorgio
 
      gthompson   Glenn A. Thompson <gt...@cdr.net>       (pluggable-db br.)
        sigfred   Sigfred Håversen <bs...@mumak.com>        (svnserve-ssl br.)
+                                                             [EMAIL IS BOUNCING]
         pmarek   Ph. Marek <ph...@marek.priv.at>           (meta-data-v br.)
       jpeacock   John Peacock <jp...@rowman.com>          (perl-bindings-
                                                               improvements br.)
@@ -191,8 +194,6 @@ giorgio_valoti   Giorgio Valoti <giorgio
        cacknin   Charles Acknin <ch...@gmail.com>    (svnpatch-diff 
                                                               br.)
         holden   Holden Karau <ho...@pigscanfly.ca>         (scheme-bindings br.)
-       jcorvel   Johan Corveleyn <jc...@gmail.com>         (diff-
-                                                              optimizations br.)
 
   Subprojects that are complete, abandoned or have moved elsewhere:
 

Modified: subversion/branches/ignore-mergeinfo-log/notes/variance-adjusted-patching.html
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/notes/variance-adjusted-patching.html?rev=1066152&r1=1066151&r2=1066152&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/notes/variance-adjusted-patching.html (original)
+++ subversion/branches/ignore-mergeinfo-log/notes/variance-adjusted-patching.html Tue Feb  1 19:19:52 2011
@@ -670,7 +670,7 @@ in that you could adjust the 'soft-confl
 <p>The message he's referring to appears to be this one:</p>
 
 <pre>
-   <a href="http://subversion.tigris.org/servlets/ReadMsg?list=dev&amp;msgId=162878">http://subversion.tigris.org/servlets/ReadMsg?list=dev&amp;msgId=162878</a>
+   <a href="http://svn.haxx.se/dev/archive-2002-02/1059.shtml">http://svn.haxx.se/dev/archive-2002-02/1059.shtml</a>
    From: William Uther
    To: dev@subversion.tigris.org
    Subject: Re: Merging

Propchange: subversion/branches/ignore-mergeinfo-log/subversion/include/private/svn_adler32.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb  1 19:19:52 2011
@@ -40,4 +40,4 @@
 /subversion/branches/tc_url_rev/subversion/libsvn_diff/diff.h:874351-874483
 /subversion/branches/tree-conflicts/subversion/libsvn_diff/diff.h:868291-873154
 /subversion/branches/tree-conflicts-notify/subversion/libsvn_diff/diff.h:873926-874008
-/subversion/trunk/subversion/include/private/svn_adler32.h:1054732-1064731
+/subversion/trunk/subversion/include/private/svn_adler32.h:1054732-1066149

Modified: subversion/branches/ignore-mergeinfo-log/subversion/include/svn_dirent_uri.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/include/svn_dirent_uri.h?rev=1066152&r1=1066151&r2=1066152&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/include/svn_dirent_uri.h (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/include/svn_dirent_uri.h Tue Feb  1 19:19:52 2011
@@ -40,9 +40,6 @@
  *       "svn+ssh://user@host:123/My%20Stuff/file.doc"
  *    But not:
  *       "file", "dir/file", "A:/dir", "/My%20Stuff/file.doc"
- *    ### Currently the uri implementation still allows relative URIs
- *    ### (carrying both relative and absolute path data) as valid
- *    ### uris, but this will change soon.
  *
  *  - a relative path (relpath) is an unrooted path that can be joined
  *    to any other relative path, uri or dirent. A relative path is
@@ -71,31 +68,62 @@
  *    - @c svn_uri_canonicalize()
  *    - @c svn_uri_is_canonical()
  *
- * The Subversion codebase also recognizes another class of path.  A
- * Subversion filesystem path (fspath) -- otherwise known as a path
- * within a repository -- is a path relative to the root of the
- * repository filesystem, that starts with a slash ("/").  The rules
- * for a fspath are the same as for a relpath except for the leading
- * '/'.  A fspath never ends with '/' except when the whole path is
- * just '/'.  The fspath API is private (see private/svn_fspath.h).
- *
- * Code that works with a path-in-repository should use, in order of
- * preference: a relpath (preferred), or a fspath (widely used by legacy
- * code), or a relative URI (not recommended except in the context of
- * splitting or joining to a full URL).
+ * The Subversion codebase also recognizes some other classes of path:
  *
- * All code that works with local files, MUST USE the dirent apis.
+ *  - A Subversion filesystem path (fspath) -- otherwise known as a
+ *    path within a repository -- is a path relative to the root of
+ *    the repository filesystem, that starts with a slash ("/").  The
+ *    rules for a fspath are the same as for a relpath except for the
+ *    leading '/'.  A fspath never ends with '/' except when the whole
+ *    path is just '/'.  The fspath API is private (see
+ *    private/svn_fspath.h).
+ *
+ *  - A URL path (urlpath) is just the path part of a URL (the part
+ *    that follows the schema, username, hostname, and port).  These
+ *    are also like relpaths, except that they have a leading slash
+ *    (like fspaths) and are URI-encoded.  The urlpath API is also
+ *    private (see private/svn_fspath.h)
+ *    Example:
+ *       "/svn/repos/trunk/README",
+ *       "/svn/repos/!svn/bc/45/file%20with%20spaces.txt"
+ *
+ * So, which path API is appropriate for your use-case?
+ *
+ *  - If your path refers to a local file, directory, symlink, etc. of
+ *    the sort that you can examine and operate on with other software
+ *    on your computer, it's a dirent.
+ *
+ *  - If your path is a full URL -- with a schema, hostname (maybe),
+ *    and path portion -- it's a uri.
+ *
+ *  - If your path is relative, and is somewhat ambiguous unless it's
+ *    joined to some other more explicit (possible absolute) base
+ *    (such as a dirent or URL), it's a relpath.
+ *
+ *  - If your path is the virtual path of a versioned object inside a
+ *    Subversion repository, it could be one of two different types of
+ *    paths.  We'd prefer to use relpaths (relative to the root
+ *    directory of the virtual repository filesystem) for that stuff,
+ *    but some legacy code uses fspaths.  You'll need to figure out if
+ *    your code expects repository paths to have a leading '/' or not.
+ *    If so, they are fspaths; otherwise they are relpaths.
+ *
+ *  - If your path refers only to the path part of URL -- as if
+ *    someone hacked off the initial schema and hostname portion --
+ *    it's a urlpath.  To date, the ra_dav modules are the only ones
+ *    within Subversion that make use of urlpaths, and this is because
+ *    WebDAV makes heavy use of that form of path specification.
  *
  * When translating between local paths (dirents) and uris code should
- * always go via the relative path format.
- * E.g.
- *  - by truncating a parent portion from a path with svn_*_skip_ancestor(),
- *  - or by converting portions to basenames and then joining to existing paths.
- *
- * SECURITY WARNING: If a path that is received from an untrusted source -like
- * from the network- is converted to a dirent it should be tested with
- * svn_dirent_is_under_root() before you can assume the path to be a safe local
- * path.
+ * always go via the relative path format, perhaps by truncating a
+ * parent portion from a path with svn_*_skip_ancestor(), or by
+ * converting portions to basenames and then joining to existing
+ * paths.
+ *
+ * SECURITY WARNING: If a path that is received from an untrusted
+ * source -- such as from the network -- is converted to a dirent it
+ * should be tested with svn_dirent_is_under_root() before you can
+ * assume the path to be a safe local path.
  */
 
 #ifndef SVN_DIRENT_URI_H
@@ -729,9 +757,9 @@ svn_uri_condense_targets(const char **pc
                          apr_pool_t *result_pool,
                          apr_pool_t *scratch_pool);
 
-/** Check that when @a path is joined to @a base_path, the resulting path
- * is still under BASE_PATH in the local filesystem. If not, set @a under_root
- * to @c FALSE. If @a under_root is @c TRUE is returned, and @a result_path is
+/** Check that when @a path is joined to @a base_path, the resulting path is
+ * still under @a base_path in the local filesystem. If not, set @a under_root
+ * to @c FALSE. If @a under_root of @c TRUE is returned, and @a result_path is
  * not @c NULL, then @a *result_path will be set to the absolute path of @a
  * path, allocated in @a result_pool.
  *

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_local/ra_plugin.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_local/ra_plugin.c?rev=1066152&r1=1066151&r2=1066152&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_local/ra_plugin.c Tue Feb  1 19:19:52 2011
@@ -368,7 +368,7 @@ deltify_etc(const svn_commit_info_t *com
           svn_pool_clear(iterpool);
           apr_hash_this(hi, &rel_path, NULL, &val);
           token = val;
-          abs_path = svn_dirent_join(db->fs_path, rel_path, iterpool);
+          abs_path = svn_fspath__join(db->fs_path, rel_path, iterpool);
           /* We may get errors here if the lock was broken or stolen
              after the commit succeeded.  This is fine and should be
              ignored. */
@@ -547,7 +547,7 @@ svn_ra_local__get_file_revs(svn_ra_sessi
                             apr_pool_t *pool)
 {
   svn_ra_local__session_baton_t *sess = session->priv;
-  const char *abs_path = svn_dirent_join(sess->fs_path->data, path, pool);
+  const char *abs_path = svn_fspath__join(sess->fs_path->data, path, pool);
   return svn_repos_get_file_revs2(sess->repos, abs_path, start, end,
                                   include_merged_revisions, NULL, NULL,
                                   handler, handler_baton, pool);
@@ -665,14 +665,14 @@ svn_ra_local__get_commit_editor(svn_ra_s
                hi = apr_hash_next(hi))
             {
               void *val;
-              const char *path, *token;
+              const char *abs_path, *token;
               const void *key;
 
               apr_hash_this(hi, &key, NULL, &val);
-              path = svn_dirent_join(sess->fs_path->data, (const char *)key,
-                                     pool);
+              abs_path = svn_fspath__join(sess->fs_path->data, key, pool);
               token = val;
-              SVN_ERR(svn_fs_access_add_lock_token2(fs_access, path, token));
+              SVN_ERR(svn_fs_access_add_lock_token2(fs_access,
+                                                    abs_path, token));
             }
         }
     }
@@ -710,7 +710,7 @@ svn_ra_local__get_mergeinfo(svn_ra_sessi
     {
       const char *relative_path = APR_ARRAY_IDX(paths, i, const char *);
       APR_ARRAY_PUSH(abs_paths, const char *) =
-        svn_dirent_join(sess->fs_path->data, relative_path, pool);
+        svn_fspath__join(sess->fs_path->data, relative_path, pool);
     }
 
   SVN_ERR(svn_repos_fs_get_mergeinfo2(&tmp_catalog, sess->repos, abs_paths,
@@ -892,7 +892,7 @@ svn_ra_local__get_log(svn_ra_session_t *
         {
           const char *relative_path = APR_ARRAY_IDX(paths, i, const char *);
           APR_ARRAY_PUSH(abs_paths, const char *) =
-            svn_dirent_join(sess->fs_path->data, relative_path, pool);
+            svn_fspath__join(sess->fs_path->data, relative_path, pool);
         }
     }
 
@@ -951,7 +951,7 @@ svn_ra_local__stat(svn_ra_session_t *ses
 {
   svn_ra_local__session_baton_t *sess = session->priv;
   svn_fs_root_t *root;
-  const char *abs_path = svn_dirent_join(sess->fs_path->data, path, pool);
+  const char *abs_path = svn_fspath__join(sess->fs_path->data, path, pool);
 
   if (! SVN_IS_VALID_REVNUM(revision))
     SVN_ERR(svn_fs_youngest_rev(&revision, sess->fs, pool));
@@ -1019,7 +1019,7 @@ svn_ra_local__get_file(svn_ra_session_t 
   svn_stream_t *contents;
   svn_revnum_t youngest_rev;
   svn_ra_local__session_baton_t *sess = session->priv;
-  const char *abs_path = svn_dirent_join(sess->fs_path->data, path, pool);
+  const char *abs_path = svn_fspath__join(sess->fs_path->data, path, pool);
 
   /* Open the revision's root. */
   if (! SVN_IS_VALID_REVNUM(revision))
@@ -1082,7 +1082,7 @@ svn_ra_local__get_dir(svn_ra_session_t *
   apr_hash_index_t *hi;
   svn_ra_local__session_baton_t *sess = session->priv;
   apr_pool_t *subpool;
-  const char *abs_path = svn_dirent_join(sess->fs_path->data, path, pool);
+  const char *abs_path = svn_fspath__join(sess->fs_path->data, path, pool);
 
   /* Open the revision's root. */
   if (! SVN_IS_VALID_REVNUM(revision))
@@ -1184,7 +1184,7 @@ svn_ra_local__get_locations(svn_ra_sessi
                             apr_pool_t *pool)
 {
   svn_ra_local__session_baton_t *sess = session->priv;
-  const char *abs_path = svn_dirent_join(sess->fs_path->data, path, pool);
+  const char *abs_path = svn_fspath__join(sess->fs_path->data, path, pool);
   return svn_repos_trace_node_locations(sess->fs, locations, abs_path,
                                         peg_revision, location_revisions,
                                         NULL, NULL, pool);
@@ -1202,7 +1202,7 @@ svn_ra_local__get_location_segments(svn_
                                     apr_pool_t *pool)
 {
   svn_ra_local__session_baton_t *sess = session->priv;
-  const char *abs_path = svn_dirent_join(sess->fs_path->data, path, pool);
+  const char *abs_path = svn_fspath__join(sess->fs_path->data, path, pool);
   return svn_repos_node_location_segments(sess->repos, abs_path,
                                           peg_revision, start_rev, end_rev,
                                           receiver, receiver_baton,
@@ -1241,7 +1241,7 @@ svn_ra_local__lock(svn_ra_session_t *ses
       path = key;
       revnum = val;
 
-      abs_path = svn_dirent_join(sess->fs_path->data, path, iterpool);
+      abs_path = svn_fspath__join(sess->fs_path->data, path, iterpool);
 
       /* This wrapper will call pre- and post-lock hooks. */
       err = svn_repos_fs_lock(&lock, sess->repos, abs_path, NULL, comment,
@@ -1301,7 +1301,7 @@ svn_ra_local__unlock(svn_ra_session_t *s
       else
         token = NULL;
 
-      abs_path = svn_dirent_join(sess->fs_path->data, path, iterpool);
+      abs_path = svn_fspath__join(sess->fs_path->data, path, iterpool);
 
       /* This wrapper will call pre- and post-unlock hooks. */
       err = svn_repos_fs_unlock(sess->repos, abs_path, token, force,
@@ -1333,7 +1333,7 @@ svn_ra_local__get_lock(svn_ra_session_t 
                        apr_pool_t *pool)
 {
   svn_ra_local__session_baton_t *sess = session->priv;
-  const char *abs_path = svn_dirent_join(sess->fs_path->data, path, pool);
+  const char *abs_path = svn_fspath__join(sess->fs_path->data, path, pool);
   return svn_fs_get_lock(lock, sess->fs, abs_path, pool);
 }
 
@@ -1347,7 +1347,7 @@ svn_ra_local__get_locks(svn_ra_session_t
                         apr_pool_t *pool)
 {
   svn_ra_local__session_baton_t *sess = session->priv;
-  const char *abs_path = svn_dirent_join(sess->fs_path->data, path, pool);
+  const char *abs_path = svn_fspath__join(sess->fs_path->data, path, pool);
 
   /* Kinda silly to call the repos wrapper, since we have no authz
      func to give it.  But heck, why not. */
@@ -1435,7 +1435,7 @@ svn_ra_local__get_deleted_rev(svn_ra_ses
                               apr_pool_t *pool)
 {
   svn_ra_local__session_baton_t *sess = session->priv;
-  const char *abs_path = svn_dirent_join(sess->fs_path->data, path, pool);
+  const char *abs_path = svn_fspath__join(sess->fs_path->data, path, pool);
 
   SVN_ERR(svn_repos_deleted_rev(sess->fs,
                                 abs_path,
@@ -1455,15 +1455,15 @@ svn_ra_local__obliterate_path_rev(svn_ra
                                   apr_pool_t *pool)
 {
   svn_ra_local__session_baton_t *sess = session->priv;
+  const char *abs_path  = svn_fspath__join(sess->fs_path->data, path, pool);
 
   /* A username is absolutely required to obliterate anything. */
   SVN_ERR(get_username(session, pool));
 
-  path = svn_path_join(sess->fs_path->data, path, pool);
   SVN_ERR(svn_repos__obliterate_path_rev(sess->repos,
                                          sess->username,
                                          revision,
-                                         path,
+                                         abs_path,
                                          pool));
 
   return SVN_NO_ERROR;

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_svn/protocol
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_svn/protocol?rev=1066152&r1=1066151&r2=1066152&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_svn/protocol (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_ra_svn/protocol Tue Feb  1 19:19:52 2011
@@ -370,8 +370,7 @@ second place for auth-request point as n
                 [ end-rev:number ] changed-paths:bool strict-node:bool
                 ? limit:number
                 ? include-merged-revisions:bool
-                all-revprops | revprops
-                ? ( revprop:string ... )
+                all-revprops | revprops ( revprop:string ... )
                 ? ( prop:string ... ) )
     Before sending response, server sends log entries, ending with "done".
     If a client does not want to specify a limit, it should send 0 as the

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/log.c?rev=1066152&r1=1066151&r2=1066152&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/log.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_repos/log.c Tue Feb  1 19:19:52 2011
@@ -1052,6 +1052,7 @@ get_path_histories(apr_array_header_t **
 {
   svn_fs_root_t *root;
   apr_pool_t *iterpool;
+  svn_error_t *err;
   int i;
 
   /* Create a history object for each path so we can walk through
@@ -1093,7 +1094,6 @@ get_path_histories(apr_array_header_t **
 
       if (i < MAX_OPEN_HISTORIES)
         {
-          svn_error_t *err;
           err = svn_fs_node_history(&info->hist, root, this_path, pool);
           if (err
               && ignore_missing_locations
@@ -1115,10 +1115,20 @@ get_path_histories(apr_array_header_t **
           info->newpool = NULL;
         }
 
-      SVN_ERR(get_history(info, fs,
-                          strict_node_history,
-                          authz_read_func, authz_read_baton,
-                          hist_start, pool));
+      err = get_history(info, fs,
+                        strict_node_history,
+                        authz_read_func, authz_read_baton,
+                        hist_start, pool);
+      if (err
+          && ignore_missing_locations
+          && (err->apr_err == SVN_ERR_FS_NOT_FOUND ||
+              err->apr_err == SVN_ERR_FS_NOT_DIRECTORY ||
+              err->apr_err == SVN_ERR_FS_NO_SUCH_REVISION))
+        {
+          svn_error_clear(err);
+          continue;
+        }
+      SVN_ERR(err);
       APR_ARRAY_PUSH(*histories, struct path_info *) = info;
     }
   svn_pool_destroy(iterpool);

Propchange: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/adler32.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb  1 19:19:52 2011
@@ -1 +1 @@
-/subversion/trunk/subversion/libsvn_subr/adler32.c:1054732-1064731
+/subversion/trunk/subversion/libsvn_subr/adler32.c:1054732-1066149

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/dirent_uri.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/dirent_uri.c?rev=1066152&r1=1066151&r2=1066152&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/dirent_uri.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/dirent_uri.c Tue Feb  1 19:19:52 2011
@@ -484,6 +484,12 @@ canonicalize(path_type_t type, const cha
         {
           /* Noop segment, so do nothing. */
         }
+      else if (type == type_uri && seglen == 3
+               && src[0] == '%' && src[1] == '2'
+               && canonicalize_to_upper(src[2]) == 'E')
+        {
+          /* '%2E' is equivalent to '.', so this is a noop segment */
+        }
 #ifdef SVN_USE_DOS_PATHS
       /* If this is the first path segment of a file:// URI and it contains a
          windows drive letter, convert the drive letter to upper case. */
@@ -1401,8 +1407,8 @@ svn_uri_get_longest_ancestor(const char 
   apr_size_t uri_ancestor_len;
   apr_size_t i = 0;
 
-  assert(svn_path_is_canonical(uri1, NULL));
-  assert(svn_path_is_canonical(uri2, NULL));
+  assert(svn_uri_is_canonical(uri1, NULL));
+  assert(svn_uri_is_canonical(uri2, NULL));
 
   /* Find ':' */
   while (1)
@@ -2232,7 +2238,6 @@ svn_dirent_is_under_root(svn_boolean_t *
                          const char *base_path,
                          const char *path,
                          apr_pool_t *pool)
-
 {
   apr_status_t status;
   char *full_path;
@@ -2485,14 +2490,13 @@ const char *
 svn_fspath__dirname(const char *fspath,
                     apr_pool_t *pool)
 {
-  const char *result;
   assert(svn_fspath__is_canonical(fspath));
 
-  result = apr_pstrcat(pool, "/", svn_relpath_dirname(fspath + 1, pool),
+  if (fspath[0] == '/' && fspath[1] == '\0')
+    return apr_pstrdup(pool, fspath);
+  else
+    return apr_pstrcat(pool, "/", svn_relpath_dirname(fspath + 1, pool),
                        (char *)NULL);
-
-  assert(svn_fspath__is_canonical(result));
-  return result;
 }
 
 

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/target.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/target.c?rev=1066152&r1=1066151&r2=1066152&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/target.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_subr/target.c Tue Feb  1 19:19:52 2011
@@ -47,6 +47,8 @@ svn_path_condense_targets(const char **p
   svn_boolean_t *removed;
   apr_array_header_t *abs_targets;
   int basedir_len;
+  const char *first_target;
+  svn_boolean_t first_target_is_url;
 
   /* Early exit when there's no data to work on. */
   if (targets->nelts <= 0)
@@ -58,9 +60,15 @@ svn_path_condense_targets(const char **p
     }
 
   /* Get the absolute path of the first target. */
-  SVN_ERR(svn_path_get_absolute(pcommon,
-                                APR_ARRAY_IDX(targets, 0, const char *),
-                                pool));
+  first_target = APR_ARRAY_IDX(targets, 0, const char *);
+  first_target_is_url = svn_path_is_url(first_target);
+  if (first_target_is_url)
+    {
+      first_target = apr_pstrdup(pool, first_target);
+      *pcommon = first_target;
+    }
+  else
+    SVN_ERR(svn_dirent_get_absolute(pcommon, first_target, pool));
 
   /* Early exit when there's only one path to work on. */
   if (targets->nelts == 1)
@@ -88,9 +96,31 @@ svn_path_condense_targets(const char **p
     {
       const char *rel = APR_ARRAY_IDX(targets, i, const char *);
       const char *absolute;
-      SVN_ERR(svn_path_get_absolute(&absolute, rel, pool));
+      svn_boolean_t is_url = svn_path_is_url(rel);
+
+      if (is_url)
+        absolute = apr_pstrdup(pool, rel); /* ### TODO: avoid pool dup? */
+      else
+        SVN_ERR(svn_dirent_get_absolute(&absolute, rel, pool));
+
       APR_ARRAY_PUSH(abs_targets, const char *) = absolute;
-      *pcommon = svn_path_get_longest_ancestor(*pcommon, absolute, pool);
+
+      /* If we've not already determined that there's no common
+         parent, then continue trying to do so. */
+      if (*pcommon && **pcommon)
+        {
+          /* If the is-url-ness of this target doesn't match that of
+             the first target, our search for a common ancestor can
+             end right here.  Otherwise, use the appropriate
+             get-longest-ancestor function per the path type. */
+          if (is_url != first_target_is_url)
+            *pcommon = "";
+          else if (first_target_is_url)
+            *pcommon = svn_uri_get_longest_ancestor(*pcommon, absolute, pool);
+          else
+            *pcommon = svn_dirent_get_longest_ancestor(*pcommon, absolute,
+                                                       pool);
+        }
     }
 
   if (pcondensed_targets != NULL)
@@ -113,6 +143,7 @@ svn_path_condense_targets(const char **p
                 {
                   const char *abs_targets_i;
                   const char *abs_targets_j;
+                  svn_boolean_t i_is_url, j_is_url;
                   const char *ancestor;
 
                   if (removed[j])
@@ -120,9 +151,20 @@ svn_path_condense_targets(const char **p
 
                   abs_targets_i = APR_ARRAY_IDX(abs_targets, i, const char *);
                   abs_targets_j = APR_ARRAY_IDX(abs_targets, j, const char *);
+                  i_is_url = svn_path_is_url(abs_targets_i);
+                  j_is_url = svn_path_is_url(abs_targets_j);
 
-                  ancestor = svn_path_get_longest_ancestor
-                    (abs_targets_i, abs_targets_j, pool);
+                  if (i_is_url != j_is_url)
+                    continue;
+                  
+                  if (i_is_url)
+                    ancestor = svn_uri_get_longest_ancestor(abs_targets_i,
+                                                            abs_targets_j,
+                                                            pool);
+                  else
+                    ancestor = svn_dirent_get_longest_ancestor(abs_targets_i,
+                                                               abs_targets_j,
+                                                               pool);
 
                   if (*ancestor == '\0')
                     continue;
@@ -237,10 +279,14 @@ svn_path_remove_redundancies(apr_array_h
       const char *rel_path = APR_ARRAY_IDX(targets, i, const char *);
       const char *abs_path;
       int j;
-      svn_boolean_t keep_me;
+      svn_boolean_t is_url, keep_me;
 
       /* Get the absolute path for this target. */
-      SVN_ERR(svn_path_get_absolute(&abs_path, rel_path, temp_pool));
+      is_url = svn_path_is_url(rel_path);
+      if (is_url)
+        abs_path = rel_path;
+      else
+        SVN_ERR(svn_dirent_get_absolute(&abs_path, rel_path, temp_pool));
 
       /* For each keeper in ABS_TARGETS, see if this target is the
          same as or a child of that keeper. */
@@ -248,6 +294,14 @@ svn_path_remove_redundancies(apr_array_h
       for (j = 0; j < abs_targets->nelts; j++)
         {
           const char *keeper = APR_ARRAY_IDX(abs_targets, j, const char *);
+          svn_boolean_t keeper_is_url = svn_path_is_url(keeper);
+          const char *child_relpath;
+
+          /* If KEEPER hasn't the same is-url-ness as ABS_PATH, we
+             know they aren't equal and that one isn't the child of
+             the other. */
+          if (is_url != keeper_is_url)
+            continue;
 
           /* Quit here if we find this path already in the keepers. */
           if (strcmp(keeper, abs_path) == 0)
@@ -257,7 +311,11 @@ svn_path_remove_redundancies(apr_array_h
             }
 
           /* Quit here if this path is a child of one of the keepers. */
-          if (svn_path_is_child(keeper, abs_path, temp_pool))
+          if (is_url)
+            child_relpath = svn_uri_is_child(keeper, abs_path, temp_pool);
+          else
+            child_relpath = svn_dirent_is_child(keeper, abs_path, temp_pool);
+          if (child_relpath)
             {
               keep_me = FALSE;
               break;

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/adm_ops.c?rev=1066152&r1=1066151&r2=1066152&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/adm_ops.c Tue Feb  1 19:19:52 2011
@@ -129,7 +129,6 @@ process_committed_leaf(svn_wc__db_t *db,
   svn_wc__db_kind_t kind;
   const svn_checksum_t *copied_checksum;
   const char *adm_abspath;
-  const char *tmp_text_base_abspath;
   svn_revnum_t new_changed_rev = new_revnum;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
@@ -211,12 +210,8 @@ process_committed_leaf(svn_wc__db_t *db,
          ### value, like how we handle files. */
     }
 
-  /* Set TMP_TEXT_BASE_ABSPATH to NULL.  The new text base will be found in
-     the pristine store by its checksum. */
-  /* ### TODO: Remove this parameter. */
-  tmp_text_base_abspath = NULL;
-
-  SVN_ERR(svn_wc__wq_add_postcommit(db, local_abspath, tmp_text_base_abspath,
+  /* The new text base will be found in the pristine store by its checksum. */
+  SVN_ERR(svn_wc__wq_add_postcommit(db, local_abspath, 
                                     new_revnum,
                                     new_changed_rev, new_changed_date,
                                     new_changed_author, checksum,

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/update_editor.c?rev=1066152&r1=1066151&r2=1066152&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/update_editor.c Tue Feb  1 19:19:52 2011
@@ -1314,11 +1314,12 @@ modcheck_found_node(const char *local_ab
 
   if (status != svn_wc__db_status_normal)
     modified = TRUE;
-  /* No need to check if we already have at least one non-delete
-     modification */
-  else if (!baton->found_mod || baton->all_edits_are_deletes)
+  /* No need to check if we already have at least one modification */
+  else if (!baton->found_mod)
     SVN_ERR(entry_has_local_mods(&modified, baton->db, local_abspath,
                                  db_kind, scratch_pool));
+  else
+    modified = FALSE;
 
   if (modified)
     {

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/workqueue.c?rev=1066152&r1=1066151&r2=1066152&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/workqueue.c Tue Feb  1 19:19:52 2011
@@ -46,7 +46,7 @@
 #define OP_DELETION_POSTCOMMIT "deletion-postcommit"
 /* Arguments of OP_POSTCOMMIT:
  *   (local_abspath, revnum, date, [author], [checksum],
- *    [dav_cache/wc_props], keep_changelist, [tmp_text_base_abspath]). */
+ *    [dav_cache/wc_props], keep_changelist, no_unlock, changed_rev). */
 #define OP_POSTCOMMIT "postcommit"
 #define OP_FILE_INSTALL "file-install"
 #define OP_FILE_REMOVE "file-remove"
@@ -761,10 +761,9 @@ svn_wc__wq_add_deletion_postcommit(svn_w
 /* OP_POSTCOMMIT  */
 
 
-/* If TMP_TEXT_BASE_ABSPATH is not NULL, then assume that it is a copy of
- * the new text base of the newly-committed versioned file FILE_ABSPATH,
- * and adjust the working file accordingly.  TMP_TEXT_BASE_ABSPATH is in
- * repository-normal form (aka "detranslated" form).
+/* FILE_ABSPATH is the new text base of the newly-committed versioned file,
+ * in repository-normal form (aka "detranslated" form).  Adjust the working
+ * file accordingly.
  *
  * If eol and/or keyword translation would cause the working file to
  * change, then overwrite the working file with a translated copy of
@@ -790,7 +789,6 @@ static svn_error_t *
 install_committed_file(svn_boolean_t *overwrote_working,
                        svn_wc__db_t *db,
                        const char *file_abspath,
-                       const char *tmp_text_base_abspath,
                        svn_boolean_t remove_executable,
                        svn_boolean_t remove_read_only,
                        svn_cancel_func_t cancel_func,
@@ -830,8 +828,7 @@ install_committed_file(svn_boolean_t *ov
    * text is the same as the old working text (or TRUE if it's a special
    * file). */
   {
-    const char *tmp
-      = (tmp_text_base_abspath != NULL) ? tmp_text_base_abspath : file_abspath;
+    const char *tmp = file_abspath;
 
     /* Copy and translate, if necessary. The output file will be deleted at
      * scratch_pool cleanup.
@@ -857,6 +854,7 @@ install_committed_file(svn_boolean_t *ov
                                        &special,
                                        db, file_abspath,
                                        scratch_pool, scratch_pool));
+    /* ### Should this be a strcmp()? */
     if (! special && tmp != tmp_wfile)
       SVN_ERR(svn_io_files_contents_same_p(&same, tmp_wfile,
                                            file_abspath, scratch_pool));
@@ -925,13 +923,12 @@ install_committed_file(svn_boolean_t *ov
  * - Remove children that are marked deleted (if it's a dir)
  * - Install the new base props
  * - Install the new tree state
- * - Install the new base text (if it's a file) from TMP_TEXT_BASE_ABSPATH
+ * - Install the new base text (if it's a file)
  * - Adjust the parent (if it's a dir)
  * */
 static svn_error_t *
 log_do_committed(svn_wc__db_t *db,
                  const char *local_abspath,
-                 const char *tmp_text_base_abspath,
                  svn_revnum_t new_revision,
                  svn_revnum_t changed_rev,
                  apr_time_t changed_date,
@@ -1110,7 +1107,7 @@ log_do_committed(svn_wc__db_t *db,
          by then will have moved to `text-base'. */
 
       SVN_ERR(install_committed_file(&overwrote_working, db,
-                                     local_abspath, tmp_text_base_abspath,
+                                     local_abspath,
                                      remove_executable, set_read_write,
                                      cancel_func, cancel_baton,
                                      pool));
@@ -1222,7 +1219,6 @@ run_postcommit(svn_wc__db_t *db,
   const svn_checksum_t *new_checksum;
   apr_hash_t *new_dav_cache;
   svn_boolean_t keep_changelist, no_unlock;
-  const char *tmp_text_base_abspath;
   svn_error_t *err;
   apr_int64_t val;
 
@@ -1258,32 +1254,26 @@ run_postcommit(svn_wc__db_t *db,
   /* Before r927056, this WQ item didn't have this next field.  Catch any
    * attempt to run this code on a WC having a stale WQ item in it. */
   SVN_ERR_ASSERT(arg5->next->next->next != NULL);
-  if (arg5->next->next->next->len == 0)
-    tmp_text_base_abspath = NULL;
-  else
-    tmp_text_base_abspath = apr_pstrmemdup(scratch_pool,
-                                           arg5->next->next->next->data,
-                                           arg5->next->next->next->len);
 
-  if (arg5->next->next->next->next)
+  if (arg5->next->next->next)
     {
-      SVN_ERR(svn_skel__parse_int(&val, arg5->next->next->next->next,
+      SVN_ERR(svn_skel__parse_int(&val, arg5->next->next->next,
                                   scratch_pool));
       no_unlock = (val != 0);
     }
   else
     no_unlock = TRUE;
 
-  if (arg5->next->next->next->next->next)
+  if (arg5->next->next->next->next)
     {
-      SVN_ERR(svn_skel__parse_int(&val, arg5->next->next->next->next->next,
+      SVN_ERR(svn_skel__parse_int(&val, arg5->next->next->next->next,
                                   scratch_pool));
       changed_rev = (svn_revnum_t)val;
     }
   else
     changed_rev = new_revision; /* Behavior before fixing issue #3676 */
 
-  err = log_do_committed(db, local_abspath, tmp_text_base_abspath,
+  err = log_do_committed(db, local_abspath,
                          new_revision, changed_rev, changed_date,
                          changed_author, new_checksum, new_dav_cache,
                          keep_changelist, no_unlock,
@@ -1302,7 +1292,6 @@ run_postcommit(svn_wc__db_t *db,
 svn_error_t *
 svn_wc__wq_add_postcommit(svn_wc__db_t *db,
                           const char *local_abspath,
-                          const char *tmp_text_base_abspath,
                           svn_revnum_t new_revision,
                           svn_revnum_t changed_rev,
                           apr_time_t changed_date,
@@ -1317,8 +1306,6 @@ svn_wc__wq_add_postcommit(svn_wc__db_t *
 
   svn_skel__prepend_int(changed_rev, work_item, scratch_pool);
   svn_skel__prepend_int(no_unlock, work_item, scratch_pool);
-  svn_skel__prepend_str(tmp_text_base_abspath ? tmp_text_base_abspath : "",
-                        work_item, scratch_pool);
   svn_skel__prepend_int(keep_changelist, work_item, scratch_pool);
   if (new_dav_cache == NULL || apr_hash_count(new_dav_cache) == 0)
     {

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/workqueue.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/workqueue.h?rev=1066152&r1=1066151&r2=1066152&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/workqueue.h (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_wc/workqueue.h Tue Feb  1 19:19:52 2011
@@ -291,7 +291,6 @@ svn_wc__wq_add_deletion_postcommit(svn_w
 svn_error_t *
 svn_wc__wq_add_postcommit(svn_wc__db_t *db,
                           const char *local_abspath,
-                          const char *tmp_text_base_abspath,
                           svn_revnum_t new_revision,
                           svn_revnum_t changed_rev,
                           apr_time_t changed_date,

Modified: subversion/branches/ignore-mergeinfo-log/subversion/mod_authz_svn/mod_authz_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/mod_authz_svn/mod_authz_svn.c?rev=1066152&r1=1066151&r2=1066152&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/mod_authz_svn/mod_authz_svn.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/mod_authz_svn/mod_authz_svn.c Tue Feb  1 19:19:52 2011
@@ -43,6 +43,7 @@
 #include "svn_string.h"
 #include "svn_repos.h"
 #include "svn_dirent_uri.h"
+#include "private/svn_fspath.h"
 
 
 extern module AP_MODULE_DECLARE_DATA authz_svn_module;
@@ -61,17 +62,6 @@ typedef struct authz_svn_config_rec {
  * Configuration
  */
 
-/*
- * Return a canonicalized version of URI (which is a
- * schema/hostname-less URI), allocated from POOL.
- */
-static const char *
-uri_canonicalize(const char *uri, apr_pool_t *pool)
-{
-  return apr_pstrcat(pool, (uri[0] == '/') ? "/" : "",
-                     svn_relpath_canonicalize(uri, pool), NULL);
-}
-               
 /* Implements the #create_dir_config method of Apache's #module vtable. */
 static void *
 create_authz_svn_dir_config(apr_pool_t *p, char *d)
@@ -80,7 +70,7 @@ create_authz_svn_dir_config(apr_pool_t *
   conf->base_path = d;
 
   if (d)
-    conf->base_path = uri_canonicalize(d, p);
+    conf->base_path = svn_urlpath__canonicalize(d, p);
 
   /* By default keep the fortress secure */
   conf->authoritative = 1;
@@ -325,7 +315,7 @@ req_check_access(request_rec *r,
         break;
     }
 
-  if (strcmp(uri_canonicalize(r->uri, r->pool), conf->base_path) == 0)
+  if (strcmp(svn_urlpath__canonicalize(r->uri, r->pool), conf->base_path) == 0)
     {
       /* Do no access control when conf->base_path(as configured in <Location>)
        * and given uri are same. The reason for such relaxation of access
@@ -367,7 +357,7 @@ req_check_access(request_rec *r,
     repos_path = NULL;
 
   if (repos_path)
-    repos_path = svn_path_join("/", repos_path, r->pool);
+    repos_path = svn_fspath__canonicalize(repos_path, r->pool);
 
   *repos_path_ref = apr_pstrcat(r->pool, repos_name, ":", repos_path,
                                 (char *)NULL);
@@ -415,7 +405,7 @@ req_check_access(request_rec *r,
         }
 
       if (dest_repos_path)
-        dest_repos_path = svn_path_join("/", dest_repos_path, r->pool);
+        dest_repos_path = svn_fspath__canonicalize(dest_repos_path, r->pool);
 
       *dest_repos_path_ref = apr_pstrcat(r->pool, dest_repos_name, ":",
                                          dest_repos_path, (char *)NULL);

Modified: subversion/branches/ignore-mergeinfo-log/subversion/mod_dav_svn/mirror.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/mod_dav_svn/mirror.c?rev=1066152&r1=1066151&r2=1066152&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/mod_dav_svn/mirror.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/mod_dav_svn/mirror.c Tue Feb  1 19:19:52 2011
@@ -149,10 +149,7 @@ apr_status_t dav_svn__location_in_filter
        (that is, if our root path matches that of the master server). */
     apr_uri_parse(r->pool, master_uri, &uri);
     root_dir = dav_svn__get_root_dir(r);
-    if (uri.path)
-        canonicalized_uri = svn_urlpath__canonicalize(uri.path, r->pool);
-    else
-        canonicalized_uri = uri.path;
+    canonicalized_uri = svn_urlpath__canonicalize(uri.path, r->pool);
     if (strcmp(canonicalized_uri, root_dir) == 0) {
         ap_remove_input_filter(f);
         return ap_get_brigade(f->next, bb, mode, block, readbytes);
@@ -271,10 +268,7 @@ apr_status_t dav_svn__location_body_filt
        (that is, if our root path matches that of the master server). */
     apr_uri_parse(r->pool, master_uri, &uri);
     root_dir = dav_svn__get_root_dir(r);
-    if (uri.path)
-        canonicalized_uri = svn_urlpath__canonicalize(uri.path, r->pool);
-    else
-        canonicalized_uri = uri.path;
+    canonicalized_uri = svn_urlpath__canonicalize(uri.path, r->pool);
     if (strcmp(canonicalized_uri, root_dir) == 0) {
         ap_remove_output_filter(f);
         return ap_pass_brigade(f->next, bb);

Modified: subversion/branches/ignore-mergeinfo-log/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/mod_dav_svn/mod_dav_svn.c?rev=1066152&r1=1066151&r2=1066152&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/mod_dav_svn/mod_dav_svn.c Tue Feb  1 19:19:52 2011
@@ -228,6 +228,8 @@ static const char *
 SVNMasterURI_cmd(cmd_parms *cmd, void *config, const char *arg1)
 {
   dir_conf_t *conf = config;
+  apr_uri_t parsed_uri;
+  const char *uri_base_name = "";
 
   /* SVNMasterURI requires mod_proxy and mod_proxy_http
    * (r->handler = "proxy-server" in mirror.c), make sure
@@ -236,7 +238,15 @@ SVNMasterURI_cmd(cmd_parms *cmd, void *c
     return "module mod_proxy not loaded, required for SVNMasterURI";
   if (ap_find_linked_module("mod_proxy_http.c") == NULL)
     return "module mod_proxy_http not loaded, required for SVNMasterURI";
-
+  if (APR_SUCCESS != apr_uri_parse(cmd->pool, arg1, &parsed_uri))
+    return "unable to parse SVNMasterURI value";
+  if (parsed_uri.path)
+    uri_base_name = svn_urlpath__basename(
+                        svn_urlpath__canonicalize(parsed_uri.path, cmd->pool),
+                        cmd->pool);
+  if (! *uri_base_name)
+    return "SVNMasterURI value must not be a server root";
+  
   conf->master_uri = apr_pstrdup(cmd->pool, arg1);
 
   return NULL;