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 2010/08/05 14:40:40 UTC

svn commit: r982581 - in /subversion/trunk/subversion: libsvn_wc/wc_db.c libsvn_wc/wc_db.h tests/libsvn_wc/pristine-store-test.c

Author: julianfoad
Date: Thu Aug  5 12:40:40 2010
New Revision: 982581

URL: http://svn.apache.org/viewvc?rev=982581&view=rev
Log:
Remove the pristine store "check mode" options, as we do not intend to
implement them.

* subversion/libsvn_wc/wc_db.h
  (svn_wc__db_checkmode_t): Delete.
  (svn_wc__db_pristine_check): Remove the check-mode parameter. Write a
    proper doc string.

* subversion/libsvn_wc/wc_db.c
  (svn_wc__db_pristine_check): Remove the (unused) check-mode parameter.
  (svn_wc__db_pristine_get_path): Adjust caller.

* subversion/tests/libsvn_wc/pristine-store-test.c
  (pristine_write_read): Adjust callers.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc_db.c
    subversion/trunk/subversion/libsvn_wc/wc_db.h
    subversion/trunk/subversion/tests/libsvn_wc/pristine-store-test.c

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=982581&r1=982580&r2=982581&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Thu Aug  5 12:40:40 2010
@@ -2433,7 +2433,6 @@ svn_wc__db_pristine_get_path(const char 
   VERIFY_USABLE_PDH(pdh);
 
   SVN_ERR(svn_wc__db_pristine_check(&present, db, wri_abspath, sha1_checksum,
-                                    svn_wc__db_checkmode_usable,
                                     scratch_pool));
   if (! present)
     return svn_error_createf(SVN_ERR_WC_DB_ERROR, NULL,
@@ -2815,7 +2814,6 @@ svn_wc__db_pristine_check(svn_boolean_t 
                           svn_wc__db_t *db,
                           const char *wri_abspath,
                           const svn_checksum_t *sha1_checksum,
-                          svn_wc__db_checkmode_t mode,
                           apr_pool_t *scratch_pool)
 {
   svn_wc__db_pdh_t *pdh;

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.h?rev=982581&r1=982580&r2=982581&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.h Thu Aug  5 12:40:40 2010
@@ -857,53 +857,6 @@ svn_wc__db_base_clear_dav_cache_recursiv
    @{
 */
 
-/* Enumerated constants for how hard svn_wc__db_pristine_check() should
-   work on checking for the pristine file.
-*/
-typedef enum {
-
-  /* ### bah. this is bogus. we open the sqlite database "all the time",
-     ### and don't worry about optimizing that. so: given the db is always
-     ### open, then the following modes are overengineered, premature
-     ### optimizations. ... will clean up in a future rev.  */
-
-  /* The caller wants to be sure the pristine file is present and usable.
-     This is the typical mode to use.
-
-     Implementation note: the SQLite database is opened (if not already)
-       and its state is verified against the file in the filesystem. */
-  svn_wc__db_checkmode_usable,
-
-  /* The caller is performing just this one check. The implementation will
-     optimize around the assumption no further calls to _check() will occur
-     (but of course has no problem if they do).
-
-     Note: this test is best used for detecting a *missing* file
-     rather than for detecting a usable file.
-
-     Implementation note: this will examine the presence of the pristine file
-       in the filesystem. The SQLite database is untouched, though if it is
-       (already) open, then it will be used instead. */
-  svn_wc__db_checkmode_single,
-
-  /* The caller is going to perform multiple calls, so the implementation
-     should optimize its operation around that.
-
-     Note: this test is best used for detecting a *missing* file
-     rather than for detecting a usable file.
-
-     Implementation note: the SQLite database will be opened (if not already),
-     and all checks will simply look in the TEXT_BASE table to see if the
-     given key is present. Note that the file may not be present. */
-  svn_wc__db_checkmode_multi,
-
-  /* Similar to _usable, but the file is checksum'd to ensure that it has
-     not been corrupted in some way. */
-  svn_wc__db_checkmode_validate
-
-} svn_wc__db_checkmode_t;
-
-
 /* Set *PRISTINE_ABSPATH to the path to the pristine text file
    identified by SHA1_CHECKSUM.  Error if it does not exist.
 
@@ -1023,15 +976,14 @@ svn_wc__db_pristine_cleanup(svn_wc__db_t
                             apr_pool_t *scratch_pool);
 
 
-/* ### check for presence, according to the given mode (on how hard we
-   ### should examine things)
+/* Set *PRESENT to true if the pristine store for WRI_ABSPATH in DB contains
+   a pristine text with SHA-1 checksum SHA1_CHECKSUM, and to false otherwise.
 */
 svn_error_t *
 svn_wc__db_pristine_check(svn_boolean_t *present,
                           svn_wc__db_t *db,
                           const char *wri_abspath,
                           const svn_checksum_t *sha1_checksum,
-                          svn_wc__db_checkmode_t mode,
                           apr_pool_t *scratch_pool);
 
 

Modified: subversion/trunk/subversion/tests/libsvn_wc/pristine-store-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/pristine-store-test.c?rev=982581&r1=982580&r2=982581&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/pristine-store-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/pristine-store-test.c Thu Aug  5 12:40:40 2010
@@ -162,7 +162,7 @@ pristine_write_read(const svn_test_opts_
     svn_boolean_t present;
 
     SVN_ERR(svn_wc__db_pristine_check(&present, db, wc_abspath, data_sha1,
-                                      svn_wc__db_checkmode_usable, pool));
+                                      pool));
     SVN_ERR_ASSERT(! present);
   }
 
@@ -175,7 +175,7 @@ pristine_write_read(const svn_test_opts_
     svn_boolean_t present;
 
     SVN_ERR(svn_wc__db_pristine_check(&present, db, wc_abspath, data_sha1,
-                                      svn_wc__db_checkmode_usable, pool));
+                                      pool));
     SVN_ERR_ASSERT(present);
   }
 
@@ -220,7 +220,7 @@ pristine_write_read(const svn_test_opts_
     svn_boolean_t present;
 
     SVN_ERR(svn_wc__db_pristine_check(&present, db, wc_abspath, data_sha1,
-                                      svn_wc__db_checkmode_usable, pool));
+                                      pool));
     SVN_ERR_ASSERT(! present);
   }