[Hide Content]From bbd1ce71c17fb026c26c96a27bed9323f989ab4f Mon Sep 17 00:00:00 2001
From: Darshan Shaligram <scintilla@gmail.com>
Date: Mon, 5 May 2014 15:54:02 -0400
Subject: [PATCH] On experimental branches, log explbr=branchname.
Set EXPERIMENTAL_BRANCH and log explbr to logfile and milestones on
experimental branches.
---
crawl-ref/source/Makefile | 7 +++++++
crawl-ref/source/hiscores.cc | 3 +++
2 files changed, 10 insertions(+)
diff --git a/crawl-ref/source/Makefile b/crawl-ref/source/Makefile
index 327e6db..36daa8d 100644
--- a/crawl-ref/source/Makefile
+++ b/crawl-ref/source/Makefile
@@ -719,6 +719,13 @@ ifdef EUCLIDEAN
DEFINES_L += -DEUCLIDEAN
endif
+
+SRC_BRANCH := $(shell git rev-parse --abbrev-ref HEAD || echo release)
+ifneq ($(SRC_BRANCH),$(filter master release stone_soup-%, $(SRC_BRANCH)))
+ DEFINES_L += -DEXPERIMENTAL_BRANCH="\"$(SRC_BRANCH)\""
+endif
+
+
#
# Figure out the build settings for this type of build
#
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc
index 05d77a6..9422041 100644
--- a/crawl-ref/source/hiscores.cc
+++ b/crawl-ref/source/hiscores.cc
@@ -978,6 +978,9 @@ void scorefile_entry::set_base_xlog_fields() const
score_version += "-zotdef.1";
fields->add_field("v", "%s", Version::Short);
fields->add_field("lv", "%s", score_version.c_str());
+#ifdef EXPERIMENTAL_BRANCH
+ fields->add_field("explbr", EXPERIMENTAL_BRANCH);
+#endif
if (tiles)
fields->add_field("tiles", "%d", tiles);
fields->add_field("name", "%s", name.c_str());
--
1.9.0