You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2012/02/17 11:52:41 UTC

svn commit: r1245385 [5/5] - in /subversion/branches/1.7.x-r1210147: ./ contrib/server-side/mod_dontdothat/ notes/api-errata/1.7/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/javahl/tests/org/apache/subversion/javahl...

Modified: subversion/branches/1.7.x-r1210147/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-r1210147/subversion/tests/cmdline/stat_tests.py?rev=1245385&r1=1245384&r2=1245385&view=diff
==============================================================================
--- subversion/branches/1.7.x-r1210147/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/1.7.x-r1210147/subversion/tests/cmdline/stat_tests.py Fri Feb 17 10:52:38 2012
@@ -117,6 +117,12 @@ def status_update_with_nested_adds(sbox)
   svntest.actions.run_and_verify_unquiet_status(wc_backup,
                                                 expected_status)
 
+  # At one time an obstructing 'newdir' caused a SEGV on 'newdir/newfile'
+  os.makedirs(os.path.join(wc_backup, 'newdir'))
+  expected_status.tweak('newdir', status='? ')
+  svntest.actions.run_and_verify_unquiet_status(wc_backup,
+                                                expected_status)
+
 #----------------------------------------------------------------------
 
 # svn status -vN should include all entries in a directory
@@ -899,7 +905,7 @@ def missing_dir_in_anchor(sbox):
 def status_in_xml(sbox):
   "status output in XML format"
 
-  sbox.build(read_only = True)
+  sbox.build()
   wc_dir = sbox.wc_dir
 
   file_name = "iota"
@@ -951,6 +957,44 @@ def status_in_xml(sbox):
       print("ERROR: expected: %s actual: %s" % (template[i], output[i]))
       raise svntest.Failure
 
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'cp', '-m', 'repo-to-repo copy',
+                                     sbox.repo_url + '/iota',
+                                     sbox.repo_url + '/iota2')
+  
+  file_path = sbox.ospath('iota2')
+
+  template = ['<?xml version="1.0" encoding="UTF-8"?>\n',
+              "<status>\n",
+              "<target\n",
+              "   path=\"%s\">\n" % (file_path),
+              "<entry\n",
+              "   path=\"%s\">\n" % (file_path),
+              "<wc-status\n",
+              "   props=\"none\"\n",
+              "   item=\"none\">\n",
+              "</wc-status>\n",
+              "<repos-status\n",
+              "   props=\"none\"\n",
+              "   item=\"added\">\n",
+              "</repos-status>\n",
+              "</entry>\n",
+              "<against\n",
+              "   revision=\"2\"/>\n",
+              "</target>\n",
+              "</status>\n",
+             ]
+
+  exit_code, output, error = svntest.actions.run_and_verify_svn(None, None, [],
+                                                                'status',
+                                                                file_path,
+                                                                '--xml', '-u')
+
+  for i in range(0, len(output)):
+    if output[i] != template[i]:
+      print("ERROR: expected: %s actual: %s" % (template[i], output[i]))
+      raise svntest.Failure
+
 #----------------------------------------------------------------------
 
 def status_ignored_dir(sbox):
@@ -1923,6 +1967,24 @@ def wclock_status(sbox):
   svntest.actions.run_and_verify_svn(None, expected_output, [],
                                      'status', wc_dir)
 
+def status_not_present(sbox):
+  "no status on not-present and excluded nodes"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # iota is a shell script.
+  sbox.simple_rm('iota', 'A/C')
+  svntest.main.run_svn(None, 'up', '--set-depth', 'exclude',
+                       sbox.ospath('A/mu'), sbox.ospath('A/B'))
+  sbox.simple_commit()
+  
+  svntest.actions.run_and_verify_svn(None, [], [],'status',
+                                     sbox.ospath('iota'),
+                                     sbox.ospath('A/B'),
+                                     sbox.ospath('A/C'),
+                                     sbox.ospath('A/mu'),
+                                     sbox.ospath('no-file'))
 
 ########################################################################
 # Run the tests
