merge(1) MPE/iX Shell and Utilities merge(1)
______________________________________________________________________
NAME
merge -- three-way file merge
SYNOPSIS
merge [-H] [-h] [-p] [-q] [-Z] file1 root file2 [mark1 [mark2]]
DESCRIPTION
merge incorporates all changes that lead from root to file2 into
file1. The result is stored in file1.
merge is useful for combining separate changes to an original.
Suppose root is the original, and both file1 and file2 are modi-
fications of root. Then, merge combines both changes.
An overlap occurs if both file1 and file2 have changes in a com-
mon segment of lines. merge prints how many overlaps occurred,
and includes both alternatives in the result. The alternatives
are delimited as follows:
<<<<<<< file1
lines in file1
=======
lines in file2
>>>>>>> file2
If there are overlaps, you should edit the result and delete one
of the alternatives.
Putting in a word or phrase for mark1 and/or mark2 lets you
change what is printed to mark overlapping lines in file1 and/or
file2. You must use double quotes if you substitute in a phrase
rather than a single word.
RCS users normally use rcsmerge(1) to access this functionality
rather than calling merge directly.
Options
merge accepts the following options:
-H tells diff to use the -H option when called by merge.
-h tells diff to use the -h option when called by merge.
-p sends the final result of the merge operation to the standard
output. Normally, merge stores the result in file1.
-q quiet mode; suppresses diagnostics.
-Z security mode; overwrites temporary files with null bytes
before unlinking.
1
merge(1) MPE/iX Shell and Utilities merge(1)
______________________________________________________________________
DIAGNOSTICS
Possible exit status values are:
0 Successful completion.
1 An error occurred.
Messages
Message: cannot find "diff3" command: system error
Cause: See syserror(3).
Action: See syserror(3).
Message: cannot rename "name1" to "name2": system error
Cause: See syserror(3).
Action: See syserror(3).
Message: child process: system error
Cause: See syserror(3).
Action: See syserror(3).
Message: failure on dup() or dup2() call: system error
Cause: See syserror(3).
Action: See syserror(3).
Message: filename: system error
Cause: See syserror(3).
Action: See syserror(3).
Message: memory allocation failure in strdup(): system error
Cause: See syserror(3).
Action: See syserror(3).
Message: no temporary files available
Cause: merge was unable to create a necessary temporary file,
probably because it could not create a new unique name
for the file.
Action: Make sure that your system has a directory for storing
temporary files (either /tmp, or another directory
indicated by the variable TMPDIR), and that this direc-
tory has both space for new files and appropriate per-
missions.
Message: temporary file "filename": system error
Cause: See syserror(3).
Action: See syserror(3).
Message: temporary output file: system error
Cause: See syserror(3).
Action: See syserror(3).
2
merge(1) MPE/iX Shell and Utilities merge(1)
______________________________________________________________________
Message: Unable to open file filename for zeroing: system error
Cause: See syserror(3).
Action: See syserror(3).
Message: Unable to stat file filename when unlinking: system
error
Cause: See syserror(3).
Action: See syserror(3).
Message: Unknown option "-option"
Cause: You specified an option that is not valid for merge.
Action: Check the DESCRIPTION section for a list of valid merge
options.
Message: Write error when zeroing file filename: system error
Cause: See syserror(3).
Action: See syserror(3).
PORTABILITY
All UNIX systems.
The options -H and -h are extensions to traditional implementa-
tions of merge. In traditional RCS implementations, merge is a
shell script.
LIMITS
Limits are those of diff3(1).
MPE/iX NOTES
For information on how the current MPE/iX implementation may
affect the operation of this utility, see Appendix A, MPE/iX
Implementation Considerations.
SEE ALSO
co(1), diff(1), diff3(1), rcsmerge(1)
3