Closed Bug 1578318 Opened 6 years ago Closed 6 years ago

moz-phab submit fails with "Failed to determine Mercurial version" error

Categories

(Conduit :: moz-phab, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: hiro, Unassigned)

Details

% hg --version --quiet
Mercurial - 分散構成管理ツール(バージョン 5.0.2)

moz-phab should set HGPLAIN in the environment when calling hg.

(In reply to Mike Hommey [:glandium] from comment #1)

moz-phab should set HGPLAIN in the environment when calling hg.

it does: https://github.com/mozilla-conduit/review/blob/master/moz-phab#L1686

hiro, can you run the following and provide output: DEBUG=1 moz-phab

Flags: needinfo?(hikezoe.birchill)

% DEBUG=1 moz-phab submit
found hg repo in /home/hiro/central
$ hg --version --quiet
Mercurial - 分散構成管理ツール(バージョン 5.0.2)
Failed to determine Mercurial version.

Flags: needinfo?(hikezoe.birchill)

Over slack i asked hiro to run HGPLAIN=1 hg --version --quiet and the result was English.

So on my system I forced hg into Japanese and got the expected result from moz-phab (after installing the Mercurial locales):

$ DEBUG=1 LANG=ja moz-phab asdf
DEBUG    2019-09-03 13:17:14,029 defaulting to `submit`
DEBUG    2019-09-03 13:17:14,030 found hg repo in /Users/byron/dev/conduit/phabricator-dev-test-repo-hg
DEBUG    2019-09-03 13:17:14,032 $ hg --version --quiet
DEBUG    2019-09-03 13:17:14,214 Mercurial Distributed SCM (version 5.1)

If I comment out the line in moz-phab that sets HGPLAIN:

$ DEBUG=1 LANG=ja moz-phab asdf
DEBUG    2019-09-03 13:17:33,500 defaulting to `submit`
DEBUG    2019-09-03 13:17:33,501 found hg repo in /Users/byron/dev/conduit/phabricator-dev-test-repo-hg
DEBUG    2019-09-03 13:17:33,501 $ hg --version --quiet
DEBUG    2019-09-03 13:17:33,677 Mercurial - 分散構成管理ツール(バージョン 5.1)
ERROR    2019-09-03 13:17:33,678 Failed to determine Mercurial version.

I've asked hiro to check that moz-phab is up to date.

Looks like hiro's moz-phab was so old that self-update was broken (at least a year out of date - this issue was fixed August last year).

After a manual update all is well.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.