From 67c0212353ce2c2d43782ccb203e5d25ebe1756a Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 4 Aug 2010 16:07:22 +0000 Subject: [PATCH] Delete mkpatch. Everything it does is already done by svn diff by default. llvm-svn: 110203 --- llvm/docs/DeveloperPolicy.html | 17 ++++++---------- llvm/utils/mkpatch | 37 ---------------------------------- 2 files changed, 6 insertions(+), 48 deletions(-) delete mode 100755 llvm/utils/mkpatch diff --git a/llvm/docs/DeveloperPolicy.html b/llvm/docs/DeveloperPolicy.html index 357c92956fd6..829860ccaa45 100644 --- a/llvm/docs/DeveloperPolicy.html +++ b/llvm/docs/DeveloperPolicy.html @@ -107,18 +107,13 @@ patches may not apply correctly if the underlying code changes between the time the patch was created and the time it is applied. -
  • Patches should be made with this command: -
    -
    -svn diff
    -
    -
    - or with the utility utils/mkpatch, which makes it easy to read - the diff.
  • +
  • Patches should be made with svn diff, or similar. If you use + a different tool, make sure it uses the diff -u format and + that it doesn't contain clutter which makes it hard to read.
  • -
  • Patches should not include differences in generated code such as the code - generated by autoconf or tblgen. The - utils/mkpatch utility takes care of this for you.
  • +
  • If you are modifying generated files, such as the top-level + configure script, please separate out those changes into + a separate patch from the rest of your changes.
  • When sending a patch to a mailing list, it is a good idea to send it as an diff --git a/llvm/utils/mkpatch b/llvm/utils/mkpatch deleted file mode 100755 index 2741563f041c..000000000000 --- a/llvm/utils/mkpatch +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# -# This script makes a patch for LLVM ensuring the correct diff options and -# putting the files in a standard review order. - - -function error { - retcode="$?" - echo "mkpatch: error: $1 ($retcode)" - exit 1 -} - -if [ ! -e llvm.spec.in ] ; then - error "Please change directory to the LLVM top source directory" -fi -if [ "$#" -ne 1 ] ; then - error "usage: utils/mkpatch [PATCH_NAME]" -fi -NAME="$1" -echo "mkpatch: Generating differences on top level files" -svn diff -N -x -u > "$NAME".patch.raw 2>&1 -echo "mkpatch: Generating differences on all directories" -svn diff -x -u >> "$NAME".patch.raw 2>&1 \ - autoconf docs utils include lib/System lib/Support lib/VMCore lib/AsmParser \ - lib/Bitcode lib/Analysis lib/Transforms lib/CodeGen lib/Target \ - lib/ExecutionEngine lib/Linker lib/MC \ - tools test unittests runtime projects examples Xcode - -echo "mkpatch: Removing cruft from the patch file" -sed -e '/^[?] .*/d' -e '/^cvs diff: Diffing/d' "$NAME".patch.raw | awk '\ -BEGIN { deleting = 0; } \ -/^Index: .*[.]cvs$/ { deleting = 1; fname=substr($0,7); \ - print "Skipping: ", fname > "/dev/stderr"; } \ -/^Index:.*/ && !/^Index: .*[.]cvs$/ { deleting = 0; } \ -{ if (! deleting) { print; } } ' > "$NAME".patch || \ - error "sed/awk cleanup failed" -