You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2009/04/14 01:27:04 UTC

Re: svn commit: r37207 - trunk/subversion/libsvn_client

On Mon, Apr 13, 2009 at 19:23, Arfrever Frehtes Taifersar Arahesis
<Ar...@gmail.com> wrote:
>...
> +++ trunk/subversion/libsvn_client/patch.c      Mon Apr 13 10:23:51 2009        (r37207)
> @@ -1638,7 +1638,6 @@ extract_svnpatch(const char *original_pa
>                  apr_pool_t *pool)
>  {
>   apr_file_t *original_patch_file; /* gzip-base64'ed */
> -  svn_stringbuf_t *original_patch_stringbuf; /* gzip-base64'ed */
>   svn_stream_t *original_patch_stream;
>   apr_file_t *compressed_file; /* base64-decoded, gzip-compressed */
>   svn_stream_t *svnpatch_stream; /* clear-text, attached to @a patch_file */
> @@ -1655,15 +1654,12 @@ extract_svnpatch(const char *original_pa
>                                        SVN_CLIENT_SVNPATCH_VERSION,
>                                        equal_string);
>
> -  SVN_ERR(svn_io_file_open(&original_patch_file, original_patch_path,
> -                           APR_READ, APR_OS_DEFAULT, pool));
> -  SVN_ERR(svn_stringbuf_from_aprfile(&original_patch_stringbuf,
> -                                     original_patch_file, pool));
> -
>   for (i = 0; i <= 1; i++)
>     {
> -      original_patch_stream = svn_stream_from_stringbuf(original_patch_stringbuf,
> -                                                        pool);
> +      SVN_ERR(svn_io_file_open(&original_patch_file, original_patch_path,
> +                               APR_READ, APR_OS_DEFAULT, pool));
> +      original_patch_stream = svn_stream_from_aprfile2(original_patch_file,
> +                                                       FALSE, pool);

Do you need the variable original_patch_file? Or maybe you could just
use svn_stream_open_readonly() here.

Also, I think you might be able to move some variable declarations
into this tighter block scope.

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1700052


Re: svn commit: r37207 - trunk/subversion/libsvn_client

Posted by Arfrever Frehtes Taifersar Arahesis <Ar...@GMail.Com>.
2009-04-14 03:27:04 Greg Stein napisał(a):
> On Mon, Apr 13, 2009 at 19:23, Arfrever Frehtes Taifersar Arahesis
> <Ar...@gmail.com> wrote:
> >...
> > +++ trunk/subversion/libsvn_client/patch.c      Mon Apr 13 10:23:51 2009        (r37207)
> > @@ -1638,7 +1638,6 @@ extract_svnpatch(const char *original_pa
> >                  apr_pool_t *pool)
> >  {
> >   apr_file_t *original_patch_file; /* gzip-base64'ed */
> > -  svn_stringbuf_t *original_patch_stringbuf; /* gzip-base64'ed */
> >   svn_stream_t *original_patch_stream;
> >   apr_file_t *compressed_file; /* base64-decoded, gzip-compressed */
> >   svn_stream_t *svnpatch_stream; /* clear-text, attached to @a patch_file */
> > @@ -1655,15 +1654,12 @@ extract_svnpatch(const char *original_pa
> >                                        SVN_CLIENT_SVNPATCH_VERSION,
> >                                        equal_string);
> >
> > -  SVN_ERR(svn_io_file_open(&original_patch_file, original_patch_path,
> > -                           APR_READ, APR_OS_DEFAULT, pool));
> > -  SVN_ERR(svn_stringbuf_from_aprfile(&original_patch_stringbuf,
> > -                                     original_patch_file, pool));
> > -
> >   for (i = 0; i <= 1; i++)
> >     {
> > -      original_patch_stream = svn_stream_from_stringbuf(original_patch_stringbuf,
> > -                                                        pool);
> > +      SVN_ERR(svn_io_file_open(&original_patch_file, original_patch_path,
> > +                               APR_READ, APR_OS_DEFAULT, pool));
> > +      original_patch_stream = svn_stream_from_aprfile2(original_patch_file,
> > +                                                       FALSE, pool);
> 
> Do you need the variable original_patch_file? Or maybe you could just
> use svn_stream_open_readonly() here.
> 
> Also, I think you might be able to move some variable declarations
> into this tighter block scope.

Fixed in r37239.

-- 
Arfrever Frehtes Taifersar Arahesis