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