home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / rcstxi11.zip / rcstexi.110 / merge.tex < prev    next >
Text File  |  1997-03-30  |  8KB  |  238 lines

  1. @c
  2. @c ================================================================================
  3. @c                               Edition 1.1
  4. @c                      of the Texinfo-manuals for the
  5. @c                      (R)evision (C)ontrol (S)ystem
  6. @c                               Version 5.7
  7. @c
  8. @c                  (c) 1982, 1988, 1989 Walter F. Tichy.
  9. @c           (c) 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert.
  10. @c        (c) 1996, 1997 Karl Heinz Marbaise (doing converting job)
  11. @c ================================================================================
  12. @c
  13. @c Discription:
  14. @c    three way file merge
  15. @c
  16. @c Authors:
  17. @c    Walter Tichy,
  18. @c    Paul Eggert,
  19. @c    Karl Heinz Marbaise (doing converting job)
  20. @c
  21. @c e-mail:
  22. @c    Internet: KHMarbaise@p69.ks.fido.de
  23. @c    Fido-net: 2:2452/117.69
  24. @c
  25. @c Bugs, question:
  26. @c    to above e-mail adress.
  27. @c
  28. @c License:
  29. @c    The "Texinfo Edition of the RCS V5.7 manuals" are free
  30. @c    software; you can redistribute it and/or modify it under
  31. @c    the terms of the GNU General Public License as published
  32. @c    by the Free Software Foundation; either version 2, or (at
  33. @c    your option) any later version.
  34. @c
  35. @c    The "Texinfo Edition of the RCS V5.7 manuals" are distributed
  36. @c    in the hope that they will be useful, but WITHOUT ANY WARRANTY;
  37. @c    without even the implied warranty of MERCHANTABILITY or
  38. @c    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
  39. @c    License for more details.
  40. @c
  41. @c    You should have received a copy of the GNU General Public License
  42. @c    along with the "Texinfo Edition of the RCS V5.7 manuals"; see the
  43. @c    file COPYING. If not, write to the:
  44. @c    Free Software Foundation,
  45. @c    59 Temple Place - Suite 330,
  46. @c    Boston, MA 02111-1307, USA.
  47. @c
  48. @c    See \rcstxi.110\COPYING for details.
  49. @c
  50. @c ================================================================================
  51. @c
  52. @c
  53. @c $Id: MERGE.TEX 1.2 1997/03/30 22:53:13 KHM Exp $
  54. @c
  55. @c =============================================================================
  56. @c merge -- three-way file merge
  57. @c -----------------------------------------------------------------------------
  58. @node merge,AppendixA,rlog,Top
  59. @chapter merge -- three-way file merge
  60. @cindex merge
  61. @cindex file merge
  62. @menu
  63. * mergeIntro::       Introduction to @code{merge}.
  64.  
  65. * mergeOptions::     command line options of @code{merge}.
  66. * mergeDiag::        Diagnostic output of @code{merge}.
  67. * mergeBugs::        Bugs.
  68.  
  69. @end menu
  70. @c =============================================================================
  71. @c merge -- three-way file merge
  72. @c     Description
  73. @c -----------------------------------------------------------------------------
  74. @node mergeIntro,mergeOptions,,merge
  75. @section Description
  76.  
  77. @code{merge}  incorporates  all  changes  that lead from @file{file2} to
  78. @file{file3} into @file{file1}.  The result ordinarily goes
  79. into  @file{file1}.
  80. merge is useful for combining separate changes to an original.
  81. Suppose @file{file2} is the original, and both  @file{file1} and
  82. @file{file3} are  modifications  of  @file{file2} .  Then merge combines
  83. both changes.
  84.  
  85. A conflict occurs if both @file{file1} and @file{file3} have changes  in
  86. a  common segment of lines.  If a conflict is found, merge
  87. normally outputs a warning and brackets the conflict  with
  88. @code{<<<<<<<}  and  @code{>>>>>>>} lines.  A typical conflict will look
  89. like this:
  90.  
  91. @example
  92. @group
  93. <<<<<<< file A
  94. lines in file A
  95. =======
  96. lines in file B
  97. >>>>>>> file B
  98. @end group
  99. @end example
  100.  
  101. If there are conflicts, the user should  edit  the  result
  102. and delete one of the alternatives.
  103. @c =============================================================================
  104. @c merge -- three-way file merge
  105. @c     Options
  106. @c -----------------------------------------------------------------------------
  107. @node mergeOptions,mergeDiag,mergeIntro,merge
  108. @section Command line options of merge
  109. @ifinfo
  110. Overview off all options which can be given to @code{merge}
  111.  
  112. @code{Synopsis}: merge [options] file1 file2 file3
  113. @end ifinfo
  114. @menu
  115. * mergeOptA::      -A Style of diff3.
  116. * mergeOptE::      -E Conflict style.
  117. * mergeOptL::      -L Labels.
  118. * mergeOptp::      -p Send to standard output.
  119. * mergeOptq::      -q Quite mode.
  120. * mergeOptV::      -V Version.
  121. @end menu
  122. @c =============================================================================
  123. @c merge -- three-way file merge
  124. @c     Options
  125. @c         option -A
  126. @c -----------------------------------------------------------------------------
  127. @node mergeOptA,mergeOptE,mergeOptions,mergeOptions
  128. @subsection Output conflicts
  129. @cindex -A
  130. @cindex Output conflicts
  131. @cindex diff3
  132. @table @code
  133. @item -A
  134.  
  135. Output conflicts using the @code{-A} style of @code{diff3}, if
  136. supported by diff3.  This merges all changes  leading
  137. from  @file{file2} to @file{file3} into @file{file1}, and generates
  138. the most verbose output.
  139. @end table
  140. @c =============================================================================
  141. @c merge -- three-way file merge
  142. @c     Options
  143. @c         option -E
  144. @c -----------------------------------------------------------------------------
  145. @node mergeOptE,mergeOptL,mergeOptA,mergeOptions
  146. @subsection Specify conflict styles
  147. @cindex -E
  148. @cindex -e
  149. @cindex conflict styles
  150. @cindex diff3
  151. @table @code
  152. @item -E -e
  153.  
  154. These options specify conflict styles that generate
  155. less   information   than  @code{-A}.   See  @code{diff3}  for
  156. details.  The default is @code{-E}.  With @code{-e},  merge  does
  157. not warn about conflicts.
  158. @end table
  159. @c =============================================================================
  160. @c merge -- three-way file merge
  161. @c     Options
  162. @c         option -L
  163. @c -----------------------------------------------------------------------------
  164. @node mergeOptL,mergeOptp,mergeOptE,mergeOptions
  165. @subsection Label
  166. @cindex -L
  167. @table @code
  168. @item -L@file{label}
  169.  
  170. This  option  may  be  given up to three times, and
  171. specifies labels to be used in place of the  corresponding
  172. file names in conflict reports.  That is,
  173. @code{merge -L x -L y -L z a b c}  generates  output  that
  174. looks like it came from files @file{x}, @file{y} and @file{z}instead of
  175. from files @file{a}, @file{b} and @file{c}.
  176.  
  177. @end table
  178. @c =============================================================================
  179. @c merge -- three-way file merge
  180. @c     Options
  181. @c         option -p
  182. @c -----------------------------------------------------------------------------
  183. @node mergeOptp,mergeOptq,mergeOptL,mergeOptions
  184. @subsection Standard output
  185. @cindex -p
  186. @cindex Standard output
  187. @table @code
  188. @item -p
  189.  
  190. Send results to standard output  instead  of  overwriting
  191. @file{file1}.
  192. @end table
  193. @c =============================================================================
  194. @c merge -- three-way file merge
  195. @c     Options
  196. @c         option -q
  197. @c -----------------------------------------------------------------------------
  198. @node mergeOptq,mergeOptV,mergeOptp,mergeOptions
  199. @subsection Quiet Mode
  200. @cindex -q
  201. @cindex Quiet mode
  202. @table @code
  203. @item -q
  204.  
  205. Quiet;  do  not  warn about conflicts.
  206. @end table
  207. @c =============================================================================
  208. @c merge -- three-way file merge
  209. @c     Options
  210. @c         option -V
  211. @c -----------------------------------------------------------------------------
  212. @node mergeOptV,,mergeOptq,mergeOptions
  213. @subsection Version
  214. @cindex -V
  215. @cindex Version
  216. @table @code
  217. @item -V
  218.  
  219. Print's version number.
  220. @end table
  221. @c =============================================================================
  222. @c merge -- three-way file merge
  223. @c     Diagnostics
  224. @c -----------------------------------------------------------------------------
  225. @node mergeDiag,mergeBugs,mergeOptions,merge
  226. @section Diagnostics
  227. Exit status is 0 for no conflicts, 1 for some conflicts, 2
  228. for trouble.
  229. @c =============================================================================
  230. @c merge -- three-way file merge
  231. @c     Bugs
  232. @c -----------------------------------------------------------------------------
  233. @node mergeBugs,,mergeDiag,merge
  234. @section Bugs
  235. It normally does not make sense to merge binary  files  as
  236. if they were text, but merge tries to do it anyway.
  237.  
  238.