1 | Changes in versions 2.5.8 and 2.5.9: bug fixes only.
|
---|
2 |
|
---|
3 | Changes in version 2.5.7:
|
---|
4 |
|
---|
5 | * patch -D now outputs preprocessor lines without comments, as required
|
---|
6 | by POSIX 1003.1-2001.
|
---|
7 |
|
---|
8 | Changes in version 2.5.6:
|
---|
9 |
|
---|
10 | * File names in context patches may now contain spaces, so long
|
---|
11 | as the context patch headers use a tab to separate the file name
|
---|
12 | from the time stamp.
|
---|
13 | * Perforce is now supported.
|
---|
14 | * Patch lines beginning with "#" are comments and are ignored.
|
---|
15 |
|
---|
16 | Changes in version 2.5.5:
|
---|
17 |
|
---|
18 | * The bug reporting address is now <bug-patch@gnu.org>.
|
---|
19 |
|
---|
20 | Changes in version 2.5.4:
|
---|
21 |
|
---|
22 | * A security hole has been closed.
|
---|
23 | It involved race conditions with temporary files.
|
---|
24 |
|
---|
25 | * The default quoting style is 'shell', which causes `patch' to quote
|
---|
26 | file names with funny characters like `$'. This prevents their
|
---|
27 | misinterpretation if you cut them from its output and paste them into
|
---|
28 | the shell.
|
---|
29 |
|
---|
30 | * `patch' now works correctly with large files on Large File Summit
|
---|
31 | hosts like Solaris 2.6.
|
---|
32 |
|
---|
33 | * `patch' now ignores trailing carriage returns in lines of context diffs
|
---|
34 | if the context diff headers end in carriage return.
|
---|
35 |
|
---|
36 | * `patch' now ignores context diff header file names that have fewer slashes
|
---|
37 | than the count specified by the -p or --strip option.
|
---|
38 |
|
---|
39 | * New options:
|
---|
40 | --posix
|
---|
41 | --quoting-style=WORD
|
---|
42 |
|
---|
43 | * New environment variables:
|
---|
44 | QUOTING_STYLE
|
---|
45 |
|
---|
46 | * `patch' now supports ClearCase version management.
|
---|
47 |
|
---|
48 | Changes in version 2.5:
|
---|
49 |
|
---|
50 | * Version control is now independent of whether backups are made.
|
---|
51 | The -V or --version-control option and the VERSION_CONTROL and
|
---|
52 | PATCH_VERSION_CONTROL environment variables no longer affect whether
|
---|
53 | backups are made; they affect only the names of the backup files.
|
---|
54 |
|
---|
55 | * When asking the user whether to reverse a patch,
|
---|
56 | the default answer is now `no' instead of `yes'.
|
---|
57 |
|
---|
58 | * `patch' can now recognize context diffs that have been encapsulated
|
---|
59 | by prepending "- " to lines beginning with "-" (as per Internet RFC 934).
|
---|
60 |
|
---|
61 | * `patch' now reports an error if the input contains garbage and no patches.
|
---|
62 |
|
---|
63 | Changes in version 2.4:
|
---|
64 |
|
---|
65 | * New options:
|
---|
66 | -Z or --set-utc sets times of patched files, assuming diff uses UTC (GMT).
|
---|
67 | -T or --set-time is similar, assuming local time (not recommended).
|
---|
68 | --backup-if-mismatch makes a backup if the patch does not match exactly
|
---|
69 | --no-backup-if-mismatch makes a backup only if otherwise requested
|
---|
70 |
|
---|
71 | * The default is now --backup-if-mismatch unless POSIXLY_CORRECT is set.
|
---|
72 |
|
---|
73 | * The -B or --prefix, -Y or --basename-prefix, and -z or --suffix options
|
---|
74 | no longer affect whether backups are made (as they did in patch 2.2 and 2.3);
|
---|
75 | they now merely specify the file names used when simple backups are made.
|
---|
76 |
|
---|
77 | * When patching a nonexistent file and making backups, an empty backup file
|
---|
78 | is now made (just as with traditional patch); but the backup file is
|
---|
79 | unreadable, as a way of indicating that it represents a nonexistent file.
|
---|
80 |
|
---|
81 | * `patch' now matches against empty and nonexistent files more generously.
|
---|
82 | A patch against an empty file applies to a nonexistent file, and vice versa.
|
---|
83 |
|
---|
84 | * -g or --get and PATCH_GET now have a numeric value that specifies
|
---|
85 | whether `patch' is getting files.
|
---|
86 | If the value is positive, working files are gotten from RCS or SCCS files;
|
---|
87 | if zero, `patch' ignores RCS and SCCS and working files are not gotten;
|
---|
88 | and if negative, `patch' asks the user whether to get each file.
|
---|
89 | The default is normally negative, but it is zero if POSIXLY_CORRECT is set.
|
---|
90 |
|
---|
91 | * The -G or --no-get option introduced in GNU patch 2.3 has been removed;
|
---|
92 | use -g0 instead.
|
---|
93 |
|
---|
94 | * The method used to intuit names of files to be patched is changed again:
|
---|
95 | `Index:' lines are normally ignored for context diffs,
|
---|
96 | and RCS and SCCS files are normally looked for when files do not exist.
|
---|
97 | The complete new method is described in the man page.
|
---|
98 |
|
---|
99 | * By default, `patch' is now more verbose when patches do not match exactly.
|
---|
100 |
|
---|
101 | * The manual page has a new COMPATIBILITY ISSUES section.
|
---|
102 | |
---|
103 |
|
---|
104 | Changes in version 2.3:
|
---|
105 |
|
---|
106 | * Unless the POSIXLY_CORRECT environment variable is set:
|
---|
107 |
|
---|
108 | - `patch' now distinguishes more accurately between empty and
|
---|
109 | nonexistent files if the input is a context diff.
|
---|
110 | A file is assumed to not exist if its context diff header
|
---|
111 | suggests that it is empty, and if the header timestamp
|
---|
112 | looks like it might be equivalent to 1970-01-01 00:00:00 UTC.
|
---|
113 | - Files that ``become nonexistent'' after patching are now removed.
|
---|
114 | When a file is removed, any empty ancestor directories are also removed.
|
---|
115 |
|
---|
116 | * Files are now automatically gotten from RCS and SCCS
|
---|
117 | if the -g or --get option is specified.
|
---|
118 | (The -G or --no-get option, also introduced in 2.3, was withdrawn in 2.4.)
|
---|
119 |
|
---|
120 | * If the PATCH_VERSION_CONTROL environment variable is set,
|
---|
121 | it overrides the VERSION_CONTROL environment variable.
|
---|
122 |
|
---|
123 | * The method used to intuit names of files to be patched is changed.
|
---|
124 | (It was further revised in 2.4; see above.)
|
---|
125 |
|
---|
126 | * The new --binary option makes `patch' read and write files in binary mode.
|
---|
127 | This option has no effect on POSIX-compliant hosts;
|
---|
128 | it is useful only in on operating systems like DOS
|
---|
129 | that distinguish between text and binary I/O.
|
---|
130 |
|
---|
131 | * The environment variables TMP and TEMP are consulted for the name of
|
---|
132 | the temporary directory if TMPDIR is not set.
|
---|
133 |
|
---|
134 | * A port to MS-DOS and MS-Windows is available; see the `pc' directory.
|
---|
135 |
|
---|
136 | * Backup file names are no longer ever computed by uppercasing characters,
|
---|
137 | since this isn't portable to systems with case-insensitive file names.
|
---|
138 | |
---|
139 |
|
---|
140 | Changes in version 2.2:
|
---|
141 |
|
---|
142 | * Arbitrary limits removed (e.g. line length, file name length).
|
---|
143 |
|
---|
144 | * On POSIX.1-compliant hosts, you can now patch binary files using the output
|
---|
145 | of GNU `diff -a'.
|
---|
146 |
|
---|
147 | * New options:
|
---|
148 | --dry-run
|
---|
149 | --help
|
---|
150 | --verbose
|
---|
151 | -i FILE or --input=FILE
|
---|
152 | -Y PREF or --basename-prefix=PREF
|
---|
153 |
|
---|
154 | * patch is now quieter by default; use --verbose for the old chatty behavior.
|
---|
155 |
|
---|
156 | * Patch now complies better with POSIX.2 if your host complies with POSIX.1.
|
---|
157 |
|
---|
158 | Therefore:
|
---|
159 | - By default, no backups are made.
|
---|
160 | (But this was changed again in patch 2.4; see above.)
|
---|
161 | - The simple backup file name for F defaults to F.orig
|
---|
162 | regardless of whether the file system supports long file names,
|
---|
163 | and F~ is used only if F.orig is too long for that particular file.
|
---|
164 | - Similarly for the reject file names F.rej and F#.
|
---|
165 |
|
---|
166 | Also:
|
---|
167 | - The pseudo-option `+' has been withdrawn.
|
---|
168 | - -b is equivalent to --version-control=simple;
|
---|
169 | `-z SUFF' has the meaning that `-b SUFF' used to.
|
---|
170 | - Names of files to be patched are taken first from *** line and then from
|
---|
171 | --- line of context diffs; then from Index: line; /dev/tty is
|
---|
172 | consulted if none of the above files exist. However, if the patch
|
---|
173 | appears to create a file, the file does not have to exist: instead,
|
---|
174 | the first name with the longest existing directory prefix is taken.
|
---|
175 | (These rules were changed again in patch 2.3 and 2.4; see above.)
|
---|
176 | - Exit status 0 means success, 1 means hunks were rejected, 2 means trouble.
|
---|
177 | - `-l' ignores changes only in spaces and tabs, not in other white space.
|
---|
178 | - If no `-p' option is given, `-pINFINITY' is assumed, instead of trying
|
---|
179 | to guess the proper value.
|
---|
180 | - `-p' now requires an operand; use `-p 0' to get the effect of the old plain
|
---|
181 | `-p' option.
|
---|
182 | - `-p' treats two or more adjacent slashes as if it were one slash.
|
---|
183 | - The TERM signal is caught.
|
---|
184 | - New option `-i F' reads patch from F instead of stdin.
|
---|
185 |
|
---|
186 | * The `patch' options and build procedure conform to current GNU standards.
|
---|
187 | For example, the `--version' option now outputs copyright information.
|
---|
188 |
|
---|
189 | * When the patch is creating a file, but a nonempty file of that name already
|
---|
190 | exists, `patch' now asks for confirmation before patching.
|
---|
191 |
|
---|
192 | * RCS is used only if the version control method is `existing'
|
---|
193 | and there is already an RCS file. Similarly for SCCS.
|
---|
194 | (But this was changed again in patch 2.3 and 2.4; see above.)
|
---|
195 |
|
---|
196 | * Copyright notices have been clarified. Every file in this version of `patch'
|
---|
197 | can be distributed under the GNU General Public License. See README for
|
---|
198 | details.
|
---|
199 | |
---|
200 |
|
---|
201 | Changes in version 2.1:
|
---|
202 |
|
---|
203 | * A few more portability bugs have been fixed. The version number has
|
---|
204 | been changed from 2.0.12g11 to 2.1, because the name
|
---|
205 | `patch-2.0.12g10' was too long for traditional Unix file systems.
|
---|
206 | |
---|
207 |
|
---|
208 | Versions 2.0.12g9 through 2.0.12g11 fix various portability bugs.
|
---|
209 | |
---|
210 |
|
---|
211 | Changes in version 2.0.12g8:
|
---|
212 |
|
---|
213 | * Start of the 12g series, with a GNU-style configure script and
|
---|
214 | long-named options.
|
---|
215 | * Added the -t --batch option, similar to -f.
|
---|
216 | * Improved detection of files that are locked under RCS or SCCS.
|
---|
217 | * Reinstate the -E option to remove output files that are empty after
|
---|
218 | being patched.
|
---|
219 | * Print the system error message when system calls fail.
|
---|
220 | * Fixed various bugs and portability problems.
|
---|
221 |
|
---|
222 | |
---|
223 |
|
---|
224 |
|
---|
225 | Copyright (C) 1992, 1993, 1997, 1998, 1999, 2000, 2001, 2002, 2003
|
---|
226 | Free Software Foundation, Inc.
|
---|
227 |
|
---|
228 | This file is part of GNU Patch.
|
---|
229 |
|
---|
230 | This program is free software; you can redistribute it and/or modify
|
---|
231 | it under the terms of the GNU General Public License as published by
|
---|
232 | the Free Software Foundation; either version 2, or (at your option)
|
---|
233 | any later version.
|
---|
234 |
|
---|
235 | This program is distributed in the hope that they will be useful,
|
---|
236 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
237 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
238 | GNU General Public License for more details.
|
---|
239 |
|
---|
240 | You should have received a copy of the GNU General Public License
|
---|
241 | along with this program; see the file COPYING. If not, write to
|
---|
242 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
---|
243 | Boston, MA 02111-1307, USA.
|
---|