subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r923537 - in /subversion/branches/1.6.x: ./ CHANGES STATUS subversion/libsvn_repos/dump.c subversion/tests/cmdline/svnadmin_tests.py
Date Tue, 16 Mar 2010 01:36:25 GMT
Author: hwright
Date: Tue Mar 16 01:36:24 2010
New Revision: 923537

URL: http://svn.apache.org/viewvc?rev=923537&view=rev
Log:
Merge r904594 from trunk:

 * r904594
   Update 'svnadmin verify' to recognize malformed/missing revprops files
   Justification:
     It's misleading for 'svnadmin verify' to say a repository is fine
     when in reality it isn't.
   Votes:
     +1: jwhitlock, danielsh, cmpilato

Modified:
    subversion/branches/1.6.x/   (props changed)
    subversion/branches/1.6.x/CHANGES   (props changed)
    subversion/branches/1.6.x/STATUS
    subversion/branches/1.6.x/subversion/libsvn_repos/dump.c
    subversion/branches/1.6.x/subversion/tests/cmdline/svnadmin_tests.py

Propchange: subversion/branches/1.6.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 16 01:36:24 2010
@@ -55,4 +55,4 @@
 /subversion/branches/tc_url_rev:870696-870828
 /subversion/branches/tree-conflicts:864636-869499
 /subversion/branches/tree-conflicts-notify:870271-870353
-/subversion/trunk:875976,875980-875981,876054-876056,876092,876175,876299,876306,876427,876440,876450,876507,876571,879093,879688,880274-880275,880370,880450,880474,880525-880526,880552,881905,884842,886164,886197,888715,888979,889081,889840,895514,895653,896522,898963,899826,899828,900797
+/subversion/trunk:875976,875980-875981,876054-876056,876092,876175,876299,876306,876427,876440,876450,876507,876571,879093,879688,880274-880275,880370,880450,880474,880525-880526,880552,881905,884842,886164,886197,888715,888979,889081,889840,895514,895653,896522,898963,899826,899828,900797,904594

Propchange: subversion/branches/1.6.x/CHANGES
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 16 01:36:24 2010
@@ -54,4 +54,4 @@
 /subversion/branches/tc_url_rev/CHANGES:870696-870828
 /subversion/branches/tree-conflicts/CHANGES:864636-869499
 /subversion/branches/tree-conflicts-notify/CHANGES:870271-870353
-/subversion/trunk/CHANGES:875962-901365
+/subversion/trunk/CHANGES:875962-901365,904594

Modified: subversion/branches/1.6.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/STATUS?rev=923537&r1=923536&r2=923537&view=diff
==============================================================================
--- subversion/branches/1.6.x/STATUS (original)
+++ subversion/branches/1.6.x/STATUS Tue Mar 16 01:36:24 2010
@@ -305,14 +305,6 @@ Approved changes:
    Votes:
      +1: pburba, rhuijben, cmpilato
 
- * r904594
-   Update 'svnadmin verify' to recognize malformed/missing revprops files
-   Justification:
-     It's misleading for 'svnadmin verify' to say a repository is fine
-     when in reality it isn't.
-   Votes:
-     +1: jwhitlock, danielsh, cmpilato
-
  * r905326
    Issue #3561: Teach ra_serf the same out-of-date fix we taught ra_neon.
    Justification:

Modified: subversion/branches/1.6.x/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/libsvn_repos/dump.c?rev=923537&r1=923536&r2=923537&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/1.6.x/subversion/libsvn_repos/dump.c Tue Mar 16 01:36:24 2010
@@ -1213,6 +1213,7 @@ svn_repos_verify_fs(svn_repos_t *repos,
       const svn_delta_editor_t *cancel_editor;
       void *cancel_edit_baton;
       svn_fs_root_t *to_root;
+      apr_hash_t *props;
 
       svn_pool_clear(iterpool);
 
@@ -1234,6 +1235,7 @@ svn_repos_verify_fs(svn_repos_t *repos,
       SVN_ERR(svn_repos_replay2(to_root, "", SVN_INVALID_REVNUM, FALSE,
                                 cancel_editor, cancel_edit_baton,
                                 NULL, NULL, iterpool));
+      SVN_ERR(svn_fs_revision_proplist(&props, fs, rev, iterpool));
       SVN_ERR(svn_stream_printf(feedback_stream, iterpool,
                                 _("* Verified revision %ld.\n"),
                                 rev));

Modified: subversion/branches/1.6.x/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/tests/cmdline/svnadmin_tests.py?rev=923537&r1=923536&r2=923537&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/1.6.x/subversion/tests/cmdline/svnadmin_tests.py Tue Mar 16 01:36:24
2010
@@ -917,6 +917,39 @@ def create_in_repo_subdir(sbox):
   # No SVNRepositoryCreateFailure raised?
   raise svntest.Failure
 
+def verify_with_invalid_revprops(sbox):
+  "svnadmin verify detects invalid revprops file"
+
+  repo_dir = sbox.repo_dir
+
+  svntest.main.safe_rmtree(repo_dir, 1)
+
+  # This should succeed
+  svntest.main.create_repos(repo_dir)
+
+  # Run a test verify
+  exit_code, output, errput = svntest.main.run_svnadmin("verify",
+                                                        sbox.repo_dir)
+
+  if svntest.verify.verify_outputs(
+    "Output of 'svnadmin verify' is unexpected.", None, errput, None,
+    ".*Verified revision 0*"):
+    raise svntest.Failure
+
+  # Empty the revprops file
+  rp_file = open(os.path.join(repo_dir, 'db', 'revprops', '0', '0'), 'w')
+
+  rp_file.write('')
+  rp_file.close()
+
+  exit_code, output, errput = svntest.main.run_svnadmin("verify",
+                                                        sbox.repo_dir)
+
+  if svntest.verify.verify_outputs(
+    "Output of 'svnadmin verify' is unexpected.", None, errput, None,
+    ".*Malformed file"):
+    raise svntest.Failure
+
 
 ########################################################################
 # Run the tests
@@ -943,6 +976,7 @@ test_list = [ None,
               SkipUnless(fsfs_recover_handle_missing_revs_or_revprops_file,
                          svntest.main.is_fs_type_fsfs),
               create_in_repo_subdir,
+              verify_with_invalid_revprops,
              ]
 
 if __name__ == '__main__':



Mime
View raw message