This is an archive of the discontinued Mercurial Phabricator instance.

rcutil: don't check if defaultrc/ is a directory -- we know it is
ClosedPublic

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

Details

Summary

mercurial/defaultrc/ is a directory both in the Mercurial repo and
once installed on a target platform. The directory was created in
c4ce077588d0 (config: introduce "built-in" default configuration
settings in default.d, 2014-09-04). That commit has some more
information, but it still doesn't seem to say that defaultrc/ (then
called default.d/) could be a file. Perhaps the check was there to
allow you to run the same code on an older install/repo?

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Dec 12 2019, 6:44 PM
pulkit added a subscriber: pulkit.Dec 17 2019, 6:48 AM

I am unable to find some code or understand the reasoning behind -- we know this part.

I am unable to find some code or understand the reasoning behind -- we know this part.

defaultrc/ is a directory in the mercurial repo (mercurial/defaultrc/). We also don't convert it to a file when packaging, so it will remain the same directory in an installed mercurial.

I am unable to find some code or understand the reasoning behind -- we know this part.

defaultrc/ is a directory in the mercurial repo (mercurial/defaultrc/). We also don't convert it to a file when packaging, so it will remain the same directory in an installed mercurial.

I'll add more detail to the commit message in a bit.

pulkit accepted this revision.Dec 17 2019, 11:05 AM
This revision is now accepted and ready to land.Dec 17 2019, 11:05 AM