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

Re: [PATCH] fix core and make tests pass

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-01-05 15:36:12 CET

"Craig Peterein" <craig.peterein@myrealbox.com> writes:

> * commit-cmd.c (svn_cl__commit): Initialize date and author to NULL to prevent
> core and make tests pass (svn-test.sh and svn-test2.sh)
>
> Index: ./subversion/clients/cmdline/commit-cmd.c
> ===================================================================
> --- ./subversion/clients/cmdline/.svn/text-base/commit-cmd.c.svn-base Thu Jan 3 19:58:34 2002
> +++ ./subversion/clients/cmdline/commit-cmd.c Sat Jan 5 06:34:53 2002
> @@ -52,6 +52,8 @@
> const char *date; /* Server-side date of the commit. */
> const char *author; /* Server-side author of the commit. */
>
> + date = NULL;
> + author = NULL;
> /* Take our message from ARGV or a FILE */
> if (opt_state->filedata)
> message = opt_state->filedata;

I don't think that is quite right. svn_client_commit writes to data
and author, requiring the caller to initialise them first is ugly. An
ra_local commit does this at lines 126 to 141 in ra_local/ra_plugin.c.
Perhaps --xml-file and ra_dav commits need something similar?

If we choose to initialise to null, which looks like a hack to me, it
should be done in libsvn_client/commit.c:send_to_repos. Something
like

   if (committed_date)
     *committed_date = NULL;

-- 
Philip
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:54 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.