1*0b459c2cSDavid du ColombierKnown problems: 2*0b459c2cSDavid du Colombier 3*0b459c2cSDavid du Colombier* The diffutils 2.7 documentation for `patch' is obsolete; this should be 4*0b459c2cSDavid du Colombier fixed in diffutils 2.8. Until then, see `patch --help' or `man patch'. 5*0b459c2cSDavid du Colombier 6*0b459c2cSDavid du ColombierChanges in version 2.5: 7*0b459c2cSDavid du Colombier 8*0b459c2cSDavid du Colombier* Version control is now independent of whether backups are made. 9*0b459c2cSDavid du Colombier The -V or --version-control option and the VERSION_CONTROL and 10*0b459c2cSDavid du Colombier PATCH_VERSION_CONTROL environment variables no longer affect whether 11*0b459c2cSDavid du Colombier backups are made; they affect only the names of the backup files. 12*0b459c2cSDavid du Colombier 13*0b459c2cSDavid du Colombier* When asking the user whether to reverse a patch, 14*0b459c2cSDavid du Colombier the default answer is now `no' instead of `yes'. 15*0b459c2cSDavid du Colombier 16*0b459c2cSDavid du Colombier* `patch' can now recognize context diffs that have been encapsulated 17*0b459c2cSDavid du Colombier by prepending "- " to lines beginning with "-" (as per Internet RFC 934). 18*0b459c2cSDavid du Colombier 19*0b459c2cSDavid du Colombier* `patch' now reports an error if the input contains garbage and no patches. 20*0b459c2cSDavid du Colombier 21*0b459c2cSDavid du ColombierChanges in version 2.4: 22*0b459c2cSDavid du Colombier 23*0b459c2cSDavid du Colombier* New options: 24*0b459c2cSDavid du Colombier -Z or --set-utc sets times of patched files, assuming diff uses UTC (GMT). 25*0b459c2cSDavid du Colombier -T or --set-time is similar, assuming local time (not recommended). 26*0b459c2cSDavid du Colombier --backup-if-mismatch makes a backup if the patch does not match exactly 27*0b459c2cSDavid du Colombier --no-backup-if-mismatch makes a backup only if otherwise requested 28*0b459c2cSDavid du Colombier 29*0b459c2cSDavid du Colombier* The default is now --backup-if-mismatch unless POSIXLY_CORRECT is set. 30*0b459c2cSDavid du Colombier 31*0b459c2cSDavid du Colombier* The -B or --prefix, -Y or --basename-prefix, and -z or --suffix options 32*0b459c2cSDavid du Colombier no longer affect whether backups are made (as they did in patch 2.2 and 2.3); 33*0b459c2cSDavid du Colombier they now merely specify the file names used when simple backups are made. 34*0b459c2cSDavid du Colombier 35*0b459c2cSDavid du Colombier* When patching a nonexistent file and making backups, an empty backup file 36*0b459c2cSDavid du Colombier is now made (just as with traditional patch); but the backup file is 37*0b459c2cSDavid du Colombier unreadable, as a way of indicating that it represents a nonexistent file. 38*0b459c2cSDavid du Colombier 39*0b459c2cSDavid du Colombier* `patch' now matches against empty and nonexistent files more generously. 40*0b459c2cSDavid du Colombier A patch against an empty file applies to a nonexistent file, and vice versa. 41*0b459c2cSDavid du Colombier 42*0b459c2cSDavid du Colombier* -g or --get and PATCH_GET now have a numeric value that specifies 43*0b459c2cSDavid du Colombier whether `patch' is getting files. 44*0b459c2cSDavid du Colombier If the value is positive, working files are gotten from RCS or SCCS files; 45*0b459c2cSDavid du Colombier if zero, `patch' ignores RCS and SCCS and working files are not gotten; 46*0b459c2cSDavid du Colombier and if negative, `patch' asks the user whether to get each file. 47*0b459c2cSDavid du Colombier The default is normally negative, but it is zero if POSIXLY_CORRECT is set. 48*0b459c2cSDavid du Colombier 49*0b459c2cSDavid du Colombier* The -G or --no-get option introduced in GNU patch 2.3 has been removed; 50*0b459c2cSDavid du Colombier use -g0 instead. 51*0b459c2cSDavid du Colombier 52*0b459c2cSDavid du Colombier* The method used to intuit names of files to be patched is changed again: 53*0b459c2cSDavid du Colombier `Index:' lines are normally ignored for context diffs, 54*0b459c2cSDavid du Colombier and RCS and SCCS files are normally looked for when files do not exist. 55*0b459c2cSDavid du Colombier The complete new method is described in the man page. 56*0b459c2cSDavid du Colombier 57*0b459c2cSDavid du Colombier* By default, `patch' is now more verbose when patches do not match exactly. 58*0b459c2cSDavid du Colombier 59*0b459c2cSDavid du Colombier* The manual page has a new COMPATIBILITY ISSUES section. 60*0b459c2cSDavid du Colombier 61*0b459c2cSDavid du ColombierChanges in version 2.3: 62*0b459c2cSDavid du Colombier 63*0b459c2cSDavid du Colombier* Unless the POSIXLY_CORRECT environment variable is set: 64*0b459c2cSDavid du Colombier 65*0b459c2cSDavid du Colombier - `patch' now distinguishes more accurately between empty and 66*0b459c2cSDavid du Colombier nonexistent files if the input is a context diff. 67*0b459c2cSDavid du Colombier A file is assumed to not exist if its context diff header 68*0b459c2cSDavid du Colombier suggests that it is empty, and if the header timestamp 69*0b459c2cSDavid du Colombier looks like it might be equivalent to 1970-01-01 00:00:00 UTC. 70*0b459c2cSDavid du Colombier - Files that ``become nonexistent'' after patching are now removed. 71*0b459c2cSDavid du Colombier When a file is removed, any empty ancestor directories are also removed. 72*0b459c2cSDavid du Colombier 73*0b459c2cSDavid du Colombier* Files are now automatically gotten from RCS and SCCS 74*0b459c2cSDavid du Colombier if the -g or --get option is specified. 75*0b459c2cSDavid du Colombier (The -G or --no-get option, also introduced in 2.3, was withdrawn in 2.4.) 76*0b459c2cSDavid du Colombier 77*0b459c2cSDavid du Colombier* If the PATCH_VERSION_CONTROL environment variable is set, 78*0b459c2cSDavid du Colombier it overrides the VERSION_CONTROL environment variable. 79*0b459c2cSDavid du Colombier 80*0b459c2cSDavid du Colombier* The method used to intuit names of files to be patched is changed. 81*0b459c2cSDavid du Colombier (It was further revised in 2.4; see above.) 82*0b459c2cSDavid du Colombier 83*0b459c2cSDavid du Colombier* The new --binary option makes `patch' read and write files in binary mode. 84*0b459c2cSDavid du Colombier This option has no effect on POSIX-compliant hosts; 85*0b459c2cSDavid du Colombier it is useful only in on operating systems like DOS 86*0b459c2cSDavid du Colombier that distinguish between text and binary I/O. 87*0b459c2cSDavid du Colombier 88*0b459c2cSDavid du Colombier* The environment variables TMP and TEMP are consulted for the name of 89*0b459c2cSDavid du Colombier the temporary directory if TMPDIR is not set. 90*0b459c2cSDavid du Colombier 91*0b459c2cSDavid du Colombier* A port to MS-DOS and MS-Windows is available; see the `pc' directory. 92*0b459c2cSDavid du Colombier 93*0b459c2cSDavid du Colombier* Backup file names are no longer ever computed by uppercasing characters, 94*0b459c2cSDavid du Colombier since this isn't portable to systems with case-insensitive file names. 95*0b459c2cSDavid du Colombier 96*0b459c2cSDavid du ColombierChanges in version 2.2: 97*0b459c2cSDavid du Colombier 98*0b459c2cSDavid du Colombier* Arbitrary limits removed (e.g. line length, file name length). 99*0b459c2cSDavid du Colombier 100*0b459c2cSDavid du Colombier* On POSIX.1-compliant hosts, you can now patch binary files using the output 101*0b459c2cSDavid du Colombier of GNU `diff -a'. 102*0b459c2cSDavid du Colombier 103*0b459c2cSDavid du Colombier* New options: 104*0b459c2cSDavid du Colombier --dry-run 105*0b459c2cSDavid du Colombier --help 106*0b459c2cSDavid du Colombier --verbose 107*0b459c2cSDavid du Colombier -i FILE or --input=FILE 108*0b459c2cSDavid du Colombier -Y PREF or --basename-prefix=PREF 109*0b459c2cSDavid du Colombier 110*0b459c2cSDavid du Colombier* patch is now quieter by default; use --verbose for the old chatty behavior. 111*0b459c2cSDavid du Colombier 112*0b459c2cSDavid du Colombier* Patch now complies better with POSIX.2 if your host complies with POSIX.1. 113*0b459c2cSDavid du Colombier 114*0b459c2cSDavid du Colombier Therefore: 115*0b459c2cSDavid du Colombier - By default, no backups are made. 116*0b459c2cSDavid du Colombier (But this was changed again in patch 2.4; see above.) 117*0b459c2cSDavid du Colombier - The simple backup file name for F defaults to F.orig 118*0b459c2cSDavid du Colombier regardless of whether the file system supports long file names, 119*0b459c2cSDavid du Colombier and F~ is used only if F.orig is too long for that particular file. 120*0b459c2cSDavid du Colombier - Similarly for the reject file names F.rej and F#. 121*0b459c2cSDavid du Colombier 122*0b459c2cSDavid du Colombier Also: 123*0b459c2cSDavid du Colombier - The pseudo-option `+' has been withdrawn. 124*0b459c2cSDavid du Colombier - -b is equivalent to --version-control=simple; 125*0b459c2cSDavid du Colombier `-z SUFF' has the meaning that `-b SUFF' used to. 126*0b459c2cSDavid du Colombier - Names of files to be patched are taken first from *** line and then from 127*0b459c2cSDavid du Colombier --- line of context diffs; then from Index: line; /dev/tty is 128*0b459c2cSDavid du Colombier consulted if none of the above files exist. However, if the patch 129*0b459c2cSDavid du Colombier appears to create a file, the file does not have to exist: instead, 130*0b459c2cSDavid du Colombier the first name with the longest existing directory prefix is taken. 131*0b459c2cSDavid du Colombier (These rules were changed again in patch 2.3 and 2.4; see above.) 132*0b459c2cSDavid du Colombier - Exit status 0 means success, 1 means hunks were rejected, 2 means trouble. 133*0b459c2cSDavid du Colombier - `-l' ignores changes only in spaces and tabs, not in other white space. 134*0b459c2cSDavid du Colombier - If no `-p' option is given, `-pINFINITY' is assumed, instead of trying 135*0b459c2cSDavid du Colombier to guess the proper value. 136*0b459c2cSDavid du Colombier - `-p' now requires an operand; use `-p 0' to get the effect of the old plain 137*0b459c2cSDavid du Colombier `-p' option. 138*0b459c2cSDavid du Colombier - `-p' treats two or more adjacent slashes as if it were one slash. 139*0b459c2cSDavid du Colombier - The TERM signal is caught. 140*0b459c2cSDavid du Colombier - New option `-i F' reads patch from F instead of stdin. 141*0b459c2cSDavid du Colombier 142*0b459c2cSDavid du Colombier* The `patch' options and build procedure conform to current GNU standards. 143*0b459c2cSDavid du Colombier For example, the `--version' option now outputs copyright information. 144*0b459c2cSDavid du Colombier 145*0b459c2cSDavid du Colombier* When the patch is creating a file, but a nonempty file of that name already 146*0b459c2cSDavid du Colombier exists, `patch' now asks for confirmation before patching. 147*0b459c2cSDavid du Colombier 148*0b459c2cSDavid du Colombier* RCS is used only if the version control method is `existing' 149*0b459c2cSDavid du Colombier and there is already an RCS file. Similarly for SCCS. 150*0b459c2cSDavid du Colombier (But this was changed again in patch 2.3 and 2.4; see above.) 151*0b459c2cSDavid du Colombier 152*0b459c2cSDavid du Colombier* Copyright notices have been clarified. Every file in this version of `patch' 153*0b459c2cSDavid du Colombier can be distributed under the GNU General Public License. See README for 154*0b459c2cSDavid du Colombier details. 155*0b459c2cSDavid du Colombier 156*0b459c2cSDavid du ColombierChanges in version 2.1: 157*0b459c2cSDavid du Colombier 158*0b459c2cSDavid du Colombier* A few more portability bugs have been fixed. The version number has 159*0b459c2cSDavid du Colombier been changed from 2.0.12g11 to 2.1, because the name 160*0b459c2cSDavid du Colombier `patch-2.0.12g10' was too long for traditional Unix file systems. 161*0b459c2cSDavid du Colombier 162*0b459c2cSDavid du ColombierVersions 2.0.12g9 through 2.0.12g11 fix various portability bugs. 163*0b459c2cSDavid du Colombier 164*0b459c2cSDavid du ColombierChanges in version 2.0.12g8: 165*0b459c2cSDavid du Colombier 166*0b459c2cSDavid du Colombier* Start of the 12g series, with a GNU-style configure script and 167*0b459c2cSDavid du Colombier long-named options. 168*0b459c2cSDavid du Colombier* Added the -t --batch option, similar to -f. 169*0b459c2cSDavid du Colombier* Improved detection of files that are locked under RCS or SCCS. 170*0b459c2cSDavid du Colombier* Reinstate the -E option to remove output files that are empty after 171*0b459c2cSDavid du Colombier being patched. 172*0b459c2cSDavid du Colombier* Print the system error message when system calls fail. 173*0b459c2cSDavid du Colombier* Fixed various bugs and portability problems. 174