Author: breser
Date: Fri Feb 21 23:47:44 2014
New Revision: 1570753
URL: http://svn.apache.org/r1570753
Log:
Just remove svn_fs_base__key_compare().
The function has different semantics than strcmp, but this doesn't matter for
how we use it. Leaving the macro around essentially means we need to document
strcmp again which is silly.
* subversion/libsvn_fs_base/key-gen.h
(svn_fs_base__key_compare): Remove.
* subversion/libsvn_fs_base/revs-txns.c
(delete_txn_tree): Update callers to use strcmp directly.
* subversion/libsvn_fs_base/tree.c
(get_copy_inheritance, txn_body_copied_from, txn_body_history_prev): ...
Modified:
subversion/trunk/subversion/libsvn_fs_base/key-gen.h
subversion/trunk/subversion/libsvn_fs_base/revs-txns.c
subversion/trunk/subversion/libsvn_fs_base/tree.c
Modified: subversion/trunk/subversion/libsvn_fs_base/key-gen.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/key-gen.h?rev=1570753&r1=1570752&r2=1570753&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/key-gen.h (original)
+++ subversion/trunk/subversion/libsvn_fs_base/key-gen.h Fri Feb 21 23:47:44
2014
@@ -78,13 +78,6 @@ extern "C" {
void svn_fs_base__next_key(const char *this, apr_size_t *len, char *next);
-/* Compare two strings A and B as base-36 alphanumeric keys.
- *
- * Return an integer value less than zero, zero, or greater than zero if A is
- * less than, equal to, or greater than B, respectively.
- */
-#define svn_fs_base__key_compare strcmp
-
/* Compare two strings A and B as base-36 alphanumber keys.
*
* Return TRUE iff both keys are NULL or both keys have the same
Modified: subversion/trunk/subversion/libsvn_fs_base/revs-txns.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/revs-txns.c?rev=1570753&r1=1570752&r2=1570753&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/revs-txns.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/revs-txns.c Fri Feb 21 23:47:44
2014
@@ -912,7 +912,7 @@ delete_txn_tree(svn_fs_t *fs,
svn_error_t *err;
/* If this sucker isn't mutable, there's nothing to do. */
- if (svn_fs_base__key_compare(svn_fs_base__id_txn_id(id), txn_id) != 0)
+ if (strcmp(svn_fs_base__id_txn_id(id), txn_id) != 0)
return SVN_NO_ERROR;
/* See if the thing has dirents that need to be recursed upon. If
Modified: subversion/trunk/subversion/libsvn_fs_base/tree.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/tree.c?rev=1570753&r1=1570752&r2=1570753&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/tree.c Fri Feb 21 23:47:44 2014
@@ -544,7 +544,7 @@ get_copy_inheritance(copy_id_inherit_t *
parent_copy_id = svn_fs_base__id_copy_id(parent_id);
/* Easy out: if this child is already mutable, we have nothing to do. */
- if (svn_fs_base__key_compare(svn_fs_base__id_txn_id(child_id), txn_id) == 0)
+ if (strcmp(svn_fs_base__id_txn_id(child_id), txn_id) == 0)
return SVN_NO_ERROR;
/* If the child and its parent are on the same branch, then the
@@ -561,7 +561,7 @@ get_copy_inheritance(copy_id_inherit_t *
target of any copy, and therefore must be on the same branch as
its parent. */
if ((strcmp(child_copy_id, "0") == 0)
- || (svn_fs_base__key_compare(child_copy_id, parent_copy_id) == 0))
+ || (strcmp(child_copy_id, parent_copy_id) == 0))
{
*inherit_p = copy_id_inherit_parent;
return SVN_NO_ERROR;
@@ -3354,8 +3354,8 @@ txn_body_copied_from(void *baton, trail_
return SVN_NO_ERROR;
/* If NODE's copy-ID is the same as that of its predecessor... */
- if (svn_fs_base__key_compare(svn_fs_base__id_copy_id(node_id),
- svn_fs_base__id_copy_id(pred_id)) != 0)
+ if (strcmp(svn_fs_base__id_copy_id(node_id),
+ svn_fs_base__id_copy_id(pred_id)) != 0)
{
/* ... then NODE was either the target of a copy operation,
a copied subtree item. We examine the actual copy record
@@ -4360,8 +4360,7 @@ txn_body_history_prev(void *baton, trail
(which is either a real predecessor, or is the node itself
playing the predecessor role to an imaginary mutable successor),
then we need to report a copy. */
- if (svn_fs_base__key_compare(svn_fs_base__id_copy_id(node_id),
- end_copy_id) != 0)
+ if (strcmp(svn_fs_base__id_copy_id(node_id), end_copy_id) != 0)
{
const char *remainder;
dag_node_t *dst_node;