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/05/07 11:04:29 UTC

svn commit: r942039 - /subversion/trunk/subversion/libsvn_wc/workqueue.c

Author: julianfoad
Date: Fri May  7 09:04:29 2010
New Revision: 942039

URL: http://svn.apache.org/viewvc?rev=942039&view=rev
Log:
* subversion/libsvn_wc/workqueue.c
  (run_revert): Move calculation to a local scope. Add a comment.

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

Modified: subversion/trunk/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/workqueue.c?rev=942039&r1=942038&r2=942039&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/trunk/subversion/libsvn_wc/workqueue.c Fri May  7 09:04:29 2010
@@ -224,10 +224,6 @@ run_revert(svn_wc__db_t *db,
     {
       svn_boolean_t magic_changed;
       svn_boolean_t reinstall_working;
-      const char *text_base_path;
-
-      SVN_ERR(svn_wc__text_base_path(&text_base_path, db, local_abspath,
-                                     FALSE, scratch_pool));
 
       magic_changed = svn_skel__parse_int(arg1->next->next, scratch_pool) != 0;
 
@@ -237,13 +233,19 @@ run_revert(svn_wc__db_t *db,
          using the original base.  */
       reinstall_working = magic_changed || replaced;
 
+      /* If there is a "revert base" file (because the file is replaced),
+       * then move that revert base over to the normal base and update the
+       * normal base checksum. */
       if (replaced)
         {
           const char *revert_base_path;
+          const char *text_base_path;
           svn_checksum_t *checksum;
 
           SVN_ERR(svn_wc__text_revert_path(&revert_base_path, db,
                                            local_abspath, scratch_pool));
+          SVN_ERR(svn_wc__text_base_path(&text_base_path, db, local_abspath,
+                                         FALSE, scratch_pool));
           SVN_ERR(move_if_present(revert_base_path, text_base_path,
                                   scratch_pool));