/[Apache-SVN]
ViewVC logotype

Revision 1783500


Jump to revision: Previous Next
Author: stsp
Date: Sat Feb 18 10:38:20 2017 UTC (7 years, 1 month ago)
Changed paths: 3
Log Message:
Allow the conflict resolver to recommend resolution options and implement
support for this feature in 'svn resolve'.

Clients can now avoid interactive prompting in cases where resolution
succeeds with the recommended resolution option.

Recommendations are hard-coded in libsvn_client. Since only one possible
option should be recommended, and clients are free to ignore recommendations
made by libsvn_client, I don't see a point in making this configurable.

At present libsvn_client only recommends options for tree conflicts which
involve unambiguous moves, but this is an implementation detail.

In the future, we may want to add an override to 'svn resolve', such as a
new '--accept ask' option, for people who enjoy the conflict prompt so much
that they want to see it all the time.

* subversion/include/svn_client.h
  (svn_client_conflict_get_recommended_option_id): Declare.
  (svn_client_conflict_tree_resolve): Add another error code to the docstring.
   Knowing these error code is now important to client implementors because a
   recommended option may fail to resolve a conflict, in which case clients
   should fall back to trying other options (and, usually, prompting).

* subversion/libsvn_client/conflicts.c
  (svn_client_conflict_t): Add 'recommended_option_id' field.
  (init_wc_move_targets): Recommend options for resolving tree conflicts
   involving unambiguous moves.
  (svn_client_conflict_get_recommended_option_id): New.
  (svn_client_conflict_get): Initialize 'recommended_option_id' field.
   
* subversion/svn/conflict-callbacks.c
  (client_option_t) Add 'is_recommended' flag.
  (find_recommended_option): New helper function.
  (find_option_by_builtin): Add a 'conflict' paramter. Set 'is_recommended'
   flag for recommended options.
  (build_text_conflict_options, build_prop_conflict_options,
   build_tree_conflict_options): Adjust callers of find_option_by_builtin().
  (handle_tree_conflict): If an option is recommended, try it before falling
   back to the interactive conflict prompt.


Changed paths

Path Details
Directorysubversion/trunk/subversion/include/svn_client.h modified , text changed
Directorysubversion/trunk/subversion/libsvn_client/conflicts.c modified , text changed
Directorysubversion/trunk/subversion/svn/conflict-callbacks.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26