You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2010/04/28 01:19:25 UTC

svn commit: r938718 - in /subversion/trunk/subversion/libsvn_wc: adm_ops.c copy.c entries.c entries.h log.c old-and-busted.c update_editor.c workqueue.c

Author: gstein
Date: Tue Apr 27 23:19:25 2010
New Revision: 938718

URL: http://svn.apache.org/viewvc?rev=938718&view=rev
Log:
Clean up a bunch fo entry modification stuff. In particular, constify the
structure used to provide values (tmp_entry.schedule used to be an OUT
parameter in certain cases), and renumber the flag values down into a
simple integer's range (these numbers are not persisted, so this is okay).

* subversion/libsvn_wc/entries.h:
  (svn_wc__atts_to_entry): change MODIFY_FLAGS to 'int'
  (SVN_WC__ENTRY_MODIFY_*): renumbered into 'int' range
  (svn_wc__entry_modify, svn_wc__entry_modify_stub): change MODIFY_FLAGS
    to 'int' and constify ENTRY.

* subversion/libsvn_wc/entries.c:
  (fold_entry): change MODIFY_FLAGS to 'int'. skip setting schedule,
    deferring to the caller for this. use CUR_ENTRY to get the "new"
    schedule for a couple entry structure cleanups
  (fold_scheduling): remove DELETE_ENTRY param, and let the caller handle
    the singular case where this occurs. remove SCRATCH_POOL, as we never
    used it. assert that we never attempt to move into sched-replace (the
    only code which tries this uses FORCE, so fold_scheduling is not
    called). clean up style of the error returns. surface another error
    condition up out of the nested switches, to sit with the other error
    results. unwind the nested switches into simple if-conditions and
    clean up some of the commentary.
  (entry_modify): constify ENTRY_MODS and change MODIFY_FLAGS to 'int'.
    tweak how we handle schedule changes. detect the case for removing the
    entry, rather than letting fold_scheduling tell us.
  (svn_wc__entry_modify, svn_wc__entry_modify_stub): change MODIFY_FLAGS
    to 'int' and constify ENTRY.

* subversion/libsvn_wc/adm_ops.c:
  (svn_wc_add4): change MODIFY_FLAGS to 'int'. move the TMP_ENTRY
    assignments near their MODIFY_FLAGS keys.

* subversion/libsvn_wc/copy.c:
  (post_copy_cleanup): rename FLAGS to MODIFY_FLAGS and make it an 'int'

* subversion/libsvn_wc/log.c:
  (log_do_modify_entry): change MODIFY_FLAGS to 'int'

* subversion/libsvn_wc/old-and-busted.c:
  (do_bool_attr): change MODIFY_FLAGS and MODIFY_FLAG params to 'int'
  (extract_string): change MODIFY_FLAGS and FLAG params to 'int'
  (handle_start_tag): change MODIFY_FLAGS to 'int'

* subversion/libsvn_wc/update_editor.c:
  (add_directory): change MODIFY_FLAGS var to 'int' and do some simple
    reformatting.
  (svn_wc_add_repos_file4): change MODIFY_FLAGS var to 'int'

Modified:
    subversion/trunk/subversion/libsvn_wc/adm_ops.c
    subversion/trunk/subversion/libsvn_wc/copy.c
    subversion/trunk/subversion/libsvn_wc/entries.c
    subversion/trunk/subversion/libsvn_wc/entries.h
    subversion/trunk/subversion/libsvn_wc/log.c
    subversion/trunk/subversion/libsvn_wc/old-and-busted.c
    subversion/trunk/subversion/libsvn_wc/update_editor.c
    subversion/trunk/subversion/libsvn_wc/workqueue.c

Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=938718&r1=938717&r2=938718&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Tue Apr 27 23:19:25 2010
@@ -1334,7 +1334,7 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
   svn_wc_entry_t tmp_entry;
   svn_boolean_t is_replace = FALSE;
   svn_node_kind_t kind;
-  apr_uint64_t modify_flags;
+  int modify_flags;
   svn_wc__db_t *db = wc_ctx->db;
   svn_error_t *err;
   svn_wc__db_status_t status;
@@ -1451,9 +1451,15 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
        svn_dirent_local_style(local_abspath, pool));
 
   /* Init the modify flags. */
+  tmp_entry.schedule = svn_wc_schedule_add;
+  tmp_entry.kind = kind;
   modify_flags = SVN_WC__ENTRY_MODIFY_SCHEDULE | SVN_WC__ENTRY_MODIFY_KIND;
+
   if (! (is_replace || copyfrom_url))
