NEWS 7.3 KB

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