Alien-SVN

 view release on metacpan or  search on metacpan

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

/** Return a duplicate of @a conflict, allocated in @a result_pool.
 * A deep copy of all members will be made.
 *
 * @since New in 1.7.
 */
svn_wc_conflict_description2_t *
svn_wc__conflict_description2_dup(
  const svn_wc_conflict_description2_t *conflict,
  apr_pool_t *result_pool);


/** The way in which the conflict callback chooses a course of action.
 *
 * @since New in 1.5.
 */
typedef enum svn_wc_conflict_choice_t
{
  /** Don't resolve the conflict now.  Let libsvn_wc mark the path
     'conflicted', so user can run 'svn resolved' later. */
  svn_wc_conflict_choose_postpone,

  /** If there were files to choose from, select one as a way of
     resolving the conflict here and now.  libsvn_wc will then do the
     work of "installing" the chosen file.
  */
  svn_wc_conflict_choose_base,            /**< original version */
  svn_wc_conflict_choose_theirs_full,     /**< incoming version */
  svn_wc_conflict_choose_mine_full,       /**< own version */
  svn_wc_conflict_choose_theirs_conflict, /**< incoming (for conflicted hunks) */
  svn_wc_conflict_choose_mine_conflict,   /**< own (for conflicted hunks) */
  svn_wc_conflict_choose_merged,          /**< merged version */

  /* @since New in 1.8. */
  svn_wc_conflict_choose_unspecified      /**< undecided */

} svn_wc_conflict_choice_t;


/** The final result returned by #svn_wc_conflict_resolver_func_t.
 *
 * @note Fields may be added to the end of this structure in future
 * versions.  Therefore, to preserve binary compatibility, users
 * should not directly allocate structures of this type.  Instead,
 * construct this structure using svn_wc_create_conflict_result()
 * below.
 *
 * @since New in 1.5.
 */
typedef struct svn_wc_conflict_result_t
{
  /** A choice to either delay the conflict resolution or select a
      particular file to resolve the conflict. */
  svn_wc_conflict_choice_t choice;

  /** If not NULL, this is a path to a file which contains the client's
      (or more likely, the user's) merging of the three values in
      conflict.  libsvn_wc accepts this file if (and only if) @c choice
      is set to #svn_wc_conflict_choose_merged.*/
  const char *merged_file;

  /** If true, save a backup copy of merged_file (or the original
      merged_file from the conflict description, if merged_file is
      NULL) in the user's working copy. */
  svn_boolean_t save_merged;

} svn_wc_conflict_result_t;


/**
 * Allocate an #svn_wc_conflict_result_t structure in @a pool,
 * initialize and return it.
 *
 * Set the @c choice field of the structure to @a choice, @c merged_file
 * to @a merged_file, and @c save_merged to false.  Make only a shallow
 * copy of the pointer argument @a merged_file.
 *
 * @since New in 1.5.
 */
svn_wc_conflict_result_t *
svn_wc_create_conflict_result(svn_wc_conflict_choice_t choice,
                              const char *merged_file,
                              apr_pool_t *pool);


/** A callback used in merge, update and switch for resolving conflicts
 * during the application of a tree delta to a working copy.
 *
 * @a description describes the exact nature of the conflict, and
 * provides information to help resolve it.  @a baton is a closure
 * object; it should be provided by the implementation, and passed by
 * the caller.  When finished, the callback signals its resolution by
 * returning a structure in @a *result, which should be allocated in
 * @a result_pool.  (See #svn_wc_conflict_result_t.)  @a scratch_pool
 * should be used for any temporary allocations.
 *
 * The values #svn_wc_conflict_choose_mine_conflict and
 * #svn_wc_conflict_choose_theirs_conflict are not legal for conflicts
 * in binary files or binary properties.
 *
 * Implementations of this callback are free to present the conflict
 * using any user interface.  This may include simple contextual
 * conflicts in a file's text or properties, or more complex
 * 'tree'-based conflicts related to obstructed additions, deletions,
 * and edits.  The callback implementation is free to decide which
 * sorts of conflicts to handle; it's also free to decide which types
 * of conflicts are automatically resolvable and which require user
 * interaction.
 *
 * @since New in 1.7.
 */
