author Gregory Szorc <gps@mozilla.com>
Tue, 24 May 2016 11:35:44 -0700
changeset 298842 32886f06e0fb2a5c2b58d49500b3baee59e970d4
parent 288367 df2083106d8d69bcb8112ab95efe814103947ad9
child 448947 6f3709b3878117466168c40affa7bca0b60cf75b
permissions -rw-r--r--
Bug 1274655 - Resolve changeset when only repo is defined; r=mshal Previously, we required both or none of MOZ_SOURCE_REPO and MOZ_SOURCE_CHANGESET to be defined. This logic was established in 51029f4d82d3 (bug 1247162). There appears to be no good reason why we require MOZ_SOURCE_CHANGESET if MOZ_SOURCE_REPO is defined. After all, if we have a checkout we should be able to resolve the revision. This commit changes the logic to resolve the changeset when not defined. We still error if MOZ_SOURCE_REPO is defined but we can't resolve the changeset. I can't imagine this breaking anything. This change will be necessary to appease TaskCluster tasks once mozharness is changed in a subsequent commit to define MOZ_SOURCE_REPO. Buildbot and TC each have their own way of specifying the source revision. Rather than change mozharness, it feels easier to just have the build system derive things. This decision is further justified by the fact there is a chicken and egg problem in mozharness: the environment variable dict is resolved before source directory population. So, we'd need to teach mozharness about TC's VCS mechanism, which it currently has no knowledge of. I'd rather not do that. MozReview-Commit-ID: ANaoGbPGWj2

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set sw=2 ts=8 et ft=cpp : */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef mozilla_HalLog_h
#define mozilla_HalLog_h

#include "mozilla/Logging.h"

 * HalLog.h contains internal macros and functions used for logging.
 * This should be considered a private include and not used in non-HAL code.
 * To enable logging in non-debug builds define the PR_FORCE_LOG macro here.

namespace mozilla {

namespace hal {

mozilla::LogModule *GetHalLog();
#define HAL_LOG(...) \
  MOZ_LOG(mozilla::hal::GetHalLog(), LogLevel::Debug, (__VA_ARGS__))
#define HAL_ERR(...) \
  MOZ_LOG(mozilla::hal::GetHalLog(), LogLevel::Error, (__VA_ARGS__))

} // namespace hal

} // namespace mozilla

#endif // mozilla_HalLog_h