-    modify_flags |= SVN_WC__ENTRY_MODIFY_REVISION;
+    {
+      tmp_entry.revision = 0;
+      modify_flags |= SVN_WC__ENTRY_MODIFY_REVISION;
+    }
 
   /* If a copy ancestor was given, make sure the copyfrom URL is in the same
      repository (if possible) and put the proper ancestry info in the new
@@ -1481,10 +1487,6 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
       modify_flags |= SVN_WC__ENTRY_MODIFY_CHECKSUM;
     }
 
-  tmp_entry.revision = 0;
-  tmp_entry.kind = kind;
-  tmp_entry.schedule = svn_wc_schedule_add;
-
 
   /* Store the pristine properties to install them on working, because
      we might delete the base table */
@@ -1571,8 +1573,8 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
                                               copyfrom_rev, depth, pool));
         }
 
-      /* ### This block can be removed after we fully abandon access batons
-             and centralise the db. */
+      /* ### This block can be removed after we centralise the db and have
+         ### infinite depth admin locks. */
       if (! exists)
         {
           /* Lock on parent needs to be propogated into the child db. */
@@ -1590,9 +1592,9 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
       if (modify_flags)
         {
           modify_flags |= SVN_WC__ENTRY_MODIFY_FORCE;
-          tmp_entry.schedule = is_replace
-            ? svn_wc_schedule_replace
-            : svn_wc_schedule_add;
+          tmp_entry.schedule = (is_replace
+                                ? svn_wc_schedule_replace
+                                : svn_wc_schedule_add);
           SVN_ERR(svn_wc__entry_modify(db, local_abspath, svn_node_dir,
                                        &tmp_entry, modify_flags, pool));
         }

Modified: subversion/trunk/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/copy.c?rev=938718&r1=938717&r2=938718&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/copy.c (original)
+++ subversion/trunk/subversion/libsvn_wc/copy.c Tue Apr 27 23:19:25 2010
@@ -555,9 +555,9 @@ post_copy_cleanup(svn_wc__db_t *db,
          with creating a directory.  See Issue #2101 for details. */
       if (entry->deleted)
         {
-          apr_uint64_t flags = (SVN_WC__ENTRY_MODIFY_FORCE
-                                | SVN_WC__ENTRY_MODIFY_SCHEDULE
-                                | SVN_WC__ENTRY_MODIFY_DELETED);
+          int modify_flags = (SVN_WC__ENTRY_MODIFY_FORCE
+                              | SVN_WC__ENTRY_MODIFY_SCHEDULE
+                              | SVN_WC__ENTRY_MODIFY_DELETED);
           svn_wc_entry_t tmp_entry;
 
           tmp_entry.schedule = svn_wc_schedule_delete;
@@ -583,11 +583,11 @@ post_copy_cleanup(svn_wc__db_t *db,
               schedule delete until the copy is committed, when they become
               state deleted and everything works! */
               tmp_entry.kind = svn_node_file;
-              flags |= SVN_WC__ENTRY_MODIFY_KIND;
+              modify_flags |= SVN_WC__ENTRY_MODIFY_KIND;
             }
 
           SVN_ERR(svn_wc__entry_modify(db, child_abspath, svn_node_unknown,
-                                       &tmp_entry, flags, iterpool));
+                                       &tmp_entry, modify_flags, iterpool));
         }
 
       /* Remove lock stuffs. */

