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

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

From: Daniel Rall <dlr_at_finemaltcoding.com>
Date: 2005-10-20 18:37:34 CEST

On Thu, 20 Oct 2005, zhakov@tigris.org wrote:
...
> New Revision: 16853
...
> Abstract common code from svn_wc__merge_props() and
> svn_wc__merge_prop_diffs()
>
> * subversion/libsvn_wc/props.c
> (open_reject_tmp_file): New helper for creating temporary reject file.
> Abstracted from svn_wc__merge_props().
> (svn_wc__merge_props, svn_wc__merge_prop_diffs): Eliminate slash variable.
> Use open_reject_tmp_file() helper.
...
> --- trunk/subversion/libsvn_wc/props.c (original)
> +++ trunk/subversion/libsvn_wc/props.c Thu Oct 20 10:34:03 2005
> @@ -208,6 +208,44 @@
>
> /*** Misc ***/
>
> +/* Opens reject temporary file for FULL_PATH. */
> +static svn_error_t *
> +open_reject_tmp_file (apr_file_t **fp, const char **reject_tmp_path,
> + const char *full_path,
> + svn_wc_adm_access_t *adm_access,
> + svn_boolean_t is_dir, apr_pool_t *pool)
> +{
> + const char *tmppath, *tmpname;

There is a parameter named "reject_tmp_path" to this function, yet neither
of the local variables defined above uses that same -- slightly more
comprehensible -- naming convention which uses the underscore to emphasize
word boundries (e.g. "tmp_path"). Both style came from pre-refactoring, but
it would be nice if the refactoring made them consistent.

> + /* Get path to /temporary/ local prop file */
> + SVN_ERR (svn_wc__prop_path (&tmppath, full_path, adm_access, TRUE, pool));
> +
> + /* Reserve a .prej file based on it. */
> + SVN_ERR (svn_io_open_unique_file (fp, reject_tmp_path, tmppath,
> + SVN_WC__PROP_REJ_EXT, FALSE, pool));
> +
> + /* reject_tmp_path is an absolute path at this point,
> + but that's no good for us. We need to convert this
> + path to a *relative* path to use in the logfile. */
> + tmpname = svn_path_basename (*reject_tmp_path, pool);
> +
> + if (is_dir)
> + {
> + /* Dealing with directory "path" */
> + *reject_tmp_path = svn_wc__adm_path ("", TRUE, /* use tmp */ pool,
> + tmpname, NULL);

Formatting a little off here?

...
> - }
> - }
> + /* This is the very first prop conflict found on this item. */
> + SVN_ERR (open_reject_tmp_file (&reject_tmp_fp, &reject_tmp_path,
> + full_path, adm_access, is_dir,
> + pool));

Formatting looks a touch odd here.

> /* Append the conflict to the open tmp/PROPS/---.prej file */
> SVN_ERR (append_prop_conflict (reject_tmp_fp,
...

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 20 18:36:40 2005

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.