subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1182877 [3/5] - in /subversion/branches/fs-py: ./ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/tigris/subversion/javahl/ subversion/bindings/javahl/tests/org/apache/subversion/javahl/ subversion/include/ subversion...
Date Thu, 13 Oct 2011 14:30:10 GMT
Modified: subversion/branches/fs-py/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_subr/mergeinfo.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_subr/mergeinfo.c Thu Oct 13 14:30:07 2011
@@ -78,7 +78,7 @@ combine_ranges(svn_merge_range_t *output
 static svn_error_t *
 parse_pathname(const char **input,
                const char *end,
-               svn_stringbuf_t **pathname,
+               const char **pathname,
                apr_pool_t *pool)
 {
   const char *curr = *input;
@@ -101,17 +101,11 @@ parse_pathname(const char **input,
     return svn_error_create(SVN_ERR_MERGEINFO_PARSE_ERROR, NULL,
                             _("No pathname preceding ':'"));
 
-  /* Tolerate relative repository paths, but convert them to absolute. */
-  if (**input == '/')
-    {
-      *pathname = svn_stringbuf_ncreate(*input, last_colon - *input, pool);
-    }
-  else
-    {
-      const char *repos_rel_path = apr_pstrndup(pool, *input,
-                                                last_colon - *input);
-      *pathname = svn_stringbuf_createf(pool, "/%s",  repos_rel_path);
-    }
+  /* Tolerate relative repository paths, but convert them to absolute.
+     ### Efficiency?  1 string duplication here, 2 in canonicalize. */
+  *pathname = svn_fspath__canonicalize(apr_pstrndup(pool, *input,
+                                                    last_colon - *input),
+                                       pool);
 
   *input = last_colon;
 
@@ -614,7 +608,7 @@ static svn_error_t *
 parse_revision_line(const char **input, const char *end, svn_mergeinfo_t hash,
                     apr_pool_t *scratch_pool)
 {
-  svn_stringbuf_t *pathname;
+  const char *pathname;
   apr_array_header_t *existing_rangelist;
   apr_array_header_t *rangelist = apr_array_make(scratch_pool, 1,
                                                  sizeof(svn_merge_range_t *));
@@ -627,7 +621,7 @@ parse_revision_line(const char **input, 
 
   *input = *input + 1;
 
-  SVN_ERR(parse_rangelist(input, end, rangelist, pathname->data, scratch_pool));
+  SVN_ERR(parse_rangelist(input, end, rangelist, pathname, scratch_pool));
 
   if (*input != end && *(*input) != '\n')
     return svn_error_createf(SVN_ERR_MERGEINFO_PARSE_ERROR, NULL,
@@ -695,12 +689,12 @@ parse_revision_line(const char **input, 
      leading slash, e.g. "trunk:4033\n/trunk:4039-4995".  In the event
      we encounter this we merge the rangelists together under a single
      absolute path key. */
-  existing_rangelist = apr_hash_get(hash, pathname->data, APR_HASH_KEY_STRING);
+  existing_rangelist = apr_hash_get(hash, pathname, APR_HASH_KEY_STRING);
   if (existing_rangelist)
     SVN_ERR(svn_rangelist_merge2(rangelist, existing_rangelist,
                                  scratch_pool, scratch_pool));
 
-  apr_hash_set(hash, apr_pstrdup(apr_hash_pool_get(hash), pathname->data),
+  apr_hash_set(hash, apr_pstrdup(apr_hash_pool_get(hash), pathname),
                APR_HASH_KEY_STRING,
                svn_rangelist_dup(rangelist, apr_hash_pool_get(hash)));
 
@@ -742,68 +736,401 @@ svn_mergeinfo_parse(svn_mergeinfo_t *mer
   return err;
 }
 
+/* Cleanup after svn_rangelist_merge2 when it modifies the ending range of
+   a single rangelist element in-place.
+
+   If *RANGE_INDEX is not a valid element in RANGELIST do nothing.  Otherwise
+   ensure that RANGELIST[*RANGE_INDEX]->END does not adjoin or overlap any
+   subsequent ranges in RANGELIST.
+
+   If overlap is found, then remove, modify, and/or add elements to RANGELIST
+   as per the invariants for rangelists documented in svn_mergeinfo.h.  If
+   RANGELIST[*RANGE_INDEX]->END adjoins a subsequent element then combine the
+   elements if their inheritability permits -- The inheritance of intersecting
+   and adjoining ranges is handled as per svn_mergeinfo_merge2.  Upon return
+   set *RANGE_INDEX to the index of the youngest element modified, added, or
+   adjoined to RANGELIST[*RANGE_INDEX].
+
+   Note: Adjoining rangelist elements are those where the end rev of the older
+   element is equal to the start rev of the younger element.
+
+   Any new elements inserted into RANGELIST are allocated in  RESULT_POOL.*/
+static void
+adjust_remaining_ranges(apr_array_header_t *rangelist,
+                        int *range_index,
+                        apr_pool_t *result_pool)
+{
+  int i;
+  int starting_index;
+  int elements_to_delete = 0;
+  svn_merge_range_t *modified_range;
+
+  if (*range_index >= rangelist->nelts)
+    return;
+
+  starting_index = *range_index + 1;
+  modified_range = APR_ARRAY_IDX(rangelist, *range_index, svn_merge_range_t *);
+
+  for (i = *range_index + 1; i < rangelist->nelts; i++)
+    {
+      svn_merge_range_t *next_range = APR_ARRAY_IDX(rangelist, i,
+                                                    svn_merge_range_t *);
+
+      /* If MODIFIED_RANGE doesn't adjoin or overlap the next range in
+         RANGELIST then we are finished. */
+      if (modified_range->end < next_range->start)
+        break;
+
+      /* Does MODIFIED_RANGE adjoin NEXT_RANGE? */
+      if (modified_range->end == next_range->start)
+        {
+          if (modified_range->inheritable == next_range->inheritable)
+            {
+              /* Combine adjoining ranges with the same inheritability. */
+              modified_range->end = next_range->end;
+              elements_to_delete++;
+            }
+          else
+            {
+              /* Cannot join because inheritance differs. */
+              (*range_index)++;
+            }
+          break;
+        }
+
+      /* Alright, we know MODIFIED_RANGE overlaps NEXT_RANGE, but how? */
+      if (modified_range->end > next_range->end)
+        {
+          /* NEXT_RANGE is a proper subset of MODIFIED_RANGE and the two
+             don't share the same end range. */
+          if (modified_range->inheritable
+              || (modified_range->inheritable == next_range->inheritable))
+            {
+              /* MODIFIED_RANGE absorbs NEXT_RANGE. */
+              elements_to_delete++;
+            }
+          else
+            {
+              /* NEXT_RANGE is a proper subset MODIFIED_RANGE but
+                 MODIFIED_RANGE is non-inheritable and NEXT_RANGE is
+                 inheritable.  This means MODIFIED_RANGE is truncated,
+                 NEXT_RANGE remains, and the portion of MODIFIED_RANGE
+                 younger than NEXT_RANGE is added as a separate range:
+                  ______________________________________________
+                 |                                              |
+                 M                 MODIFIED_RANGE               N
+                 |                 (!inhertiable)               |
+                 |______________________________________________|
+                                  |              |
+                                  O  NEXT_RANGE  P
+                                  | (inheritable)|
+                                  |______________|
+                                         |
+                                         V
+                  _______________________________________________
+                 |                |              |               |
+                 M MODIFIED_RANGE O  NEXT_RANGE  P   NEW_RANGE   N
+                 | (!inhertiable) | (inheritable)| (!inheritable)|
+                 |________________|______________|_______________|
+              */
+              svn_merge_range_t *new_modified_range =
+                apr_palloc(result_pool, sizeof(*new_modified_range));
+              new_modified_range->start = next_range->end;
+              new_modified_range->end = modified_range->end;
+              new_modified_range->inheritable = FALSE;
+              modified_range->end = next_range->start;
+              (*range_index)+=2;
+              svn_sort__array_insert(&new_modified_range, rangelist,
+                                     *range_index);
+              /* Recurse with the new range. */
+              adjust_remaining_ranges(rangelist, range_index, result_pool);
+              break;
+            }
+        }
+      else if (modified_range->end == next_range->end)
+        {
+          /* NEXT_RANGE is a proper subset MODIFIED_RANGE and share
+             the same end range. */
+          if (modified_range->inheritable
+              || (modified_range->inheritable == next_range->inheritable))
+            {
+              /* MODIFIED_RANGE absorbs NEXT_RANGE. */
+              elements_to_delete++;
+            }
+          else
+            {
+              /* The intersection between MODIFIED_RANGE and NEXT_RANGE is
+                 absorbed by the latter. */
+              modified_range->end = next_range->start;
+              (*range_index)++;
+            }
+          break;
+        }
+      else
+        {
+          /* NEXT_RANGE and MODIFIED_RANGE intersect but NEXT_RANGE is not
+             a proper subset of MODIFIED_RANGE, nor do the two share the
+             same end revision, i.e. they overlap. */
+          if (modified_range->inheritable == next_range->inheritable)
+            {
+              /* Combine overlapping ranges with the same inheritability. */
+              modified_range->end = next_range->end;
+              elements_to_delete++;
+            }
+          else if (modified_range->inheritable)
+            {
+              /* MODIFIED_RANGE absorbs the portion of NEXT_RANGE it overlaps
+                 and NEXT_RANGE is truncated. */
+              next_range->start = modified_range->end;
+              (*range_index)++;
+            }
+          else
+            {
+              /* NEXT_RANGE absorbs the portion of MODIFIED_RANGE it overlaps
+                 and MODIFIED_RANGE is truncated. */
+              modified_range->end = next_range->start;
+              (*range_index)++;
+            }
+          break;
+        }
+    }
+
+  if (elements_to_delete)
+    svn_sort__array_delete(rangelist, starting_index, elements_to_delete);
+}
+
 svn_error_t *
 svn_rangelist_merge2(apr_array_header_t *rangelist,
                      const apr_array_header_t *changes,
                      apr_pool_t *result_pool,
                      apr_pool_t *scratch_pool)
 {
-  int i, j;
-  apr_array_header_t *original_rangelist;
-  
-  original_rangelist = apr_array_copy(scratch_pool, rangelist);
-  apr_array_clear(rangelist);
+  int i = 0;
+  int j = 0;
 
-  i = 0;
-  j = 0;
-  while (i < (original_rangelist)->nelts && j < changes->nelts)
-    {
-      svn_merge_range_t *elt1, *elt2;
-      int res;
+  /* We may modify CHANGES, so make a copy in SCRATCH_POOL. */
+  changes = svn_rangelist_dup(changes, scratch_pool);
 
-      elt1 = APR_ARRAY_IDX(original_rangelist, i, svn_merge_range_t *);
-      elt2 = APR_ARRAY_IDX(changes, j, svn_merge_range_t *);
+  while (i < rangelist->nelts && j < changes->nelts)
+    {
+      svn_merge_range_t *range =
+        APR_ARRAY_IDX(rangelist, i, svn_merge_range_t *);
+      svn_merge_range_t *change =
+        APR_ARRAY_IDX(changes, j, svn_merge_range_t *);
+      int res = svn_sort_compare_ranges(&range, &change);
 
-      res = svn_sort_compare_ranges(&elt1, &elt2);
       if (res == 0)
         {
           /* Only when merging two non-inheritable ranges is the result also
              non-inheritable.  In all other cases ensure an inheritiable
              result. */
-          if (elt1->inheritable || elt2->inheritable)
-            elt1->inheritable = TRUE;
-          SVN_ERR(combine_with_lastrange(elt1, rangelist, TRUE, result_pool));
+          if (range->inheritable || change->inheritable)
+            range->inheritable = TRUE;
           i++;
           j++;
         }
-      else if (res < 0)
+      else if (res < 0) /* CHANGE is younger than RANGE */
         {
-          SVN_ERR(combine_with_lastrange(elt1, rangelist, TRUE, result_pool));
-          i++;
+          if (range->end < change->start)
+            {
+              /* RANGE is older than CHANGE and the two do not
+                 adjoin or overlap */
+              i++;
+            }
+          else if (range->end == change->start)
+            {
+              /* RANGE and CHANGE adjoin */
+              if (range->inheritable == change->inheritable)
+                {
+                  /* RANGE and CHANGE have the same inheritability so
+                     RANGE expands to absord CHANGE. */
+                  range->end = change->end;
+                  adjust_remaining_ranges(rangelist, &i, result_pool);
+                  j++;
+                }
+              else
+                {
+                  /* RANGE and CHANGE adjoin, but have different
+                     inheritability.  Since RANGE is older, just
+                     move on to the next RANGE. */
+                  i++;
+                }
+            }
+          else
+            {
+              /* RANGE and CHANGE overlap, but how? */
+              if ((range->inheritable == change->inheritable)
+                  || range->inheritable)
+                {
+                  /* If CHANGE is a proper subset of RANGE, it absorbs RANGE
+                      with no adjustment otherwise only the intersection is
+                      absorbed and CHANGE is truncated. */
+                  if (range->end >= change->end)
+                    j++;
+                  else
+                    change->start = range->end;
+                }
+              else
+                {
+                  /* RANGE is non-inheritable and CHANGE is inheritable. */
+                  if (range->start < change->start)
+                    {
+                      /* CHANGE absorbs intersection with RANGE and RANGE
+                         is truncated. */
+                      svn_merge_range_t *range_copy =
+                        svn_merge_range_dup(range, result_pool);
+                      range_copy->end = change->start;
+                      range->start = change->start;
+                      svn_sort__array_insert(&range_copy, rangelist, i++);
+                    }
+                  else
+                    {
+                      /* CHANGE and RANGE share the same start rev, but
+                         RANGE is considered older because its end rev
+                         is older. */
+                      range->inheritable = TRUE;
+                      change->start = range->end;
+                    }
+                }
+            }
         }
-      else
+      else /* res > 0, CHANGE is older than RANGE */
         {
-          SVN_ERR(combine_with_lastrange(elt2, rangelist, TRUE, result_pool));
-          j++;
+          if (change->end < range->start)
+            {
+              /* CHANGE is older than RANGE and the two do not
+                 adjoin or overlap, so insert a copy of CHANGE
+                 into RANGELIST. */
+              svn_merge_range_t *change_copy =
+                svn_merge_range_dup(change, result_pool);
+              svn_sort__array_insert(&change_copy, rangelist, i++);
+              j++;
+            }
+          else if (change->end == range->start)
+            {
+              /* RANGE and CHANGE adjoin */
+              if (range->inheritable == change->inheritable)
+                {
+                  /* RANGE and CHANGE have the same inheritability so we
+                     can simply combine the two in place. */
+                  range->start = change->start;
+                  j++;
+                }
+              else
+                {
+                  /* RANGE and CHANGE have different inheritability so insert
+                     a copy of CHANGE into RANGELIST. */
+                  svn_merge_range_t *change_copy =
+                    svn_merge_range_dup(change, result_pool);
+                  svn_sort__array_insert(&change_copy, rangelist, i);
+                  j++;
+                }
+            }
+          else
+            {
+              /* RANGE and CHANGE overlap. */
+              if (range->inheritable == change->inheritable)
+                {
+                  /* RANGE and CHANGE have the same inheritability so we
+                     can simply combine the two in place... */
+                  range->start = change->start;
+                  if (range->end < change->end)
+                    {
+                      /* ...but if RANGE is expanded ensure that we don't
+                         violate any rangelist invariants. */
+                      range->end = change->end;
+                      adjust_remaining_ranges(rangelist, &i, result_pool);
+                    }
+                  j++;
+                }
+              else if (range->inheritable)
+                {
+                  if (change->start < range->start)
+                    {
+                      /* RANGE is inheritable so absorbs any part of CHANGE
+                         it overlaps.  CHANGE is truncated and the remainder
+                         inserted into RANGELIST. */
+                      svn_merge_range_t *change_copy =
+                        svn_merge_range_dup(change, result_pool);
+                      change_copy->end = range->start;
+                      change->start = range->start;
+                      svn_sort__array_insert(&change_copy, rangelist, i++);
+                    }
+                  else
+                    {
+                      /* CHANGE and RANGE share the same start rev, but
+                         CHANGE is considered older because CHANGE->END is
+                         older than RANGE->END. */
+                      j++;
+                    }
+                }
+              else
+                {
+                  /* RANGE is non-inheritable and CHANGE is inheritable. */
+                  if (change->start < range->start)
+                    {
+                      if (change->end == range->end)
+                        {
+                          /* RANGE is a proper subset of CHANGE and share the
+                             same end revision, so set RANGE equal to CHANGE. */
+                          range->start = change->start;
+                          range->inheritable = TRUE;
+                          j++;
+                        }
+                      else if (change->end > range->end)
+                        {
+                          /* RANGE is a proper subset of CHANGE and CHANGE has
+                             a younger end revision, so set RANGE equal to its
+                             intersection with CHANGE and truncate CHANGE. */
+                          range->start = change->start;
+                          range->inheritable = TRUE;
+                          change->start = range->end;
+                        }
+                      else
+                        {
+                          /* CHANGE and RANGE overlap. Set RANGE equal to its
+                             intersection with CHANGE and take the remainder
+                             of RANGE and insert it into RANGELIST. */
+                          svn_merge_range_t *range_copy =
+                            svn_merge_range_dup(range, result_pool);
+                          range_copy->start = change->end;
+                          range->start = change->start;
+                          range->end = change->end;
+                          range->inheritable = TRUE;
+                          svn_sort__array_insert(&range_copy, rangelist, ++i);
+                          j++;
+                        }
+                    }
+                  else 
+                    {
+                      /* CHANGE and RANGE share the same start rev, but
+                         CHANGE is considered older because its end rev
+                         is older.
+                         
+                         Insert the intersection of RANGE and CHANGE into
+                         RANGELIST and then set RANGE to the non-intersecting
+                         portion of RANGE. */
+                      svn_merge_range_t *range_copy =
+                        svn_merge_range_dup(range, result_pool);
+                      range_copy->end = change->end;
+                      range_copy->inheritable = TRUE;
+                      range->start = change->end;
+                      svn_sort__array_insert(&range_copy, rangelist, i++);
+                      j++;
+                    }
+                }
+            }
         }
     }
-  /* Copy back any remaining elements.
-     Only one of these loops should end up running, if anything. */
 
-  SVN_ERR_ASSERT(!(i < (original_rangelist)->nelts && j < changes->nelts));
-
-  for (; i < (original_rangelist)->nelts; i++)
-    {
-      svn_merge_range_t *elt = APR_ARRAY_IDX(original_rangelist, i,
-                                             svn_merge_range_t *);
-      SVN_ERR(combine_with_lastrange(elt, rangelist, TRUE, result_pool));
-    }
-
-
-  for (; j < changes->nelts; j++)
+  /* Copy any remaining elements in CHANGES into RANGELIST. */
+  for (; j < (changes)->nelts; j++)
     {
-      svn_merge_range_t *elt = APR_ARRAY_IDX(changes, j, svn_merge_range_t *);
-      SVN_ERR(combine_with_lastrange(elt, rangelist, TRUE, result_pool));
+      svn_merge_range_t *change =
+        APR_ARRAY_IDX(changes, j, svn_merge_range_t *);
+      svn_merge_range_t *change_copy = svn_merge_range_dup(change,
+                                                           result_pool);
+      svn_sort__array_insert(&change_copy, rangelist, rangelist->nelts);
     }
 
   return SVN_NO_ERROR;
@@ -2280,3 +2607,54 @@ svn_mergeinfo__mergeinfo_from_segments(s
   *mergeinfo_p = mergeinfo;
   return SVN_NO_ERROR;
 }
+
+svn_error_t *
+svn_rangelist__merge_many(apr_array_header_t *merged_rangelist,
+                          svn_mergeinfo_t merge_history,
+                          apr_pool_t *result_pool,
+                          apr_pool_t *scratch_pool)
+{
+  if (apr_hash_count(merge_history))
+    {
+      apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+      apr_hash_index_t *hi;
+
+      for (hi = apr_hash_first(scratch_pool, merge_history);
+           hi;
+           hi = apr_hash_next(hi))
+        {
+          apr_array_header_t *subtree_rangelist = svn__apr_hash_index_val(hi);
+
+          svn_pool_clear(iterpool);
+          SVN_ERR(svn_rangelist_merge2(merged_rangelist, subtree_rangelist,
+                                       result_pool, iterpool));
+        }
+      svn_pool_destroy(iterpool);
+    }
+  return SVN_NO_ERROR;
+}
+
+
+const char *
+svn_inheritance_to_word(svn_mergeinfo_inheritance_t inherit)
+{
+  switch (inherit)
+    {
+    case svn_mergeinfo_inherited:
+      return "inherited";
+    case svn_mergeinfo_nearest_ancestor:
+      return "nearest-ancestor";
+    default:
+      return "explicit";
+    }
+}
+
+svn_mergeinfo_inheritance_t
+svn_inheritance_from_word(const char *word)
+{
+  if (strcmp(word, "inherited") == 0)
+    return svn_mergeinfo_inherited;
+  if (strcmp(word, "nearest-ancestor") == 0)
+    return svn_mergeinfo_nearest_ancestor;
+  return svn_mergeinfo_explicit;
+}

Modified: subversion/branches/fs-py/subversion/libsvn_subr/properties.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_subr/properties.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_subr/properties.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_subr/properties.c Thu Oct 13 14:30:07 2011
@@ -221,6 +221,85 @@ svn_prop_diffs(apr_array_header_t **prop
   return SVN_NO_ERROR;
 }
 
+/**
+ * Reallocate the members of PROP using POOL.
+ */
+static void
+svn_prop__members_dup(svn_prop_t *prop, apr_pool_t *pool)
+{
+  if (prop->name)
+    prop->name = apr_pstrdup(pool, prop->name);
+  if (prop->value)
+    prop->value = svn_string_dup(prop->value, pool);
+}
+
+svn_prop_t *
+svn_prop_dup(const svn_prop_t *prop, apr_pool_t *pool)
+{
+  svn_prop_t *new_prop = apr_palloc(pool, sizeof(*new_prop));
+
+  *new_prop = *prop;
+
+  svn_prop__members_dup(new_prop, pool);
+
+  return new_prop;
+}
+
+apr_array_header_t *
+svn_prop_array_dup(const apr_array_header_t *array, apr_pool_t *pool)
+{
+  int i;
+  apr_array_header_t *new_array = apr_array_copy(pool, array);
+  for (i = 0; i < new_array->nelts; ++i)
+    {
+      svn_prop_t *elt = &APR_ARRAY_IDX(new_array, i, svn_prop_t);
+      svn_prop__members_dup(elt, pool);
+    }
+  return new_array;
+}
+
+apr_array_header_t *
+svn_prop_hash_to_array(apr_hash_t *hash, apr_pool_t *pool)
+{
+  apr_hash_index_t *hi;
+  apr_array_header_t *array = apr_array_make(pool, apr_hash_count(hash),
+                                             sizeof(svn_prop_t));
+
+  for (hi = apr_hash_first(pool, hash); hi; hi = apr_hash_next(hi))
+    {
+      const void *key;
+      void *val;
+      svn_prop_t prop;
+
+      apr_hash_this(hi, &key, NULL, &val);
+      prop.name = key;
+      prop.value = val;
+      APR_ARRAY_PUSH(array, svn_prop_t) = prop;
+    }
+
+  return array;
+}
+
+apr_hash_t *
+svn_prop_hash_dup(apr_hash_t *hash,
+                  apr_pool_t *pool)
+{
+  apr_hash_index_t *hi;
+  apr_hash_t *new_hash = apr_hash_make(pool);
+
+  for (hi = apr_hash_first(pool, hash); hi; hi = apr_hash_next(hi))
+    {
+      const void *key;
+      apr_ssize_t klen;
+      void *prop;
+
+      apr_hash_this(hi, &key, &klen, &prop);
+      apr_hash_set(new_hash, apr_pstrdup(pool, key), klen,
+                   svn_string_dup(prop, pool));
+    }
+  return new_hash;
+}
+
 apr_hash_t *
 svn_prop_array_to_hash(const apr_array_header_t *properties,
                        apr_pool_t *pool)

Modified: subversion/branches/fs-py/subversion/libsvn_subr/sorts.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_subr/sorts.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_subr/sorts.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_subr/sorts.c Thu Oct 13 14:30:07 2011
@@ -245,3 +245,35 @@ svn_sort__array_insert(const void *new_e
   /* Copy in the new element */
   memcpy(new_position, new_element, array->elt_size);
 }
+
+void
+svn_sort__array_delete(apr_array_header_t *arr,
+                       int delete_index,
+                       int elements_to_delete)
+{
+  /* Do we have a valid index and are there enough elements? */
+  if (delete_index >= 0
+      && delete_index < arr->nelts
+      && elements_to_delete > 0
+      && (elements_to_delete + delete_index) <= arr->nelts)
+    {
+      if (delete_index == (arr->nelts - 1))
+        {
+          /* Deleting the last or only element in an array is easy. */
+          apr_array_pop(arr);
+        }
+      else if ((delete_index + elements_to_delete) == arr->nelts)
+        {
+          /* Delete the last ELEMENTS_TO_DELETE elements. */
+          arr->nelts -= elements_to_delete;
+        }
+      else
+        {
+          memmove(
+            arr->elts + arr->elt_size * delete_index,
+            arr->elts + (arr->elt_size * (delete_index + elements_to_delete)),
+            arr->elt_size * (arr->nelts - elements_to_delete - delete_index));
+          arr->nelts -= elements_to_delete;
+        }
+    }
+}

Modified: subversion/branches/fs-py/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_subr/sqlite.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_subr/sqlite.c Thu Oct 13 14:30:07 2011
@@ -637,12 +637,6 @@ init_sqlite(void *baton, apr_pool_t *poo
 
 #endif /* APR_HAS_THRADS */
 
-  /* SQLite 3.5 allows sharing cache instances, even in a multithreaded
-     environment. This allows sharing cached data when we open a database
-     more than once (Very common in the current pre-single-database state) */
-  SQLITE_ERR_MSG(sqlite3_enable_shared_cache(TRUE),
-                 _("Could not initialize SQLite shared cache"));
-
   return SVN_NO_ERROR;
 }
 
@@ -673,6 +667,13 @@ internal_open(sqlite3 **db3, const char 
     flags |= SQLITE_OPEN_NOMUTEX;
 #endif
 
+    /* SQLite 3.5 allows sharing cache instances, even in a multithreaded
+       environment. This allows sharing cached data when we open a database
+       more than once.
+
+       OS X 10.7 doesn't support sqlite3_enable_shared_cache. */
+    flags |= SQLITE_OPEN_SHAREDCACHE;
+
     /* Open the database. Note that a handle is returned, even when an error
        occurs (except for out-of-memory); thus, we can safely use it to
        extract an error message and construct an svn_error_t. */

Modified: subversion/branches/fs-py/subversion/libsvn_subr/utf.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_subr/utf.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_subr/utf.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_subr/utf.c Thu Oct 13 14:30:07 2011
@@ -42,6 +42,7 @@
 #include "private/svn_utf_private.h"
 #include "private/svn_dep_compat.h"
 #include "private/svn_string_private.h"
+#include "private/svn_mutex.h"
 
 
 
@@ -53,9 +54,7 @@ static const char *SVN_UTF_UTON_XLATE_HA
 
 static const char *SVN_APR_UTF8_CHARSET = "UTF-8";
 
-#if APR_HAS_THREADS
-static apr_thread_mutex_t *xlate_handle_mutex = NULL;
-#endif
+static svn_mutex__t *xlate_handle_mutex = NULL;
 
 /* The xlate handle cache is a global hash table with linked lists of xlate
  * handles.  In multi-threaded environments, a thread "borrows" an xlate
@@ -99,10 +98,6 @@ xlate_cleanup(void *arg)
 {
   /* We set the cache variables to NULL so that translation works in other
      cleanup functions, even if it isn't cached then. */
-#if APR_HAS_THREADS
-  apr_thread_mutex_destroy(xlate_handle_mutex);
-  xlate_handle_mutex = NULL;
-#endif
   xlate_handle_hash = NULL;
 
   /* ensure no stale objects get accessed */
@@ -125,27 +120,24 @@ xlate_handle_node_cleanup(void *arg)
 void
 svn_utf_initialize(apr_pool_t *pool)
 {
-  apr_pool_t *subpool;
-#if APR_HAS_THREADS
-  apr_thread_mutex_t *mutex;
-#endif
-
   if (!xlate_handle_hash)
     {
       /* We create our own subpool, which we protect with the mutex.
          We can't use the pool passed to us by the caller, since we will
          use it for xlate handle allocations, possibly in multiple threads,
          and pool allocation is not thread-safe. */
-      subpool = svn_pool_create(pool);
-#if APR_HAS_THREADS
-      if (apr_thread_mutex_create(&mutex, APR_THREAD_MUTEX_DEFAULT, subpool)
-          == APR_SUCCESS)
-        xlate_handle_mutex = mutex;
-      else
-        return;
-#endif
+      apr_pool_t *subpool = svn_pool_create(pool);
+      svn_mutex__t *mutex;
+      svn_error_t *err = svn_mutex__init(&mutex, TRUE, subpool);
+      if (err)
+        {
+          svn_error_clear(err);
+          return;
+        }
 
+      xlate_handle_mutex = mutex;
       xlate_handle_hash = apr_hash_make(subpool);
+
       apr_pool_cleanup_register(subpool, NULL, xlate_cleanup,
                                 apr_pool_cleanup_null);
     }
@@ -202,91 +194,17 @@ atomic_swap(void * volatile * mem, void 
 #endif
 }
 
-/* Set *RET to a handle node for converting from FROMPAGE to TOPAGE,
-   creating the handle node if it doesn't exist in USERDATA_KEY.
-   If a node is not cached and apr_xlate_open() returns APR_EINVAL or
-   APR_ENOTIMPL, set (*RET)->handle to NULL.  If fail for any other
-   reason, return the error.
-
-   Allocate *RET and its xlate handle in POOL if svn_utf_initialize()
-   hasn't been called or USERDATA_KEY is NULL.  Else, allocate them
-   in the pool of xlate_handle_hash. */
+/* Set *RET to a newly created handle node for converting from FROMPAGE 
+   to TOPAGE, If apr_xlate_open() returns APR_EINVAL or APR_ENOTIMPL, set 
+   (*RET)->handle to NULL.  If fail for any other reason, return the error.
+   Allocate *RET and its xlate handle in POOL. */
 static svn_error_t *
-get_xlate_handle_node(xlate_handle_node_t **ret,
-                      const char *topage, const char *frompage,
-                      const char *userdata_key, apr_pool_t *pool)
+xlate_alloc_handle(xlate_handle_node_t **ret,
+                   const char *topage, const char *frompage,
+                   apr_pool_t *pool)
 {
-  xlate_handle_node_t **old_node_p;
-  xlate_handle_node_t *old_node = NULL;
   apr_status_t apr_err;
   apr_xlate_t *handle;
-  svn_error_t *err = NULL;
-
-  /* If we already have a handle, just return it. */
-  if (userdata_key)
-    {
-      if (xlate_handle_hash)
-        {
-          /* 1st level: global, static items */
-          if (userdata_key == SVN_UTF_NTOU_XLATE_HANDLE)
-            old_node = atomic_swap(&xlat_ntou_static_handle, NULL);
-          else if (userdata_key == SVN_UTF_UTON_XLATE_HANDLE)
-            old_node = atomic_swap(&xlat_uton_static_handle, NULL);
-
-          if (old_node && old_node->valid)
-            {
-              *ret = old_node;
-              return SVN_NO_ERROR;
-            }
-
-          /* 2nd level: hash lookup */
-#if APR_HAS_THREADS
-          apr_err = apr_thread_mutex_lock(xlate_handle_mutex);
-          if (apr_err != APR_SUCCESS)
-            return svn_error_create(apr_err, NULL,
-                                    _("Can't lock charset translation mutex"));
-#endif
-          old_node_p = apr_hash_get(xlate_handle_hash, userdata_key,
-                                    APR_HASH_KEY_STRING);
-          if (old_node_p)
-            old_node = *old_node_p;
-          if (old_node)
-            {
-              /* Ensure that the handle is still valid. */
-              if (old_node->valid)
-                {
-                  /* Remove from the list. */
-                  *old_node_p = old_node->next;
-                  old_node->next = NULL;
-#if APR_HAS_THREADS
-                  apr_err = apr_thread_mutex_unlock(xlate_handle_mutex);
-                  if (apr_err != APR_SUCCESS)
-                    return svn_error_create(apr_err, NULL,
-                                            _("Can't unlock charset "
-                                              "translation mutex"));
-#endif
-                  *ret = old_node;
-                  return SVN_NO_ERROR;
-                }
-            }
-        }
-      else
-        {
-          void *p;
-          /* We fall back on a per-pool cache instead. */
-          apr_pool_userdata_get(&p, userdata_key, pool);
-          old_node = p;
-          /* Ensure that the handle is still valid. */
-          if (old_node && old_node->valid)
-            {
-              *ret = old_node;
-              return SVN_NO_ERROR;
-            }
-        }
-    }
-
-  /* Note that we still have the mutex locked (if it is initialized), so we
-     can use the global pool for creating the new xlate handle. */
 
   /* The error handling doesn't support the following cases, since we don't
      use them currently.  Catch this here. */
@@ -295,10 +213,6 @@ get_xlate_handle_node(xlate_handle_node_
                  && (frompage != SVN_APR_LOCALE_CHARSET
                      || topage != SVN_APR_LOCALE_CHARSET));
 
-  /* Use the correct pool for creating the handle. */
-  if (userdata_key && xlate_handle_hash)
-    pool = apr_hash_pool_get(xlate_handle_hash);
-
   /* Try to create a handle. */
 #if defined(WIN32)
   apr_err = svn_subr__win32_xlate_open((win32_xlate_t **)&handle, topage,
@@ -327,8 +241,7 @@ get_xlate_handle_node(xlate_handle_node_
                               _("Can't create a character converter from "
                                 "'%s' to '%s'"), frompage, topage);
 
-      err = svn_error_create(apr_err, NULL, errstr);
-      goto cleanup;
+      return svn_error_create(apr_err, NULL, errstr);
     }
 
   /* Allocate and initialize the node. */
@@ -350,76 +263,178 @@ get_xlate_handle_node(xlate_handle_node_
     apr_pool_cleanup_register(pool, *ret, xlate_handle_node_cleanup,
                               apr_pool_cleanup_null);
 
- cleanup:
-  /* Don't need the lock anymore. */
-#if APR_HAS_THREADS
+  return SVN_NO_ERROR;
+}
+
+/* Extend xlate_alloc_handle by using USERDATA_KEY as a key in our
+   global hash map, if available.
+   
+   Allocate *RET and its xlate handle in POOL if svn_utf_initialize()
+   hasn't been called or USERDATA_KEY is NULL.  Else, allocate them
+   in the pool of xlate_handle_hash.
+   
+   Note: this function is not thread-safe. Call get_xlate_handle_node
+   instead. */
+static svn_error_t *
+get_xlate_handle_node_internal(xlate_handle_node_t **ret,
+                               const char *topage, const char *frompage,
+                               const char *userdata_key, apr_pool_t *pool)
+{
+  /* If we already have a handle, just return it. */
   if (userdata_key && xlate_handle_hash)
     {
-      apr_status_t unlock_err = apr_thread_mutex_unlock(xlate_handle_mutex);
-      if (unlock_err != APR_SUCCESS)
-        return svn_error_create(unlock_err, NULL,
-                                _("Can't unlock charset translation mutex"));
+      xlate_handle_node_t *old_node = NULL;
+
+      /* 2nd level: hash lookup */
+      xlate_handle_node_t **old_node_p = apr_hash_get(xlate_handle_hash, 
+                                                      userdata_key,
+                                                      APR_HASH_KEY_STRING);
+      if (old_node_p)
+        old_node = *old_node_p;
+      if (old_node)
+        {
+          /* Ensure that the handle is still valid. */
+          if (old_node->valid)
+            {
+              /* Remove from the list. */
+              *old_node_p = old_node->next;
+              old_node->next = NULL;
+              *ret = old_node;
+              return SVN_NO_ERROR;
+            }
+        }
+    }
+
+  /* Note that we still have the mutex locked (if it is initialized), so we
+     can use the global pool for creating the new xlate handle. */
+
+  /* Use the correct pool for creating the handle. */
+  pool = apr_hash_pool_get(xlate_handle_hash);
+
+  return xlate_alloc_handle(ret, topage, frompage, pool);
+}
+
+/* Set *RET to a handle node for converting from FROMPAGE to TOPAGE,
+   creating the handle node if it doesn't exist in USERDATA_KEY.
+   If a node is not cached and apr_xlate_open() returns APR_EINVAL or
+   APR_ENOTIMPL, set (*RET)->handle to NULL.  If fail for any other
+   reason, return the error.
+
+   Allocate *RET and its xlate handle in POOL if svn_utf_initialize()
+   hasn't been called or USERDATA_KEY is NULL.  Else, allocate them
+   in the pool of xlate_handle_hash. */
+static svn_error_t *
+get_xlate_handle_node(xlate_handle_node_t **ret,
+                      const char *topage, const char *frompage,
+                      const char *userdata_key, apr_pool_t *pool)
+{
+  xlate_handle_node_t *old_node = NULL;
+
+  /* If we already have a handle, just return it. */
+  if (userdata_key)
+    {
+      if (xlate_handle_hash)
+        {
+          /* 1st level: global, static items */
+          if (userdata_key == SVN_UTF_NTOU_XLATE_HANDLE)
+            old_node = atomic_swap(&xlat_ntou_static_handle, NULL);
+          else if (userdata_key == SVN_UTF_UTON_XLATE_HANDLE)
+            old_node = atomic_swap(&xlat_uton_static_handle, NULL);
+
+          if (old_node && old_node->valid)
+            {
+              *ret = old_node;
+              return SVN_NO_ERROR;
+            }
+        }
+      else
+        {
+          void *p;
+          /* We fall back on a per-pool cache instead. */
+          apr_pool_userdata_get(&p, userdata_key, pool);
+          old_node = p;
+          /* Ensure that the handle is still valid. */
+          if (old_node && old_node->valid)
+            {
+              *ret = old_node;
+              return SVN_NO_ERROR;
+            }
+
+          return xlate_alloc_handle(ret, topage, frompage, pool);
+        }
     }
-#endif
 
-  return err;
+  SVN_MUTEX__WITH_LOCK(xlate_handle_mutex,
+                       get_xlate_handle_node_internal(ret,
+                                                      topage,
+                                                      frompage,
+                                                      userdata_key,
+                                                      pool));
+
+  return SVN_NO_ERROR;
+}
+
+/* Put back NODE into the xlate handle cache for use by other calls.
+   
+   Note: this function is not thread-safe. Call put_xlate_handle_node
+   instead. */
+static svn_error_t *
+put_xlate_handle_node_internal(xlate_handle_node_t *node,
+                               const char *userdata_key)
+{
+  xlate_handle_node_t **node_p = apr_hash_get(xlate_handle_hash,
+                                              userdata_key,
+                                              APR_HASH_KEY_STRING);
+  if (node_p == NULL)
+    {
+      userdata_key = apr_pstrdup(apr_hash_pool_get(xlate_handle_hash),
+                                  userdata_key);
+      node_p = apr_palloc(apr_hash_pool_get(xlate_handle_hash),
+                          sizeof(*node_p));
+      *node_p = NULL;
+      apr_hash_set(xlate_handle_hash, userdata_key,
+                    APR_HASH_KEY_STRING, node_p);
+    }
+  node->next = *node_p;
+  *node_p = node;
+  
+  return SVN_NO_ERROR;
 }
 
 /* Put back NODE into the xlate handle cache for use by other calls.
    If there is no global cache, store the handle in POOL.
-   Ignore errors related to locking/unlocking the mutex.
-   ### Mutex errors here are very weird. Should we handle them "correctly"
-   ### even if that complicates error handling in the routines below? */
-static void
+   Ignore errors related to locking/unlocking the mutex. */
+static svn_error_t *
 put_xlate_handle_node(xlate_handle_node_t *node,
                       const char *userdata_key,
                       apr_pool_t *pool)
 {
   assert(node->next == NULL);
   if (!userdata_key)
-    return;
+    return SVN_NO_ERROR;
 
   /* push previous global node to the hash */
   if (xlate_handle_hash)
     {
-      xlate_handle_node_t **node_p;
-
       /* 1st level: global, static items */
       if (userdata_key == SVN_UTF_NTOU_XLATE_HANDLE)
         node = atomic_swap(&xlat_ntou_static_handle, node);
       else if (userdata_key == SVN_UTF_UTON_XLATE_HANDLE)
         node = atomic_swap(&xlat_uton_static_handle, node);
       if (node == NULL)
-        return;
+        return SVN_NO_ERROR;
 
-#if APR_HAS_THREADS
-      if (apr_thread_mutex_lock(xlate_handle_mutex) != APR_SUCCESS)
-        SVN_ERR_MALFUNCTION_NO_RETURN();
-#endif
-      node_p = apr_hash_get(xlate_handle_hash, userdata_key,
-                            APR_HASH_KEY_STRING);
-      if (node_p == NULL)
-        {
-          userdata_key = apr_pstrdup(apr_hash_pool_get(xlate_handle_hash),
-                                     userdata_key);
-          node_p = apr_palloc(apr_hash_pool_get(xlate_handle_hash),
-                              sizeof(*node_p));
-          *node_p = NULL;
-          apr_hash_set(xlate_handle_hash, userdata_key,
-                       APR_HASH_KEY_STRING, node_p);
-        }
-      node->next = *node_p;
-      *node_p = node;
-#if APR_HAS_THREADS
-      if (apr_thread_mutex_unlock(xlate_handle_mutex) != APR_SUCCESS)
-        SVN_ERR_MALFUNCTION_NO_RETURN();
-#endif
+      SVN_MUTEX__WITH_LOCK(xlate_handle_mutex,
+                           put_xlate_handle_node_internal(node, 
+                                                          userdata_key));
     }
   else
     {
       /* Store it in the per-pool cache. */
       apr_pool_userdata_set(node, userdata_key, apr_pool_cleanup_null, pool);
     }
+    
+  return SVN_NO_ERROR;
 }
 
 /* Return the apr_xlate handle for converting native characters to UTF-8. */
@@ -720,9 +735,11 @@ svn_utf_stringbuf_to_utf8(svn_stringbuf_
         *dest = svn_stringbuf_dup(src, pool);
     }
 
-  put_xlate_handle_node(node, SVN_UTF_NTOU_XLATE_HANDLE, pool);
-
-  return err;
+  return svn_error_compose_create(err,
+                                  put_xlate_handle_node
+                                     (node, 
+                                      SVN_UTF_NTOU_XLATE_HANDLE,
+                                      pool));
 }
 
 
@@ -752,9 +769,11 @@ svn_utf_string_to_utf8(const svn_string_
         *dest = svn_string_dup(src, pool);
     }
 
-  put_xlate_handle_node(node, SVN_UTF_NTOU_XLATE_HANDLE, pool);
-
-  return err;
+  return svn_error_compose_create(err,
+                                  put_xlate_handle_node
+                                     (node, 
+                                      SVN_UTF_NTOU_XLATE_HANDLE,
+                                      pool));
 }
 
 
@@ -795,8 +814,11 @@ svn_utf_cstring_to_utf8(const char **des
 
   SVN_ERR(get_ntou_xlate_handle_node(&node, pool));
   err = convert_cstring(dest, src, node, pool);
-  put_xlate_handle_node(node, SVN_UTF_NTOU_XLATE_HANDLE, pool);
-  SVN_ERR(err);
+  SVN_ERR(svn_error_compose_create(err,
+                                   put_xlate_handle_node
+                                      (node, 
+                                       SVN_UTF_NTOU_XLATE_HANDLE,
+                                       pool)));
   return check_cstring_utf8(*dest, pool);
 }
 
@@ -815,8 +837,12 @@ svn_utf_cstring_to_utf8_ex2(const char *
   SVN_ERR(get_xlate_handle_node(&node, SVN_APR_UTF8_CHARSET, frompage,
                                 convset_key, pool));
   err = convert_cstring(dest, src, node, pool);
-  put_xlate_handle_node(node, convset_key, pool);
-  SVN_ERR(err);
+  SVN_ERR(svn_error_compose_create(err,
+                                   put_xlate_handle_node
+                                      (node, 
+                                       SVN_UTF_NTOU_XLATE_HANDLE,
+                                       pool)));
+
   return check_cstring_utf8(*dest, pool);
 }
 

Modified: subversion/branches/fs-py/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/adm_crawler.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/adm_crawler.c Thu Oct 13 14:30:07 2011
@@ -102,7 +102,7 @@ svn_wc_restore(svn_wc_context_t *wc_ctx,
                apr_pool_t *scratch_pool)
 {
   svn_wc__db_status_t status;
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
   svn_node_kind_t disk_kind;
 
   SVN_ERR(svn_io_check_path(local_abspath, &disk_kind, scratch_pool));
@@ -131,7 +131,7 @@ svn_wc_restore(svn_wc_context_t *wc_ctx,
   if (status != svn_wc__db_status_normal
       && status != svn_wc__db_status_copied
       && status != svn_wc__db_status_moved_here
-      && !(kind == svn_wc__db_kind_dir
+      && !(kind == svn_kind_dir
            && (status == svn_wc__db_status_added
                || status == svn_wc__db_status_incomplete)))
     {
@@ -141,7 +141,7 @@ svn_wc_restore(svn_wc_context_t *wc_ctx,
                                                       scratch_pool));
     }
 
-  if (kind == svn_wc__db_kind_file || kind == svn_wc__db_kind_symlink)
+  if (kind == svn_kind_file || kind == svn_kind_symlink)
     SVN_ERR(restore_file(wc_ctx->db, local_abspath, use_commit_times, FALSE,
                          scratch_pool));
   else
@@ -160,19 +160,19 @@ svn_wc_restore(svn_wc_context_t *wc_ctx,
 static svn_error_t *
 restore_node(svn_wc__db_t *db,
              const char *local_abspath,
-             svn_wc__db_kind_t kind,
+             svn_kind_t kind,
              svn_boolean_t use_commit_times,
              svn_wc_notify_func2_t notify_func,
              void *notify_baton,
              apr_pool_t *scratch_pool)
 {
-  if (kind == svn_wc__db_kind_file || kind == svn_wc__db_kind_symlink)
+  if (kind == svn_kind_file || kind == svn_kind_symlink)
     {
       /* Recreate file from text-base */
       SVN_ERR(restore_file(db, local_abspath, use_commit_times, TRUE,
                            scratch_pool));
     }
-  else if (kind == svn_wc__db_kind_dir)
+  else if (kind == svn_kind_dir)
     {
       /* Recreating a directory is just a mkdir */
       SVN_ERR(svn_io_dir_make(local_abspath, APR_OS_DEFAULT, scratch_pool));
@@ -373,7 +373,7 @@ report_revisions_and_depths(svn_wc__db_t
           && apr_hash_get(dirents, child, APR_HASH_KEY_STRING) == NULL)
         {
           svn_wc__db_status_t wrk_status;
-          svn_wc__db_kind_t wrk_kind;
+          svn_kind_t wrk_kind;
 
           SVN_ERR(svn_wc__db_read_info(&wrk_status, &wrk_kind, NULL, NULL,
                                        NULL, NULL, NULL, NULL, NULL, NULL,
@@ -391,7 +391,7 @@ report_revisions_and_depths(svn_wc__db_t
           if (wrk_status == svn_wc__db_status_normal
               || wrk_status == svn_wc__db_status_copied
               || wrk_status == svn_wc__db_status_moved_here
-              || (wrk_kind == svn_wc__db_kind_dir
+              || (wrk_kind == svn_kind_dir
                   && (wrk_status == svn_wc__db_status_added
                       || wrk_status == svn_wc__db_status_incomplete)))
             {
@@ -435,8 +435,8 @@ report_revisions_and_depths(svn_wc__db_t
         ths->depth = svn_depth_infinity;
 
       /*** Files ***/
-      if (ths->kind == svn_wc__db_kind_file ||
-               ths->kind == svn_wc__db_kind_symlink)
+      if (ths->kind == svn_kind_file ||
+               ths->kind == svn_kind_symlink)
         {
           if (report_everything)
             {
@@ -489,7 +489,7 @@ report_revisions_and_depths(svn_wc__db_t
         } /* end file case */
 
       /*** Directories (in recursive mode) ***/
-      else if (ths->kind == svn_wc__db_kind_dir
+      else if (ths->kind == svn_kind_dir
                && (depth > svn_depth_files
                    || depth == svn_depth_unknown))
         {
@@ -642,7 +642,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
   svn_revnum_t target_rev = SVN_INVALID_REVNUM;
   svn_boolean_t start_empty;
   svn_wc__db_status_t status;
-  svn_wc__db_kind_t target_kind;
+  svn_kind_t target_kind;
   const char *repos_relpath, *repos_root_url;
   svn_depth_t target_depth;
   svn_wc__db_lock_t *target_lock;
@@ -715,7 +715,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
       && disk_kind == svn_node_none)
     {
       svn_wc__db_status_t wrk_status;
-      svn_wc__db_kind_t wrk_kind;
+      svn_kind_t wrk_kind;
       err = svn_wc__db_read_info(&wrk_status, &wrk_kind, NULL, NULL, NULL,
                                  NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                                  NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -729,7 +729,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
         {
           svn_error_clear(err);
           wrk_status = svn_wc__db_status_not_present;
-          wrk_kind = svn_wc__db_kind_file;
+          wrk_kind = svn_kind_file;
         }
       else
         SVN_ERR(err);
@@ -743,7 +743,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
       if (wrk_status == svn_wc__db_status_normal
           || wrk_status == svn_wc__db_status_copied
           || wrk_status == svn_wc__db_status_moved_here
-          || (wrk_kind == svn_wc__db_kind_dir
+          || (wrk_kind == svn_kind_dir
               && (wrk_status == svn_wc__db_status_added
                   || wrk_status == svn_wc__db_status_incomplete)))
         {
@@ -768,7 +768,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
     SVN_ERR(reporter->set_path(report_baton, "", target_rev, report_depth,
                                start_empty, NULL, scratch_pool));
   }
-  if (target_kind == svn_wc__db_kind_dir)
+  if (target_kind == svn_kind_dir)
     {
       if (depth != svn_depth_empty)
         {
@@ -795,8 +795,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
         }
     }
 
-  else if (target_kind == svn_wc__db_kind_file ||
-           target_kind == svn_wc__db_kind_symlink)
+  else if (target_kind == svn_kind_file || target_kind == svn_kind_symlink)
     {
       const char *parent_abspath, *base;
       svn_wc__db_status_t parent_status;
@@ -1207,7 +1206,7 @@ svn_wc__internal_transmit_prop_deltas(sv
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   int i;
   apr_array_header_t *propmods;
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
 
   SVN_ERR(svn_wc__db_read_kind(&kind, db, local_abspath, FALSE, iterpool));
 
@@ -1222,7 +1221,7 @@ svn_wc__internal_transmit_prop_deltas(sv
 
       svn_pool_clear(iterpool);
 
-      if (kind == svn_wc__db_kind_file)
+      if (kind == svn_kind_file)
         SVN_ERR(editor->change_file_prop(baton, p->name, p->value,
                                          iterpool));
       else

Modified: subversion/branches/fs-py/subversion/libsvn_wc/adm_files.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/adm_files.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/adm_files.c Thu Oct 13 14:30:07 2011
@@ -196,7 +196,7 @@ svn_wc__text_base_path_to_read(const cha
                                apr_pool_t *scratch_pool)
 {
   svn_wc__db_status_t status;
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
   const svn_checksum_t *checksum;
 
   SVN_ERR(svn_wc__db_read_pristine_info(&status, &kind, NULL, NULL, NULL, NULL,
@@ -205,7 +205,7 @@ svn_wc__text_base_path_to_read(const cha
                                         scratch_pool, scratch_pool));
 
   /* Sanity */
-  if (kind != svn_wc__db_kind_file)
+  if (kind != svn_kind_file)
     return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
                              _("Can only get the pristine contents of files; "
                                "'%s' is not a file"),
@@ -249,7 +249,7 @@ svn_wc__get_pristine_contents(svn_stream
                               apr_pool_t *scratch_pool)
 {
   svn_wc__db_status_t status;
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
   const svn_checksum_t *sha1_checksum;
 
   if (size)
@@ -261,7 +261,7 @@ svn_wc__get_pristine_contents(svn_stream
                                         scratch_pool, scratch_pool));
 
   /* Sanity */
-  if (kind != svn_wc__db_kind_file)
+  if (kind != svn_kind_file)
     return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
                              _("Can only get the pristine contents of files; "
                                "'%s' is not a file"),

Modified: subversion/branches/fs-py/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/adm_ops.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/adm_ops.c Thu Oct 13 14:30:07 2011
@@ -123,7 +123,7 @@ process_committed_leaf(svn_wc__db_t *db,
                        apr_pool_t *scratch_pool)
 {
   svn_wc__db_status_t status;
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
   const svn_checksum_t *copied_checksum;
   svn_revnum_t new_changed_rev = new_revnum;
   svn_boolean_t have_base;
@@ -145,7 +145,7 @@ process_committed_leaf(svn_wc__db_t *db,
   {
     const char *adm_abspath;
 
-    if (kind == svn_wc__db_kind_dir)
+    if (kind == svn_kind_dir)
       adm_abspath = local_abspath;
     else
       adm_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
@@ -176,7 +176,7 @@ process_committed_leaf(svn_wc__db_t *db,
   SVN_ERR_ASSERT(status == svn_wc__db_status_normal
                  || status == svn_wc__db_status_added);
 
-  if (kind != svn_wc__db_kind_dir)
+  if (kind != svn_kind_dir)
     {
       /* If we sent a delta (meaning: post-copy modification),
          then this file will appear in the queue and so we should have
@@ -249,7 +249,7 @@ svn_wc__process_committed_internal(svn_w
                                    const svn_wc_committed_queue_t *queue,
                                    apr_pool_t *scratch_pool)
 {
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
 
   /* NOTE: be wary of making crazy semantic changes in this function, since
      svn_wc_process_committed4() calls this.  */
@@ -265,7 +265,7 @@ svn_wc__process_committed_internal(svn_w
      have been deleted */
   SVN_ERR(svn_wc__db_read_kind(&kind, db, local_abspath, TRUE, scratch_pool));
 
-  if (recurse && kind == svn_wc__db_kind_dir)
+  if (recurse && kind == svn_kind_dir)
     {
       const apr_array_header_t *children;
       apr_pool_t *iterpool = svn_pool_create(scratch_pool);
@@ -301,7 +301,7 @@ svn_wc__process_committed_internal(svn_w
             continue;
 
           sha1_checksum = NULL;
-          if (kind != svn_wc__db_kind_dir && queue != NULL)
+          if (kind != svn_kind_dir && queue != NULL)
             {
               const committed_queue_item_t *cqi;
 
@@ -611,7 +611,7 @@ svn_wc__delete_internal(svn_wc_context_t
   svn_wc__db_t *db = wc_ctx->db;
   svn_error_t *err;
   svn_wc__db_status_t status;
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
   svn_boolean_t conflicted;
   const apr_array_header_t *conflicts;
 
@@ -650,7 +650,7 @@ svn_wc__delete_internal(svn_wc_context_t
     }
 
   if (status == svn_wc__db_status_normal
-      && kind == svn_wc__db_kind_dir)
+      && kind == svn_kind_dir)
     {
       svn_boolean_t is_wcroot;
       SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, db, local_abspath, pool));
@@ -788,7 +788,7 @@ check_can_add_to_parent(const char **rep
 {
   const char *parent_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
   svn_wc__db_status_t parent_status;
-  svn_wc__db_kind_t parent_kind;
+  svn_kind_t parent_kind;
   svn_error_t *err;
 
   SVN_ERR(svn_wc__write_check(db, parent_abspath, scratch_pool));
@@ -821,7 +821,7 @@ check_can_add_to_parent(const char **rep
                           svn_dirent_local_style(local_abspath,
                                                  scratch_pool));
     }
-  else if (parent_kind != svn_wc__db_kind_dir)
+  else if (parent_kind != svn_kind_dir)
     return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
                              _("Can't schedule an addition of '%s'"
                                " below a not-directory node"),
@@ -1354,7 +1354,7 @@ revert_restore_handle_copied_dirs(svn_bo
       if (cancel_func)
         SVN_ERR(cancel_func(cancel_baton));
 
-      if (child_info->kind != svn_wc__db_kind_file)
+      if (child_info->kind != svn_kind_file)
         continue;
 
       svn_pool_clear(iterpool);
@@ -1384,7 +1384,7 @@ revert_restore_handle_copied_dirs(svn_bo
       if (cancel_func)
         SVN_ERR(cancel_func(cancel_baton));
 
-      if (child_info->kind != svn_wc__db_kind_dir)
+      if (child_info->kind != svn_kind_dir)
         continue;
 
       svn_pool_clear(iterpool);
@@ -1439,7 +1439,7 @@ revert_restore(svn_wc__db_t *db,
 {
   svn_error_t *err;
   svn_wc__db_status_t status;
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
   svn_node_kind_t on_disk;
   svn_boolean_t notify_required;
   const char *conflict_old;
@@ -1453,7 +1453,7 @@ revert_restore(svn_wc__db_t *db,
   svn_boolean_t special;
 #endif
   svn_boolean_t copied_here;
-  svn_wc__db_kind_t reverted_kind;
+  svn_kind_t reverted_kind;
 
   if (cancel_func)
     SVN_ERR(cancel_func(cancel_baton));
@@ -1497,7 +1497,7 @@ revert_restore(svn_wc__db_t *db,
            * ### trying to restore anything to disk.
            * ### 'status' should be status_unknown but that doesn't exist. */
           status = svn_wc__db_status_normal;
-          kind = svn_wc__db_kind_unknown;
+          kind = svn_kind_unknown;
           recorded_size = SVN_INVALID_FILESIZE;
           recorded_mod_time = 0;
         }
@@ -1538,12 +1538,12 @@ revert_restore(svn_wc__db_t *db,
   if (copied_here)
     {
       /* The revert target itself is the op-root of a copy. */
-      if (reverted_kind == svn_wc__db_kind_file && on_disk == svn_node_file)
+      if (reverted_kind == svn_kind_file && on_disk == svn_node_file)
         {
           SVN_ERR(svn_io_remove_file2(local_abspath, TRUE, scratch_pool));
           on_disk = svn_node_none;
         }
-      else if (reverted_kind == svn_wc__db_kind_dir && on_disk == svn_node_dir)
+      else if (reverted_kind == svn_kind_dir && on_disk == svn_node_dir)
         {
           svn_boolean_t removed;
 
@@ -1565,13 +1565,13 @@ revert_restore(svn_wc__db_t *db,
       && status != svn_wc__db_status_excluded
       && status != svn_wc__db_status_not_present)
     {
-      if (on_disk == svn_node_dir && kind != svn_wc__db_kind_dir)
+      if (on_disk == svn_node_dir && kind != svn_kind_dir)
         {
           SVN_ERR(svn_io_remove_dir2(local_abspath, FALSE,
                                      cancel_func, cancel_baton, scratch_pool));
           on_disk = svn_node_none;
         }
-      else if (on_disk == svn_node_file && kind != svn_wc__db_kind_file)
+      else if (on_disk == svn_node_file && kind != svn_kind_file)
         {
           SVN_ERR(svn_io_remove_file2(local_abspath, FALSE, scratch_pool));
           on_disk = svn_node_none;
@@ -1696,10 +1696,10 @@ revert_restore(svn_wc__db_t *db,
       && status != svn_wc__db_status_excluded
       && status != svn_wc__db_status_not_present)
     {
-      if (kind == svn_wc__db_kind_dir)
+      if (kind == svn_kind_dir)
         SVN_ERR(svn_io_dir_make(local_abspath, APR_OS_DEFAULT, scratch_pool));
 
-      if (kind == svn_wc__db_kind_file)
+      if (kind == svn_kind_file)
         {
           svn_skel_t *work_item;
 
@@ -1730,7 +1730,7 @@ revert_restore(svn_wc__db_t *db,
                                      scratch_pool),
                 scratch_pool);
 
-  if (depth == svn_depth_infinity && kind == svn_wc__db_kind_dir)
+  if (depth == svn_depth_infinity && kind == svn_kind_dir)
     {
       apr_pool_t *iterpool = svn_pool_create(scratch_pool);
       const apr_array_header_t *children;
@@ -1946,11 +1946,11 @@ revert_partial(svn_wc__db_t *db,
       /* For svn_depth_files: don't revert non-files.  */
       if (depth == svn_depth_files)
         {
-          svn_wc__db_kind_t kind;
+          svn_kind_t kind;
 
           SVN_ERR(svn_wc__db_read_kind(&kind, db, local_abspath, TRUE,
                                        iterpool));
-          if (kind != svn_wc__db_kind_file)
+          if (kind != svn_kind_file)
             continue;
         }
 
@@ -2092,7 +2092,7 @@ svn_wc__internal_remove_from_revision_co
   svn_error_t *err;
   svn_boolean_t left_something = FALSE;
   svn_wc__db_status_t status;
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
 
   /* ### This whole function should be rewritten to run inside a transaction,
      ### to allow a stable cancel behavior.
@@ -2116,7 +2116,7 @@ svn_wc__internal_remove_from_revision_co
                                NULL, NULL, NULL, NULL,
                                db, local_abspath, scratch_pool, scratch_pool));
 
-  if (kind == svn_wc__db_kind_file || kind == svn_wc__db_kind_symlink)
+  if (kind == svn_kind_file || kind == svn_kind_symlink)
     {
       svn_boolean_t text_modified_p = FALSE;
 
@@ -2140,7 +2140,7 @@ svn_wc__internal_remove_from_revision_co
       /* Remove NAME from DB */
       SVN_ERR(svn_wc__db_op_remove_node(db, local_abspath,
                                         SVN_INVALID_REVNUM,
-                                        svn_wc__db_kind_unknown,
+                                        svn_kind_unknown,
                                         scratch_pool));
 
       /* If we were asked to destroy the working file, do so unless
@@ -2172,7 +2172,7 @@ svn_wc__internal_remove_from_revision_co
           const char *node_name = APR_ARRAY_IDX(children, i, const char*);
           const char *node_abspath;
           svn_wc__db_status_t node_status;
-          svn_wc__db_kind_t node_kind;
+          svn_kind_t node_kind;
 
           svn_pool_clear(iterpool);
 
@@ -2187,7 +2187,7 @@ svn_wc__internal_remove_from_revision_co
                                        iterpool, iterpool));
 
           if (node_status == svn_wc__db_status_normal
-              && node_kind == svn_wc__db_kind_dir)
+              && node_kind == svn_kind_dir)
             {
               svn_boolean_t is_root;
 
@@ -2206,7 +2206,7 @@ svn_wc__internal_remove_from_revision_co
                  versioned nodes */
               SVN_ERR(svn_wc__db_op_remove_node(db, node_abspath,
                                                 SVN_INVALID_REVNUM,
-                                                svn_wc__db_kind_unknown,
+                                                svn_kind_unknown,
                                                 iterpool));
 
               continue;
@@ -2250,7 +2250,7 @@ svn_wc__internal_remove_from_revision_co
           {
             SVN_ERR(svn_wc__db_op_remove_node(db, local_abspath,
                                               SVN_INVALID_REVNUM,
-                                              svn_wc__db_kind_unknown,
+                                              svn_kind_unknown,
                                               iterpool));
           }
         else

Modified: subversion/branches/fs-py/subversion/libsvn_wc/ambient_depth_filter_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/ambient_depth_filter_editor.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/ambient_depth_filter_editor.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/ambient_depth_filter_editor.c Thu Oct 13 14:30:07 2011
@@ -117,7 +117,7 @@ struct dir_baton
    obtaining information for the ambient depth editor */
 static svn_error_t *
 ambient_read_info(svn_wc__db_status_t *status,
-                  svn_wc__db_kind_t *kind,
+                  svn_kind_t *kind,
                   svn_depth_t *depth,
                   svn_wc__db_t *db,
                   const char *local_abspath,
@@ -136,7 +136,7 @@ ambient_read_info(svn_wc__db_status_t *s
     {
       svn_error_clear(err);
 
-      *kind = svn_wc__db_kind_unknown;
+      *kind = svn_kind_unknown;
       if (status)
         *status = svn_wc__db_status_normal;
       if (depth)
@@ -186,7 +186,7 @@ make_dir_baton(struct dir_baton **d_p,
     {
       svn_boolean_t exclude;
       svn_wc__db_status_t status;
-      svn_wc__db_kind_t kind;
+      svn_kind_t kind;
       svn_boolean_t exists = TRUE;
 
       if (!added)
@@ -197,10 +197,10 @@ make_dir_baton(struct dir_baton **d_p,
       else
         {
           status = svn_wc__db_status_not_present;
-          kind = svn_wc__db_kind_unknown;
+          kind = svn_kind_unknown;
         }
 
-      exists = (kind != svn_wc__db_kind_unknown);
+      exists = (kind != svn_kind_unknown);
 
       if (pb->ambient_depth == svn_depth_empty
           || pb->ambient_depth == svn_depth_files)
@@ -246,7 +246,7 @@ make_file_baton(struct file_baton **f_p,
   struct file_baton *f = apr_pcalloc(pool, sizeof(*f));
   struct edit_baton *eb = pb->edit_baton;
   svn_wc__db_status_t status;
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
   const char *abspath;
 
   SVN_ERR_ASSERT(path);
@@ -268,7 +268,7 @@ make_file_baton(struct file_baton **f_p,
   else
     {
       status = svn_wc__db_status_not_present;
-      kind = svn_wc__db_kind_unknown;
+      kind = svn_kind_unknown;
     }
 
   if (pb->ambient_depth == svn_depth_empty)
@@ -281,7 +281,7 @@ make_file_baton(struct file_baton **f_p,
       if (status == svn_wc__db_status_not_present
           || status == svn_wc__db_status_server_excluded
           || status == svn_wc__db_status_excluded
-          || kind == svn_wc__db_kind_unknown)
+          || kind == svn_kind_unknown)
         {
           f->ambiently_excluded = TRUE;
           *f_p = f;
@@ -340,7 +340,7 @@ open_root(void *edit_baton,
   if (! *eb->target)
     {
       /* For an update with a NULL target, this is equivalent to open_dir(): */
-      svn_wc__db_kind_t kind;
+      svn_kind_t kind;
       svn_wc__db_status_t status;
       svn_depth_t depth;
 
@@ -349,7 +349,7 @@ open_root(void *edit_baton,
                                 eb->db, eb->anchor_abspath,
                                 pool));
 
-      if (kind != svn_wc__db_kind_unknown
+      if (kind != svn_kind_unknown
           && status != svn_wc__db_status_not_present
           && status != svn_wc__db_status_excluded
           && status != svn_wc__db_status_server_excluded)
@@ -380,7 +380,7 @@ delete_entry(const char *path,
       /* If the entry we want to delete doesn't exist, that's OK.
          It's probably an old server that doesn't understand
          depths. */
-      svn_wc__db_kind_t kind;
+      svn_kind_t kind;
       svn_wc__db_status_t status;
       const char *abspath;
 
@@ -389,7 +389,7 @@ delete_entry(const char *path,
       SVN_ERR(ambient_read_info(&status, &kind, NULL,
                                 eb->db, abspath, pool));
 
-      if (kind == svn_wc__db_kind_unknown
+      if (kind == svn_kind_unknown
           || status == svn_wc__db_status_not_present
           || status == svn_wc__db_status_excluded
           || status == svn_wc__db_status_server_excluded)
@@ -458,7 +458,7 @@ open_directory(const char *path,
   struct edit_baton *eb = pb->edit_baton;
   struct dir_baton *b;
   const char *local_abspath;
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
   svn_wc__db_status_t status;
   svn_depth_t depth;
 
@@ -480,7 +480,7 @@ open_directory(const char *path,
   SVN_ERR(ambient_read_info(&status, &kind, &depth,
                             eb->db, local_abspath, pool));
 
-  if (kind != svn_wc__db_kind_unknown
+  if (kind != svn_kind_unknown
       && status != svn_wc__db_status_not_present
       && status != svn_wc__db_status_excluded
       && status != svn_wc__db_status_server_excluded)

Modified: subversion/branches/fs-py/subversion/libsvn_wc/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/cleanup.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/cleanup.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/cleanup.c Thu Oct 13 14:30:07 2011
@@ -76,7 +76,7 @@ repair_timestamps(svn_wc__db_t *db,
                   void *cancel_baton,
                   apr_pool_t *scratch_pool)
 {
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
   svn_wc__db_status_t status;
 
   if (cancel_func)
@@ -95,15 +95,15 @@ repair_timestamps(svn_wc__db_t *db,
       || status == svn_wc__db_status_not_present)
     return SVN_NO_ERROR;
 
-  if (kind == svn_wc__db_kind_file
-      || kind == svn_wc__db_kind_symlink)
+  if (kind == svn_kind_file
+      || kind == svn_kind_symlink)
     {
       svn_boolean_t modified;
       SVN_ERR(svn_wc__internal_file_modified_p(&modified,
                                                db, local_abspath, FALSE,
                                                scratch_pool));
     }
-  else if (kind == svn_wc__db_kind_dir)
+  else if (kind == svn_kind_dir)
     {
       apr_pool_t *iterpool = svn_pool_create(scratch_pool);
       const apr_array_header_t *children;

Modified: subversion/branches/fs-py/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/conflicts.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/conflicts.c Thu Oct 13 14:30:07 2011
@@ -180,7 +180,7 @@ resolve_conflict_on_node(svn_wc__db_t *d
   const char *conflict_new = NULL;
   const char *conflict_working = NULL;
   const char *prop_reject_file = NULL;
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
   int i;
   const apr_array_header_t *conflicts;
   const char *conflict_dir_abspath;
@@ -208,7 +208,7 @@ resolve_conflict_on_node(svn_wc__db_t *d
         prop_reject_file = desc->their_abspath;
     }
 
-  if (kind == svn_wc__db_kind_dir)
+  if (kind == svn_kind_dir)
     conflict_dir_abspath = local_abspath;
   else
     conflict_dir_abspath = svn_dirent_dirname(local_abspath, pool);
@@ -503,7 +503,7 @@ recursive_resolve_conflict(svn_wc__db_t 
       const char *name = APR_ARRAY_IDX(children, i, const char *);
       const char *child_abspath;
       svn_wc__db_status_t status;
-      svn_wc__db_kind_t kind;
+      svn_kind_t kind;
       svn_boolean_t conflicted;
 
       svn_pool_clear(iterpool);
@@ -526,10 +526,10 @@ recursive_resolve_conflict(svn_wc__db_t 
         continue;
 
       apr_hash_set(visited, name, APR_HASH_KEY_STRING, name);
-      if (kind == svn_wc__db_kind_dir && depth < svn_depth_immediates)
+      if (kind == svn_kind_dir && depth < svn_depth_immediates)
         continue;
 
-      if (kind == svn_wc__db_kind_dir)
+      if (kind == svn_kind_dir)
         SVN_ERR(recursive_resolve_conflict(db,
                                            child_abspath,
                                            conflicted,
@@ -603,7 +603,7 @@ svn_wc_resolved_conflict5(svn_wc_context
                           void *notify_baton,
                           apr_pool_t *scratch_pool)
 {
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
   svn_boolean_t conflicted;
   /* ### the underlying code does NOT support resolving individual
      ### properties. bail out if the caller tries it.  */
@@ -621,7 +621,7 @@ svn_wc_resolved_conflict5(svn_wc_context
 
   /* When the implementation still used the entry walker, depth
      unknown was translated to infinity. */
-  if (kind != svn_wc__db_kind_dir)
+  if (kind != svn_kind_dir)
     depth = svn_depth_empty;
   else if (depth == svn_depth_unknown)
     depth = svn_depth_infinity;

Modified: subversion/branches/fs-py/subversion/libsvn_wc/conflicts.h
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/conflicts.h?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/conflicts.h (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/conflicts.h Thu Oct 13 14:30:07 2011
@@ -222,12 +222,12 @@ svn_error_t *
 svn_wc__conflict_skel_add_tree_conflict(
   svn_skel_t *skel,
   svn_wc_conflict_reason_t local_change,
-  svn_wc__db_kind_t original_local_kind,
+  svn_kind_t original_local_kind,
   const svn_checksum_t *original_checksum,
-  svn_wc__db_kind_t mine_local_kind,
+  svn_kind_t mine_local_kind,
   const svn_checksum_t *mine_checksum,
   svn_wc_conflict_action_t incoming_change,
-  svn_wc__db_kind_t incoming_kind,
+  svn_kind_t incoming_kind,
   const svn_checksum_t *incoming_checksum,
   apr_pool_t *result_pool,
   apr_pool_t *scratch_pool);

Modified: subversion/branches/fs-py/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/copy.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/copy.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/copy.c Thu Oct 13 14:30:07 2011
@@ -183,7 +183,7 @@ copy_pristine_text_if_necessary(svn_wc__
    versioned file itself.
 
    This also works for versioned symlinks that are stored in the db as
-   svn_wc__db_kind_file with svn:special set. */
+   svn_kind_file with svn:special set. */
 static svn_error_t *
 copy_versioned_file(svn_wc__db_t *db,
                     const char *src_abspath,
@@ -410,7 +410,7 @@ copy_versioned_dir(svn_wc__db_t *db,
     {
       const char *child_name, *child_src_abspath, *child_dst_abspath;
       svn_wc__db_status_t child_status;
-      svn_wc__db_kind_t child_kind;
+      svn_kind_t child_kind;
       svn_boolean_t op_root;
       svn_boolean_t conflicted;
       const svn_checksum_t *checksum;
@@ -441,7 +441,7 @@ copy_versioned_dir(svn_wc__db_t *db,
           || child_status == svn_wc__db_status_added)
         {
           /* We have more work to do than just changing the DB */
-          if (child_kind == svn_wc__db_kind_file)
+          if (child_kind == svn_kind_file)
             {
               svn_boolean_t skip = FALSE;
 
@@ -470,7 +470,7 @@ copy_versioned_dir(svn_wc__db_t *db,
                                             NULL, NULL,
                                             iterpool));
             }
-          else if (child_kind == svn_wc__db_kind_dir)
+          else if (child_kind == svn_kind_dir)
             SVN_ERR(copy_versioned_dir(db,
                                        child_src_abspath, child_dst_abspath,
                                        dst_op_root_abspath, tmpdir_abspath,
@@ -589,7 +589,7 @@ copy_or_move(svn_wc_context_t *wc_ctx,
              apr_pool_t *scratch_pool)
 {
   svn_wc__db_t *db = wc_ctx->db;
-  svn_wc__db_kind_t src_db_kind;
+  svn_kind_t src_db_kind;
   const char *dstdir_abspath;
   svn_boolean_t conflicted;
   const svn_checksum_t *checksum;
@@ -770,8 +770,8 @@ copy_or_move(svn_wc_context_t *wc_ctx,
                                          dst_abspath,
                                          scratch_pool, scratch_pool));
 
-  if (src_db_kind == svn_wc__db_kind_file
-      || src_db_kind == svn_wc__db_kind_symlink)
+  if (src_db_kind == svn_kind_file
+      || src_db_kind == svn_kind_symlink)
     {
       SVN_ERR(copy_versioned_file(db, src_abspath, dst_abspath, dst_abspath,
                                   tmpdir_abspath, checksum,
@@ -948,7 +948,7 @@ remove_all_conflict_markers(svn_wc__db_t
                             svn_dirent_join(wc_dir_abspath, name, iterpool),
                             iterpool));
         }
-      if (info->kind == svn_wc__db_kind_dir)
+      if (info->kind == svn_kind_dir)
         {
           svn_pool_clear(iterpool);
           SVN_ERR(remove_all_conflict_markers(
@@ -990,7 +990,7 @@ svn_wc_move(svn_wc_context_t *wc_ctx,
     SVN_ERR(svn_io_file_rename(src_abspath, dst_abspath, scratch_pool));
 
   {
-    svn_wc__db_kind_t kind;
+    svn_kind_t kind;
     svn_boolean_t conflicted;
 
     SVN_ERR(svn_wc__db_read_info(NULL, &kind, NULL, NULL, NULL, NULL, NULL,
@@ -1001,7 +1001,7 @@ svn_wc_move(svn_wc_context_t *wc_ctx,
                                  db, src_abspath,
                                  scratch_pool, scratch_pool));
 
-    if (kind == svn_wc__db_kind_dir)
+    if (kind == svn_kind_dir)
       SVN_ERR(remove_all_conflict_markers(db, src_abspath, dst_abspath,
                                           scratch_pool));
 

Modified: subversion/branches/fs-py/subversion/libsvn_wc/crop.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/crop.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/crop.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/crop.c Thu Oct 13 14:30:07 2011
@@ -98,7 +98,7 @@ crop_children(svn_wc__db_t *db,
       const char *child_name = APR_ARRAY_IDX(children, i, const char *);
       const char *child_abspath;
       svn_wc__db_status_t child_status;
-      svn_wc__db_kind_t kind;
+      svn_kind_t kind;
       svn_depth_t child_depth;
 
       svn_pool_clear(iterpool);
@@ -117,18 +117,18 @@ crop_children(svn_wc__db_t *db,
           child_status == svn_wc__db_status_excluded ||
           child_status == svn_wc__db_status_not_present)
         {
-          svn_depth_t remove_below = (kind == svn_wc__db_kind_dir)
+          svn_depth_t remove_below = (kind == svn_kind_dir)
                                             ? svn_depth_immediates
                                             : svn_depth_files;
           if (new_depth < remove_below)
             SVN_ERR(svn_wc__db_op_remove_node(db, local_abspath,
                                               SVN_INVALID_REVNUM,
-                                              svn_wc__db_kind_unknown,
+                                              svn_kind_unknown,
                                               iterpool));
 
           continue;
         }
-      else if (kind == svn_wc__db_kind_file)
+      else if (kind == svn_kind_file)
         {
           /* We currently crop on a directory basis. So don't worry about
              svn_depth_exclude here. And even we permit excluding a single
@@ -148,7 +148,7 @@ crop_children(svn_wc__db_t *db,
             continue;
 
         }
-      else if (kind == svn_wc__db_kind_dir)
+      else if (kind == svn_kind_dir)
         {
           if (new_depth < svn_depth_immediates)
             {
@@ -209,7 +209,7 @@ svn_wc_exclude(svn_wc_context_t *wc_ctx,
 {
   svn_boolean_t is_root, is_switched;
   svn_wc__db_status_t status;
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
   svn_revnum_t revision;
   const char *repos_relpath, *repos_root, *repos_uuid;
 
@@ -318,7 +318,7 @@ svn_wc_crop_tree2(svn_wc_context_t *wc_c
 {
   svn_wc__db_t *db = wc_ctx->db;
   svn_wc__db_status_t status;
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
   svn_depth_t dir_depth;
 
   /* Only makes sense when the depth is restrictive. */
@@ -335,7 +335,7 @@ svn_wc_crop_tree2(svn_wc_context_t *wc_c
                                db, local_abspath,
                                scratch_pool, scratch_pool));
 
-  if (kind != svn_wc__db_kind_dir)
+  if (kind != svn_kind_dir)
     return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
       _("Can only crop directories"));
 

Modified: subversion/branches/fs-py/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/deprecated.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/deprecated.c Thu Oct 13 14:30:07 2011
@@ -930,10 +930,10 @@ svn_wc_add3(const char *path,
   /* Make sure the caller gets the new access baton in the set. */
   if (svn_wc__adm_retrieve_internal2(wc_db, local_abspath, pool) == NULL)
     {
-      svn_wc__db_kind_t kind;
+      svn_kind_t kind;
 
       SVN_ERR(svn_wc__db_read_kind(&kind, wc_db, local_abspath, FALSE, pool));
-      if (kind == svn_wc__db_kind_dir)
+      if (kind == svn_kind_dir)
         {
           svn_wc_adm_access_t *adm_access;
 

Modified: subversion/branches/fs-py/subversion/libsvn_wc/diff_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/diff_editor.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/diff_editor.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/diff_editor.c Thu Oct 13 14:30:07 2011
@@ -839,7 +839,7 @@ walk_local_nodes_diff(struct edit_baton 
       const char *name = APR_ARRAY_IDX(children, i, const char*);
       const char *child_abspath, *child_path;
       svn_wc__db_status_t status;
-      svn_wc__db_kind_t kind;
+      svn_kind_t kind;
 
       svn_pool_clear(iterpool);
 
@@ -875,12 +875,12 @@ walk_local_nodes_diff(struct edit_baton 
 
       switch (kind)
         {
-        case svn_wc__db_kind_file:
-        case svn_wc__db_kind_symlink:
+        case svn_kind_file:
+        case svn_kind_symlink:
           SVN_ERR(file_diff(eb, child_abspath, child_path, iterpool));
           break;
 
-        case svn_wc__db_kind_dir:
+        case svn_kind_dir:
           /* ### TODO: Don't know how to do replaced dirs. How do I get
              information about what is being replaced? If it was a
              directory then the directory elements are also going to be
@@ -1080,7 +1080,7 @@ report_wc_directory_as_added(struct edit
       const char *name = APR_ARRAY_IDX(children, i, const char *);
       const char *child_abspath, *child_path;
       svn_wc__db_status_t status;
-      svn_wc__db_kind_t kind;
+      svn_kind_t kind;
 
       svn_pool_clear(iterpool);
 
@@ -1111,13 +1111,13 @@ report_wc_directory_as_added(struct edit
 
       switch (kind)
         {
-        case svn_wc__db_kind_file:
-        case svn_wc__db_kind_symlink:
+        case svn_kind_file:
+        case svn_kind_symlink:
           SVN_ERR(report_wc_file_as_added(eb, child_abspath, child_path,
                                           iterpool));
           break;
 
-        case svn_wc__db_kind_dir:
+        case svn_kind_dir:
           if (depth > svn_depth_files || depth == svn_depth_unknown)
             {
               svn_depth_t depth_below_here = depth;
@@ -1187,7 +1187,7 @@ delete_entry(const char *path,
   const char *name = svn_dirent_basename(path, NULL);
   const char *local_abspath = svn_dirent_join(pb->local_abspath, name, pool);
   svn_wc__db_status_t status;
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
 
   /* Mark this node as compared in the parent directory's baton. */
   apr_hash_set(pb->compared, apr_pstrdup(pb->pool, path),
@@ -1207,8 +1207,8 @@ delete_entry(const char *path,
   SVN_ERR(get_empty_file(pb->eb, &empty_file));
   switch (kind)
     {
-    case svn_wc__db_kind_file:
-    case svn_wc__db_kind_symlink:
+    case svn_kind_file:
+    case svn_kind_symlink:
       /* A delete is required to change working-copy into requested
          revision, so diff should show this as an add. Thus compare
          the empty file against the current working copy.  If
@@ -1245,7 +1245,7 @@ delete_entry(const char *path,
           SVN_ERR(report_wc_file_as_added(eb, local_abspath, path, pool));
         }
       break;
-    case svn_wc__db_kind_dir:
+    case svn_kind_dir:
       /* A delete is required to change working-copy into requested
          revision, so diff should show this as an add. */
       SVN_ERR(report_wc_directory_as_added(eb,

Modified: subversion/branches/fs-py/subversion/libsvn_wc/diff_local.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/diff_local.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/diff_local.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/diff_local.c Thu Oct 13 14:30:07 2011
@@ -138,7 +138,7 @@ file_diff(struct diff_baton *eb,
   const char *empty_file;
   const char *original_repos_relpath;
   svn_wc__db_status_t status;
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
   svn_revnum_t revision;
   const svn_checksum_t *checksum;
   svn_boolean_t op_root;
@@ -167,7 +167,7 @@ file_diff(struct diff_baton *eb,
 
       if (replaced && base_replace /* && !have_more_work */)
         {
-          svn_wc__db_kind_t base_kind;
+          svn_kind_t base_kind;
           SVN_ERR(svn_wc__db_base_get_info(&base_status, &base_kind,
                                            &base_revision,
                                            NULL, NULL, NULL, NULL, NULL, NULL,
@@ -560,14 +560,14 @@ svn_wc_diff6(svn_wc_context_t *wc_ctx,
              apr_pool_t *scratch_pool)
 {
   struct diff_baton eb = { 0 };
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
   svn_boolean_t get_all;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
   SVN_ERR(svn_wc__db_read_kind(&kind, wc_ctx->db, local_abspath, FALSE,
                                scratch_pool));
 
-  if (kind == svn_wc__db_kind_dir)
+  if (kind == svn_kind_dir)
       eb.anchor_abspath = local_abspath;
   else
     eb.anchor_abspath = svn_dirent_dirname(local_abspath, scratch_pool);



Mime
View raw message