cvs-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cl2patch: invalid patch generated for merges


From: Alexandre Oliva
Subject: cl2patch: invalid patch generated for merges
Date: 18 Mar 2002 16:35:10 -0300
User-agent: Gnus/5.0805 (Gnus v5.8.5) Emacs/20.7

ChangeLog entries such as:

Index: ChangeLog
from  Alexandre Oliva  <address@hidden>

        Merged:
        2002-02-02  Joe User  <address@hidden>
        * fnord (grumble): Fix snafu.

would cause an incorrect patch to be generated by cl2patch, since Joe
User's entry would be regarded as the beginning of a new ChangeLog
entry.  With this patch, it won't, as long as it's indented with a
tab.  I'm not sure this is enough, but it works for me.  Opinions?

I'm checking this in for now.

Index: ChangeLog
from  Alexandre Oliva  <address@hidden>

        * cl2patch (printpatch): Don't take indented author entries as
        separate entries, but rather as part of a merge.

Index: cl2patch
===================================================================
RCS file: /cvsroot/cvs-utils/cvs-utils/cl2patch,v
retrieving revision 1.2
diff -u -p -r1.2 cl2patch
--- cl2patch 7 Apr 2000 13:01:45 -0000 1.2
+++ cl2patch 18 Mar 2002 19:20:26 -0000
@@ -1,14 +1,14 @@
 #! /bin/sh
 
-# cl2patch version 1.3
+# cl2patch version 1.4
 
-# Copyright (C) 1998, 1999, 2000 Free Software Foundation
+# Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation
 
 # This script is Free Software, and it can be copied, distributed and
 # modified as defined in the GNU General Public License.  A copy of
 # its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
 
-# Written by Alexandre Oliva <address@hidden>
+# Written by Alexandre Oliva <address@hidden>
 
 # usage: cl2patch [-D|-d DATE] [-r dir] [-a AUTHOR] -- \
 #            [ mypatch.diff ... | < mypatch.diff ] | \
@@ -196,7 +196,8 @@ inchangelog != 0 && /^(>?[Ff]rom|[Bb]y) 
     entry=entry "\n+" thisdate "  " author;
     next;
 }
-inchangelog != 0 && /[^ ]  [A-Za-z].*<address@hidden>/ { # author name
+# Ignore TAB-indented entries; assumed to be part of merges.
+inchangelog != 0 && /[^ ]  [A-Za-z].*<address@hidden>/ && ! /^[        ]/ { # 
author name
     author=$0;
     while (author !~ /^  [A-Za-z].*<address@hidden>/)
         author=substr(author, 2);
-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  address@hidden, redhat.com}
CS PhD student at IC-Unicamp        address@hidden, gnu.org}
Free Software Evangelist                Professional serial bug killer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]