From xemacs-m  Tue Jan 28 23:55:58 1997
Received: from dres.elam.org (dres@cola51.scsn.net [206.25.247.51])
          by xemacs.org (8.8.4/8.8.4) with ESMTP
	  id XAA29236 for <xemacs-beta@xemacs.org>; Tue, 28 Jan 1997 23:55:55 -0600 (CST)
Received: (from dres@localhost)
	by dres.elam.org (8.8.5/8.8.5) id AAA22644;
	Wed, 29 Jan 1997 00:52:21 -0500
To: xemacs-beta@xemacs.org
Subject: perl script for patch
Mime-Version: 1.0 (generated by tm-edit 7.100)
Content-Type: multipart/mixed;
 boundary="Multipart_Wed_Jan_29_00:52:19_1997-1"
Content-Transfer-Encoding: 7bit
From: James LewisMoss <dres@scsn.net>
Date: 29 Jan 1997 00:52:19 -0500
Message-ID: <hh680hxc30.fsf@dres.elam.org>
Lines: 52
X-Mailer: Gnus v5.2.40/XEmacs 20.0

--Multipart_Wed_Jan_29_00:52:19_1997-1
Content-Type: text/plain; charset=US-ASCII

Try the following perl script on patches made with cvs.  Made the last
patch file (b91 to b92) patch cleanly without using the newfiles tar
file.

Run it as cvs2patch.pl <patch file> > <new patch file>

Jim

--
@James LewisMoss                 | moss@cs.sc.edu | Blessed Be!
@    http://www.cs.sc.edu/~moss  | dres@scsn.net  | Linux is cool!
@"Argue for your limitations and sure enough, they're yours." Bach


--Multipart_Wed_Jan_29_00:52:19_1997-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="cvs2patch.pl"
Content-Transfer-Encoding: 7bit

#!/usr/bin/perl 

if($#ARGV != 0) {
    print "Need one and only one argument to this script\n";
}

if(open(PATCH, $ARGV[0])) {

    while(<PATCH>) {
        if(m/^Index:\s*(.*)$/) {
            $file_loc = $1;
            #print $file_loc . " is the pattern matched\n";
        }
        if(m/^\+\+\+\s*(\S*).*/) {
            #print $1 . " " . $file_loc . "\n";
            s/^\+\+\+\s*(\S*)(\s*)(.*)/+++ $file_loc$2$3/;
        }
        print;
    }
} else {
    print "No file " . $ARGV[0] . "found\n";
}

--Multipart_Wed_Jan_29_00:52:19_1997-1
Content-Type: text/plain; charset=US-ASCII




--Multipart_Wed_Jan_29_00:52:19_1997-1--

