]> www.infradead.org Git - users/dedekind/aiaiai.git/commitdiff
email: don't allow pcfg_branch to default
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 27 Mar 2014 18:40:02 +0000 (11:40 -0700)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 31 Mar 2014 08:14:37 +0000 (11:14 +0300)
Since we don't allow pcfg_path to default, it makes little sense to
allow pcfg_branch to default. Also, it would be better to have a die
check on branch, so that we fail if the project doesn't specify the
branch.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
doc/email/configuration.txt
doc/email/example-aiaiai.cfg
email/aiaiai-email-sh-functions

index 1f3b758cd931a038066e9969c8e381f86d1a42db..70a307f15797fe7487e8b9f9ce74c0abe1c029ea 100644 (file)
@@ -90,11 +90,6 @@ additive.
     the kernel, or possibly inside the defconfigdir as specified by other
     option. Multiple configs are supported by seperating with spaces. Each
     config will be tested. See the example-aiaiai.cfg for details and examples.
-* branch
-    What git refspec to validate against. Usually this should be a remote
-    branch ie: origin/master, but can actually be any refspec. Note that the
-    defconfigs specified in the config option must actually be available from
-    the refspec.
 * always_cc
     A comma seperated list of addresses to always Cc when creating replies. For
     example, it could be a mailing list to which all aiaiai replies go.
@@ -155,6 +150,11 @@ specified for each project.
     also does not depend on the tree being (or not) bare, so you can feel free
     to make this a bare remote or a local tree. Generally, aiaiai works best if
     the tree is locally stored on the same machine as the aiaiai process.
+* branch
+    What git refspec to validate against. Usually this should be a remote
+    branch ie: origin/master, but can actually be any refspec. Note that the
+    defconfigs specified in the config option must actually be available from
+    the refspec.
 
 2.4 Aiaiai Hooks
 ~~~~~~~~~~~~~~~~
index 6101c5824fc69f57a30434b9544b7ae83a20a944..73014d8520f438b658e16af4b36adfe60ebe7e65 100644 (file)
        # CROSS_COMPILE="arm-eabi-". The last component is optional.
        configs = x86_64_defconfig,x86_64 i386_defconfig,i386
 
-       # Git refspec to validate the patches against. Usually this a the
-       # remote branch name. But may actually be any refspec.
-       #
-       # Note, the defconfig files specified in the "configs" option must be
-       # part of this git refspec.
-       branch = origin/master
-
        # Comma-separated list of e-mail addresses to always CC when replying.
        # These are maintainers or other project supervisors. This may be a
        # separate mailing list for replies from Aiaiai.
 # The e-mail front-end may operate on several project. Each project has its
 # own kernel tree, kernel configuration, and some other settings. These are
 # configured in per-project sections. Section names have to start with "prj_"
-# and follow with the name of the project.
+# and follow with the name of the project. The 'name', 'description', 'path'
+# and 'branch' settings are required and are not provided by the [defaults]
+# section, so must be set for each project.
 
 # This is the "android" project section.
 [prj_android]
        # server. No default value.
        path = /home/aiaiai/work/git/android-x86
 
+       # Git refspec to validate the patches against. Usually this a the
+       # remote branch name. But may actually be any refspec.
+       #
+       # Note, the defconfig files specified in the "configs" option must be
+       # part of this git refspec.
+       branch = origin/3.0-mid
+
        # See the [defaults] section above for detailed explanation of the
        # options below, and their formats. Be aware that any value set here
        # will override the default value, ignoring anything set there. For
        # value and actually set the option to the empty value. To use the
        # default, simply leave the option out of the per-project section.
        configs = android_defconfig,i386 android_debug_defconfig,i386
-       branch = origin/3.0-mid
        always_cc =
        reply_to_all = 1
        accept_notify = 1
index f996e9db4a46ecae5e122aac89d12377000d5f86..b80892151514ca3c79cddda3b6e370c99dbe527d 100644 (file)
@@ -182,10 +182,10 @@ parse_config()
 # per-option variables and their values are exactly as in the configuration
 # file:
 #
