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 2013/07/22 18:49:25 UTC

svn commit: r1505729 - /subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/cached_data.c

Author: stefan2
Date: Mon Jul 22 16:49:24 2013
New Revision: 1505729

URL: http://svn.apache.org/r1505729
Log:
On the fsfs-improvements branch:  Rename a debug function.

* subversion/libsvn_fs_fs/cached_data.c
  (dgb__log_access): rename to ...
  (dbg_log_access): ... this one
  (svn_fs_fs__get_node_revision,
   create_rep_state_body,
   read_delta_window,
   svn_fs_fs__get_changes): update callers

Found by: philip

Modified:
    subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/cached_data.c

Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/cached_data.c?rev=1505729&r1=1505728&r2=1505729&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/cached_data.c Mon Jul 22 16:49:24 2013
@@ -58,12 +58,12 @@
  * For pre-format7 repos, the display will be restricted.
  */
 static svn_error_t *
-dgb__log_access(svn_fs_t *fs,
-                svn_revnum_t revision,
-                apr_off_t offset,
-                void *item,
-                int item_type,
-                apr_pool_t *scratch_pool)
+dbg_log_access(svn_fs_t *fs,
+               svn_revnum_t revision,
+               apr_off_t offset,
+               void *item,
+               int item_type,
+               apr_pool_t *scratch_pool)
 {
   /* no-op if this macro is not defined */
 #ifdef SVN_FS_FS__LOG_ACCESS
@@ -375,12 +375,12 @@ svn_fs_fs__get_node_revision(node_revisi
                                id_string->data);
     }
 
-  SVN_ERR(dgb__log_access(fs,
-                          svn_fs_fs__id_rev(id),
-                          svn_fs_fs__id_offset(id),
-                          *noderev_p,
-                          SVN_FS_FS__ITEM_TYPE_NODEREV,
-                          pool));
+  SVN_ERR(dbg_log_access(fs,
+                         svn_fs_fs__id_rev(id),
+                         svn_fs_fs__id_offset(id),
+                         *noderev_p,
+                         SVN_FS_FS__ITEM_TYPE_NODEREV,
+                         pool));
 
   return svn_error_trace(err);
 }
@@ -648,8 +648,8 @@ create_rep_state_body(rep_state_t **rep_
         *shared_file = file;
     }
 
-  SVN_ERR(dgb__log_access(fs, rep->revision, rep->offset, rh,
-                          SVN_FS_FS__ITEM_TYPE_ANY_REP, pool));
+  SVN_ERR(dbg_log_access(fs, rep->revision, rep->offset, rh,
+                         SVN_FS_FS__ITEM_TYPE_ANY_REP, pool));
 
   SVN_ERR(svn_fs_fs__read_rep_header(&rh, rs->file->stream, pool));
   SVN_ERR(svn_fs_fs__get_file_offset(&rs->start, rs->file->file, pool));
@@ -1177,8 +1177,8 @@ read_delta_window(svn_txdelta_window_t *
   apr_off_t end_offset;
   SVN_ERR_ASSERT(rs->chunk_index <= this_chunk);
 
-  SVN_ERR(dgb__log_access(rs->file->fs, rs->revision, rs->offset,
-                          NULL, SVN_FS_FS__ITEM_TYPE_ANY_REP, pool));
+  SVN_ERR(dbg_log_access(rs->file->fs, rs->revision, rs->offset,
+                         NULL, SVN_FS_FS__ITEM_TYPE_ANY_REP, pool));
 
   /* someone has to actually read the data from file */
   SVN_ERR(auto_read_diff_version(rs, pool));
@@ -2017,8 +2017,8 @@ svn_fs_fs__get_changes(apr_array_header_
   if (ffd->changes_cache)
     SVN_ERR(svn_cache__set(ffd->changes_cache, &rev, *changes, pool));
 
-  SVN_ERR(dgb__log_access(fs, rev, changes_offset, *changes,
-                          SVN_FS_FS__ITEM_TYPE_CHANGES, pool));
+  SVN_ERR(dbg_log_access(fs, rev, changes_offset, *changes,
+                         SVN_FS_FS__ITEM_TYPE_CHANGES, pool));
 
   return SVN_NO_ERROR;
 }



Re: Log messages Re: svn commit: r1505729 - /subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/cache d_data.c

Posted by Stefan Fuhrmann <st...@wandisco.com>.
On Sun, Aug 4, 2013 at 8:32 AM, Daniel Shahaf <da...@elego.de> wrote:

> stefan2@apache.org wrote on Mon, Jul 22, 2013 at 16:49:25 -0000:
> > Author: stefan2
> > Date: Mon Jul 22 16:49:24 2013
> > New Revision: 1505729
> >
> > URL: http://svn.apache.org/r1505729
> > Log:
> > On the fsfs-improvements branch:  Rename a debug function.
> >
> > * subversion/libsvn_fs_fs/cached_data.c
> >   (dgb__log_access): rename to ...
> >   (dbg_log_access): ... this one
>
> That's a classic example of a log message that leaves me "Huh?"-ed: it
> says nothing more than the unidiff says.  "Fix a typo in the function
> name" would have been easier to understand.
>

Agreed and changed.


> This one is a trivial patch, but the point of "Describe the why, not the
> what" applies to larger, less-trivial patches too.  (And that's why
> I made it)
>

