diff --git a/build/Makefile.in b/build/Makefile.in index 96e05a4ebd4..b0261635f0e 100644 --- a/build/Makefile.in +++ b/build/Makefile.in @@ -16,23 +16,13 @@ DEFINES += -DMOZ_APP_BUILDID=$(MOZ_APP_BUILDID) APP_INI_DEPS += $(DEPTH)/config/autoconf.mk -ifdef MOZ_SOURCE_CHANGESET -MOZ_SOURCE_STAMP := $(MOZ_SOURCE_CHANGESET) -else MOZ_SOURCE_STAMP := $(firstword $(shell cd $(topsrcdir)/$(MOZ_BUILD_APP)/.. && hg parent --template='{node}\n' 2>/dev/null)) -endif - ifdef MOZ_SOURCE_STAMP DEFINES += -DMOZ_SOURCE_STAMP='$(MOZ_SOURCE_STAMP)' endif - ifdef MOZ_INCLUDE_SOURCE_INFO -ifdef MOZ_SOURCE_REPO -source_repo := $(MOZ_SOURCE_REPO) -else source_repo ?= $(call getSourceRepo,$(topsrcdir)/$(MOZ_BUILD_APP)/..) -endif ifneq (,$(source_repo)) DEFINES += -DMOZ_SOURCE_REPO='$(source_repo)' endif diff --git a/configure.in b/configure.in index 37f6f008545..8e9fb5feedb 100644 --- a/configure.in +++ b/configure.in @@ -8713,18 +8713,13 @@ fi # On official builds, we need to know in Telemetry what revision this is built from. # This is e.g. needed to match incoming data to a specific revision of the Histograms.json # file. -# External builds (specifically Ubuntu) may drop the hg repo information, so we allow to -# explicitly set the repository and changeset information in. -if test "$MOZILLA_OFFICIAL"; then - if test -z "$MOZ_SOURCE_REPO" && test -z "$MOZ_SOURCE_CHANGESET" && test -d ${_topsrcdir}/.hg; then - MOZ_SOURCE_CHANGESET=`cd $_topsrcdir && hg parent --template='{node}'` - MOZ_SOURCE_REPO=`cd $_topsrcdir && hg showconfig paths.default | sed -e 's|^ssh://|http://|' -e 's|/$||'` - fi - SOURCE_REV_URL=$MOZ_SOURCE_REPO/rev/$MOZ_SOURCE_CHANGESET +if test "$MOZILLA_OFFICIAL" && test -d ${_topsrcdir}/.hg; then + SOURCE_REV=`cd $_topsrcdir && hg parent --template='{node|short}'` + SOURCE_REPO=`cd $_topsrcdir && hg showconfig paths.default | sed -e 's|^ssh://|http://|' -e 's|/$||'` + SOURCE_REV_URL=$SOURCE_REPO/rev/$SOURCE_REV +else + SOURCE_REV_URL= fi - -AC_SUBST(MOZ_SOURCE_CHANGESET) -AC_SUBST(MOZ_SOURCE_REPO) AC_SUBST(SOURCE_REV_URL) AC_SUBST(MOZ_INCLUDE_SOURCE_INFO) diff --git a/toolkit/content/Makefile.in b/toolkit/content/Makefile.in index fd262f617d3..e42ed6dc725 100644 --- a/toolkit/content/Makefile.in +++ b/toolkit/content/Makefile.in @@ -11,21 +11,13 @@ DEFINES += \ -DCPPFLAGS='$(CPPFLAGS)' \ $(NULL) -ifdef MOZ_SOURCE_CHANGESET -MOZ_SOURCE_STAMP = $(MOZ_SOURCE_CHANGESET) -else MOZ_SOURCE_STAMP ?= $(shell hg -R $(topsrcdir) parent --template='{node}\n' 2>/dev/null) -endif ifdef MOZ_SOURCE_STAMP DEFINES += -DSOURCE_CHANGESET='$(MOZ_SOURCE_STAMP)' endif ifdef MOZ_INCLUDE_SOURCE_INFO -ifdef MOZ_SOURCE_REPO -source_repo = $(MOZ_SOURCE_REPO) -else source_repo ?= $(call getSourceRepo) -endif ifneq (,$(filter http%,$(source_repo))) DEFINES += -DSOURCE_REPO='$(source_repo)' else ifneq (,$(strip $(source_repo))) diff --git a/toolkit/mozapps/installer/package-name.mk b/toolkit/mozapps/installer/package-name.mk index 26bd9a1312e..d3f4b194bfe 100644 --- a/toolkit/mozapps/installer/package-name.mk +++ b/toolkit/mozapps/installer/package-name.mk @@ -156,21 +156,15 @@ ifndef INCLUDED_RCS_MK include $(MOZILLA_DIR)/config/makefiles/makeutils.mk endif -ifdef MOZ_SOURCE_CHANGESET -MOZ_SOURCE_STAMP = $(MOZ_SOURCE_CHANGESET) -else MOZ_SOURCE_STAMP = $(firstword $(shell hg -R $(MOZILLA_DIR) parent --template="{node}\n" 2>/dev/null)) -endif ########################################################################### # bug: 746277 - preserve existing functionality. # MOZILLA_DIR="": cd $(SPACE); hg # succeeds if ~/.hg exists ########################################################################### ifdef MOZ_INCLUDE_SOURCE_INFO -ifndef MOZ_SOURCE_REPO MOZ_SOURCE_REPO = $(call getSourceRepo,$(MOZILLA_DIR)$(NULL) $(NULL)) endif -endif MOZ_SOURCESTAMP_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).txt MOZ_BUILDINFO_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).json diff --git a/toolkit/xre/Makefile.in b/toolkit/xre/Makefile.in index 158ab512ae5..9b0fb23fbea 100644 --- a/toolkit/xre/Makefile.in +++ b/toolkit/xre/Makefile.in @@ -19,21 +19,13 @@ $(call warnIfEmpty,TOOLKIT_EM_VERSION) # Valid if null: {warn,error}IfEmpty DEFINES += -DTOOLKIT_EM_VERSION='"$(TOOLKIT_EM_VERSION)"' -ifdef MOZ_SOURCE_CHANGESET -MOZ_SOURCE_STAMP = $MOZ_SOURCE_CHANGESET -else MOZ_SOURCE_STAMP ?= $(firstword $(shell hg -R $(topsrcdir) parent --template='{node}\n' 2>/dev/null)) -endif ifdef MOZ_SOURCE_STAMP INIARGS = --sourcestamp=$(MOZ_SOURCE_STAMP) ifdef MOZ_INCLUDE_SOURCE_INFO - ifdef MOZ_SOURCE_REPO - source_repo = $MOZ_SOURCE_REPO - else source_repo := $(call getSourceRepo) - endif # extra sanity check for old versions of hg, no showconfig support ifneq (,$(filter http%,$(source_repo)))