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

Re: [PATCH] Modified export behavior

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-11-16 18:57:18 CET

John Szakmeister <john@szakmeister.net> writes:

> + if (mime_type && svn_mime_type_is_binary (mime_type->data))
> + {
> + SVN_ERR (svn_io_copy_file (base,
> + copy_to,
> + TRUE,
> + subpool));
> + }

I don't think the "if binary do this else do that" is necessary.
Binary files won't have keywords, eol-style and copy_and_translate
will just do a copy_file. Did you copy this pattern from elsewhere in
the code?

> + else
> + {
> + svn_string_t *eol_style;
> + svn_string_t *keywords;
> + const char *eol = NULL;
> +
> + eol_style = apr_hash_get (props, SVN_PROP_EOL_STYLE,
> + APR_HASH_KEY_STRING);
> +
> + keywords = apr_hash_get (props, SVN_PROP_KEYWORDS,
> + APR_HASH_KEY_STRING);
> +
> + if (eol_style)
> + svn_subst_eol_style_from_value (&style, &eol,
> + eol_style->data);
> +
> + if (keywords)
> + {
> + SVN_ERR (svn_subst_build_keywords
> + (&kw, keywords->data,
> + apr_psprintf (pool,
> + "%" SVN_REVNUM_T_FMT,
> + entry->cmt_rev),
> + entry->url,
> + entry->cmt_date,
> + entry->cmt_author,
> + subpool));
> + }
> +
> + SVN_ERR (svn_subst_copy_and_translate (base, copy_to,
> + eol, FALSE,
> + &kw, TRUE,
> + subpool));
> + }

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Nov 16 18:58:20 2003

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