commit diffstat for openSUSE:Factory
Hello community, here is the log from the commit of package diffstat for openSUSE:Factory checked in at Wed Apr 1 17:04:45 CEST 2009. -------- --- diffstat/diffstat.changes 2008-09-11 13:47:14.000000000 +0200 +++ diffstat/diffstat.changes 2009-03-30 11:29:55.000000000 +0200 @@ -1,0 +2,6 @@ +Mon Mar 30 11:29:12 CEST 2009 - pgajdos@suse.cz + +- updated to 1.47 version: + * Modified to work with patch ".rej" files. + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- diffstat-1.46.diff diffstat-1.46.tar.bz2 New: ---- diffstat-1.47.diff diffstat-1.47.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ diffstat.spec ++++++ --- /var/tmp/diff_new_pack.Ih8965/_old 2009-04-01 17:03:49.000000000 +0200 +++ /var/tmp/diff_new_pack.Ih8965/_new 2009-04-01 17:03:49.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package diffstat (Version 1.46) +# spec file for package diffstat (Version 1.47) # -# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ Name: diffstat -Version: 1.46 +Version: 1.47 Release: 1 AutoReqProv: on Group: Productivity/Text/Utilities @@ -66,6 +66,9 @@ %{_bindir}/* %changelog +* Mon Mar 30 2009 pgajdos@suse.cz +- updated to 1.47 version: + * Modified to work with patch ".rej" files. * Thu Sep 11 2008 pgajdos@suse.cz - update to 1.46 version: * add "-S", "-D" and "-m" options to provide a way to show the amount ++++++ diffstat-1.46.diff -> diffstat-1.47.diff ++++++ ++++++ diffstat-1.46.tar.bz2 -> diffstat-1.47.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/diffstat-1.46/CHANGES new/diffstat-1.47/CHANGES --- old/diffstat-1.46/CHANGES 2008-08-07 02:37:18.000000000 +0200 +++ new/diffstat-1.47/CHANGES 2009-03-29 19:53:16.000000000 +0200 @@ -1,3 +1,12 @@ +29-Mar-2009 + diffstat 1.47 + + modify to work with patch ".rej" files, which do not have a header to + tell which file is affected. + + fix typo in usage message (reports by Moritz Barsnick, John McNamara, + Richard Quadling). + 06-Aug-2008 diffstat 1.46 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/diffstat-1.46/diffstat.c new/diffstat-1.47/diffstat.c --- old/diffstat-1.46/diffstat.c 2008-08-07 02:19:28.000000000 +0200 +++ new/diffstat-1.47/diffstat.c 2009-03-29 20:04:40.000000000 +0200 @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright 1994-2007,2008 by Thomas E. Dickey * + * Copyright 1994-2008,2009 by Thomas E. Dickey * * All Rights Reserved. * * * * Permission to use, copy, modify, and distribute this software and its * @@ -20,7 +20,7 @@ ******************************************************************************/ #ifndef NO_IDENT -static const char *Id = "$Id: diffstat.c,v 1.46 2008/08/07 00:19:28 tom Exp $"; +static const char *Id = "$Id: diffstat.c,v 1.47 2009/03/29 18:04:40 tom Exp $"; #endif /* @@ -28,6 +28,10 @@ * Author: T.E.Dickey * Created: 02 Feb 1992 * Modified: + * 29 Mar 2009, modify to work with patch ".rej" files, which have + * no filename header (use the name of the ".rej" + * file if it is available). + * 29 Sep 2008, fix typo in usage message. * 06 Aug 2008, add "-m", "-S" and "-D" options. * 05 Aug 2008, add "-q" option to suppress 0-files-changed * message (patch by Greg Norris). @@ -253,10 +257,10 @@ #define MARKS 4 /* each of +, - and ! */ typedef enum { - cInsert = 0, - cDelete, - cModify, - cEquals + cInsert = 0, + cDelete, + cModify, + cEquals } Change; #define InsOf(p) (p)->count[cInsert] /* "+" count inserted lines */ @@ -852,7 +856,7 @@ } static void -update_chunk(DATA *p, Change change) +update_chunk(DATA * p, Change change) { if (merge_opt) { p->pending += 1; @@ -863,7 +867,7 @@ } static void -finish_chunk(DATA *p) +finish_chunk(DATA * p) { int i; @@ -899,8 +903,10 @@ #define CASE_TRACE() TRACE(("** handle case for '%c' %d:%s\n", *buffer, ok, that ? that->name : "")) static void -do_file(FILE *fp) +do_file(FILE *fp, char *default_name) { + static const char *only_stars = "***************"; + DATA dummy; DATA *that = &dummy; DATA *prev = 0; @@ -964,6 +970,16 @@ TRACE(("[%05d] %s\n", line_no, buffer)); /* + * "patch -U" can create ".rej" files lacking a filename header, + * in unified format. Check for those. + */ + if (line_no == 1 && !strncmp(buffer, "@@", 2)) { + unified = 2; + that = find_data(default_name); + ok = begin_data(that); + } + + /* * The lines identifying files in a context diff depend on how it was * invoked. But after the header, each chunk begins with a line * containing 15 *'s. Each chunk may contain a line-range with '***' @@ -977,10 +993,15 @@ * lines to ensure we do not confuse the marker lines. */ marker = -1; - if (that != &dummy && !strcmp(buffer, "***************")) { + if (that != &dummy && !strcmp(buffer, only_stars)) { finish_chunk(that); TRACE(("** begin context chunk\n")); context = 2; + } else if (line_no == 1 && !strcmp(buffer, only_stars)) { + TRACE(("** begin context chunk\n")); + context = 2; + that = find_data(default_name); + ok = begin_data(that); } else if (context == 2 && match(buffer, "*** ")) { context = 1; } else if (context == 1 && match(buffer, "--- ")) { @@ -1659,7 +1680,6 @@ } printf("FILENAME\n"); } - #ifdef HAVE_TSEARCH if (use_tsearch) { twalk(sorted_data, show_tsearch); @@ -1747,7 +1767,7 @@ " -h print this message", " -k do not merge filenames", " -l list filenames only", - " -m merge insert/delete data in chunks as modified-lines" + " -m merge insert/delete data in chunks as modified-lines", " -n NUM specify minimum width for the filenames (default: auto)", " -o FILE redirect standard output to FILE", " -p NUM specify number of pathname-separators to strip (default: common)", @@ -1794,7 +1814,8 @@ max_width = 80; while ((j = getopt_helper(argc, argv, - "bcdD:e:f:hklmn:o:p:qr:S:tuvVw:", 'h', 'V')) != -1) { + "bcdD:e:f:hklmn:o:p:qr:S:tuvVw:", 'h', 'V')) + != -1) { switch (j) { case 'b': suppress_binary = 1; @@ -1899,7 +1920,7 @@ (void) fprintf(stderr, "%s\n", name); (void) fflush(stderr); } - do_file(fp); + do_file(fp, name); (void) pclose(fp); } free(command); @@ -1910,14 +1931,14 @@ (void) fprintf(stderr, "%s\n", name); (void) fflush(stderr); } - do_file(fp); + do_file(fp, name); (void) fclose(fp); } else { failed(name); } } } else { - do_file(stdin); + do_file(stdin, "unknown"); } summarize(); #if defined(NO_LEAKS) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de