-# __dcfg_configs, __dcfg_branch, __dcfg_always_cc, __dcfg_reply_to_all,
-# __dcfg_accept_notify, __dcfg_unwanted_keywords, __dcfg_kmake_opts,
-# __dcfg_targets, __dcfg_defconfigdir, __dcfg_bisectability, __dcfg_sparse,
-# __dcfg_smatch, __dcfg_cppcheck, __dcfg_coccinelle
+# __dcfg_configs, __dcfg_always_cc, __dcfg_reply_to_all, __dcfg_accept_notify,
+# __dcfg_unwanted_keywords, __dcfg_kmake_opts, __dcfg_targets,
+# __dcfg_defconfigdir, __dcfg_bisectability, __dcfg_sparse, __dcfg_smatch,
+# __dcfg_cppcheck, __dcfg_coccinelle
 #
 # It is expected that this is used internally by the parse_prj_config and
 # should not normally be called outside of this file.
@@ -196,7 +196,6 @@ __parse_default_config()
        local cfgfile="$1"; shift
 
        __dcfg_configs="$(ini_config_get "$cfgfile" "defaults" "configs")"
-       __dcfg_branch="$(ini_config_get "$cfgfile" "defaults" "branch")"
        __dcfg_always_cc="$(ini_config_get "$cfgfile" "defaults" "always_cc")"
        __dcfg_reply_to_all="$(ini_config_get "$cfgfile" "defaults" "reply_to_all")"
        __dcfg_accept_notify="$(ini_config_get "$cfgfile" "defaults" "accept_notify")"
@@ -214,15 +213,14 @@ __parse_default_config()
 # Similar to "parse_config", but parses a project configuration section. If the
 # project is found, the following variables are defined:
 #
-# pcfg_name, pcfg_description, and pcfg_path.
+# pcfg_name, pcfg_description, pcfg_path and pcfg_branch.
 #
 # The following variables are defined, but receive default values from the
 # [defaults] section, if they are not specified in the project section:
 #
-# pcfg_configs, pcfg_branch, pcfg_always_cc, pcfg_reply_to_all,
-# pcfg_accept_notify, pcfg_unwanted_keywords, pcfg_kmake_opts, pcfg_targets,
-# pcfg_defconfigdir, pcfg_bisectability, pcfg_sparse, pcfg_smatch,
-# pcfg_cppcheck, pcfg_coccinelle
+# pcfg_configs, pcfg_always_cc, pcfg_reply_to_all, pcfg_accept_notify,
+# pcfg_unwanted_keywords, pcfg_kmake_opts, pcfg_targets, pcfg_defconfigdir,
+# pcfg_bisectability, pcfg_sparse, pcfg_smatch, pcfg_cppcheck, pcfg_coccinelle
 #
 # If the project is not found, this function only defined an empty "pcfg_name"
 # variable.
@@ -242,6 +240,7 @@ parse_prj_config()
 
        ini_config_get_or_die pcfg_description   "$cfgfile" "prj_$prj" "description"
        ini_config_get_or_die pcfg_path          "$cfgfile" "prj_$prj" "path"
+       ini_config_get_or_die pcfg_branch        "$cfgfile" "prj_$prj" "branch"
 
        # The following options all take default value from the "defaults"
        # section, and hence "override" those settings. First we need to populate those.
@@ -253,8 +252,6 @@ parse_prj_config()
        # project config does not specify anything.
        pcfg_configs="$(ini_config_get "$cfgfile" "prj_$prj" "configs")"
        ini_config_is_set "$cfgfile" "prj_$prj" "configs" || pcfg_configs="$__dcfg_configs"
-       pcfg_branch="$(ini_config_get "$cfgfile" "prj_$prj" "branch")"
-       ini_config_is_set "$cfgfile" "prj_$prj" "branch" || pcfg_branch="$__dcfg_branch"
        pcfg_reply_to_all="$(ini_config_get "$cfgfile" "prj_$prj" "reply_to_all")"
        ini_config_is_set "$cfgfile" "prj_$prj" "reply_to_all" || pcfg_reply_to_all="$__dcfg_reply_to_all"
        pcfg_accept_notify="$(ini_config_get "$cfgfile" "prj_$prj" "accept_notify")"