@@ -1965,6 +2027,7 @@ test_list = [ None,
               status_locked_deleted,
               wc_wc_copy_timestamp,
               wclock_status,
+              status_not_present,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/1.7.x-r1210147/subversion/tests/cmdline/svnrdump_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-r1210147/subversion/tests/cmdline/svnrdump_tests.py?rev=1245385&r1=1245384&r2=1245385&view=diff
==============================================================================
--- subversion/branches/1.7.x-r1210147/subversion/tests/cmdline/svnrdump_tests.py (original)
+++ subversion/branches/1.7.x-r1210147/subversion/tests/cmdline/svnrdump_tests.py Fri Feb 17 10:52:38 2012
@@ -162,6 +162,7 @@ def run_load_test(sbox, dumpfile_name, e
 ######################################################################
 # Tests
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def basic_dump(sbox):
   "dump: standard sbox repos"
   sbox.build(read_only = True, create_wc = False)
@@ -174,6 +175,7 @@ def basic_dump(sbox):
   if not out[0].startswith('SVN-fs-dump-format-version:'):
     raise svntest.Failure('No valid output')
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def revision_0_dump(sbox):
   "dump: revision zero"
   run_dump_test(sbox, "revision-0.dump")
@@ -192,6 +194,7 @@ def revision_0_load(sbox):
 #     docs/         (Added r6)
 #       README      (Added r6)
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def skeleton_dump(sbox):
   "dump: skeleton repository"
   run_dump_test(sbox, "skeleton.dump")
@@ -200,6 +203,7 @@ def skeleton_load(sbox):
   "load: skeleton repository"
   run_load_test(sbox, "skeleton.dump")
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def sparse_propchanges_dump(sbox):
   "dump: sparse file/dir propchanges"
   run_dump_test(sbox, "sparse-propchanges.dump")
@@ -209,6 +213,7 @@ def sparse_propchanges_load(sbox):
   "load: sparse file/dir propchanges"
   run_load_test(sbox, "sparse-propchanges.dump")
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def copy_and_modify_dump(sbox):
   "dump: copy and modify"
   run_dump_test(sbox, "copy-and-modify.dump")
@@ -217,6 +222,7 @@ def copy_and_modify_load(sbox):
   "load: copy and modify"
   run_load_test(sbox, "copy-and-modify.dump")
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def no_author_dump(sbox):
   "dump: copy revs with no svn:author revprops"
   run_dump_test(sbox, "no-author.dump")
@@ -225,6 +231,7 @@ def no_author_load(sbox):
   "load: copy revs with no svn:author revprops"
   run_load_test(sbox, "no-author.dump")
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def copy_from_previous_version_and_modify_dump(sbox):
   "dump: copy from previous version and modify"
   run_dump_test(sbox, "copy-from-previous-version-and-modify.dump")
@@ -233,6 +240,7 @@ def copy_from_previous_version_and_modif
   "load: copy from previous version and modify"
   run_load_test(sbox, "copy-from-previous-version-and-modify.dump")
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def modified_in_place_dump(sbox):
   "dump: modified in place"
   run_dump_test(sbox, "modified-in-place.dump")
@@ -241,6 +249,7 @@ def modified_in_place_load(sbox):
   "load: modified in place"
   run_load_test(sbox, "modified-in-place.dump")
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def move_and_modify_in_the_same_revision_dump(sbox):
   "dump: move parent & modify child file in same rev"
   run_dump_test(sbox, "move-and-modify.dump")
@@ -249,6 +258,7 @@ def move_and_modify_in_the_same_revision
   "load: move parent & modify child file in same rev"
   run_load_test(sbox, "move-and-modify.dump")
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def tag_empty_trunk_dump(sbox):
   "dump: tag empty trunk"
   run_dump_test(sbox, "tag-empty-trunk.dump")
@@ -257,6 +267,7 @@ def tag_empty_trunk_load(sbox):
   "load: tag empty trunk"
   run_load_test(sbox, "tag-empty-trunk.dump")
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def tag_trunk_with_file_dump(sbox):
   "dump: tag trunk containing a file"
   run_dump_test(sbox, "tag-trunk-with-file.dump")
@@ -265,6 +276,7 @@ def tag_trunk_with_file_load(sbox):
   "load: tag trunk containing a file"
   run_load_test(sbox, "tag-trunk-with-file.dump")
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def tag_trunk_with_file2_dump(sbox):
   "dump: tag trunk containing a file (#2)"
   run_dump_test(sbox, "tag-trunk-with-file2.dump")
@@ -273,6 +285,7 @@ def tag_trunk_with_file2_load(sbox):
   "load: tag trunk containing a file (#2)"
   run_load_test(sbox, "tag-trunk-with-file2.dump")
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def dir_prop_change_dump(sbox):
   "dump: directory property changes"
   run_dump_test(sbox, "dir-prop-change.dump")
@@ -281,6 +294,7 @@ def dir_prop_change_load(sbox):
   "load: directory property changes"
   run_load_test(sbox, "dir-prop-change.dump")
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def copy_parent_modify_prop_dump(sbox):
   "dump: copy parent and modify prop"
   run_dump_test(sbox, "copy-parent-modify-prop.dump")
@@ -289,6 +303,7 @@ def copy_parent_modify_prop_load(sbox):
   "load: copy parent and modify prop"
   run_load_test(sbox, "copy-parent-modify-prop.dump")
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def copy_revprops_dump(sbox):
   "dump: copy revprops other than svn:*"
   run_dump_test(sbox, "revprops.dump")
@@ -297,16 +312,19 @@ def copy_revprops_load(sbox):
   "load: copy revprops other than svn:*"
   run_load_test(sbox, "revprops.dump")
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def only_trunk_dump(sbox):
   "dump: subdirectory"
   run_dump_test(sbox, "trunk-only.dump", subdir="/trunk",
                 expected_dumpfile_name="trunk-only.expected.dump")
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def only_trunk_A_with_changes_dump(sbox):
   "dump: subdirectory with changes on root"
   run_dump_test(sbox, "trunk-A-changes.dump", subdir="/trunk/A",
            expected_dumpfile_name="trunk-A-changes.expected.dump")
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def url_encoding_dump(sbox):
   "dump: url encoding issues"
   run_dump_test(sbox, "url-encoding-bug.dump")
@@ -315,18 +333,21 @@ def url_encoding_load(sbox):
   "load: url encoding issues"
   run_load_test(sbox, "url-encoding-bug.dump")
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def copy_bad_line_endings_dump(sbox):
   "dump: inconsistent line endings in svn:* props"
   run_dump_test(sbox, "copy-bad-line-endings.dump",
                 expected_dumpfile_name="copy-bad-line-endings.expected.dump",
                 bypass_prop_validation=True)
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def copy_bad_line_endings2_dump(sbox):
   "dump: non-LF line endings in svn:* props"
   run_dump_test(sbox, "copy-bad-line-endings2.dump",
                 expected_dumpfile_name="copy-bad-line-endings2.expected.dump",
                 bypass_prop_validation=True)
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def commit_a_copy_of_root_dump(sbox):
   "dump: commit a copy of root"
   run_dump_test(sbox, "repo-with-copy-of-root-dir.dump")
@@ -335,6 +356,7 @@ def commit_a_copy_of_root_load(sbox):
   "load: commit a copy of root"
   run_load_test(sbox, "repo-with-copy-of-root-dir.dump")
 
+@Skip(svntest.main.is_ra_type_dav_serf)
 def descend_into_replace_dump(sbox):
   "dump: descending into replaced dir looks in src"
   run_dump_test(sbox, "descend-into-replace.dump", subdir='/trunk/H',
@@ -345,6 +367,7 @@ def descend_into_replace_load(sbox):
   run_load_test(sbox, "descend-into-replace.dump")
 
 @Issue(3847)
+@Skip(svntest.main.is_ra_type_dav_serf)
 def add_multi_prop_dump(sbox):
   "dump: add with multiple props"
   run_dump_test(sbox, "add-multi-prop.dump")
@@ -359,6 +382,7 @@ def multi_prop_edit_load(sbox):
 # revs in svn:mergeinfo' but uses 'svnrdump load' in place of
 # 'svnadmin load'.
 @Issue(3890)
+@Skip(svntest.main.is_ra_type_dav_serf)
 def reflect_dropped_renumbered_revs(sbox):
   "svnrdump renumbers dropped revs in mergeinfo"
 
@@ -422,6 +446,7 @@ def reflect_dropped_renumbered_revs(sbox
 # from incremental dump' but uses 'svnrdump [dump|load]' in place of
 # 'svnadmin [dump|load]'.
 @Issue(3890)
+@Skip(svntest.main.is_ra_type_dav_serf)
 def dont_drop_valid_mergeinfo_during_incremental_svnrdump_loads(sbox):
   "don't drop mergeinfo revs in incremental svnrdump"
 

Modified: subversion/branches/1.7.x-r1210147/subversion/tests/cmdline/svntest/sandbox.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-r1210147/subversion/tests/cmdline/svntest/sandbox.py?rev=1245385&r1=1245384&r2=1245385&view=diff
==============================================================================
--- subversion/branches/1.7.x-r1210147/subversion/tests/cmdline/svntest/sandbox.py (original)
+++ subversion/branches/1.7.x-r1210147/subversion/tests/cmdline/svntest/sandbox.py Fri Feb 17 10:52:38 2012
@@ -204,16 +204,18 @@ class Sandbox:
       target = self.ospath(target)
     svntest.main.run_svn(False, 'switch', url, target, '--ignore-ancestry')
 
-  def simple_commit(self, target=None):
-    """Commit the WC or TARGET with a default log message.
+  def simple_commit(self, target=None, message=None):
+    """Commit the WC or TARGET, with a default or supplied log message.
+       Raise if the exit code is non-zero or there is output on stderr.
        TARGET is a relpath relative to the WC."""
     assert not self.read_only
     if target is None:
       target = self.wc_dir
     else:
       target = self.ospath(target)
-    svntest.main.run_svn(False, 'commit',
-                         '-m', svntest.main.make_log_msg(),
+    if message is None:
+      message = svntest.main.make_log_msg()
+    svntest.main.run_svn(False, 'commit', '-m', message,
                          target)
 
   def simple_rm(self, *targets):

Modified: subversion/branches/1.7.x-r1210147/subversion/tests/libsvn_diff/parse-diff-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-r1210147/subversion/tests/libsvn_diff/parse-diff-test.c?rev=1245385&r1=1245384&r2=1245385&view=diff
==============================================================================
--- subversion/branches/1.7.x-r1210147/subversion/tests/libsvn_diff/parse-diff-test.c (original)
+++ subversion/branches/1.7.x-r1210147/subversion/tests/libsvn_diff/parse-diff-test.c Fri Feb 17 10:52:38 2012
@@ -246,29 +246,38 @@ static const char *bad_git_diff_header =
   "diff --git a/ b/path 1 b/ b/path 1"                                  NL
   "new file mode 100644"                                                NL;
 
+static const char *unidiff_lacking_trailing_eol =
+  "Index: A/C/gamma"                                                    NL
+  "===================================================================" NL
+  "--- A/C/gamma\t(revision 2)"                                         NL
+  "+++ A/C/gamma\t(working copy)"                                       NL
+  "@@ -1 +1,2 @@"                                                       NL
+  " This is the file 'gamma'."                                          NL
+  "+some more bytes to 'gamma'"; /* Don't add NL after this line */
 
-/* Create a PATCH_FILE with name FNAME containing the contents of DIFF. */
+
+/* Create a PATCH_FILE containing the contents of DIFF. */
 static svn_error_t *
-create_patch_file(svn_patch_file_t **patch_file, const char *fname,
+create_patch_file(svn_patch_file_t **patch_file,
                   const char *diff, apr_pool_t *pool)
 {
+  apr_size_t bytes;
   apr_size_t len;
-  apr_status_t status;
+  const char *path;
   apr_file_t *apr_file;
 
   /* Create a patch file. */
-  status = apr_file_open(&apr_file, fname,
-                        (APR_READ | APR_WRITE | APR_CREATE | APR_TRUNCATE |
-                         APR_DELONCLOSE), APR_OS_DEFAULT, pool);
-  if (status != APR_SUCCESS)
-    return svn_error_createf(SVN_ERR_TEST_FAILED, NULL, "Cannot open '%s'",
-                             fname);
-  len = strlen(diff);
-  status = apr_file_write_full(apr_file, diff, len, &len);
-  if (status || len != strlen(diff))
+  SVN_ERR(svn_io_open_unique_file3(&apr_file, &path, NULL,
+                                   svn_io_file_del_on_pool_cleanup,
+                                   pool, pool));
+
+  bytes = strlen(diff);
+  SVN_ERR(svn_io_file_write_full(apr_file, diff, bytes, &len, pool));
+  if (len != bytes)
     return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
-                             "Cannot write to '%s'", fname);
-  SVN_ERR(svn_diff_open_patch_file(patch_file, fname, pool));
+                             "Cannot write to '%s'", path);
+  SVN_ERR(svn_io_file_close(apr_file, pool));
+  SVN_ERR(svn_diff_open_patch_file(patch_file, path, pool));
 
   return SVN_NO_ERROR;
 }
@@ -305,7 +314,8 @@ check_content(svn_diff_hunk_t *hunk, svn
     SVN_TEST_STRING_ASSERT(exp_buf->data, hunk_buf->data);
   }
 
-  SVN_TEST_ASSERT(hunk_buf->len == 0);
+  if (!hunk_eof)
+    SVN_TEST_ASSERT(hunk_buf->len == 0);
 
   return SVN_NO_ERROR;
 }
@@ -314,7 +324,6 @@ static svn_error_t *
 test_parse_unidiff(apr_pool_t *pool)
 {
   svn_patch_file_t *patch_file;
-  const char *fname = "test_parse_unidiff.patch";
   svn_boolean_t reverse;
   svn_boolean_t ignore_whitespace;
   int i;
@@ -330,7 +339,7 @@ test_parse_unidiff(apr_pool_t *pool)
 
       svn_pool_clear(iterpool);
 
-      SVN_ERR(create_patch_file(&patch_file, fname, unidiff, pool));
+      SVN_ERR(create_patch_file(&patch_file, unidiff, pool));
 
       /* We have two patches with one hunk each.
        * Parse the first patch. */
@@ -393,9 +402,8 @@ test_parse_git_diff(apr_pool_t *pool)
   svn_patch_file_t *patch_file;
   svn_patch_t *patch;
   svn_diff_hunk_t *hunk;
-  const char *fname = "test_parse_git_diff.patch";
 
-  SVN_ERR(create_patch_file(&patch_file, fname, git_unidiff, pool));
+  SVN_ERR(create_patch_file(&patch_file, git_unidiff, pool));
 
   /* Parse a deleted empty file */
   SVN_ERR(svn_diff_parse_next_patch(&patch, patch_file,
@@ -467,10 +475,8 @@ test_parse_git_tree_and_text_diff(apr_po
   svn_patch_file_t *patch_file;
   svn_patch_t *patch;
   svn_diff_hunk_t *hunk;
-  const char *fname = "test_parse_git_tree_and_text_diff.patch";
 
-  SVN_ERR(create_patch_file(&patch_file, fname, git_tree_and_text_unidiff,
-                            pool));
+  SVN_ERR(create_patch_file(&patch_file, git_tree_and_text_unidiff, pool));
 
   /* Parse a copied file with text modifications. */
   SVN_ERR(svn_diff_parse_next_patch(&patch, patch_file,
@@ -567,10 +573,8 @@ test_bad_git_diff_headers(apr_pool_t *po
   svn_patch_file_t *patch_file;
   svn_patch_t *patch;
   svn_diff_hunk_t *hunk;
-  const char *fname = "test_bad_git_diff_header.patch";
 
-  SVN_ERR(create_patch_file(&patch_file, fname, bad_git_diff_header,
-                            pool));
+  SVN_ERR(create_patch_file(&patch_file, bad_git_diff_header, pool));
 
   SVN_ERR(svn_diff_parse_next_patch(&patch, patch_file,
                                     FALSE, /* reverse */
@@ -607,9 +611,8 @@ test_parse_property_diff(apr_pool_t *poo
   svn_prop_patch_t *prop_patch;
   svn_diff_hunk_t *hunk;
   apr_array_header_t *hunks;
-  const char *fname = "test_parse_property_diff.patch";
 
-  SVN_ERR(create_patch_file(&patch_file, fname, property_unidiff, pool));
+  SVN_ERR(create_patch_file(&patch_file, property_unidiff, pool));
 
   SVN_ERR(svn_diff_parse_next_patch(&patch, patch_file,
                                     FALSE, /* reverse */
@@ -710,10 +713,8 @@ test_parse_property_and_text_diff(apr_po
   svn_prop_patch_t *prop_patch;
   svn_diff_hunk_t *hunk;
   apr_array_header_t *hunks;
-  const char *fname = "test_parse_property_and_text_diff.patch";
 
-  SVN_ERR(create_patch_file(&patch_file, fname, property_and_text_unidiff,
-                            pool));
+  SVN_ERR(create_patch_file(&patch_file, property_and_text_unidiff, pool));
 
   SVN_ERR(svn_diff_parse_next_patch(&patch, patch_file,
                                     FALSE, /* reverse */
@@ -766,10 +767,8 @@ test_parse_diff_symbols_in_prop_unidiff(
   svn_prop_patch_t *prop_patch;
   svn_diff_hunk_t *hunk;
   apr_array_header_t *hunks;
-  const char *fname = "test_parse_diff_symbols_in_prop_unidiff.patch";
 
-  SVN_ERR(create_patch_file(&patch_file, fname, diff_symbols_in_prop_unidiff,
-                            pool));
+  SVN_ERR(create_patch_file(&patch_file, diff_symbols_in_prop_unidiff, pool));
 
   SVN_ERR(svn_diff_parse_next_patch(&patch, patch_file,
                                     FALSE, /* reverse */
@@ -865,10 +864,8 @@ test_git_diffs_with_spaces_diff(apr_pool
 {
   svn_patch_file_t *patch_file;
   svn_patch_t *patch;
-  const char *fname = "test_git_diffs_with_spaces_diff.patch";
 
-  SVN_ERR(create_patch_file(&patch_file, fname, path_with_spaces_unidiff,
-                            pool));
+  SVN_ERR(create_patch_file(&patch_file, path_with_spaces_unidiff, pool));
 
   SVN_ERR(svn_diff_parse_next_patch(&patch, patch_file,
                                     FALSE, /* reverse */
@@ -913,6 +910,55 @@ test_git_diffs_with_spaces_diff(apr_pool
   SVN_ERR(svn_diff_close_patch_file(patch_file, pool));
   return SVN_NO_ERROR;
 }
+
+static svn_error_t *
+test_parse_unidiff_lacking_trailing_eol(apr_pool_t *pool)
+{
+  svn_patch_file_t *patch_file;
+  svn_boolean_t reverse;
+  svn_boolean_t ignore_whitespace;
+  int i;
+  apr_pool_t *iterpool;
+
+  reverse = FALSE;
+  ignore_whitespace = FALSE;
+  iterpool = svn_pool_create(pool);
+  for (i = 0; i < 2; i++)
+    {
+      svn_patch_t *patch;
+      svn_diff_hunk_t *hunk;
+
+      svn_pool_clear(iterpool);
+
+      SVN_ERR(create_patch_file(&patch_file, unidiff_lacking_trailing_eol,
+                                pool));
+
+      /* We have one patch with one hunk. Parse it. */
+      SVN_ERR(svn_diff_parse_next_patch(&patch, patch_file, reverse,
+                                        ignore_whitespace, iterpool,
+                                        iterpool));
+      SVN_TEST_ASSERT(patch);
+      SVN_TEST_STRING_ASSERT(patch->old_filename, "A/C/gamma");
+      SVN_TEST_STRING_ASSERT(patch->new_filename, "A/C/gamma");
+      SVN_TEST_ASSERT(patch->hunks->nelts == 1);
+
+      hunk = APR_ARRAY_IDX(patch->hunks, 0, svn_diff_hunk_t *);
+      SVN_ERR(check_content(hunk, ! reverse,
+                            "This is the file 'gamma'." NL,
+                            pool));
+
+      SVN_ERR(check_content(hunk, reverse,
+                            "This is the file 'gamma'." NL
+                            "some more bytes to 'gamma'",
+                            pool));
+
+      reverse = !reverse;
+      SVN_ERR(svn_diff_close_patch_file(patch_file, pool));
+    }
+  svn_pool_destroy(iterpool);
+  return SVN_NO_ERROR;
+}
+
 /* ========================================================================== */
 
 struct svn_test_descriptor_t test_funcs[] =
@@ -934,5 +980,7 @@ struct svn_test_descriptor_t test_funcs[
                    "test property diffs with odd symbols"),
     SVN_TEST_PASS2(test_git_diffs_with_spaces_diff,
                    "test git diffs with spaces in paths"),
+    SVN_TEST_PASS2(test_parse_unidiff_lacking_trailing_eol,
+                   "test parsing unidiffs lacking trailing eol"),
     SVN_TEST_NULL
   };

Propchange: subversion/branches/1.7.x-r1210147/subversion/tests/libsvn_wc/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Feb 17 10:52:38 2012
@@ -8,3 +8,4 @@ svn-test-work
 entries-compat-test
 op-depth-test
 wc-lock-tester
+wc-incomplete-tester

Modified: subversion/branches/1.7.x-r1210147/tools/examples/get-location-segments.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-r1210147/tools/examples/get-location-segments.py?rev=1245385&r1=1245384&r2=1245385&view=diff
==============================================================================
--- subversion/branches/1.7.x-r1210147/tools/examples/get-location-segments.py (original)
+++ subversion/branches/1.7.x-r1210147/tools/examples/get-location-segments.py Fri Feb 17 10:52:38 2012
@@ -91,13 +91,20 @@ ERROR: %s
 
   core.svn_config_ensure(None)
   ctx = client.ctx_t()
-  providers = [
+
+  # Make sure that these are at the start of the list, so passwords from
+  # gnome-keyring / kwallet are checked before asking for new passwords.
+  # Note that we don't pass our config here, since we can't seem to access
+  # ctx.config.config (ctx.config is opaque).
+  providers = core.svn_auth_get_platform_specific_client_providers(None, None)
+  providers.extend([
     client.get_simple_provider(),
     client.get_username_provider(),
     client.get_ssl_server_trust_file_provider(),
     client.get_ssl_client_cert_file_provider(),
     client.get_ssl_client_cert_pw_file_provider(),
-    ]
+  ])
+
   ctx.auth_baton = core.svn_auth_open(providers)
   ctx.config = core.svn_config_get_config(None)
 

Propchange: subversion/branches/1.7.x-r1210147/tools/server-side/mod_dontdothat/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Feb 17 10:52:38 2012
@@ -0,0 +1,2 @@
+*.slo
+.libs