typedef svn_error_t *(*svn_wc_conflict_resolver_func2_t)(
  svn_wc_conflict_result_t **result,
  const svn_wc_conflict_description2_t *description,
  void *baton,
  apr_pool_t *result_pool,
  apr_pool_t *scratch_pool);


/** Similar to #svn_wc_conflict_resolver_func2_t, but using
 * #svn_wc_conflict_description_t instead of
 * #svn_wc_conflict_description2_t

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


/**
 * Similar to svn_wc_remove_from_revision_control2() but with a name
 * and access baton.
 *
 * WARNING:  This routine was exported for careful, measured use by
 * libsvn_client.  Do *not* call this routine unless you really
 * understand what the heck you're doing.
 *
 * @deprecated Provided for compatibility with the 1.6 API
 */
SVN_DEPRECATED
svn_error_t *
svn_wc_remove_from_revision_control(svn_wc_adm_access_t *adm_access,
                                    const char *name,
                                    svn_boolean_t destroy_wf,
                                    svn_boolean_t instant_error,
                                    svn_cancel_func_t cancel_func,
                                    void *cancel_baton,
                                    apr_pool_t *pool);


/**
 * Assuming @a local_abspath is under version control or a tree conflict
 * victim and in a state of conflict, then take @a local_abspath *out*
 * of this state.  If @a resolve_text is TRUE then any text conflict is
 * resolved, if @a resolve_tree is TRUE then any tree conflicts are
 * resolved. If @a resolve_prop is set to "" all property conflicts are
 * resolved, if it is set to any other string value, conflicts on that
 * specific property are resolved and when resolve_prop is NULL, no
 * property conflicts are resolved.
 *
 * If @a depth is #svn_depth_empty, act only on @a local_abspath; if
 * #svn_depth_files, resolve @a local_abspath and its conflicted file
 * children (if any); if #svn_depth_immediates, resolve @a local_abspath
 * and all its immediate conflicted children (both files and directories,
 * if any); if #svn_depth_infinity, resolve @a local_abspath and every
 * conflicted file or directory anywhere beneath it.
 *
 * If @a conflict_choice is #svn_wc_conflict_choose_base, resolve the
 * conflict with the old file contents; if
 * #svn_wc_conflict_choose_mine_full, use the original working contents;
 * if #svn_wc_conflict_choose_theirs_full, the new contents; and if
 * #svn_wc_conflict_choose_merged, don't change the contents at all,
 * just remove the conflict status, which is the pre-1.5 behavior.
 *
 * #svn_wc_conflict_choose_theirs_conflict and
 * #svn_wc_conflict_choose_mine_conflict are not legal for binary
 * files or properties.
 *
 * @a wc_ctx is a working copy context, with a write lock, for @a
 * local_abspath.
 *
 * Needless to say, this function doesn't touch conflict markers or
 * anything of that sort -- only a human can semantically resolve a
 * conflict.  Instead, this function simply marks a file as "having
 * been resolved", clearing the way for a commit.
 *
 * The implementation details are opaque, as our "conflicted" criteria
 * might change over time.  (At the moment, this routine removes the
 * three fulltext 'backup' files and any .prej file created in a conflict,
 * and modifies @a local_abspath's entry.)
 *
 * If @a local_abspath is not under version control and not a tree
 * conflict, return #SVN_ERR_ENTRY_NOT_FOUND. If @a path isn't in a
 * state of conflict to begin with, do nothing, and return #SVN_NO_ERROR.
 *
 * If @c local_abspath was successfully taken out of a state of conflict,
 * report this information to @c notify_func (if non-@c NULL.)  If only
 * text, only property, or only tree conflict resolution was requested,
 * and it was successful, then success gets reported.
 *
 * Temporary allocations will be performed in @a scratch_pool.
 *
 * @since New in 1.7.
 */
