You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2011/09/21 04:23:34 UTC

svn commit: r1173464 [2/2] - in /subversion/branches/1.7.x-r1173425: ./ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_fs/ subversion/libsvn_fs_base/ subversion/libsvn_fs_fs/ subversion/libsvn_ra/ subversion...

Modified: subversion/branches/1.7.x-r1173425/subversion/libsvn_repos/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-r1173425/subversion/libsvn_repos/log.c?rev=1173464&r1=1173463&r2=1173464&view=diff
==============================================================================
--- subversion/branches/1.7.x-r1173425/subversion/libsvn_repos/log.c (original)
+++ subversion/branches/1.7.x-r1173425/subversion/libsvn_repos/log.c Wed Sep 21 02:23:33 2011
@@ -663,9 +663,9 @@ fs_mergeinfo_changed(svn_mergeinfo_catal
           svn_mergeinfo_catalog_t tmp_catalog;
 
           APR_ARRAY_PUSH(query_paths, const char *) = changed_path;
-          SVN_ERR(svn_fs_get_mergeinfo2(&tmp_catalog, root,
+          SVN_ERR(svn_fs_get_mergeinfo(&tmp_catalog, root,
                                         query_paths, svn_mergeinfo_inherited,
-                                        FALSE, FALSE, iterpool));
+                                       FALSE, iterpool));
           tmp_mergeinfo = apr_hash_get(tmp_catalog, changed_path,
                                         APR_HASH_KEY_STRING);
           if (tmp_mergeinfo)
@@ -682,9 +682,9 @@ fs_mergeinfo_changed(svn_mergeinfo_catal
           svn_mergeinfo_catalog_t tmp_catalog;
 
           APR_ARRAY_PUSH(query_paths, const char *) = base_path;
-          SVN_ERR(svn_fs_get_mergeinfo2(&tmp_catalog, base_root,
+          SVN_ERR(svn_fs_get_mergeinfo(&tmp_catalog, base_root,
                                         query_paths, svn_mergeinfo_inherited,
-                                        FALSE, FALSE, iterpool));
+                                       FALSE, iterpool));
           tmp_mergeinfo = apr_hash_get(tmp_catalog, base_path,
                                         APR_HASH_KEY_STRING);
           if (tmp_mergeinfo)
@@ -835,9 +835,8 @@ get_combined_mergeinfo_changes(svn_merge
       SVN_ERR(svn_fs_revision_root(&prev_root, fs, prev_rev, iterpool));
       query_paths = apr_array_make(iterpool, 1, sizeof(const char *));
       APR_ARRAY_PUSH(query_paths, const char *) = prev_path;
-      err = svn_fs_get_mergeinfo2(&catalog, prev_root, query_paths,
-                                  svn_mergeinfo_inherited, FALSE, FALSE,
-                                  iterpool);
+      err = svn_fs_get_mergeinfo(&catalog, prev_root, query_paths,
+                                 svn_mergeinfo_inherited, FALSE, iterpool);
       if (err && (err->apr_err == SVN_ERR_FS_NOT_FOUND ||
                   err->apr_err == SVN_ERR_FS_NOT_DIRECTORY ||
                   err->apr_err == SVN_ERR_MERGEINFO_PARSE_ERROR))
@@ -852,9 +851,8 @@ get_combined_mergeinfo_changes(svn_merge
       /* Fetch the current mergeinfo (as of REV, and including
          inherited stuff) for this path. */
       APR_ARRAY_IDX(query_paths, 0, const char *) = path;
-      SVN_ERR(svn_fs_get_mergeinfo2(&catalog, root, query_paths,
-                                    svn_mergeinfo_inherited, FALSE, FALSE,
-                                    iterpool));
+      SVN_ERR(svn_fs_get_mergeinfo(&catalog, root, query_paths,
+                                   svn_mergeinfo_inherited, FALSE, iterpool));
       mergeinfo = apr_hash_get(catalog, path, APR_HASH_KEY_STRING);
 
       if (!prev_mergeinfo && !mergeinfo)

Modified: subversion/branches/1.7.x-r1173425/subversion/libsvn_repos/rev_hunt.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-r1173425/subversion/libsvn_repos/rev_hunt.c?rev=1173464&r1=1173463&r2=1173464&view=diff
==============================================================================
--- subversion/branches/1.7.x-r1173425/subversion/libsvn_repos/rev_hunt.c (original)
+++ subversion/branches/1.7.x-r1173425/subversion/libsvn_repos/rev_hunt.c Wed Sep 21 02:23:33 2011
@@ -997,9 +997,8 @@ get_path_mergeinfo(apr_hash_t **mergeinf
   /* We do not need to call svn_repos_fs_get_mergeinfo() (which performs authz)
      because we will filter out unreadable revisions in
      find_interesting_revision(), above */
-  SVN_ERR(svn_fs_get_mergeinfo2(&tmp_catalog, root, paths,
-                                svn_mergeinfo_inherited, FALSE, FALSE,
-                                subpool));
+  SVN_ERR(svn_fs_get_mergeinfo(&tmp_catalog, root, paths,
+                               svn_mergeinfo_inherited, FALSE, subpool));
 
   *mergeinfo = apr_hash_get(tmp_catalog, path, APR_HASH_KEY_STRING);
   if (*mergeinfo)

Modified: subversion/branches/1.7.x-r1173425/subversion/mod_dav_svn/reports/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-r1173425/subversion/mod_dav_svn/reports/mergeinfo.c?rev=1173464&r1=1173463&r2=1173464&view=diff
==============================================================================
--- subversion/branches/1.7.x-r1173425/subversion/mod_dav_svn/reports/mergeinfo.c (original)
+++ subversion/branches/1.7.x-r1173425/subversion/mod_dav_svn/reports/mergeinfo.c Wed Sep 21 02:23:33 2011
@@ -52,7 +52,6 @@ dav_svn__get_mergeinfo_report(const dav_
   dav_error *derr = NULL;
   apr_xml_elem *child;
   svn_mergeinfo_catalog_t catalog;
-  svn_boolean_t validate_inherited_mergeinfo = FALSE;
   svn_boolean_t include_descendants = FALSE;
   dav_svn__authz_read_baton arb;
   const dav_svn_repos *repos = resource->info->repos;
@@ -108,12 +107,6 @@ dav_svn__get_mergeinfo_report(const dav_
                                     resource->pool);
           (*((const char **)(apr_array_push(paths)))) = target;
         }
-      else if (strcmp(child->name, SVN_DAV__VALIDATE_INHERITED) == 0)
-        {
-          const char *word = dav_xml_get_cdata(child, resource->pool, 1);
-          if (strcmp(word, "yes") == 0)
-            validate_inherited_mergeinfo = TRUE;
-        }
       else if (strcmp(child->name, SVN_DAV__INCLUDE_DESCENDANTS) == 0)
         {
           const char *word = dav_xml_get_cdata(child, resource->pool, 1);
@@ -132,9 +125,8 @@ dav_svn__get_mergeinfo_report(const dav_
   /* Build mergeinfo brigade */
   bb = apr_brigade_create(resource->pool, output->c->bucket_alloc);
 
-  serr = svn_repos_fs_get_mergeinfo2(&catalog, repos->repos, paths, rev,
-                                     inherit, validate_inherited_mergeinfo,
-                                     include_descendants,
+  serr = svn_repos_fs_get_mergeinfo(&catalog, repos->repos, paths, rev,
+                                    inherit, include_descendants,
                                      dav_svn__authz_read_func(&arb),
                                      &arb, resource->pool);
   if (serr)

Modified: subversion/branches/1.7.x-r1173425/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-r1173425/subversion/mod_dav_svn/version.c?rev=1173464&r1=1173463&r2=1173464&view=diff
==============================================================================
--- subversion/branches/1.7.x-r1173425/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/1.7.x-r1173425/subversion/mod_dav_svn/version.c Wed Sep 21 02:23:33 2011
@@ -147,8 +147,8 @@ get_vsn_options(apr_pool_t *p, apr_text_
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_ATOMIC_REVPROPS);
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_PARTIAL_REPLAY);
   /* Mergeinfo is a special case: here we merely say that the server
-   * knows how to handle mergeinfo and validate inherited
-   * mergeinfo -- whether the repository does too is a separate matter.
+   * knows how to handle mergeinfo -- whether the repository does too
+   * is a separate matter.
    *
    * Think of it as offering the client an early out: if the server
    * can't do merge-tracking, there's no point finding out of the
@@ -159,7 +159,6 @@ get_vsn_options(apr_pool_t *p, apr_text_
    * server capability and remain agnostic about the repository).
    */
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_MERGEINFO);
-  apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_MERGEINFO_VALIDATION);
 
   /* ### fork-control? */
 }

Modified: subversion/branches/1.7.x-r1173425/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-r1173425/subversion/svnserve/serve.c?rev=1173464&r1=1173463&r2=1173464&view=diff
==============================================================================
--- subversion/branches/1.7.x-r1173425/subversion/svnserve/serve.c (original)
+++ subversion/branches/1.7.x-r1173425/subversion/svnserve/serve.c Wed Sep 21 02:23:33 2011
@@ -1845,17 +1845,12 @@ static svn_error_t *get_mergeinfo(svn_ra
   apr_hash_index_t *hi;
   const char *inherit_word;
   svn_mergeinfo_inheritance_t inherit;
-  apr_uint64_t validate_inherited_mergeinfo;
   svn_boolean_t include_descendants;
   apr_pool_t *iterpool;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "l(?r)wb?B", &paths, &rev,
-                                 &inherit_word,
-                                 &include_descendants,
-                                 &validate_inherited_mergeinfo));
+  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "l(?r)wb", &paths, &rev,
+                                 &inherit_word, &include_descendants));
   inherit = svn_inheritance_from_word(inherit_word);
-  if (validate_inherited_mergeinfo == SVN_RA_SVN_UNSPECIFIED_NUMBER)
-    validate_inherited_mergeinfo = FALSE;
 
   /* Canonicalize the paths which mergeinfo has been requested for. */
   canonical_paths = apr_array_make(pool, paths->nelts, sizeof(const char *));
@@ -1878,11 +1873,9 @@ static svn_error_t *get_mergeinfo(svn_ra
                                              pool)));
 
   SVN_ERR(trivial_auth_request(conn, pool, b));
