[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] * Script to automatically generate patches for submission.
commit d0fc26388841afcbcea439adb32e02a53c8c6f19
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date: Wed Oct 31 23:06:35 2012 +0000
* Script to automatically generate patches for submission.
* Comment out the legacy modules for testing.
---
ooni/__init__.py | 9 +++--
submit-patch | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 100 insertions(+), 4 deletions(-)
diff --git a/ooni/__init__.py b/ooni/__init__.py
index 1533244..22ffb8b 100644
--- a/ooni/__init__.py
+++ b/ooni/__init__.py
@@ -10,12 +10,13 @@ from . import templates
from . import utils
# XXX below are legacy related modules
-from . import ooniprobe
-from . import plugoo
-from . import plugins
+#from . import ooniprobe
+#from . import plugoo
+#from . import plugins
__all__ = ['config', 'inputunit', 'kit',
'lib', 'nettest', 'oonicli', 'reporter',
'runner', 'templates', 'utils',
# XXX below are legacy related modules
- 'ooniprobe', 'plugoo', 'plugins']
+ #'ooniprobe', 'plugoo', 'plugins'
+ ]
diff --git a/submit-patch b/submit-patch
new file mode 100755
index 0000000..f794a2f
--- /dev/null
+++ b/submit-patch
@@ -0,0 +1,95 @@
+#!/bin/bash
+##############################################################################
+#
+# submit-patch
+# -------------------
+# Submit a patch to the OONI developers!
+#
+# @authors: Isis Lovecruft, 0x2cdb8b35 <isis@xxxxxxxxxxxxxx>
+# @license: see included LICENSE file
+# @version: 0.0.1
+#
+# To apply these patches:
+#
+# $ git fetch <project> master:test-apply
+# $ git checkout test-apply
+# $ git reset --hard
+# $ git am a.patch
+#
+# Note:
+# Dear other OONI developers and contributors,
+# if you would like patches emailed to you as well, then add your name and
+# email to this script, commit the changes, and submit it as a patch. :)
+# <(A)3
+# isis agora lovecruft
+#
+
+DEVELOPERS="<isis@xxxxxxxxxxxxxx>, "
+
+HEADERS="X-Git-Format-Patch: ooni "
+
+function usage ()
+{
+ echo;
+ echo -e "\033[40m\033[0;32m OPEN OBSERVATORY of NETWORK INTERFERENCE \033[0m"
+ echo -e "\033[40m\033[0;32m ---------------------------------------- \033[0m"
+ echo -e ""
+ echo -e "\033[40m\033[0;32m This script will collect all committed changes in your current \033[0m"
+ echo -e "\033[40m\033[0;32m branch which are not in the upstream branch, format a patch or \033[0m"
+ echo -e "\033[40m\033[0;32m a series of patches from them, and, finally, email them to the \033[0m"
+ echo -e "\033[40m\033[0;32m OONI developers. \033[0m"
+ echo -e "\033[40m\033[0;32m Thanks for the patch\! \033[0m"
+}
+
+function pullfirst ()
+{
+ echo;
+ read -ep" Should we pull in changes from master before formatting patches? (Y/n) " -s choice
+ case "$choice" in
+ "n"|"N"|"no"|"No"|"NO"|"non"|"nein")
+ PULL=false
+ ;;
+ *)
+ PULL=true
+ ;;
+ esac
+ if $PULL; then
+ if test -n "$UPSTREAMPULL" ; then
+ echo;
+ echo -e "\033[40m\033[0;32m Pulling from upstream... \033[0m"
+ git pull $UPSTREAM
+ fi
+ fi
+}
+
+
+usage
+echo -e ""
+read -ep" Should we CC the generated patch emails to tor-dev@xxxxxxxxxxxxxxxxxxxx? (Y/n) " cctordev
+if test -z "$cctordev" ; then
+ CC="tor-dev@xxxxxxxxxxxxxxxxxxxx, "
+else
+ CC=""
+fi
+
+#echo;
+#echo -e
+#read -ep" Which branch/revision/commit should we include up to? (Return for 'HEAD'): " upstream
+#if test -n "$upstream" ; then
+# UPSTREAM=$upstream
+# UPSTREAMPULL=$upstream" master"
+#else
+# UPSTREAM="origin"
+# UPSTREAMPULL="origin master"
+#fi
+#pullfirst
+echo;
+echo -e "\033[40m\033[0;32m THIS SCRIPT DOES NOT SEND THE PATCH FILES. \033[0m"
+echo -e "\033[40m\033[0;32m You'll have to handle that bit on your own. \033[0m"
+echo;
+
+git format-patch --full-index -o "./patches" --stat -l10 --ignore-submodules \
+ --binary --cover-letter --numbered --ignore-if-in-upstream \
+ --suffix=".patch" --to="$DEVELOPERS" --cc="$CC" master
+#NEW=`git patch-id < patches/new.patch`
+#echo "Patch id: $NEW"
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits