You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2005/08/03 10:52:50 UTC

[PATCH] Issue 443: post-commit hook (error) output lost: Step 1

(I'm just forwarding this with the Subject line mentioning the subject.  - Julian)

-------- Original Message --------
Subject: [PATCH] Issue 443 : Step 1
Date: Wed, 03 Aug 2005 14:01:42 +0530
From: Madan U Sreenivasan <ma...@collab.net>
Reply-To: madan@collab.net
Organization: Collabnet Software Private Limited
To: dev@subversion.tigris.org

Hi,
   Pl. find attached the step-1 of the patch for issue #443. These steps
were discussed on the list at...
http://svn.haxx.se/dev/archive-2005-07/0281.shtml

Regards,
Madan.

Re: [PATCH] Issue 443: post-commit hook (error) output lost: Step 1

Posted by Madan U Sreenivasan <ma...@collab.net>.
On Tue, 2005-08-09 at 15:34, Peter N. Lundblad wrote:
> On Wed, 3 Aug 2005, Julian Foad wrote:
> 
> > Hi,
> >    Pl. find attached the step-1 of the patch for issue #443. These steps
> 
> A tweaked version was committed in r15648.
Thanks, Peter.

Regards,
Madan.


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

Re: [PATCH] Issue 443: post-commit hook (error) output lost: Step 1

Posted by Julian Foad <ju...@btopenworld.com>.
Peter N. Lundblad wrote:
> On Wed, 3 Aug 2005, Julian Foad wrote:
> 
>>Hi,
>>   Pl. find attached the step-1 of the patch for issue #443. These steps

Just for the record: I didn't write that!

- Julian

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

Re: [PATCH] Issue 443: post-commit hook (error) output lost: Step 1

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Wed, 3 Aug 2005, Julian Foad wrote:

> Hi,
>    Pl. find attached the step-1 of the patch for issue #443. These steps

A tweaked version was committed in r15648.

The tweaks were docstring for the most part. I moved
svn_client_commit_info2_t above the soon-to-be-deprecated function and
added a @since note, and I moved the constructor below the constructor for
the client context.

The important thing I changed was that the constructor now initializes the
fields of the struct. the reason is that old code must be able to use the
constructor even if the struct has been extended and the new fields must
then be initialized.  (Note that this constructor isn't used, but it is
still a good idea to provide a constructor, so that people don't start
creating objects themselves.)

Thanks for the patch,
//Peter

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

Re: [PATCH] Issue 443: post-commit hook (error) output lost: Step 1

Posted by Madan U Sreenivasan <ma...@collab.net>.
thank you Julian....

On Wed, 2005-08-03 at 16:22, Julian Foad wrote:
> (I'm just forwarding this with the Subject line mentioning the subject.  - Julian)
> 
> -------- Original Message --------
> Subject: [PATCH] Issue 443 : Step 1
> Date: Wed, 03 Aug 2005 14:01:42 +0530
> From: Madan U Sreenivasan <ma...@collab.net>
> Reply-To: madan@collab.net
> Organization: Collabnet Software Private Limited
> To: dev@subversion.tigris.org
> 
> Hi,
>    Pl. find attached the step-1 of the patch for issue #443. These steps
> were discussed on the list at...
> http://svn.haxx.se/dev/archive-2005-07/0281.shtml
> 
> Regards,
> Madan.
> 
> ______________________________________________________________________
>    Partial fix for Issue #443: post-commit hook script (error) output lost
>    Includes post-commit hook stderr propagation for ra_dav
>    This is step 1 : Introduction of svn_client_commit_info2_t and its
>    constructor.
> 
>    * subversion/include/svn_client.h
>      (svn_client_commit_info2_t): New structure to take care of
>      post-commit-hook's stderr.
>      (svn_client_create_commit_info): New fuction. Constructor for
>      svn_client_commit_info2_t.
> 
>    * subversion/libsvn_client/commit.c
>      (svn_client_create_commit_info): New function.
> 
> 
> ______________________________________________________________________
> Index: subversion/include/svn_client.h
> ===================================================================
> --- subversion/include/svn_client.h	(revision 15561)
> +++ subversion/include/svn_client.h	(working copy)
> @@ -277,7 +277,27 @@
>  
>  } svn_client_commit_info_t;
>  
> +/** objects of this type should always be created using the
> + * svn_client_create_commit_info() function.
> + * Else should not be used with any svn library functions.
> + */
> +typedef struct svn_client_commit_info2_t
> +{
> +  /** just-committed revision. */
> +  svn_revnum_t revision;
>  
> +  /** server-side date of the commit. */
> +  const char *date;
> +
> +  /** author of the commit. */
> +  const char *author;
> +
> +  /** post-commit hook's stderr. */
> +  const char *post_commit_err;
> +
> +} svn_client_commit_info2_t;
> +
> +
>  /**
>   * @name Commit state flags
>   * @brief State flags for use with the @c svn_client_commit_item_t structure
> @@ -798,6 +818,19 @@
>  
> 
>  /**
> + * Create an object of type svn_client_commit_info2_t.
> + * Any object of the type svn_client_commit_info2_t, should
> + * be created using this function, if it were to be passed to
> + * any of the svn library functions. 
> + * This is to provide for extending the svn_client_commit_info2_t.
> + *
> + * @since New in 1.3.
> + */
> +svn_client_commit_info2_t *
> +svn_client_create_commit_info (apr_pool_t *pool);
> +
> +
> +/**
>   * Commit files or directories into repository, authenticating with
>   * the authentication baton cached in @a ctx, and using 
>   * @a ctx->log_msg_func/@a ctx->log_msg_baton to obtain the log message. 
> Index: subversion/libsvn_client/commit.c
> ===================================================================
> --- subversion/libsvn_client/commit.c	(revision 15561)
> +++ subversion/libsvn_client/commit.c	(working copy)
> @@ -1163,6 +1163,12 @@
>    return SVN_NO_ERROR;
>  }
>  
> +svn_client_commit_info2_t *
> +svn_client_create_commit_info (apr_pool_t *pool)
> +{
> +  return apr_palloc (pool, sizeof (svn_client_commit_info2_t));
> +}
> +
>  svn_error_t *
>  svn_client_commit2 (svn_client_commit_info_t **commit_info,
>                      const apr_array_header_t *targets,
> 
> 


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