Commit b5e7147a authored by Dustin J. Mitchell's avatar Dustin J. Mitchell

Bug 1525946 - get hg commit message from hg, r=mt

Summary: Bug 1525946 - update .taskcluster.yml to modern standards

Reviewers: mt

Reviewed By: mt

Bug #: 1525946

Differential Revision: https://phabricator.services.mozilla.com/D19041

--HG--
extra : rebase_source : 481313196cbb12784bf7442cc910b3e904471cb8
extra : histedit_source : dbf03e7cc440f38089015ed2f2bba5ebfe2045ab
parent 6efd143c
......@@ -9,6 +9,7 @@ RUN apt-get update \
locales \
mercurial \
nodejs \
npm \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get autoremove -y && apt-get clean -y
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -5,10 +5,17 @@
import * as try_syntax from "./try_syntax";
import extend from "./extend";
// Init try syntax filter.
if (process.env.TC_PROJECT == "nss-try") {
try_syntax.initFilter();
}
const main = async () => {
// Init try syntax filter.
if (process.env.TC_PROJECT == "nss-try") {
await try_syntax.initFilter();
}
// Extend the task graph.
extend().catch(console.error);
// Extend the task graph.
await extend();
};
main().catch(err => {
console.error(err);
process.exit(1);
});
......@@ -5,6 +5,10 @@
import * as queue from "./queue";
import intersect from "intersect";
import parse_args from "minimist";
import util from "util";
import child_process from 'child_process';
let execFile = util.promisify(child_process.execFile);
function parseOptions(opts) {
opts = parse_args(opts.split(/\s+/), {
......@@ -154,8 +158,13 @@ function filter(opts) {
}
}
export function initFilter() {
let comment = process.env.TC_COMMENT || "";
async function getCommitComment() {
const res = await execFile('hg', ['log', '-r', '.', '-T', '{desc}']);
return res.stdout;
};
export async function initFilter() {
let comment = await getCommitComment();
// Check for try syntax in changeset comment.
let match = comment.match(/^\s*try:\s*(.*)\s*$/);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment