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

Re: svn commit: r21565 - trunk/subversion/libsvn_wc

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2006-09-22 10:25:10 CEST

Is this change complete? Currently I could not see line number's of
caller is not logged anywhere.

With regards
Kamesh Jayachandran

rooneg@tigris.org wrote:
> Author: rooneg
> Date: Wed Sep 20 09:09:10 2006
> New Revision: 21565
>
> Log:
> Convert an error generating function into an error generating macro.
>
> * subversion/libsvn_wc/log.c
> (signal_error): Replaced with...
> (SIGNAL_ERROR): This, a new macro version of signal_error, which allows
> it to return errors with a more useful line number in them.
> (log_do_file_xfer, log_do_modify_entry, start_handler): Use new macro.
>
>
> Modified:
> trunk/subversion/libsvn_wc/log.c
>
> Modified: trunk/subversion/libsvn_wc/log.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/log.c?pathrev=21565&r1=21564&r2=21565
> ==============================================================================
> --- trunk/subversion/libsvn_wc/log.c (original)
> +++ trunk/subversion/libsvn_wc/log.c Wed Sep 20 09:09:10 2006
> @@ -492,19 +492,18 @@
> return SVN_ERR_WC_BAD_ADM_LOG;
> }
>
> -static void
> -signal_error(struct log_runner *loggy, svn_error_t *err)
> -{
> - svn_xml_signal_bailout
> - (svn_error_createf(pick_error_code(loggy), err,
> - _("In directory '%s'"),
> - svn_path_local_style(svn_wc_adm_access_path
> - (loggy->adm_access),
> - loggy->pool)),
> - loggy->parser);
> -}
> -
> -
> +/* Helper macro for erroring out while running a logfile.
> +
> + This is implemented as a macro so that the error created has a useful
> + line number associated with it. */
> +#define SIGNAL_ERROR(loggy, err) \
> + svn_xml_signal_bailout \
> + (svn_error_createf(pick_error_code(loggy), err, \
> + _("In directory '%s'"), \
> + svn_path_local_style(svn_wc_adm_access_path \
> + (loggy->adm_access), \
> + loggy->pool)), \
> + loggy->parser)
>
>
>
> @@ -608,7 +607,7 @@
> err = file_xfer_under_path(loggy->adm_access, name, dest, versioned,
> action, special_only, loggy->rerun, loggy->pool);
> if (err)
> - signal_error(loggy, err);
> + SIGNAL_ERROR(loggy, err);
>
> return SVN_NO_ERROR;
> }
> @@ -798,7 +797,7 @@
> FALSE, loggy->pool);
>
> if (err)
> - signal_error(loggy, err);
> + SIGNAL_ERROR(loggy, err);
>
> if (! tfile_entry)
> return SVN_NO_ERROR;
> @@ -806,7 +805,7 @@
> err = svn_wc__prop_path(&pfile, tfile, tfile_entry->kind, FALSE,
> loggy->pool);
> if (err)
> - signal_error(loggy, err);
> + SIGNAL_ERROR(loggy, err);
>
> err = svn_io_file_affected_time(&prop_time, pfile, loggy->pool);
> if (err && APR_STATUS_IS_ENOENT(err->apr_err))
> @@ -1543,7 +1542,7 @@
> return;
> else if (! name && strcmp(eltname, SVN_WC__LOG_UPGRADE_FORMAT) != 0)
> {
> - signal_error
> + SIGNAL_ERROR
> (loggy, svn_error_createf
> (pick_error_code(loggy), NULL,
> _("Log entry missing 'name' attribute (entry '%s' "
> @@ -1614,7 +1613,7 @@
> }
> else
> {
> - signal_error
> + SIGNAL_ERROR
> (loggy, svn_error_createf
> (pick_error_code(loggy), NULL,
> _("Unrecognized logfile element '%s' in '%s'"),
> @@ -1625,7 +1624,7 @@
> }
>
> if (err)
> - signal_error
> + SIGNAL_ERROR
> (loggy, svn_error_createf
> (pick_error_code(loggy), err,
> _("Error processing command '%s' in '%s'"),
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Sep 22 10:24: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.