-  SVN_CMD_ERR(svn_repos_fs_get_mergeinfo2(&mergeinfo, b->repos,
+  SVN_CMD_ERR(svn_repos_fs_get_mergeinfo(&mergeinfo, b->repos,
                                           canonical_paths, rev,
                                           inherit,
-                                          (svn_boolean_t)
-                                          validate_inherited_mergeinfo,
                                           include_descendants,
                                           authz_check_access_cb_func(b), b,
                                           pool));
@@ -3229,12 +3222,7 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
     SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w(cc(!",
                                    "success", uuid, b.repos_url));
     if (supports_mergeinfo)
-      {
         SVN_ERR(svn_ra_svn_write_word(conn, pool, SVN_RA_SVN_CAP_MERGEINFO));
-        SVN_ERR(svn_ra_svn_write_word(
-          conn, pool, SVN_RA_SVN_CAP_VALIDATE_INHERITED_MERGEINFO));
-      }
-
     SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!))"));
   }
 

Modified: subversion/branches/1.7.x-r1173425/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-r1173425/subversion/tests/cmdline/merge_tests.py?rev=1173464&r1=1173463&r2=1173464&view=diff
==============================================================================
--- subversion/branches/1.7.x-r1173425/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/1.7.x-r1173425/subversion/tests/cmdline/merge_tests.py Wed Sep 21 02:23:33 2011
@@ -9693,7 +9693,7 @@ def new_subtrees_should_not_break_merge(
     'D/H/psi'   : Item("This is the file 'psi'.\n"),
     'D/H/omega' : Item("New content"),
     'D/H/nu'    : Item("New content",
-                       props={SVN_PROP_MERGEINFO : '/A/D/H/nu:8'}),
+                       props={SVN_PROP_MERGEINFO : '/A/D/H/nu:7-8'}),
     })
   expected_skip = wc.State(A_COPY_path, { })
   svntest.actions.run_and_verify_merge(A_COPY_path, '4', '6',
@@ -9739,7 +9739,7 @@ def new_subtrees_should_not_break_merge(
     'H/psi'   : Item("This is the file 'psi'.\n"),
     'H/omega' : Item("This is the file 'omega'.\n"),
     'H/nu'    : Item("New content",
-                     props={SVN_PROP_MERGEINFO : '/A/D/H/nu:8'}),
+                     props={SVN_PROP_MERGEINFO : '/A/D/H/nu:7-8'}),
     })
   expected_skip = wc.State(D_COPY_path, { })
   svntest.actions.run_and_verify_merge(D_COPY_path, '6', '5',
@@ -9811,7 +9811,7 @@ def new_subtrees_should_not_break_merge(
     'D/H/psi'   : Item("This is the file 'psi'.\n"),
     'D/H/omega' : Item("New content"),
     'D/H/nu'    : Item("New content",
-                       props={SVN_PROP_MERGEINFO : '/A/D/H/nu:8'}),
+                       props={SVN_PROP_MERGEINFO : '/A/D/H/nu:7-8'}),
     })
   expected_skip = wc.State(A_COPY_path, { })
   svntest.actions.run_and_verify_merge(A_COPY_path, '5', '6',
@@ -12903,12 +12903,6 @@ def merge_target_and_subtrees_need_nonin
     None, expected_merge_output([[8]], ['U    ' + nu_COPY_path    + '\n',
                                         ' G   ' + nu_COPY_path    + '\n']),
     [], 'merge', '-c8', sbox.repo_url + '/A/D/G/nu', nu_COPY_path)