Modified: subversion/trunk/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/entries.c?rev=938718&r1=938717&r2=938718&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/entries.c (original)
+++ subversion/trunk/subversion/libsvn_wc/entries.c Tue Apr 27 23:19:25 2010
@@ -2635,7 +2635,7 @@ write_one_entry(svn_wc__db_t *db,
 static svn_error_t *
 fold_entry(svn_wc_entry_t *cur_entry,
            const char *name,
-           apr_uint64_t modify_flags,
+           int modify_flags,
            const svn_wc_entry_t *entry,
            const svn_wc_entry_t *parent_entry,
            apr_pool_t *pool)
@@ -2660,9 +2660,7 @@ fold_entry(svn_wc_entry_t *cur_entry,
   if (modify_flags & SVN_WC__ENTRY_MODIFY_KIND)
     cur_entry->kind = entry->kind;
 
-  /* Schedule */
-  if (modify_flags & SVN_WC__ENTRY_MODIFY_SCHEDULE)
-    cur_entry->schedule = entry->schedule;
+  /* Schedule: handled by caller.  */
 
   /* Checksum */
   if (modify_flags & SVN_WC__ENTRY_MODIFY_CHECKSUM)
@@ -2750,7 +2748,7 @@ fold_entry(svn_wc_entry_t *cur_entry,
 
   */
   if (modify_flags & SVN_WC__ENTRY_MODIFY_SCHEDULE
-      && entry->schedule == svn_wc_schedule_delete)
+      && cur_entry->schedule == svn_wc_schedule_delete)
     {
       cur_entry->copied = FALSE;
       cur_entry->copyfrom_rev = SVN_INVALID_REVNUM;
@@ -2762,7 +2760,7 @@ fold_entry(svn_wc_entry_t *cur_entry,
 
   /* keep_local makes sense only when we are going to delete directory. */
   if (modify_flags & SVN_WC__ENTRY_MODIFY_SCHEDULE
-      && entry->schedule != svn_wc_schedule_delete)
+      && cur_entry->schedule != svn_wc_schedule_delete)
     {
       cur_entry->keep_local = FALSE;
     }
@@ -2822,40 +2820,34 @@ svn_wc__entry_remove(svn_wc__db_t *db,
 
    The output can be:
     * *SKIP_SCHEDULE_CHANGE set to true, when no schedule change is necessary.
-    * *DELETE_ENTRY true, when the entry should just be removed.
     * Or a schedule change.
 
    In all these cases *RESULT_SCHEDULE contains the new schedule value.
-
-   SCRATCH_POOL can be used for local allocations.
  */
 static svn_error_t *
 fold_scheduling(svn_boolean_t *skip_schedule_change,
-                svn_boolean_t *delete_entry,
                 svn_wc_schedule_t *result_schedule,
                 const svn_wc_entry_t *this_dir_entry,
                 const svn_wc_entry_t *entry,
                 svn_wc_schedule_t new_schedule,
-                const char *name,
-                apr_pool_t *scratch_pool)
+                const char *name)
 {
   SVN_ERR_ASSERT(this_dir_entry);
+  SVN_ERR_ASSERT(new_schedule != svn_wc_schedule_replace);
 
   *skip_schedule_change = FALSE;
-  *delete_entry = FALSE;
   *result_schedule = new_schedule;
 
   /* The only operation valid on an item not already in revision
      control is addition. */
-  if (! entry)
+  if (entry == NULL)
     {
       if (new_schedule == svn_wc_schedule_add)
         return SVN_NO_ERROR;
-      else
-        return
-          svn_error_createf(SVN_ERR_WC_SCHEDULE_CONFLICT, NULL,
-                            _("'%s' is not under version control"),
-                            name);
+
+      return svn_error_createf(SVN_ERR_WC_SCHEDULE_CONFLICT, NULL,
+                               _("'%s' is not under version control"),
+                               name);
     }
 
   /* At this point, we know the following things:
@@ -2880,147 +2872,102 @@ fold_scheduling(svn_boolean_t *skip_sche
                             _("Can't add '%s' to deleted directory; "
                               "try undeleting its parent directory first"),
                             name);
-      if (new_schedule == svn_wc_schedule_replace)
-        return
-          svn_error_createf(SVN_ERR_WC_SCHEDULE_CONFLICT, NULL,
-                            _("Can't replace '%s' in deleted directory; "
-                              "try undeleting its parent directory first"),
-                            name);
     }
 
   if (entry->absent && (new_schedule == svn_wc_schedule_add))
     {
-      return svn_error_createf
-        (SVN_ERR_WC_SCHEDULE_CONFLICT, NULL,
-         _("'%s' is marked as absent, so it cannot be scheduled for addition"),
-         name);
+      return svn_error_createf(SVN_ERR_WC_SCHEDULE_CONFLICT, NULL,
+                               _("'%s' is marked as absent, so it cannot "
+                                 "be scheduled for addition"),
+                               name);
+    }
+
+  if (entry->schedule == svn_wc_schedule_normal
+      && new_schedule == svn_wc_schedule_add
+      && !entry->deleted)
+    {
+      /* You can't add something that's already been added to
+         revision control... unless it's got a 'deleted' state */
+      return svn_error_createf(SVN_ERR_WC_SCHEDULE_CONFLICT, NULL,
+                               _("Entry '%s' is already under version "
+                                 "control"),
+                               name);
     }
 
-  switch (entry->schedule)
+  if (entry->schedule == svn_wc_schedule_normal)
     {
-    case svn_wc_schedule_normal:
-      switch (new_schedule)
+      if (new_schedule == svn_wc_schedule_normal)
         {
-        case svn_wc_schedule_normal:
-          /* Normal is a trivial no-op case. Reset the
-             schedule modification bit and move along. */
+          /* No-op case.  */
           *skip_schedule_change = TRUE;
-          return SVN_NO_ERROR;
+        }
+    }
+  else if (entry->schedule == svn_wc_schedule_add)
+    {
+      if (new_schedule == svn_wc_schedule_normal
+          || new_schedule == svn_wc_schedule_add)
+        {
+          /* These are both no-op cases.  Normal is obvious, as is add.
 
-        case svn_wc_schedule_delete:
-        case svn_wc_schedule_replace:
-          /* These are all good. */
-          return SVN_NO_ERROR;
-
-        case svn_wc_schedule_add:
-          /* You can't add something that's already been added to
-             revision control... unless it's got a 'deleted' state */
-          if (! entry->deleted)
-            return
-              svn_error_createf
-              (SVN_ERR_WC_SCHEDULE_CONFLICT, NULL,
-               _("Entry '%s' is already under version control"), name);
-        }
-      break;
-
-    case svn_wc_schedule_add:
-      switch (new_schedule)
-        {
-        case svn_wc_schedule_normal:
-        case svn_wc_schedule_add:
-        case svn_wc_schedule_replace:
-          /* These are all no-op cases.  Normal is obvious, as is add.
-               ### The 'add' case is not obvious: above, we throw an error if
-               ### already versioned, so why not here too?
-             Replace on an entry marked for addition breaks down to
-             (add + (delete + add)), which resolves to just (add), and
-             since this entry is already marked with (add), this too
-             is a no-op. */
+             ### Neither case is obvious: above, we throw an error if
+             ### already versioned, so why not here too?
+          */
           *skip_schedule_change = TRUE;
-          return SVN_NO_ERROR;
-
-        case svn_wc_schedule_delete:
-          /* Not-yet-versioned item being deleted.  If the original
-             entry was not marked as "deleted", then remove the entry.
-             Else, return the entry to a 'normal' state, preserving
-               ### What does it mean for an entry be schedule-add and
-               ### deleted at once, and why change schedule to normal?
-             the "deleted" flag.  Check that we are not trying to
-             remove the SVN_WC_ENTRY_THIS_DIR entry as that would
-             leave the entries file in an invalid state. */
-          SVN_ERR_ASSERT(entry != this_dir_entry);
-          if (! entry->deleted)
-            *delete_entry = TRUE;
-          else
-            *result_schedule = svn_wc_schedule_normal;
-          return SVN_NO_ERROR;
         }
-      break;
+      else if (new_schedule == svn_wc_schedule_delete)
+        {
+          /* This is deleting a node added over the top of a not-present
+             (DELETED=true) node. Return it to the not-present state.  */
+          /* ### not trying to delete the directory, and this is a
+             ### not-present node. (otherwise, caller handles this case)  */
+          SVN_ERR_ASSERT(entry != this_dir_entry);
+          SVN_ERR_ASSERT(entry->deleted);
 
-    case svn_wc_schedule_delete:
-      switch (new_schedule)
+          *result_schedule = svn_wc_schedule_normal;
+        }
+    }
+  else if (entry->schedule == svn_wc_schedule_delete)
+    {
+      if (new_schedule == svn_wc_schedule_normal)
         {
-        case svn_wc_schedule_normal:
           /* Reverting a delete results in normal */
-          return SVN_NO_ERROR;
-
-        case svn_wc_schedule_delete:
-          /* These are no-op cases. */
+        }
+      else if (new_schedule == svn_wc_schedule_delete)
+        {
+          /* This is a no-op case  */
           *skip_schedule_change = TRUE;
-          return SVN_NO_ERROR;
-
-
-        case svn_wc_schedule_add:
+        }
+      else if (new_schedule == svn_wc_schedule_add)
+        {
           /* Re-adding an entry marked for deletion?  This is really a
              replace operation. */
           *result_schedule = svn_wc_schedule_replace;
-          return SVN_NO_ERROR;
-
-
-        case svn_wc_schedule_replace:
-          /* Replacing an item marked for deletion breaks down to
-             (delete + (delete + add)), which might deserve a warning,
-             but whatever. */
-          return SVN_NO_ERROR;
-
         }
-      break;
+    }
+  else
+    {
+      /* Only possible state left.  */
+      SVN_ERR_ASSERT(entry->schedule == svn_wc_schedule_replace);
 
-    case svn_wc_schedule_replace:
-      switch (new_schedule)
+      if (new_schedule == svn_wc_schedule_normal)
+        {
+          /* Reverting replacements results in normal  */
+        }
+      else if (new_schedule == svn_wc_schedule_add)
         {
-        case svn_wc_schedule_normal:
-          /* Reverting replacements results normal. */
-          return SVN_NO_ERROR;
-
-        case svn_wc_schedule_add:
           /* Adding a to-be-replaced entry breaks down to ((delete +
              add) + add) which might deserve a warning, but we'll just
              no-op it. */
-        case svn_wc_schedule_replace:
-          /* Replacing a to-be-replaced entry breaks down to ((delete
-             + add) + (delete + add)), which is insane!  Make up your
-             friggin' mind, dude! :-)  Well, we'll no-op this one,
-             too. */
           *skip_schedule_change = TRUE;
-          return SVN_NO_ERROR;
-
-
-        case svn_wc_schedule_delete:
+        }
+      else if (new_schedule == svn_wc_schedule_delete)
+        {
           /* Deleting a to-be-replaced entry breaks down to ((delete +
              add) + delete) which resolves to a flat deletion. */
           *result_schedule = svn_wc_schedule_delete;
-          return SVN_NO_ERROR;
-
         }
-      break;
-
-    default:
-      return
-        svn_error_createf
-        (SVN_ERR_WC_SCHEDULE_CONFLICT, NULL,
-         _("Entry '%s' has illegal schedule"), name);
     }
+
   return SVN_NO_ERROR;
 }
 
@@ -3031,8 +2978,8 @@ entry_modify(svn_wc__db_t *db,
              const char *local_abspath,
              svn_node_kind_t kind,
              svn_boolean_t parent_stub,
-             svn_wc_entry_t *entry_mods,
-             apr_uint64_t modify_flags,
+             const svn_wc_entry_t *entry_mods,
+             int modify_flags,
              apr_pool_t *scratch_pool)
 {
   apr_pool_t *subpool = svn_pool_create(scratch_pool);
@@ -3042,6 +2989,7 @@ entry_modify(svn_wc__db_t *db,
   const char *name;
   const svn_wc_entry_t *parent_entry;
   svn_wc_entry_t *cur_entry;
+  svn_wc_schedule_t new_schedule;
 
   SVN_ERR_ASSERT(entry_mods);
 
@@ -3069,31 +3017,39 @@ entry_modify(svn_wc__db_t *db,
 
   if (modify_flags & SVN_WC__ENTRY_MODIFY_SCHEDULE)
     {
+      new_schedule = entry_mods->schedule;
+
       /* We may just want to force the scheduling change in. Otherwise,
          call our special function to fold the change in.  */
       if (!(modify_flags & SVN_WC__ENTRY_MODIFY_FORCE))
         {
           svn_boolean_t skip_schedule_change;
-          svn_boolean_t delete_entry;
+
+          /* ### adm_ops.c is the only code that attempts to transition to
+             ### schedule_replace, but it uses FORCE.  */
+          SVN_ERR_ASSERT(entry_mods->schedule != svn_wc_schedule_replace);
+
+          /* If we are deleting a node that has been added, then simply
+             remove the entry. Do NOT do this for an add over a not-present
+             BASE node (the DELETED flag).  */
+          if (entry_mods->schedule == svn_wc_schedule_delete
+              && cur_entry != NULL
+              && cur_entry->schedule == svn_wc_schedule_add
+              && !cur_entry->deleted)
+            {
+              SVN_ERR(svn_wc__entry_remove(db, local_abspath, subpool));
+              svn_pool_destroy(subpool);
+              return SVN_NO_ERROR;
+            }
 
           /* If scheduling changes were made, we have a special routine to
              manage those modifications. */
           SVN_ERR(fold_scheduling(&skip_schedule_change,
-                                  &delete_entry,
-                                  /* ### this is our OUT parameter  */
-                                  &entry_mods->schedule,
+                                  &new_schedule,
                                   parent_entry,
                                   cur_entry,
                                   entry_mods->schedule,
-                                  name, subpool));
-
-          /* Check if the scheduling folding resulted in removing this entry */
-          if (delete_entry)
-            {
-              SVN_ERR(svn_wc__entry_remove(db, local_abspath, subpool));
-              svn_pool_destroy(subpool);
-              return SVN_NO_ERROR;
-            }
+                                  name));
 
           if (skip_schedule_change)
             modify_flags &= ~SVN_WC__ENTRY_MODIFY_SCHEDULE;
@@ -3105,6 +3061,8 @@ entry_modify(svn_wc__db_t *db,
     cur_entry = alloc_entry(subpool);
 
   /* Fold in the changes, and write them out.  */
+  if (modify_flags & SVN_WC__ENTRY_MODIFY_SCHEDULE)
+    cur_entry->schedule = new_schedule;
   SVN_ERR(fold_entry(cur_entry, name, modify_flags, entry_mods, parent_entry,
                      subpool));
 
@@ -3123,8 +3081,8 @@ svn_error_t *
 svn_wc__entry_modify(svn_wc__db_t *db,
                      const char *local_abspath,
                      svn_node_kind_t kind,
-                     svn_wc_entry_t *entry,
-                     apr_uint64_t modify_flags,
+                     const svn_wc_entry_t *entry,
+                     int modify_flags,
                      apr_pool_t *scratch_pool)
 {
   return svn_error_return(entry_modify(db, local_abspath, kind, FALSE,
@@ -3135,8 +3093,8 @@ svn_wc__entry_modify(svn_wc__db_t *db,
 svn_error_t *
 svn_wc__entry_modify_stub(svn_wc__db_t *db,
                           const char *local_abspath,
-                          svn_wc_entry_t *entry,
-                          apr_uint64_t modify_flags,
+                          const svn_wc_entry_t *entry,
+                          int modify_flags,
                           apr_pool_t *scratch_pool)
 {
   SVN_ERR_ASSERT((modify_flags & ~(
@@ -3243,7 +3201,7 @@ svn_wc__tweak_entry(svn_wc__db_t *db,
 {
   const svn_wc_entry_t *entry;
   svn_wc_entry_t tmp_entry;
-  apr_uint64_t modify_flags = 0;
+  int modify_flags = 0;
 
   SVN_ERR(svn_wc__get_entry(&entry, db, local_abspath, FALSE, kind,
                             parent_stub, scratch_pool, scratch_pool));

Modified: subversion/trunk/subversion/libsvn_wc/entries.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/entries.h?rev=938718&r1=938717&r2=938718&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/entries.h (original)
+++ subversion/trunk/subversion/libsvn_wc/entries.h Tue Apr 27 23:19:25 2010
@@ -75,7 +75,7 @@ extern "C" {
 
    Set MODIFY_FLAGS to reflect the fields that were present in ATTS. */
 svn_error_t *svn_wc__atts_to_entry(svn_wc_entry_t **new_entry,
-                                   apr_uint64_t *modify_flags,
+                                   int *modify_flags,
                                    apr_hash_t *atts,
                                    apr_pool_t *pool);
 
@@ -83,35 +83,28 @@ svn_error_t *svn_wc__atts_to_entry(svn_w
 /* The MODIFY_FLAGS that tell svn_wc__entry_modify which parameters to
    pay attention to.  ### These should track the changes made to the
    SVN_WC__ENTRY_ATTR_* #defines! */
-/* Note: we use APR_INT64_C because APR 0.9 lacks APR_UINT64_C */
-#define SVN_WC__ENTRY_MODIFY_REVISION           APR_INT64_C(0x0000000000000001)
-#define SVN_WC__ENTRY_MODIFY_URL                APR_INT64_C(0x0000000000000002)
-/* OPEN */
-#define SVN_WC__ENTRY_MODIFY_KIND               APR_INT64_C(0x0000000000000008)
-#define SVN_WC__ENTRY_MODIFY_TEXT_TIME          APR_INT64_C(0x0000000000000010)
-/* OPEN */
-#define SVN_WC__ENTRY_MODIFY_CHECKSUM           APR_INT64_C(0x0000000000000040)
-#define SVN_WC__ENTRY_MODIFY_SCHEDULE           APR_INT64_C(0x0000000000000080)
-#define SVN_WC__ENTRY_MODIFY_COPIED             APR_INT64_C(0x0000000000000100)
-#define SVN_WC__ENTRY_MODIFY_DELETED            APR_INT64_C(0x0000000000000200)
-#define SVN_WC__ENTRY_MODIFY_COPYFROM_URL       APR_INT64_C(0x0000000000000400)
-#define SVN_WC__ENTRY_MODIFY_COPYFROM_REV       APR_INT64_C(0x0000000000000800)
-#define SVN_WC__ENTRY_MODIFY_CONFLICT_OLD       APR_INT64_C(0x0000000000001000)
-#define SVN_WC__ENTRY_MODIFY_CONFLICT_NEW       APR_INT64_C(0x0000000000002000)
-#define SVN_WC__ENTRY_MODIFY_CONFLICT_WRK       APR_INT64_C(0x0000000000004000)
-#define SVN_WC__ENTRY_MODIFY_PREJFILE           APR_INT64_C(0x0000000000008000)
-/* OPEN */
-#define SVN_WC__ENTRY_MODIFY_ABSENT             APR_INT64_C(0x0000000000200000)
-/* OPEN */
-#define SVN_WC__ENTRY_MODIFY_WORKING_SIZE       APR_INT64_C(0x0000000100000000)
-/* OPEN */
-#define SVN_WC__ENTRY_MODIFY_FILE_EXTERNAL      APR_INT64_C(0x0000000400000000)
-/* No #define for DEPTH, because it's only meaningful on this-dir anyway. */
+#define SVN_WC__ENTRY_MODIFY_REVISION           0x00000001
+#define SVN_WC__ENTRY_MODIFY_URL                0x00000002
+#define SVN_WC__ENTRY_MODIFY_KIND               0x00000004
+#define SVN_WC__ENTRY_MODIFY_TEXT_TIME          0x00000008
+#define SVN_WC__ENTRY_MODIFY_CHECKSUM           0x00000010
+#define SVN_WC__ENTRY_MODIFY_SCHEDULE           0x00000020
+#define SVN_WC__ENTRY_MODIFY_COPIED             0x00000040
+#define SVN_WC__ENTRY_MODIFY_DELETED            0x00000080
+#define SVN_WC__ENTRY_MODIFY_COPYFROM_URL       0x00000100
+#define SVN_WC__ENTRY_MODIFY_COPYFROM_REV       0x00000200
+#define SVN_WC__ENTRY_MODIFY_CONFLICT_OLD       0x00000400
+#define SVN_WC__ENTRY_MODIFY_CONFLICT_NEW       0x00000800
+#define SVN_WC__ENTRY_MODIFY_CONFLICT_WRK       0x00001000
+#define SVN_WC__ENTRY_MODIFY_PREJFILE           0x00002000
+#define SVN_WC__ENTRY_MODIFY_ABSENT             0x00004000
+#define SVN_WC__ENTRY_MODIFY_WORKING_SIZE       0x00008000
+#define SVN_WC__ENTRY_MODIFY_FILE_EXTERNAL      0x00010000
 
 /* ...ORed together with this to mean: just set the schedule to the new
    value, instead of treating the new value as a change of state to be
    merged with the current schedule. */
-#define SVN_WC__ENTRY_MODIFY_FORCE              APR_INT64_C(0x4000000000000000)
+#define SVN_WC__ENTRY_MODIFY_FORCE              0x00020000
 
 
 /* TODO ### Rewrite doc string to mention DB, LOCAL_ABSPATH; not ADM_ACCESS, NAME.
@@ -139,19 +132,19 @@ svn_error_t *svn_wc__atts_to_entry(svn_w
 */
 svn_error_t *
 svn_wc__entry_modify(svn_wc__db_t *db,
-                      const char *local_abspath,
-                      svn_node_kind_t kind,
-                      svn_wc_entry_t *entry,
-                      apr_uint64_t modify_flags,
-                      apr_pool_t *scratch_pool);
+                     const char *local_abspath,
+                     svn_node_kind_t kind,
+                     const svn_wc_entry_t *entry,
+                     int modify_flags,
+                     apr_pool_t *scratch_pool);
 
 
 /* Like svn_wc__entry_modify(), but modifies the "parent stub".  */
 svn_error_t *
 svn_wc__entry_modify_stub(svn_wc__db_t *db,
                           const char *local_abspath,
-                          svn_wc_entry_t *entry,
-                          apr_uint64_t modify_flags,
+                          const svn_wc_entry_t *entry,
+                          int modify_flags,
                           apr_pool_t *scratch_pool);
 
 /* Remove LOCAL_ABSPATH from DB, unconditionally.

Modified: subversion/trunk/subversion/libsvn_wc/log.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/log.c?rev=938718&r1=938717&r2=938718&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/log.c (original)
+++ subversion/trunk/subversion/libsvn_wc/log.c Tue Apr 27 23:19:25 2010
@@ -257,7 +257,7 @@ log_do_modify_entry(struct log_runner *l
   apr_hash_t *ah = svn_xml_make_att_hash(atts, loggy->pool);
   const char *local_abspath;
   svn_wc_entry_t *entry;
-  apr_uint64_t modify_flags;
+  int modify_flags;
   const char *valuestr;
 
   local_abspath = svn_dirent_join(loggy->adm_abspath, name, loggy->pool);

Modified: subversion/trunk/subversion/libsvn_wc/old-and-busted.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/old-and-busted.c?rev=938718&r1=938717&r2=938718&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/old-and-busted.c (original)
+++ subversion/trunk/subversion/libsvn_wc/old-and-busted.c Tue Apr 27 23:19:25 2010
@@ -694,7 +694,7 @@ read_entry(svn_wc_entry_t **new_entry,
  * false.  ENTRY_NAME is the name of the WC-entry. */
 static svn_error_t *
 do_bool_attr(svn_boolean_t *entry_flag,
-             apr_uint64_t *modify_flags, apr_uint64_t modify_flag,
+             int *modify_flags, int modify_flag,
              apr_hash_t *atts, const char *attr_name,
              const char *entry_name)
 {
@@ -722,10 +722,10 @@ do_bool_attr(svn_boolean_t *entry_flag,
 
 /* */
 static const char *
-extract_string(apr_uint64_t *modify_flags,
+extract_string(int *modify_flags,
                apr_hash_t *atts,
                const char *att_name,
-               apr_uint64_t flag,
+               int flag,
                svn_boolean_t normalize,
                apr_pool_t *result_pool)
 {
@@ -756,7 +756,7 @@ extract_string(apr_uint64_t *modify_flag
 */
 svn_error_t *
 svn_wc__atts_to_entry(svn_wc_entry_t **new_entry,
-                      apr_uint64_t *modify_flags,
+                      int *modify_flags,
                       apr_hash_t *atts,
                       apr_pool_t *pool)
 {
@@ -1054,7 +1054,7 @@ handle_start_tag(void *userData, const c
   apr_hash_t *attributes;
   svn_wc_entry_t *entry;
   svn_error_t *err;
-  apr_uint64_t modify_flags = 0;
+  int modify_flags = 0;
 
   /* We only care about the `entry' tag; all other tags, such as `xml'
      and `wc-entries', are ignored. */

Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=938718&r1=938717&r2=938718&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Tue Apr 27 23:19:25 2010
@@ -2610,8 +2610,9 @@ add_directory(const char *path,
 
     {
       svn_wc_entry_t tmp_entry;
-      apr_uint64_t modify_flags = SVN_WC__ENTRY_MODIFY_KIND |
-        SVN_WC__ENTRY_MODIFY_DELETED | SVN_WC__ENTRY_MODIFY_ABSENT;
+      int modify_flags = (SVN_WC__ENTRY_MODIFY_KIND
+                          | SVN_WC__ENTRY_MODIFY_DELETED
+                          | SVN_WC__ENTRY_MODIFY_ABSENT);
 
       /* Immediately create an entry for the new directory in the parent.
          Note that the parent must already be either added or opened, and
@@ -2630,8 +2631,8 @@ add_directory(const char *path,
       if (db->add_existed)
         {
           tmp_entry.schedule = svn_wc_schedule_normal;
-          modify_flags |= SVN_WC__ENTRY_MODIFY_SCHEDULE |
-            SVN_WC__ENTRY_MODIFY_FORCE;
+          modify_flags |= (SVN_WC__ENTRY_MODIFY_SCHEDULE
+                           | SVN_WC__ENTRY_MODIFY_FORCE);
         }
 
       SVN_ERR(svn_wc__entry_modify_stub(eb->db, db->local_abspath,
@@ -2643,8 +2644,9 @@ add_directory(const char *path,
              is no longer scheduled for addition.  Change rev from 0
              to the target revision allowing prep_directory() to do
              its thing without error. */
-          modify_flags  = SVN_WC__ENTRY_MODIFY_SCHEDULE
-            | SVN_WC__ENTRY_MODIFY_FORCE | SVN_WC__ENTRY_MODIFY_REVISION;
+          modify_flags = (SVN_WC__ENTRY_MODIFY_SCHEDULE
+                          | SVN_WC__ENTRY_MODIFY_FORCE
+                          | SVN_WC__ENTRY_MODIFY_REVISION);
 
           tmp_entry.revision = *(eb->target_revision);
 
@@ -5856,7 +5858,7 @@ svn_wc_add_repos_file4(svn_wc_context_t 
    */
   {
     svn_wc_entry_t tmp_entry;
-    apr_uint64_t modify_flags = SVN_WC__ENTRY_MODIFY_SCHEDULE;
+    int modify_flags = SVN_WC__ENTRY_MODIFY_SCHEDULE;
 
     tmp_entry.schedule = svn_wc_schedule_add;
 

Modified: subversion/trunk/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/workqueue.c?rev=938718&r1=938717&r2=938718&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/trunk/subversion/libsvn_wc/workqueue.c Tue Apr 27 23:19:25 2010
@@ -218,7 +218,7 @@ run_revert(svn_wc__db_t *db,
   const char *working_props_path;
   const char *parent_abspath;
   svn_boolean_t conflicted;
-  apr_uint64_t modify_flags = 0;
+  int modify_flags = 0;
   svn_wc_entry_t tmp_entry;
 
   /* We need a NUL-terminated path, so copy it out of the skel.  */