150 Commits

Author SHA1 Message Date
Andreas Gruenbacher
018ff72892 * NEWS: Version 2.6.1 released. v2.6.1 2009-12-30 16:30:44 +01:00
Andreas Gruenbacher
9fef208ad7 * patch.man: Clarify the description of the -F / --fuzz option. 2009-12-30 14:54:10 +01:00
Andreas Gruenbacher
6b65755542 * patch.man: Try to improve the documentation of patch's CRLF handling
behavior.
2009-12-29 20:02:50 +01:00
Peter Breitenlohner
6af131f138 * Makefile.in: Make the test suite work for a VPATH build. 2009-12-29 18:41:47 +01:00
Andreas Gruenbacher
8cc8b7061c * src/patch.c (longopts, get_some_switches): Add an optional argument
to the --merge option to choose the output formats for conflicts.
* patch.man: Document the new optional argument of --merge.
* src/merge.c (merge_hunk): Implement diff3-style conflicts.
* src/common.h (conflict_style): This global variable determines the
output format for conflicts.
* tests/merge: Add test cases for the diff3 output format.
2009-12-29 17:03:14 +01:00
Andreas Gruenbacher
b9e8d7e28c * install-sh: Make executable. 2009-12-28 18:47:47 +01:00
Andreas Gruenbacher
3bea3d5bc9 * Makefile.in (getopt.h, GETOPT_H): Generate getopt.h in the top-level
directory if needed.
(stdbool.h, STDBOOL_H): Likewise -- this should fix stdbool.h
generation on platforms which don't provide this header.
(argmatch.$(OBJEXT)): Add missing $(STDBOOL_H) dependency.
2009-12-28 18:35:54 +01:00
Bert Wesarg
aa50fe4ff4 * configure.ac: It looks like the . command does not pass the
arguments to the update-version.sh script [on some platforms].  Invoke
with sh instead.
2009-12-28 17:54:56 +01:00
Andreas Gruenbacher
9336e93bda * configure.ac (gl_FUNC_STRNDUP, gl_FUNC_STRNLEN): Add here.
* gl/m4/strndup.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't use gnulib's
strings.h replacement for now, it is too complicated to add right now.
* gl/lib/xstrndup.c: Instead of using gl_HEADER_STRING_H_DEFAULTS,
declare strndup here on systems which don't have it.
* gl/lib/strndup.c: Instead of using gl_HEADER_STRING_H_DEFAULTS,
declare strnlen here on systems which don't have it.
* gl/lib/strnlen.c: Import from gnulib.
2009-12-28 17:46:08 +01:00
Andreas Gruenbacher
ab59a14a7b * src/pch.c: When the input files to diff have CRLF line endings, the
'<' and '>' lines of normal-style diffs will have CRLF endings even
when the patch itself has not been CRLF mangled.  Do not assume a
mangled patch in this case.
* tests/crlf-handling: Update test case to cover this case.
2009-12-28 15:14:20 +01:00
Andreas Gruenbacher
59ae87bd5b * tests/create-delete: Clean up a syntactic glitch. 2009-12-28 14:28:47 +01:00
Andreas Gruenbacher
e2218ace73 * src/pch.c (intuit_diff_type): Fix regression introduced after patch
2.5.9: when none of the filenames in the old, new, and index headers
exists, patch chose the wrong filename (bug 28367).
(maybe_reverse): Return if the patch looks reversed, not if this
function toggled the reverse flag.
* tests/filename-choice: New test case.
* Makefile.in (TESTS): Add test case.
2009-12-23 00:15:30 +01:00
Andreas Gruenbacher
84f303c1ef * src/pch.c (intuit_diff_type): Add some clarifying comments. 2009-12-22 20:31:43 +01:00
Andreas Gruenbacher
71a3f0d5cf * src/version.c (copyright_string): Add year 2009. 2009-12-22 20:30:22 +01:00
Andreas Gruenbacher
31a8f72983 Platform compatibility fixes in update-version.sh 2009-11-14 21:59:52 +01:00
Andreas Gruenbacher
f01f28263e Version 2.6 released v2.6 2009-11-13 15:10:28 +01:00
Andreas Gruenbacher
87f54e80e1 Clarify the message when (part of) a hunk cannot be merged 2009-10-27 16:46:25 +01:00
Andreas Gruenbacher
7f5e5b5ec1 Fix typo in patch.man (reported by Vytautas Šaltenis) 2009-10-27 16:38:02 +01:00
Andreas Gruenbacher
ba37782d74 Try to preserve the owning group of patched files 2009-09-04 13:55:32 +02:00
Andreas Gruenbacher
80d8b7827b Add the gnulib which were imported on 2009-06-05 to the tarball as well 2009-09-04 13:53:01 +02:00
Andreas Gruenbacher
62d03acb14 The -m option hasn't been officially allocated yet; use only the long form for now (--merge) 2009-07-19 17:50:54 +02:00
Andreas Gruenbacher
8c8cf43e87 When copying files, use full_write() from gnulib instead of write() 2009-07-19 16:37:11 +02:00
Andreas Gruenbacher
4e894668a7 Don't fail when removing nonexistent files in move_file 2009-06-15 23:31:47 +02:00
Andreas Gruenbacher
6d9e60f59a Import gnulib's rename() for platforms like Mingw 2009-06-05 21:57:06 +02:00
Andreas Gruenbacher
dee5d61753 To redirect messages, instead of assigning stderr to stdout, use dup2 2009-06-05 21:54:58 +02:00
Andreas Gruenbacher
4027b46b0f Include the subdirectory (gl/lib/) in GETOPT_H when using the gnulib version 2009-06-05 21:17:46 +02:00
Andreas Gruenbacher
2273a73529 Add some missing gnulib files 2009-06-05 21:08:01 +02:00
Andreas Gruenbacher
917aa4f4f1 When the file to patch is specified on the command line, apply all patches to that file 2009-05-12 21:55:35 +02:00
Andreas Gruenbacher
889d33db47 When merging, make sure that hunks will not end up "out of order" 2009-05-12 15:39:36 +02:00
Vincent Legoll
b008dece18 Change the default value of PATCH_GET to 0
Patch should default to not try to get files from revision control software
unless actively asked by the user with the "-g" or "--get" command-line
switches, or the PATCH_GET environment variable.

