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

Re: svn commit: r21177 - in branches/incomplete-directories/subversion: include libsvn_client svn

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2006-08-22 16:22:21 CEST

On 8/22/06, kfogel@tigris.org <kfogel@tigris.org> wrote:

> +/* Return string representation of DEPTH */
> +static const char *
> +depth_str(svn_depth_t depth)
> +{
> + switch (depth)
> + {
> + case svn_depth_unknown:
> + return "unknown";
> + case svn_depth_zero:
> + return "zero";
> + case svn_depth_one:
> + return "one";
> + case svn_depth_infinity:
> + return "infinity";
> + default:
> + /* Remember that svn_depth_exclude should never happen here. */
> + return "INVALID";
> + }
> +}

It seems like this function should be used in the following printfs,
instead of hardcoding the names in two places.

> + switch (info->depth)
> + {
> + case svn_depth_unknown:
> + /* Unknown depth is the norm for remote directories anyway
> + (although infinity would be equally appropriate). Let's
> + not bother to print it. */
> + break;
> +
> + case svn_depth_zero:
> + SVN_ERR(svn_cmdline_printf(pool, _("Depth: zero\n")));
> + break;
> +
> + case svn_depth_one:
> + SVN_ERR(svn_cmdline_printf(pool, _("Depth: one\n")));
> + break;
> +
> + case svn_depth_infinity:
> + /* Infinity is the default depth for working copy
> + directories. Let's not print it, it's not special enough
> + to be worth mentioning. */
> + break;
> +
> + default:
> + /* Remember that svn_depth_exclude should never happen here. */
> + SVN_ERR(svn_cmdline_printf(pool, _("Depth: INVALID\n")));
> + }
> +
> if (info->copyfrom_url)
> SVN_ERR(svn_cmdline_printf(pool, _("Copied From URL: %s\n"),
> info->copyfrom_url));
>
> ---------------------------------------------------------------------
> 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 Tue Aug 22 16:23:04 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.