1 05/12/81  merge_ascii, ma
  2 
  3 Syntax:  ma paths {-control_args}
  4 
  5 
  6 Function:  merges two or more related ASCII text segments.
  7 
  8 
  9 Arguments:
 10 paths
 11    are pathnames of segments to be merged as automatically as possible.
 12    The equal and ::  conventions are allowed.  Up to six segments can
 13    be merged, including those preceded by the -edit control_argument.
 14 
 15 
 16 Control arguments:
 17 -edit path
 18    merges the segment named path in a nonautomatic manner.  Edit mode
 19    is entered each time a modification is found in the specified
 20    segment.
 21 -minchars N
 22    specifies the minimum number of characters that must be identical
 23    for merge_ascii to assume blocks of text in different segments are
 24    identical.  The default value of minchars is 25.
 25 -minlines N
 26    specifies the minimum number of lines that must be identical for
 27    merge_ascii to assume blocks of text in different segments are
 28    identical.  The default value of of minlines is 2.
 29 
 30 
 31 -old_original path, -old_orig path
 32    identifies path as the pathname of a segment antecedent to the most
 33    recent common ancestor of the texts being merged and allows the
 34    automatic picking up of identical changes present in all the texts
 35    being merged.
 36 -original path, -orig path
 37    identifies path as the pathname of a segment containing the original
 38    version of the text.  The proper original is the most recent common
 39    ancestor of the texts being merged.  Overlapping changes, even if
 40    identical, cause edit mode to be entered.
 41 -output_file path, -of path
 42    put the merged output text in the segment named path.  (no ::
 43    convention)
 44 
 45 
 46 Notes:  The merge_ascii program is typically used to merge texts that
 47 have been independently modified by several users.  If an original
 48 version of the text is available, and if the user desires, merge_ascii
 49 performs the merge automatically, requiring user intervention only when
 50 overlapping modifications are detected.  When user intervention is
 51 required, merge_ascii displays line-numbered blocks of text and then
 52 enters edit mode allowing the user to choose lines from any text or
 53 insert new lines.
 54 
 55 
 56 When blocks of text are displayed, each line is preceded by a text
 57 identifier and a line number.  The text identifier A is reserved for
 58 the original, whether supplied or not.  The identifiers B-G are
 59 assigned to the texts being merged in the order in which their
 60 pathnames are encountered on the command line.  The identifier M is
 61 used for the merged output, if printed while in edit mode.
 62 
 63 
 64 The equal convention is allowed; equal processing is based on the first
 65 path argument in the command invocation.
 66 
 67 Either the -original or -old_original (but not both) control argument
 68 may be used to enable automatic merging.  If neither is supplied, edit
 69 mode is entered each time differences are found in the segments being
 70 merged.  The -old_original control argument should be used judiciously,
 71 only if appropriate, and the user fully understands the relationships
 72 between the texts being merged.
 73 
 74 
 75 List of edit requests:  In the syntax of the edit requests, <text_id>
 76    is the lowercase letter corresponding to the text identifier used by
 77    merge_ascii; <line_no> is a line number in the text segment.  Line
 78    numbers can be specified as "<" to address the first line or as ">"
 79    to specify the last line of a current block.
 80 <text_id>k
 81    copy current block from specified text (e.g., bk copies current
 82    block from text B).
 83 <text_id><line_no>k
 84    copy specified line from specified text (e.g., b5k copies line 5
 85    from text B).
 86 <text_id><line_no>,<line_no>k
 87    copy specified lines from specified text (e.g., b4,7k copies lines 4
 88    through 7 from text B).
 89 
 90 
 91 <text_id>p
 92    print current block from specified text (e.g., bp prints current
 93    block from text B).
 94 <text_id><line_no>p
 95    print specified line from specified text (e.g., b6p prints line 6
 96    from text B).
 97 <text_id><line_no>,<line_no>p
 98    print specified line from specified text (e.g., b12,16p prints lines
 99    12 through 16 from text B).
100 <text_id>d
101    delete the current block in specified text (e.g., md deletes the
102    current block in text M).
103 input
104    enter input mode.
105 .
106    return from input mode to edit mode.
107 
108 
109 go
110    exit editor and continue comparison.
111 quit
112    abort merge and return to command level.  If this request is given
113    during a merging procedure, all work is lost.  Work is not saved
114    unless merging is done from the beginning to the end of the
115    segments.
116 e
117    execute rest of line as a Multics command line.
118 x
119    display identifiers, current line numbers, and pathnames of each
120    text.
121 help
122    print a list of the edit requests and a brief explanation of each
123    one.
124 
125 
126 Notes on edit requests:  In any invocation of edit mode the current
127    block in each text is just the block of lines previously displayed.
128    The current block in text M is initially empty, and is grown as the
129    user selects or inputs lines.
130 
131    The print (p) and copy (k) requests may address any lines in any
132    text (A to M) known to merge_ascii.  The delete (d) request can only
133    be applied to the current block in text M, and has the effect of
134    undoing all edit requests made since changes were last displayed.
135 
136    Multiple edit requests, delimited by blanks, can be given on a
137    single request line.  However, the quit, go, input, and e requests
138    must not be followed by other requests.