subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r959257 - /subversion/trunk/subversion/libsvn_wc/wc_db_pdh.c
Date Wed, 30 Jun 2010 10:21:31 GMT
Author: philip
Date: Wed Jun 30 10:21:31 2010
New Revision: 959257

URL: http://svn.apache.org/viewvc?rev=959257&view=rev
Log:
* subversion/libsvn_wc/wc_db_pdh.c
  (svn_wc__db_pdh_create_wcroot): Don't auto-upgrade if there are
   outstanding workqueue items.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc_db_pdh.c

Modified: subversion/trunk/subversion/libsvn_wc/wc_db_pdh.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db_pdh.c?rev=959257&r1=959256&r2=959257&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_pdh.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_pdh.c Wed Jun 30 10:21:31 2010
@@ -299,16 +299,30 @@ svn_wc__db_pdh_create_wcroot(svn_wc__db_
         format);
     }
 
+  /* Verify that no work items exists. If they do, then our integrity is
+     suspect and, thus, we cannot use this database.  */
+  if (format >= SVN_WC__HAS_WORK_QUEUE
+      && (enforce_empty_wq || (format < SVN_WC__VERSION && auto_upgrade)))
+    {
+      svn_error_t *err = verify_no_work(sdb);
+      if (err)
+        {
+          /* Special message for attempts to upgrade a 1.7-dev wc with
+             outstanding workqueue items. */
+          if (err->apr_err == SVN_ERR_WC_CLEANUP_REQUIRED
+              && format < SVN_WC__VERSION && auto_upgrade)
+            err = svn_error_quick_wrap(err, _("Cleanup with an older 1.7 "
+                                              "client before upgrading with "
+                                              "this client"));
+          return svn_error_return(err);
+        }
+    }
+
   /* Auto-upgrade the SDB if possible.  */
   if (format < SVN_WC__VERSION && auto_upgrade)
     SVN_ERR(svn_wc__upgrade_sdb(&format, wcroot_abspath, sdb, format,
                                 scratch_pool));
 
-  /* Verify that no work items exists. If they do, then our integrity is
-     suspect and, thus, we cannot use this database.  */
-  if (format >= SVN_WC__HAS_WORK_QUEUE && enforce_empty_wq)
-    SVN_ERR(verify_no_work(sdb));
-
   *wcroot = apr_palloc(result_pool, sizeof(**wcroot));
 
   (*wcroot)->abspath = wcroot_abspath;



Mime
View raw message