A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2000-August/008217.html below:

[Python-Dev] Processing CVS diffs

[Python-Dev] Processing CVS diffs [Python-Dev] Processing CVS diffsMartin v. Loewis martin@loewis.home.cs.tu-berlin.de
Sat, 12 Aug 2000 11:29:25 +0200
While looking at the comments for Patch #100654, I noticed a complaint
about the patch being a CVS diff, which is not easily processed by
patch.

There is a simple solution to that: process the patch with the script
below. It will change the patch in-place, and it works well for me
even though it is written in the Evil Language :-)

Martin

#! /usr/bin/perl -wi
# Propagate the full pathname from the Index: line in CVS output into
# the diff itself so that patch will use it.
#  Thrown together by Jason Merrill <jason@cygnus.com>

while (<>)
{
  if (/^Index: (.*)/) 
    {
      $full = $1;
      print;
      for (1..7)
	{
	  $_ = <>;
	  s/ [^\t]+\t/ $full\t/;
	  print;
	}
    }
  else
    {
      print;
    }
}





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4