I agree with the general goal. Changes that don't impact functionality,
however, often could be summarized as "shuffle code around" and I
find it hard to express the rationale behind those. Of course, there is
a "why" behind them but that can usually be paraphrased as "because
it's just better / nicer that way". On example:

r1506344
On the fsfs-improvements branch:  refactor some ID allocation code
into shared functions.

-- Stefan^2,

Re: Log messages Re: svn commit: r1505729 - /subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/cache d_data.c

Posted by Stefan Fuhrmann <st...@wandisco.com>.
On Sun, Aug 4, 2013 at 8:32 AM, Daniel Shahaf <da...@elego.de> wrote:

> stefan2@apache.org wrote on Mon, Jul 22, 2013 at 16:49:25 -0000:
> > Author: stefan2
> > Date: Mon Jul 22 16:49:24 2013
> > New Revision: 1505729
> >
> > URL: http://svn.apache.org/r1505729
> > Log:
> > On the fsfs-improvements branch:  Rename a debug function.
> >
> > * subversion/libsvn_fs_fs/cached_data.c
> >   (dgb__log_access): rename to ...
> >   (dbg_log_access): ... this one
>
> That's a classic example of a log message that leaves me "Huh?"-ed: it
> says nothing more than the unidiff says.  "Fix a typo in the function
> name" would have been easier to understand.
>

Agreed and changed.


> This one is a trivial patch, but the point of "Describe the why, not the
> what" applies to larger, less-trivial patches too.  (And that's why
> I made it)
>

I agree with the general goal. Changes that don't impact functionality,
however, often could be summarized as "shuffle code around" and I
find it hard to express the rationale behind those. Of course, there is
a "why" behind them but that can usually be paraphrased as "because
it's just better / nicer that way". On example:

r1506344
On the fsfs-improvements branch:  refactor some ID allocation code
into shared functions.

-- Stefan^2,

Log messages Re: svn commit: r1505729 - /subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/cache d_data.c

Posted by Daniel Shahaf <da...@elego.de>.
stefan2@apache.org wrote on Mon, Jul 22, 2013 at 16:49:25 -0000:
> Author: stefan2
> Date: Mon Jul 22 16:49:24 2013
> New Revision: 1505729
> 
> URL: http://svn.apache.org/r1505729
> Log:
> On the fsfs-improvements branch:  Rename a debug function.
> 
> * subversion/libsvn_fs_fs/cached_data.c
>   (dgb__log_access): rename to ...
>   (dbg_log_access): ... this one

That's a classic example of a log message that leaves me "Huh?"-ed: it
says nothing more than the unidiff says.  "Fix a typo in the function
name" would have been easier to understand.

This one is a trivial patch, but the point of "Describe the why, not the
what" applies to larger, less-trivial patches too.  (And that's why
I made it)

Log messages Re: svn commit: r1505729 - /subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/cache d_data.c

Posted by Daniel Shahaf <da...@elego.de>.
stefan2@apache.org wrote on Mon, Jul 22, 2013 at 16:49:25 -0000:
> Author: stefan2
> Date: Mon Jul 22 16:49:24 2013
> New Revision: 1505729
> 
> URL: http://svn.apache.org/r1505729
> Log:
> On the fsfs-improvements branch:  Rename a debug function.
> 
> * subversion/libsvn_fs_fs/cached_data.c
>   (dgb__log_access): rename to ...
>   (dbg_log_access): ... this one

That's a classic example of a log message that leaves me "Huh?"-ed: it
says nothing more than the unidiff says.  "Fix a typo in the function
name" would have been easier to understand.

This one is a trivial patch, but the point of "Describe the why, not the
what" applies to larger, less-trivial patches too.  (And that's why
I made it)