Factor out some merge code.
Factor out some merge code.

* subversion/libsvn_client/merge.c
  (open_source_session): New function, factored out ...
  (merge_locked, merge_peg_locked): ... of these.
  (find_reintegrate_merge): Take RA sessions and resolved source location as
    inputs rather than opening sessions and returning them.
  (open_reintegrate_source_and_target): New function, extracted from
    find_reintegrate_merge().
  (svn_client_find_reintegrate_merge, merge_reintegrate_locked): Use it.


git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@1302816 13f79535-47bb-0310-9956-ffa450edef68

YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion