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

Re: svn commit: r921588 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_wc/adm_files.h libsvn_wc/adm_ops.c

From: Greg Stein <gstein_at_gmail.com>
Date: Wed, 10 Mar 2010 19:42:30 -0500

On Wed, Mar 10, 2010 at 17:00, <neels_at_apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Wed Mar 10 22:00:38 2010
> @@ -2208,17 +2208,39 @@ svn_wc__get_pristine_contents(svn_stream
>                               apr_pool_t *result_pool,
>                               apr_pool_t *scratch_pool)
>  {
> +  svn_wc__db_status_t status;
>   const char *text_base;
>
> -  SVN_ERR(svn_wc__text_base_path(&text_base, db, local_abspath, FALSE,
> -                                 scratch_pool));
> -
> -  if (text_base == NULL)
> +  SVN_ERR(svn_wc__db_read_info(&status,
> +                               NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> +                               NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> +                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> +                               db, local_abspath, scratch_pool, scratch_pool));

You can read the KIND at the same time here, and early-out for non-files.

> +  if (status == svn_wc__db_status_added)

You should also check for obstructed_add. This could be a local copy
of a file, and the user rm'd the file and put a directory there. You
still want access to the underlying pristine.

>...

Cheers,
-g
Received on 2010-03-11 01:42:58 CET

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