You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2011/05/26 19:30:39 UTC

svn commit: r1127993 - /subversion/trunk/subversion/libsvn_client/mergeinfo.c

Author: pburba
Date: Thu May 26 17:30:38 2011
New Revision: 1127993

URL: http://svn.apache.org/viewvc?rev=1127993&view=rev
Log:
Some minor mergeinfo optimizations.

* subversion/libsvn_client/mergeinfo.c
  (svn_client__get_wc_mergeinfo): Remove a needless conditional.  Don't
   bother trying to fix up inherited mergeinfo if all that was inherited
   was *empty* mergeinfo, that's a noop.

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

Modified: subversion/trunk/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/mergeinfo.c?rev=1127993&r1=1127992&r2=1127993&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_client/mergeinfo.c Thu May 26 17:30:38 2011
@@ -280,7 +280,7 @@ svn_client__get_wc_mergeinfo(svn_mergein
       /* Mergeinfo may be inherited. */
       if (wc_mergeinfo)
         {
-          *inherited = (wc_mergeinfo != NULL);
+          *inherited = TRUE;
           *mergeinfo = apr_hash_make(result_pool);
           SVN_ERR(svn_client__adjust_mergeinfo_source_paths(*mergeinfo,
                                                             walk_relpath,
@@ -299,7 +299,8 @@ svn_client__get_wc_mergeinfo(svn_mergein
 
   /* Remove non-inheritable mergeinfo and paths mapped to empty ranges
      which may occur if WCPATH's mergeinfo is not explicit. */
-  if (*inherited)
+  if (*inherited
+      && apr_hash_count(*mergeinfo)) /* Nothing to do for empty mergeinfo. */
     {
       SVN_ERR(svn_mergeinfo_inheritable(mergeinfo, *mergeinfo, NULL,
               SVN_INVALID_REVNUM, SVN_INVALID_REVNUM, result_pool));