HomePhabricator

Work around `hg` echoing warnings to stdout under --debug

Description

Work around hg echoing warnings to stdout under --debug

Summary:
Ref T615. Ref T4237. With --debug, Mercurial will echo an "ignoring untrusted configuration option" warning to stdout if .hgrc has the wrong owner.

However, we need --debug to make {parents} usable, at least until the patches I got into the upstream are widely deployed. So after getting --debug output, strip off any leading warnings.

These warnings should always be in English, at least, since we set LANG explicitly.

Test Plan: Unit tests. @asherkin, maybe you can confirm this? I can't actually get the warning, but I think my hg in PATH is just a bit out of date.

Reviewers: asherkin, btrahan

Reviewed By: asherkin

CC: asherkin, aran

Maniphest Tasks: T615, T4237

Differential Revision: https://secure.phabricator.com/D7784

Details

Provenance
epriestleyAuthored on Dec 18 2013, 2:04 AM
epriestleyPushed on Dec 18 2013, 2:04 AM
Reviewer
asherkin
Differential Revision
D7784: Work around `hg` echoing warnings to stdout under --debug
Parents
rP3386920971b8: Add Herald support for blocking ref changes
Branches
Unknown
Tags
Unknown
Tasks
T4237: Add "bin/repository prune" to destroy orphaned commits
Restricted Maniphest Task

Event Timeline