svn_error_t *
svn_wc_resolved_conflict5(svn_wc_context_t *wc_ctx,
                          const char *local_abspath,
                          svn_depth_t depth,
                          svn_boolean_t resolve_text,
                          const char *resolve_prop,
                          svn_boolean_t resolve_tree,
                          svn_wc_conflict_choice_t conflict_choice,
                          svn_cancel_func_t cancel_func,
                          void *cancel_baton,
                          svn_wc_notify_func2_t notify_func,
                          void *notify_baton,
                          apr_pool_t *scratch_pool);

/** Similar to svn_wc_resolved_conflict5, but takes an absolute path
 * and an access baton. This version doesn't support resolving a specific
 * property.conflict.
 *
 * @since New in 1.6.
 * @deprecated Provided for backward compatibility with the 1.6 API.
 */
SVN_DEPRECATED
svn_error_t *
svn_wc_resolved_conflict4(const char *path,
                          svn_wc_adm_access_t *adm_access,
                          svn_boolean_t resolve_text,
                          svn_boolean_t resolve_props,
                          svn_boolean_t resolve_tree,
                          svn_depth_t depth,
                          svn_wc_conflict_choice_t conflict_choice,
                          svn_wc_notify_func2_t notify_func,
                          void *notify_baton,
                          svn_cancel_func_t cancel_func,
                          void *cancel_baton,
                          apr_pool_t *pool);


/**
 * Similar to svn_wc_resolved_conflict4(), but without tree-conflict
 * resolution support.
 *
 * @since New in 1.5.
 * @deprecated Provided for backward compatibility with the 1.5 API.
 */
SVN_DEPRECATED

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


} svn_wc_merge_outcome_t;

