subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1366199 - /subversion/trunk/subversion/libsvn_client/merge.c
Date Thu, 26 Jul 2012 20:57:33 GMT
Author: julianfoad
Date: Thu Jul 26 20:57:32 2012
New Revision: 1366199

URL: http://svn.apache.org/viewvc?rev=1366199&view=rev
Log:
Change my r1366120 assertions to plain 'assert' after discussion on IRC
(<http://colabti.org/irclogger/irclogger_log/svn-dev?date=2012-07-26#l165>.

* subversion/libsvn_client/merge.c
  (fix_deleted_subtree_ranges, remove_noop_subtree_ranges,
   merge_cousins_and_supplement_mergeinfo, find_unmerged_mergeinfo,
   calculate_left_hand_side, find_reintegrate_merge): Use plain 'assert'.

Modified:
    subversion/trunk/subversion/libsvn_client/merge.c

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1366199&r1=1366198&r2=1366199&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Thu Jul 26 20:57:32 2012
@@ -27,6 +27,7 @@
 
 /*** Includes ***/
 
+#include <assert.h>
 #include <apr_strings.h>
 #include <apr_tables.h>
 #include <apr_hash.h>
@@ -3541,9 +3542,9 @@ fix_deleted_subtree_ranges(const merge_s
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   svn_boolean_t is_rollback = source->loc2->rev < source->loc1->rev;
 
-  SVN_ERR_ASSERT(session_url_is(
-                   ra_session, (is_rollback ? source->loc1 : source->loc2)->url,
-                   scratch_pool));
+  assert(session_url_is(ra_session,
+                        (is_rollback ? source->loc1 : source->loc2)->url,
+                        scratch_pool));
 
   /* CHILDREN_WITH_MERGEINFO is sorted in depth-first order, so
      start at index 1 to examine only subtrees. */
@@ -8432,7 +8433,7 @@ remove_noop_subtree_ranges(const merge_s
   apr_array_header_t *inoperative_ranges;
   apr_pool_t *iterpool;
 
-  SVN_ERR_ASSERT(session_url_is(ra_session, source->loc2->url, scratch_pool));
+  assert(session_url_is(ra_session, source->loc2->url, scratch_pool));
 
   /* This function is only intended to work with forward merges. */
   if (source->loc1->rev > source->loc2->rev)
@@ -9296,10 +9297,8 @@ merge_cousins_and_supplement_mergeinfo(c
      subtree mergeinfo, then this will help keep memory use in check. */
   apr_pool_t *subpool = svn_pool_create(scratch_pool);
 
-  SVN_ERR_ASSERT(session_url_is(URL1_ra_session, source->loc1->url,
-                                scratch_pool));
-  SVN_ERR_ASSERT(session_url_is(URL2_ra_session, source->loc2->url,
-                                scratch_pool));
+  assert(session_url_is(URL1_ra_session, source->loc1->url, scratch_pool));
+  assert(session_url_is(URL2_ra_session, source->loc2->url, scratch_pool));
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(target->abspath));
   SVN_ERR_ASSERT(! source->ancestral);
@@ -10280,10 +10279,8 @@ find_unmerged_mergeinfo(svn_mergeinfo_ca
   svn_mergeinfo_catalog_t new_catalog = apr_hash_make(result_pool);
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
 
-  SVN_ERR_ASSERT(session_url_is(source_ra_session, source_loc->url,
-                                scratch_pool));
-  SVN_ERR_ASSERT(session_url_is(target_ra_session, target->loc.url,
-                                scratch_pool));
+  assert(session_url_is(source_ra_session, source_loc->url, scratch_pool));
+  assert(session_url_is(target_ra_session, target->loc.url, scratch_pool));
 
   *youngest_merged_rev = SVN_INVALID_REVNUM;
 
@@ -10516,10 +10513,8 @@ calculate_left_hand_side(svn_client__pat
   svn_revnum_t youngest_merged_rev;
   svn_client__pathrev_t *yc_ancestor;
 
-  SVN_ERR_ASSERT(session_url_is(source_ra_session, source_loc->url,
-                                scratch_pool));
-  SVN_ERR_ASSERT(session_url_is(target_ra_session, target->loc.url,
-                                scratch_pool));
+  assert(session_url_is(source_ra_session, source_loc->url, scratch_pool));
+  assert(session_url_is(target_ra_session, target->loc.url, scratch_pool));
 
   /* Initialize our return variables. */
   *left_p = NULL;
@@ -10673,10 +10668,8 @@ find_reintegrate_merge(merge_source_t **
   svn_error_t *err;
   apr_hash_t *subtrees_with_mergeinfo;
 
-  SVN_ERR_ASSERT(session_url_is(source_ra_session, source_loc->url,
-                                scratch_pool));
-  SVN_ERR_ASSERT(session_url_is(target_ra_session, target->loc.url,
-                                scratch_pool));
+  assert(session_url_is(source_ra_session, source_loc->url, scratch_pool));
+  assert(session_url_is(target_ra_session, target->loc.url, scratch_pool));
 
   /* As the WC tree is "pure", use its last-updated-to revision as
      the default revision for the left side of our merge, since that's



Mime
View raw message