Make the posixly correct behaviour of not using source control, the global
patch default. I.e. default to "-g0".

This is related to debian BTS bug: #200895
Please refer to that discussion for more background
information and discussion.
2009-05-12 14:32:15 +02:00
Andreas Gruenbacher
e41a32b1d9 Portability improvements in update-version.sh 2009-04-11 13:50:24 +02:00
Andreas Gruenbacher
70df4e46b3 Don't forget to NUL terminate ptimestr in fetchname() 2009-04-08 16:37:57 +02:00
Andreas Gruenbacher
c59af953e8 Allow special characters in filenames read interactively 2009-04-08 12:28:33 +02:00
Andreas Gruenbacher
2e583114c7 Add support for sending output to standard output 2009-04-08 06:23:11 +02:00
Andreas Gruenbacher
7e2373f062 Remove redundant check in main(). 2009-04-08 06:19:20 +02:00
Andreas Gruenbacher
da45b67685 Preserve timestamps in reject files 2009-04-07 22:03:49 +02:00
Andreas Gruenbacher
aba1379506 Improve the description of --binary in patch.man 2009-04-07 13:58:07 +02:00
Andreas Gruenbacher
ad10c164f3 Suppress some unwanted output 2009-04-07 02:44:45 +02:00
Andreas Gruenbacher
b7a82a44b8 Update NEWS 2009-04-07 02:12:46 +02:00
Andreas Gruenbacher
7a4abf4e56 Update .gitignore 2009-04-07 02:15:14 +02:00
Andreas Gruenbacher
657b2a86e7 Optionally also create bzip2 and xz tarballs 2009-04-07 02:01:34 +02:00
Andreas Gruenbacher
5e17eeea55 Fix out-of-tree builds 2009-04-07 01:45:24 +02:00
Andreas Gruenbacher
2782a52315 Adapt file_id_hasher() to Gnulib type change 2009-04-07 01:28:13 +02:00
Christian Franke
d35880278d patch -Z not working if timestamp contains seconds > 59.5
Hi,

this is from a recent discussion in the cygwin mailing list:
(http://cygwin.com/ml/cygwin/2006-04/msg00699.html)

The patch options -Z and -T do not set filetime if the seconds part
of the timestamp is greater 59.5. This is because maketime() does
not handle denormalized times and returns an error on tm_sec = 60.

The bug could also be reproduced with patch 2.5.9 on Linux.

It might be better to ignore the fractional part of the second at all.
This would make timestamps set by patch identical to those set by tar.

[agruen: Christian's second version of the patch.]
2009-04-06 17:57:50 +02:00
Andreas Gruenbacher
c7d14511bf Phrase things a little better 2009-04-06 16:54:28 +02:00
Andreas Gruenbacher
327c939155 Add config.guess and config.sub to the dist tarball 2009-04-06 13:02:51 +02:00
Andreas Gruenbacher
b3a9ff4f13 Fix the "patch would create" fix from 2009-03-28 2009-04-06 05:47:52 +02:00
Andreas Gruenbacher
fea737a1b5 Document that merging can be slow 2009-04-05 23:46:02 +02:00
Andreas Gruenbacher
a03f22893c Copyright notice updates 2009-04-05 21:12:30 +02:00
Andreas Gruenbacher
99c2da6f0b Add a similar asymmetric hunk check to locate_merge() 2009-04-05 20:40:55 +02:00