This is an archive of the discontinued Mercurial Phabricator instance.

config: move reading of defaultrc/ files from ui to rcutil
AbandonedPublic

Authored by martinvonz on Dec 12 2019, 6:44 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

For PyOxidizer, we'll need to read the default configs using the
resources module. This prepares for putting that call in rcutil.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

martinvonz created this revision.Dec 12 2019, 6:44 PM

The patch seems functionally correct. But I have a question about whether this is the desired approach. See inline comment.

mercurial/rcutil.py
102

Do you think it would be better to change the return type to expose a resource type, which the caller can resolve accordingly? Or maybe do away with leaving it up to the caller to open and read paths? It just feels weird for some I/O to be performed in this function while some I/O is deferred to the caller.

But I don't have this code paged in, so maybe my comment is off base.

martinvonz abandoned this revision.Jan 23 2020, 5:04 PM

This was probably also obsoleted by D7629