Bug 1361370 - Allow overrride of MOZ_SOURCE_CHANGESET and MOZ_SOURCE_REPO. r=glandium
authorBill Gianopoulos <wgianopoulos@gmail.com>
Sat, 29 Apr 2017 19:23:14 -0400
changeset 21583 bd34d80df5ff4929617aaede1ec44230f54d65f7
parent 21582 2adf96bc4bf9690ed1da624951c990d8c69dbab8
child 21584 849228c56d57b0a9f82f3df7d0a19df0bc413f1b
push id13147
push usermozilla@jorgk.com
push dateTue, 23 May 2017 06:39:26 +0000
treeherdercomm-central@bd34d80df5ff [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1361370
Bug 1361370 - Allow overrride of MOZ_SOURCE_CHANGESET and MOZ_SOURCE_REPO. r=glandium
configure.in
--- a/configure.in
+++ b/configure.in
@@ -11,19 +11,23 @@ dnl the --with-external-source-dir rules
 dnl ========================================================
 divert(0)dnl
 #!/bin/sh
 SRCDIR=$(dirname $0)
 TOPSRCDIR="$SRCDIR"
 MOZILLA_SRCDIR="${SRCDIR}/mozilla"
 export OLD_CONFIGURE="${MOZILLA_SRCDIR}"/old-configure
 
-# Ensure the comm-* values are used.
-export MOZ_SOURCE_CHANGESET=$(hg -R "$TOPSRCDIR" parent --template="{node}" 2>/dev/null)
-export MOZ_SOURCE_REPO=$(hg -R "$TOPSRCDIR" showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/https:/")
+# Ensure the comm-* values are used unless overridden by environment variables.
+if test -z "$MOZ_SOURCE_CHANGESET"; then
+    export MOZ_SOURCE_CHANGESET=$(hg -R "$TOPSRCDIR" parent --template="{node}" 2>/dev/null)
+fi
+if test -z "$MOZ_SOURCE_REPO"; then
+    export MOZ_SOURCE_REPO=$(hg -R "$TOPSRCDIR" showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/https:/")
+fi
 
 # If MOZCONFIG isn't set, use the .mozconfig from the current directory. This
 # overrides the lookup in mozilla-central's configure, which looks in the wrong
 # directory for this file.
 if test -z "$MOZCONFIG" -a -f "$SRCDIR"/.mozconfig; then
     export MOZCONFIG="$SRCDIR"/.mozconfig
 elif test -z "$MOZCONFIG" -a -f "$SRCDIR"/mozconfig; then
     export MOZCONFIG="$SRCDIR"/mozconfig