Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com Date: Wed, 8 Nov 2000 12:34:57 -0500 Message-Id: <200011081734.MAA23244@envy.delorie.com> X-Authentication-Warning: envy.delorie.com: dj set sender to dj AT envy DOT delorie DOT com using -f From: DJ Delorie To: Jason DOT Tishler AT dothill DOT com CC: cygwin-developers AT sources DOT redhat DOT com In-reply-to: <20001108085927.D388@dothill.com> (message from Jason Tishler on Wed, 8 Nov 2000 08:59:27 -0500) Subject: Re: Silly Patch Question References: <20001108085927 DOT D388 AT dothill DOT com> You might need the "-p0" option of patch, otherwise it strips off directory names. Plus, "cvs diff" strips directory names too. I have a script that puts them back on. Do "cvs diff -p2 ... | FixPatch > file.txt" #!/usr/bin/perl # -*- perl -*- while (<>) { s/\r//; if (/^Index: (\S+)/) { $full = $1; } if (/^(diff .* )\S+/) { $_ = "$1 $full\n"; $header = 1; } if ($header) { $header = 0 if /\*\*\*\*/; s/^--- \S+/--- $full/; s/^\+\+\+ \S+/\+\+\+ $full/; s/^\*\*\* \S+/\*\*\* $full/; } print; }