diff --git a/.gitreview b/.gitreview index 19f841cdc0..56859fe88a 100644 --- a/.gitreview +++ b/.gitreview @@ -1,5 +1,6 @@ [gerrit] defaultbranch=18 +basebranch=18 # # Intentional padding to ensure it is possible to point a commit # to an alternative gerrit server/repository without breaking diff --git a/build_tools/make_version b/build_tools/make_version index 83c42d1fba..6ef7b2941d 100755 --- a/build_tools/make_version +++ b/build_tools/make_version @@ -100,7 +100,11 @@ elif [ -d ${1}/.git ]; then MODIFIED="" SVN_REV=`${GIT} log --pretty=full -1 | sed -n '/git-svn-id:/ s/.*\@\([^ ]*\) .*/\1/p'` if [ -z "$SVN_REV" ]; then - MAINLINE_BRANCH=$(git config -f .gitreview --get gerrit.defaultbranch) + MAINLINE_BRANCH=$(${GIT} config -f .gitreview --get gerrit.basebranch) + if [ "x${MAINLINE_BRANCH}" == "x" ] ; then + MAINLINE_BRANCH=$(${GIT} config -f .gitreview --get gerrit.defaultbranch) + fi + VERSION=`${GIT} describe --long --always --tags --dirty=M 2> /dev/null` if [ $? -ne 0 ]; then if [ "`${GIT} ls-files -m | wc -l`" != "0" ]; then