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

[PATCH]: Stop checking properties unnecessarily

From: Daniel Berlin <dberlin_at_dberlin.org>
Date: 2005-11-01 18:50:33 CET

This is actually a typo that nobody has noticed.

check_prop_mods in libsvn_client/commit_util.c called
svn_wc_props_modified_p, which takes a pointer to a boolean .

110 *eol_prop_changed = *props_changed = FALSE;
111 SVN_ERR (svn_wc_props_modified_p (props_changed, path,
adm_access, pool));
112 if (! props_changed)
113 return SVN_NO_ERROR;

We then check whether the returned *pointer* is null, which we know it
isn't, since if it was, we would have crashed setting it to FALSE.

Thus, i'd imagine the compiler actually just removes this return.

The correct test is (! *props_changed)

This bug, btw, causes us to stat and read whole *ton* of files for no
reason on commits :)

Fixed thusly.

[[[

    Fix check causing check_prop_mods to not early exit
    when properties have not been modified.

    * subversion/libsvn_client/commit_util.c
    (check_prop_mods): Test value of what props_changed
    points to, not the pointer itself.

]]]
   
     

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Tue Nov 1 18:52:37 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.