locations.
 */
int
svn_opt_parse_revision(svn_opt_revision_t *start_revision,
                       svn_opt_revision_t *end_revision,
                       const char *arg,
                       apr_pool_t *pool);

/**
 * Parse @a arg, where @a arg is "N" or "N:M", into a
 * @c svn_opt_revision_range_t and push that onto @a opt_ranges.
 *
 *    - If @a arg is "N", set the @c start field of the
 *      @c svn_opt_revision_range_t to represent N and the @c end field
 *      to @c svn_opt_revision_unspecified.
 *
 *    - If @a arg is "N:M", set the @c start field of the
 *      @c svn_opt_revision_range_t to represent N and the @c end field
 *      to represent M.
 *
 * If @a arg is invalid, return -1; else return 0.  It is invalid to omit
 * a revision (as in, ":", "N:" or ":M").
 *
 * Use @a pool to allocate @c svn_opt_revision_range_t pushed to the array.
 *
 * @since New in 1.5.
 */
int
svn_opt_parse_revision_to_range(apr_array_header_t *opt_ranges,
                                const char *arg,
                                apr_pool_t *pool);

/**
 * Resolve peg revisions and operational revisions in the following way:
 *
 *    - If @a is_url is set and @a peg_rev->kind is
 *      @c svn_opt_revision_unspecified, @a peg_rev->kind defaults to
 *      @c svn_opt_revision_head.
 *
 *    - If @a is_url is not set, and @a peg_rev->kind is
 *      @c svn_opt_revision_unspecified, @a peg_rev->kind defaults to
 *      @c svn_opt_revision_base.
 *
 *    - If @a op_rev->kind is @c svn_opt_revision_unspecified, @a op_rev
 *      defaults to @a peg_rev.
 *
 * Both @a peg_rev and @a op_rev may be modified as a result of this
 * function.  @a is_url should be set if the path the revisions refer to is
 * a url, and unset otherwise.
 *
 * If @a notice_local_mods is set, @c svn_opt_revision_working is used,
 * instead of @c svn_opt_revision_base.
 *
 * Use @a pool for allocations.
 *
 * @since New in 1.5.
 */
svn_error_t *
svn_opt_resolve_revisions(svn_opt_revision_t *peg_rev,
                          svn_opt_revision_t *op_rev,
                          svn_boolean_t is_url,
                          svn_boolean_t notice_local_mods,
                          apr_pool_t *pool);

