[PATCH RFC 4/7] config: add canonical_url variable for future use

Jacob Keller jacob.e.keller at intel.com
Wed Mar 19 15:46:44 PDT 2014

A future patch is planning on displaying the URL of the project, but the
internal file system path supplied for use in aiaiai is generally not
expected to be publically reachable. This variable can be used to
display the remote url which aiaiai's internal file system clone will

Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
 doc/email/configuration.txt     | 4 ++++
 doc/email/example-aiaiai.cfg    | 5 +++++
 email/aiaiai-email-sh-functions | 3 ++-
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/doc/email/configuration.txt b/doc/email/configuration.txt
index 70a307f15797..9056e0c0fb74 100644
--- a/doc/email/configuration.txt
+++ b/doc/email/configuration.txt
@@ -155,6 +155,10 @@ specified for each project.
     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.
+* canonical_url
+    The url to use when displaying a url for user consumption. Intended to be a
+    patch-submitter visible mirror of the local path used internally. If not
+    supplied, aiaiai will display the path instead.
 2.4 Aiaiai Hooks
diff --git a/doc/email/example-aiaiai.cfg b/doc/email/example-aiaiai.cfg
index 73014d8520f4..f9c7e0fbdc67 100644
--- a/doc/email/example-aiaiai.cfg
+++ b/doc/email/example-aiaiai.cfg
@@ -152,6 +152,11 @@
 	# server. No default value.
 	path = /home/aiaiai/work/git/android-x86
+	# Remote url used for display only. Aiaiai does not directly use this,
+	# and does not attempt to keep the path up to date itself. This is used
+	# only for display to the user.
+	canonical_url = git://aiaiai/git/android-x86
 	# Git refspec to validate the patches against. Usually this a the
 	# remote branch name. But may actually be any refspec.
diff --git a/email/aiaiai-email-sh-functions b/email/aiaiai-email-sh-functions
index b80892151514..20e482603d73 100644
--- a/email/aiaiai-email-sh-functions
+++ b/email/aiaiai-email-sh-functions
@@ -213,7 +213,7 @@ __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, pcfg_path and pcfg_branch.
+# pcfg_name, pcfg_description, pcfg_path, pcfg_branch and pcfg_canonical_url.
 # The following variables are defined, but receive default values from the
 # [defaults] section, if they are not specified in the project section:
@@ -241,6 +241,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"
+	pcfg_canonical_url="$(ini_config_get "$cfgfile" "prj_$prj" "canonical_url")"
 	# The following options all take default value from the "defaults"
 	# section, and hence "override" those settings. First we need to populate those.

More information about the aiaiai mailing list