Here's the docstring:

[[[
/**
 * Convert @a version to that version's characteristic working copy
 * format, returned in @a format.
 *
 * A NULL @a version translates to the library's default version.
 ⋮
 */
svn_error_t *
svn_wc__format_from_version(int *format,
                            const svn_version_t* version,
                            apr_pool_t *scratch_pool);
]]]

Here's part of the implementation:

[[[
  switch (version->minor)
    {
      case 0:  /* Same as 1.3.x. */
      case 1:  /* Same as 1.3.x. */
      case 2:  /* Same as 1.3.x. */
      case 3:  *format = 4; break;
      case 4:  *format = 8; break;
      case 5:  *format = 9; break;
      case 6:  *format = 10; break;
      case 7:  *format = 29; break;
      case 8:  /* Same as 1.14.x. */
      case 9:  /* Same as 1.14.x. */
      case 10: /* Same as 1.14.x. */
      case 11: /* Same as 1.14.x. */
      case 12: /* Same as 1.14.x. */
      case 13: /* Same as 1.14.x. */
      case 14: *format = 31; break;
      case 15: /* Same as the current version. */
      default: *format = SVN_WC__VERSION; break;
    }

  return SVN_NO_ERROR;
]]]

What does the term "characteristic" mean?  Is it the oldest, newest, or
default wc format supported by @a version?

The implementation uses the newest, but that may have been an oversight
(cf. r1899000), and it's not clear to me from the callers what they
expect.

Cheers,

Daniel

Reply via email to