/** Given absolute paths to three fulltexts, merge the differences between
 * @a left_abspath and @a right_abspath into @a target_abspath.
 * It may help to know that @a left_abspath, @a right_abspath and @a
 * target_abspath correspond to "OLDER", "YOURS", and "MINE",
 * respectively, in the diff3 documentation.
 *
 * @a wc_ctx should contain a write lock for the directory containing @a
 * target_abspath.
 *
 * This function assumes that @a left_abspath and @a right_abspath are
 * in repository-normal form (linefeeds, with keywords contracted); if
 * necessary, @a target_abspath is temporarily converted to this form to
 * receive the changes, then translated back again.
 *
 * If @a target_abspath is absent, or present but not under version
 * control, then set @a *merge_content_outcome to #svn_wc_merge_no_merge and
 * return success without merging anything.  (The reasoning is that if
 * the file is not versioned, then it is probably unrelated to the
 * changes being considered, so they should not be merged into it.
 * Furthermore, merging into an unversioned file is a lossy operation.)
 *
 * @a dry_run determines whether the working copy is modified.  When it
 * is @c FALSE the merge will cause @a target_abspath to be modified, when
 * it is @c TRUE the merge will be carried out to determine the result but
 * @a target_abspath will not be modified.
 *
 * If @a diff3_cmd is non-NULL, then use it as the diff3 command for
 * any merging; otherwise, use the built-in merge code.  If @a
 * merge_options is non-NULL, either pass its elements to @a diff3_cmd or
 * parse it and use as options to the internal merge code (see
 * svn_diff_file_options_parse()).  @a merge_options must contain
 * <tt>const char *</tt> elements.
 *
 * If @a merge_props_state is non-NULL, merge @a prop_diff into the
 * working properties before merging the text.  (If @a merge_props_state
 * is NULL, do not merge any property changes; in this case, @a prop_diff
 * is only used to help determine the text merge result.)  Handle any
 * conflicts as described for svn_wc_merge_props3(), with the parameters
 * @a dry_run, @a conflict_func and @a conflict_baton.  Return the
 * outcome of the property merge in @a *merge_props_state.
 *
 * The outcome of the text merge is returned in @a *merge_content_outcome. If
 * there is a conflict and @a dry_run is @c FALSE, then attempt to call @a
 * conflict_func with @a conflict_baton (if non-NULL).  If the
 * conflict callback cannot resolve the conflict, then:
 *
 *   * Put conflict markers around the conflicting regions in
 *     @a target_abspath, labeled with @a left_label, @a right_label, and
 *     @a target_label.  (If any of these labels are @c NULL, default
 *     values will be used.)
 *
 *   * Copy @a left_abspath, @a right_abspath, and the original @a
 *     target_abspath to unique names in the same directory as @a
 *     target_abspath, ending with the suffixes ".LEFT_LABEL", ".RIGHT_LABEL",
 *     and ".TARGET_LABEL" respectively.
 *
 *   * Mark @a target_abspath as "text-conflicted", and track the above
 *     mentioned backup files as well.
 *
 *   * If @a left_version and/or @a right_version are not NULL, provide
 *     these values to the conflict handler and track these while the conflict
 *     exists.
 *
 * Binary case:
 *
 *  If @a target_abspath is a binary file, then no merging is attempted,
 *  the merge is deemed to be a conflict.  If @a dry_run is @c FALSE the
 *  working @a target_abspath is untouched, and copies of @a left_abspath and
 *  @a right_abspath are created next to it using @a left_label and
 *  @a right_label. @a target_abspath is marked as "text-conflicted", and
 *  begins tracking the two backup files and the version information.
 *
 * If @a dry_run is @c TRUE no files are changed.  The outcome of the merge
 * is returned in @a *merge_content_outcome.
 * ### (and what about @a *merge_props_state?)
 *
 * ### BH: Two kinds of outcome is not how it should be.
 *
 * ### For text, we report the outcome as 'merged' if there was some
 *     incoming change that we dealt with (even if we decided to no-op?)
 *     but the callers then convert this outcome into a notification
 *     of 'merged' only if there was already a local modification;
 *     otherwise they notify it as simply 'updated'.  But for props
 *     we report a notify state of 'merged' here if there was an
 *     incoming change regardless of the local-mod state.  Inconsistent.
 *
 * Use @a scratch_pool for any temporary allocation.
 *
 * @since New in 1.8.
 */
svn_error_t *
svn_wc_merge5(enum svn_wc_merge_outcome_t *merge_content_outcome,
              enum svn_wc_notify_state_t *merge_props_state,
              svn_wc_context_t *wc_ctx,
              const char *left_abspath,
              const char *right_abspath,
              const char *target_abspath,
              const char *left_label,
              const char *right_label,
              const char *target_label,
              const svn_wc_conflict_version_t *left_version,
              const svn_wc_conflict_version_t *right_version,
              svn_boolean_t dry_run,
              const char *diff3_cmd,
              const apr_array_header_t *merge_options,
              apr_hash_t *original_props,
              const apr_array_header_t *prop_diff,
              svn_wc_conflict_resolver_func2_t conflict_func,
              void *conflict_baton,
              svn_cancel_func_t cancel_func,
              void *cancel_baton,
              apr_pool_t *scratch_pool);

/** Similar to svn_wc_merge5() but with @a merge_props_state and @a
 * original_props always passed as NULL.
 *
 * Unlike svn_wc_merge5(), this function doesn't merge property
 * changes.  Callers of this function must first use
 * svn_wc_merge_props3() to get this functionality.
 *
 * @since New in 1.7.
 * @deprecated Provided for backwards compatibility with the 1.7 API.
 */
SVN_DEPRECATED
svn_error_t *
svn_wc_merge4(enum svn_wc_merge_outcome_t *merge_outcome,
              svn_wc_context_t *wc_ctx,
              const char *left_abspath,
              const char *right_abspath,
              const char *target_abspath,
              const char *left_label,



( run in 0.481 second using v1.01-cache-2.11-cpan-97f6503c9c8 )