[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Remove incorrect comments for svn_wc__entry_modify().

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2007-01-10 23:10:25 CET

Currently, svn_wc__entry_modify() is described as follows:

/* Modify an entry for NAME in access baton ADM_ACCESS by folding in
   ("merging") changes, and sync those changes to disk. New values
   for the entry are pulled from their respective fields in ENTRY, and
   MODIFY_FLAGS is a bitmask to specify which of those field to pay
   attention to. ADM_ACCESS must hold a write lock.

   - ENTRY->kind specifies the node kind for this entry, and is
     *required* to be set to one of the following valid values:
     'svn_node_dir', 'svn_node_file'.

   - NAME can be NULL to specify that the caller wishes to modify the
     "this dir" entry in ADM_ACCESS.

   ...

The thing is, we already call this function with invalid (uninitialised)
ENTRY->kind values in several places, so I was curious as to why the
comment was there. And as far as I can see, there's no reason at all
(not even in r1531, when it was introduced!).

If it's just a bogus comment, I'd like to remove it (see the attached
trivial patch), but I'm concerned that I might be missing something...

Regards,
Malcolm

Index: subversion/libsvn_wc/entries.c
===================================================================
--- subversion/libsvn_wc/entries.c (revision 22950)
+++ subversion/libsvn_wc/entries.c (working copy)
@@ -2459,7 +2459,7 @@
   apr_hash_t *entries, *entries_nohidden;
   svn_boolean_t entry_was_deleted_p = FALSE;
 
- /* ENTRY is rather necessary, and ENTRY->kind is required to be valid! */
+ /* ENTRY is rather necessary! */
   assert(entry);
 
   /* Load ADM_ACCESS's whole entries file. */
Index: subversion/libsvn_wc/entries.h
===================================================================
--- subversion/libsvn_wc/entries.h (revision 22950)
+++ subversion/libsvn_wc/entries.h (working copy)
@@ -167,13 +167,9 @@
    MODIFY_FLAGS is a bitmask to specify which of those field to pay
    attention to. ADM_ACCESS must hold a write lock.
 
- - ENTRY->kind specifies the node kind for this entry, and is
- *required* to be set to one of the following valid values:
- 'svn_node_dir', 'svn_node_file'.
+ NAME can be NULL to specify that the caller wishes to modify the
+ "this dir" entry in ADM_ACCESS.
 
- - NAME can be NULL to specify that the caller wishes to modify the
- "this dir" entry in ADM_ACCESS.
-
    If DO_SYNC is FALSE then the modification will be entirely local to the
    access baton, if DO_SYNC is TRUE the modification will be written to
    the entries file. Be careful when setting DO_SYNC to FALSE: if there

  • application/pgp-signature attachment: stored
Received on Wed Jan 10 23:10:37 2007

This is an archived mail posted to the Subversion Dev mailing list.