-  # Replicate pre 1.7 merge behavior where self-referential mergeinfo
-  # could be inherited, this keeps the original intent of this test intact,
-  # see http://subversion.tigris.org/issues/show_bug.cgi?id=3669#desc8
-  svntest.actions.run_and_verify_svn(None, None, [], 'ps',
-                                     SVN_PROP_MERGEINFO, '/A/D/G/nu:2-8',
-                                     nu_COPY_path)
 
   svntest.actions.run_and_verify_svn(
     None, expected_merge_output([[-6]], ['G    ' + omega_COPY_path    + '\n',
@@ -16261,6 +16255,7 @@ def merge_with_os_deleted_subtrees(sbox)
 # mergeinfo' and issue #3669 'inheritance can result in mergeinfo
 # describing nonexistent sources'
 @Issue(3668)
+@XFail()
 def no_self_referential_or_nonexistent_inherited_mergeinfo(sbox):
   "don't inherit bogus mergeinfo"
 
@@ -16321,6 +16316,10 @@ def no_self_referential_or_nonexistent_i
   # Update the WC in preparation for merges.
   svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
 
+  # This test is marked as XFail because the following two merges
+  # create mergeinfo with both non-existent path-revs and self-referential
+  # mergeinfo.c
+  #
   # Merge all available revisions from A/C/nu to A_COPY/C/nu.
   # The target has no explicit mergeinfo of its own but inherits mergeinfo
   # from A_COPY.  A_COPY has the mergeinfo '/A:2-9' so the naive mergeinfo
@@ -17012,11 +17011,15 @@ def merge_adds_subtree_with_mergeinfo(sb
     'B/lambda'  : Item("This is the file 'lambda'.\n"),
     'B/F'       : Item(),
     'C'         : Item(),
+    # C/nu will pick up the mergeinfo A_COPY/C/nu:8 which is self-referential.
+    # This is issue #3668 'inheritance can result in self-referential
+    # mergeinfo', but we'll allow it in this test since issue #3668 is
+    # tested elsewhere and is not the point of *this* test.
     'C/nu'      : Item("This is the file 'nu'.\n" \
                        "More work on the A_COPY branch.\n" \
                        "A faux conflict resolution.\n",
                        props={SVN_PROP_MERGEINFO :
-                              '/A/C/nu:9-11\n/A_COPY/C/nu:10'}),
+                              '/A/C/nu:9-11\n/A_COPY/C/nu:8,10'}),
     'D'         : Item(),
     'D/G'       : Item(),
     'D/G/pi'    : Item("This is the file 'pi'.\n"),