Alien-SVN

 view release on metacpan or  search on metacpan

src/subversion/subversion/include/svn_subst.h  view on Meta::CPAN

{
  /** An unrecognized style */
  svn_subst_eol_style_unknown,

  /** EOL translation is "off" or ignored value */
  svn_subst_eol_style_none,

  /** Translation is set to client's native eol */
  svn_subst_eol_style_native,

  /** Translation is set to one of LF, CR, CRLF */
  svn_subst_eol_style_fixed

} svn_subst_eol_style_t;

/** Set @a *style to the appropriate @c svn_subst_eol_style_t and @a *eol to
 * the appropriate cstring for a given svn:eol-style property value.
 *
 * Set @a *eol to
 *
 *    - @c NULL for @c svn_subst_eol_style_none, or
 *
 *    - a NULL-terminated C string containing the native eol marker
 *      for this platform, for @c svn_subst_eol_style_native, or
 *
 *    - a NULL-terminated C string containing the eol marker indicated
 *      by the property value, for @c svn_subst_eol_style_fixed.
 *
 * If @a *style is NULL, it is ignored.
 */
void
svn_subst_eol_style_from_value(svn_subst_eol_style_t *style,
                               const char **eol,
                               const char *value);

/** Indicates whether the working copy and normalized versions of a file
 * with the given the parameters differ.  If @a force_eol_check is TRUE,
 * the routine also accounts for all translations required due to repairing
 * fixed eol styles.
 *
 * @since New in 1.4
 *
 */
svn_boolean_t
svn_subst_translation_required(svn_subst_eol_style_t style,
                               const char *eol,
                               apr_hash_t *keywords,
                               svn_boolean_t special,
                               svn_boolean_t force_eol_check);


/** Values used in keyword expansion.
 *
 * @deprecated Provided for backward compatibility with the 1.2 API.
 */
typedef struct svn_subst_keywords_t
{
  /**
   * @name svn_subst_keywords_t fields
   * String expansion of the like-named keyword, or NULL if the keyword
   * was not selected in the svn:keywords property.
   * @{
   */
  const svn_string_t *revision;
  const svn_string_t *date;
  const svn_string_t *author;
  const svn_string_t *url;
  const svn_string_t *id;
  /** @} */
} svn_subst_keywords_t;


/**
 * Set @a *kw to a new keywords hash filled with the appropriate contents
 * given a @a keywords_string (the contents of the svn:keywords
 * property for the file in question), the revision @a rev, the @a url,
 * the @a date the file was committed on, the @a author of the last
 * commit, and the URL of the repository root @a repos_root_url.
 *
 * Custom keywords defined in svn:keywords properties are expanded
 * using the provided parameters and in accordance with the following
 * format substitutions in the @a keywords_string:
 *   %a   - The author.
 *   %b   - The basename of the URL.
 *   %d   - Short format of the date.
 *   %D   - Long format of the date.
 *   %P   - The file's path, relative to the repository root URL.
 *   %r   - The revision.
 *   %R   - The URL to the root of the repository.
 *   %u   - The URL of the file.
 *   %_   - A space (keyword definitions cannot contain a literal space).
 *   %%   - A literal '%'.
 *   %H   - Equivalent to %P%_%r%_%d%_%a.
 *   %I   - Equivalent to %b%_%r%_%d%_%a.
 *
 * Custom keywords are defined by appending '=' to the keyword name, followed
 * by a string containing any combination of the format substitutions.
 *
 * Any of the inputs @a rev, @a url, @a date, @a author, and @a repos_root_url
 * can be @c NULL, or @c 0 for @a date, to indicate that the information is
 * not present. Each piece of information that is not present expands to the
 * empty string wherever it appears in an expanded keyword value.  (This can
 * result in multiple adjacent spaces in the expansion of a multi-valued
 * keyword such as "Id".)
 *
 * Hash keys are of type <tt>const char *</tt>.
 * Hash values are of type <tt>svn_string_t *</tt>.
 *
 * All memory is allocated out of @a pool.
 *
 * @since New in 1.8.
 */
svn_error_t *
svn_subst_build_keywords3(apr_hash_t **kw,
                          const char *keywords_string,
                          const char *rev,
                          const char *url,
                          const char *repos_root_url,
                          apr_time_t date,
                          const char *author,
                          apr_pool_t *pool);



( run in 0.931 second using v1.01-cache-2.11-cpan-3d66aa2751a )