You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/12/01 14:20:56 UTC

svn commit: r1717430 - /subversion/trunk/subversion/libsvn_fs_x/cached_data.c

Author: stefan2
Date: Tue Dec  1 13:20:56 2015
New Revision: 1717430

URL: http://svn.apache.org/viewvc?rev=1717430&view=rev
Log:
* subversion/libsvn_fs_x/cached_data.c
  (svn_fs_x__get_proplist): Minor simplification based on the fact that
                            the in-txn case has already been covered.

Modified:
    subversion/trunk/subversion/libsvn_fs_x/cached_data.c

Modified: subversion/trunk/subversion/libsvn_fs_x/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/cached_data.c?rev=1717430&r1=1717429&r2=1717430&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/cached_data.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/cached_data.c Tue Dec  1 13:20:56 2015
@@ -2761,17 +2761,14 @@ svn_fs_x__get_proplist(apr_hash_t **prop
       svn_fs_x__representation_t *rep = noderev->prop_rep;
       svn_fs_x__pair_cache_key_t key = { 0 };
       svn_string_t *content;
+      svn_boolean_t is_cached;
 
       key.revision = svn_fs_x__get_revnum(rep->id.change_set);
       key.second = rep->id.number;
-      if (SVN_IS_VALID_REVNUM(key.revision))
-        {
-          svn_boolean_t is_cached;
-          SVN_ERR(svn_cache__get((void **) proplist, &is_cached,
-                                 ffd->properties_cache, &key, result_pool));
-          if (is_cached)
-            return SVN_NO_ERROR;
-        }
+      SVN_ERR(svn_cache__get((void **) proplist, &is_cached,
+                             ffd->properties_cache, &key, result_pool));
+      if (is_cached)
+        return SVN_NO_ERROR;
 
       SVN_ERR(svn_fs_x__get_contents(&stream, fs, rep, FALSE, scratch_pool));
       SVN_ERR(svn_string_from_stream2(&content, stream, rep->expanded_size,
@@ -2783,9 +2780,8 @@ svn_fs_x__get_proplist(apr_hash_t **prop
                     svn_fs_x__id_unparse(&noderev->noderev_id,
                                          scratch_pool)->data));
 
-      if (SVN_IS_VALID_REVNUM(rep->id.change_set))
-        SVN_ERR(svn_cache__set(ffd->properties_cache, &key, *proplist,
-                               scratch_pool));
+      SVN_ERR(svn_cache__set(ffd->properties_cache, &key, *proplist,
+                             scratch_pool));
     }
   else
     {