delorie.com/archives/browse.cgi | search |
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; }
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |