UPatch Command Line

Guiffy's UPatch command line interface provides a "patch" like non GUI tool. UPatch works with Unified Diff patch files. The file name arguments may be specified as relative (to the current directory) or absolute paths. UPatch scans the Patch file for the changes made to the Original file. Changes made to other files are skipped over.

UPatch scans both backward and forward to find the matching context for a change. If UPatch cannot find the context for a change, it writes that change (also called a chunk) to a reject file. The reject file is normally the name of the Output file plus a .rej suffix.

End-of-Line differences are ignored when matching context. Advanced options are provided for specifying End-of-Line and Encoding formats.

UPatch normally writes to stdout information about whats done such as number of changes applied and not applied. The -s option is available to supress this output.

NOTES:
To specify filenames including blanks, encapsulate the filename with double quotes.
To specify a UNC for a filename, use \\\\servername for the usual \\servername.

Usage:
upatch [-options] <Original file> <Patch file> <Output file>

Where options include:
-ed EOLs written for DOS
-em EOLs written for MacOS
-eu EOLs written for Unix
-enf spec Encoding for all files
For Example: -enfUnicodeLittle
-eno spec Encoding for Original file
For Example: -enoUnicodeLittle
-enp spec Encoding for Patch file
For Example: -enpUnicodeLittle
-enu spec Encoding for Output file
For Example: -enuUnicodeLittle
-h -help display this Help message
-r- Do not write rejects to reject file
-rrejectfile Write rejects to rejectfile instead of the default .rej file
For Example: -rMyPatchRejects.txt
-s -silent Do not Output to stdout any information about whats being done
-v -verbose Output to stderr extra information about whats being done
-w -white -I ignore all White space differences

Exit codes:
0 OK, Successful
1 Can't find Original file
2 Can't find Patch file
4 Can't read Original file
5 Can't read Patch file
7 Can't write Output file
8 Original file is a folder
9 Patch file is a folder
10 Patch file is not Unified Diff
11 Encoding not available
12 Unexpected Exception
13 Evaluation period expired
15 Not allowed, requires eXpert license
16 Patch not complete, one or more chunks not applied
17 Patch for Original file not found in Patch file
101 Invalid option
102 Missing file parameter

Documentation by Guiffy Software, Inc. 2015