Closed Bug 1760862 Opened 3 years ago Closed 3 years ago

hg tab completions not working in mozbuild 4.0 when loaded via source command.

Categories

(Firefox Build System :: MozillaBuild, defect)

Desktop
Windows
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nrishel, Assigned: mhentges)

References

Details

Attachments

(1 file)

Hg tab completions aren't functioning in mozbuild 4 when loaded via source path/to/hg/compeletions either in terminal or in ~/.bash_profile. I can confirm .bash_profile is run (environment variables are added) and that the completions work in other terminals (git-bash).

Completions were sourced via https://www.mercurial-scm.org/repo/hg/raw-file/tip/contrib/bash_completion.

Flags: needinfo?(mhentges)

Thanks for the report, I'll dig into this this week 👍

Assignee: nobody → mhentges
Status: NEW → ASSIGNED
Flags: needinfo?(mhentges)

Hmm, this appears to be because of the alias hg="EDITOR= hg.exe" - specifically the EDITOR= part, which was a tradeoff so we could influence git's editor while putting the hg-VCS-specific config in mercurial.ini.

HG's bash completions don't work if hg is aliased, and that alias has
a space.

Additionally, the only way to influence git's editor (while still
respecting ui.editor) is with the EDITOR environment variable.

Fortunately, git's bash completions //do// behave nicely with a space,
so move the the EDITOR variable declaration to happen in a git alias
instead.

Depends on D141801

Workaround

In your ~/.bash_profile, add the line alias hg=hg.exe.
Once MozillaBuild 4.0.1 is released with the official fix, then you can safely remove the alias workaround.

Blocks: 1761015

Pushed by mhentges@mozilla.com:
https://hg.mozilla.org/mozilla-build/rev/15d1d99ab75a
Fix hg completions not working due to alias r=ahochheiden

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Component: Developer Environment Integration → MozillaBuild
Product: Firefox Build System → mozilla.org
Version: unspecified → other
Product: mozilla.org → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: