On Tue, May 5, 2009 at 22:19, Hyrum K. Wright <hyrum_at_hyrumwright.org> wrote:
>...
> +++ trunk/subversion/libsvn_wc/adm_ops.c     Tue May  5 13:19:56 2009     (r37590)
>...
> @@ -2445,8 +2451,12 @@ svn_wc_remove_from_revision_control(svn_
> Â svn_error_t *err;
> Â svn_boolean_t is_file;
> Â svn_boolean_t left_something = FALSE;
> + Â svn_wc__db_t *db = svn_wc__adm_get_db(adm_access);
> Â const char *full_path = apr_pstrdup(pool,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_wc_adm_access_path(adm_access));
I know this isn't part of your change, but this seems dumb. By
definition, the baton's path will last longer than this function. Is
there a reason to make a copy of this string?
> + Â const char *local_abspath;
> +
> + Â SVN_ERR(svn_path_get_absolute(&local_abspath, full_path, pool));
>
> Â /* Check cancellation here, so recursive calls get checked early. */
> Â if (cancel_func)
> @@ -2460,10 +2470,9 @@ svn_wc_remove_from_revision_control(svn_
> Â Â Â svn_node_kind_t kind;
> Â Â Â svn_boolean_t wc_special, local_special;
> Â Â Â svn_boolean_t text_modified_p;
> - Â Â Â svn_wc__db_t *db = svn_wc__adm_get_db(adm_access);
> - Â Â Â const char *local_abspath;
>
> Â Â Â full_path = svn_dirent_join(full_path, name, pool);
> + Â Â Â SVN_ERR(svn_path_get_absolute(&local_abspath, full_path, pool));
You did this above.
>
> Â Â Â /* Only check if the file was modified when it wasn't overwritten with a
> Â Â Â Â Â special file */
> @@ -2482,16 +2491,15 @@ svn_wc_remove_from_revision_control(svn_
> Â Â Â Â }
>
> Â Â Â /* Remove the wcprops. */
> - Â Â Â SVN_ERR(svn_wc__props_delete(full_path, svn_wc__props_wcprop,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â adm_access, pool));
> + Â Â Â SVN_ERR(svn_wc__props_delete(db, local_abspath, svn_wc__props_wcprop,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool));
> Â Â Â /* Remove prop/NAME, prop-base/NAME.svn-base. */
> - Â Â Â SVN_ERR(svn_wc__props_delete(full_path, svn_wc__props_working,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â adm_access, pool));
> - Â Â Â SVN_ERR(svn_wc__props_delete(full_path, svn_wc__props_base,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â adm_access, pool));
> + Â Â Â SVN_ERR(svn_wc__props_delete(db, local_abspath, svn_wc__props_working,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool));
> + Â Â Â SVN_ERR(svn_wc__props_delete(db, local_abspath, svn_wc__props_base,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool));
>
> Â Â Â /* Remove NAME from PATH's entries file: */
> - Â Â Â SVN_ERR(svn_path_get_absolute(&local_abspath, full_path, pool));
> Â Â Â SVN_ERR(svn_wc__entry_remove(db, local_abspath, pool));
>
> Â Â Â /* Remove text-base/NAME.svn-base */
> @@ -2534,8 +2542,8 @@ svn_wc_remove_from_revision_control(svn_
> Â Â Â /* Get rid of all the wcprops in this directory. Â This avoids rewriting
> Â Â Â Â Â the wcprops file over and over (meaning O(n^2) complexity)
> Â Â Â Â Â below. */
> - Â Â Â SVN_ERR(svn_wc__props_delete(full_path, svn_wc__props_wcprop,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â adm_access, pool));
> + Â Â Â SVN_ERR(svn_wc__props_delete(db, local_abspath, svn_wc__props_wcprop,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool));
>
> Â Â Â /* Walk over every entry. */
> Â Â Â SVN_ERR(svn_wc_entries_read(&entries, adm_access, FALSE, pool));
> @@ -2591,9 +2599,6 @@ svn_wc_remove_from_revision_control(svn_
> Â Â Â Â Â Â Â Â Â /* The directory is either missing or excluded,
> Â Â Â Â Â Â Â Â Â Â Â so don't try to recurse, just delete the
> Â Â Â Â Â Â Â Â Â Â Â entry in the parent directory. */
> - Â Â Â Â Â Â Â Â Â svn_wc__db_t *db = svn_wc__adm_get_db(adm_access);
> - Â Â Â Â Â Â Â Â Â const char *local_abspath;
> -
> Â Â Â Â Â Â Â Â Â SVN_ERR(svn_path_get_absolute(&local_abspath, entrypath,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â subpool));
Is it safe to ovewrite local_abspath? (I don't see all the context; is
it needed again?) Maybe call this entry_abspath instead?
>...
Cheers,
-g
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2072542
Received on 2009-05-05 22:44:38 CEST