[Lunar-commits] <lunar> Add sanity check: don't allow patch files to be submitted

Auke Kok sofar at foo-projects.org
Sun Aug 9 03:35:38 CEST 2009


commit 2d143d693cda096776dd5f51e72bfc11058b0a4f
Author: Auke Kok <sofar at foo-projects.org>
Date:   Sat Aug 8 18:35:38 2009 -0700

    Add sanity check: don't allow patch files to be submitted
---
 bin/lvu |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/bin/lvu b/bin/lvu
index b8ea52f..1853065 100755
--- a/bin/lvu
+++ b/bin/lvu
@@ -830,6 +830,18 @@ submit_module() {
       message "so that module changes can be tracked properly!"
       exit 1
     fi
+
+    # sanity checks
+    lvu diff $1 | diffstat -p0 -l | grep -e '.patch$' -e '.diff$' && (
+      echo ""
+      echo "Sanity check failed: patch files are not allowed inside moonbase"
+      echo "Please submit your patch files to the lunar-dev mailinglist and"
+      echo "Wait for one of the developers to upload them to \$PATCH_URL."
+      echo "Once that is done you can resubmit using that URL for the patch(es)"
+      exit 1
+    )
+
+
     TMP_MSG=$(temp_create "submission")
     TMP_MSG2=$(temp_create "submission")
     (


More information about the Lunar-commits mailing list