Closed Bug 1761502 Opened 2 years ago Closed 2 years ago

l10n lint fails on git-only environment, requiring hg

Categories

(Developer Infrastructure :: Lint and Formatting, defect, P3)

Tracking

(firefox101 fixed)

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: saschanaz, Assigned: ahal)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

created virtual environment CPython3.9.9.final.0-64 in 40ms
  creator CPython3Windows(dest=C:\Users\sasch\Documents\GitHub\gecko-dev\obj-x86_64-pc-mingw32\_virtualenvs\common, clear=False, no_vcs_ignore=False, global=False)
  activators BashActivator,BatchActivator,FishActivator,PowerShellActivator,PythonActivator
Traceback (most recent call last):
  File "c:\users\sasch\documents\github\gecko-dev\python\mozlint\mozlint\roller.py", line 228, in setup
    res = findobject(linter["setup"])(
  File "C:\Users\sasch\Documents\GitHub\gecko-dev\tools\lint\python\l10n_lint.py", line 93, in gecko_strings_setup
    hg = mozversioncontrol.get_tool_path("hg")
  File "c:\users\sasch\documents\github\gecko-dev\python\mozversioncontrol\mozversioncontrol\__init__.py", line 63, in get_tool_path
    raise MissingVCSTool(
mozversioncontrol.MissingVCSTool: Unable to obtain hg path. Try running |mach bootstrap| to ensure your environment is up to date.
error: problem with lint setup, skipping android-api-lint, android-checkstyle, android-format, android-javadoc, android-lint, android-test, l10n

But mach bootstrap won't install hg if you are on git.

The severity field is not set for this bug.
:ahal, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(ahal)

Interesting, I'm not sure what's going on here. Fwiw, I know many people using mach lint with git + cinnabar (and have done so myself in the past). Do you have cinnabar installed here?

Flags: needinfo?(ahal)
Priority: -- → P2

The severity field is not set for this bug.
:ahal, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(ahal)

Ah ok, I believe this traceback isn't fatal correct? So this bug is more about the error message being a bit scarier than it needs to be. Bootstrapping Mercurial for git users is definitely out of scope for mozlint, so I'll just hide the traceback from the error message and make it a bit less scary.

So you'll either need to install Mercurial yourself, or just live with the l10n linter not running locally. It'll still run on your try pushes and via reviewbot on moz-phab.

Flags: needinfo?(ahal)
Assignee: nobody → ahal
Status: NEW → ASSIGNED
Summary: `./mach lint` fails on git-only environment, requiring hg → l10n lint fails on git-only environment, requiring hg

The severity field is not set for this bug.
:ahal, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(ahal)
Severity: -- → S4
Flags: needinfo?(ahal)
Priority: P2 → P3
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/64eb6b660e81
Make l10n linter error less scary when Mercurial doesn't exist, r=linter-reviewers,sylvestre
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: