subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svn-r...@apache.org
Subject svn commit: r1499196 - in /subversion/branches/1.8.x: ./ STATUS subversion/libsvn_wc/upgrade.c subversion/libsvn_wc/wc_db.c subversion/libsvn_wc/wc_db.h
Date Wed, 03 Jul 2013 04:00:58 GMT
Author: svn-role
Date: Wed Jul  3 04:00:58 2013
New Revision: 1499196

URL: http://svn.apache.org/r1499196
Log:
Merge the r1493703 group from trunk:

 * r1493703, r1494171
   Fix upgrade notification for explicit upgrades of post-WC-NG working copies.
   Justification:
     Without this notification users can't see whether the upgrade was a no-op.
   Votes:
     +1: rhuijben, stsp, danielsh

Modified:
    subversion/branches/1.8.x/   (props changed)
    subversion/branches/1.8.x/STATUS
    subversion/branches/1.8.x/subversion/libsvn_wc/upgrade.c
    subversion/branches/1.8.x/subversion/libsvn_wc/wc_db.c
    subversion/branches/1.8.x/subversion/libsvn_wc/wc_db.h

Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1493703,1494171

Modified: subversion/branches/1.8.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1499196&r1=1499195&r2=1499196&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Wed Jul  3 04:00:58 2013
@@ -208,10 +208,3 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1493703, r1494171
-   Fix upgrade notification for explicit upgrades of post-WC-NG working copies.
-   Justification:
-     Without this notification users can't see whether the upgrade was a no-op.
-   Votes:
-     +1: rhuijben, stsp, danielsh
-

Modified: subversion/branches/1.8.x/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_wc/upgrade.c?rev=1499196&r1=1499195&r2=1499196&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_wc/upgrade.c Wed Jul  3 04:00:58 2013
@@ -2196,13 +2196,15 @@ svn_wc_upgrade(svn_wc_context_t *wc_ctx,
   upgrade_working_copy_baton_t cb_baton;
   svn_error_t *err;
   int result_format;
+  svn_boolean_t bumped_format;
 
   /* Try upgrading a wc-ng-style working copy. */
   SVN_ERR(svn_wc__db_open(&db, NULL /* ### config */, TRUE, FALSE,
                           scratch_pool, scratch_pool));
 
 
-  err = svn_wc__db_bump_format(&result_format, local_abspath, db,
+  err = svn_wc__db_bump_format(&result_format, &bumped_format,
+                               db, local_abspath,
                                scratch_pool);
   if (err)
     {
@@ -2224,6 +2226,17 @@ svn_wc_upgrade(svn_wc_context_t *wc_ctx,
 
       SVN_ERR_ASSERT(result_format == SVN_WC__VERSION);
 
+      if (bumped_format && notify_func)
+        {
+          svn_wc_notify_t *notify;
+
+          notify = svn_wc_create_notify(local_abspath,
+                                        svn_wc_notify_upgraded_path,
+                                        scratch_pool);
+
+          notify_func(notify_baton, notify, scratch_pool);
+        }
+
       return SVN_NO_ERROR;
     }
 

Modified: subversion/branches/1.8.x/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_wc/wc_db.c?rev=1499196&r1=1499195&r2=1499196&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_wc/wc_db.c Wed Jul  3 04:00:58 2013
@@ -14978,14 +14978,18 @@ svn_wc__db_verify(svn_wc__db_t *db,
 
 svn_error_t *
 svn_wc__db_bump_format(int *result_format,
-                       const char *wcroot_abspath,
+                       svn_boolean_t *bumped_format,
                        svn_wc__db_t *db,
+                       const char *wcroot_abspath,
                        apr_pool_t *scratch_pool)
 {
   svn_sqlite__db_t *sdb;
   svn_error_t *err;
   int format;
 
+  if (bumped_format)
+    *bumped_format = FALSE;
+
   /* Do not scan upwards for a working copy root here to prevent accidental
    * upgrades of any working copies the WCROOT might be nested in.
    * Just try to open a DB at the specified path instead. */
@@ -15020,7 +15024,10 @@ svn_wc__db_bump_format(int *result_forma
 
   SVN_ERR(svn_sqlite__read_schema_version(&format, sdb, scratch_pool));
   err = svn_wc__upgrade_sdb(result_format, wcroot_abspath,
-                                     sdb, format, scratch_pool);
+                            sdb, format, scratch_pool);
+
+  if (err == SVN_NO_ERROR && bumped_format)
+    *bumped_format = (*result_format > format);
 
   /* Make sure we return a different error than expected for upgrades from
      entries */

Modified: subversion/branches/1.8.x/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_wc/wc_db.h?rev=1499196&r1=1499195&r2=1499196&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/1.8.x/subversion/libsvn_wc/wc_db.h Wed Jul  3 04:00:58 2013
@@ -2909,11 +2909,15 @@ svn_wc__db_upgrade_get_repos_id(apr_int6
  * Upgrading subdirectories of a working copy is not supported.
  * If WCROOT_ABSPATH is not a working copy root SVN_ERR_WC_INVALID_OP_ON_CWD
  * is returned.
+ *
+ * If BUMPED_FORMAT is not NULL, set *BUMPED_FORMAT to TRUE if the format
+ * was bumped or to FALSE if the wc was already at the resulting format.
  */
 svn_error_t *
 svn_wc__db_bump_format(int *result_format,
-                       const char *wcroot_abspath,
+                       svn_boolean_t *bumped_format,
                        svn_wc__db_t *db,
+                       const char *wcroot_abspath,
                        apr_pool_t *scratch_pool);
 
 /* @} */



Mime
View raw message