Your patch mostly fell into the cracks. We seldomly have email contribution these days and it arrive a week were the bulk of reviewer where busy IRL.

The code you change seems to be been introduced in 354020079723 ¹ with the idea that Mac Os X won't respect this env variable. However it does not seems to hurt to comply to it if present and have seen multiple other project doing the same.

A test was introduced allow side the original change, with Os X exclusion. I have modified this patch in the version of you patch that I send into our usual review-pipeline:

https://foss.heptapod.net/mercurial/mercurial-devel/-/merge_requests/848

[1] https://repo.mercurial-scm.org/hg/rev/354020079723

On 4/22/24 23:33, Hraban Luyat via Mercurial-devel wrote:
Hi, did anything happen regarding this patch? Was it rejected / accepted / 
ignored?

On Tuesday, March 26th, 2024 at 1:36 AM, Hraban<hra...@0brg.net>  wrote:


# HG changeset patch
# User Hraban luyathra...@0brg.net

# Date 1711430847 14400
# Tue Mar 26 01:27:27 2024 -0400
# Node ID 8bc5a4e12666c85e246f175f6bd3136678f8a5ba
# Parent 4a8bb136ee779b9763a6dfcdb707ba5894f5e36d
hgrc: search XDG_CONFIG_HOME on mac

Searching for hgrc was special cased not to look through ~/.config/hg on
Mac,
but that’s unnecessary: Macs support it as do other unix based systems.
There
are plenty tools that use it there, e.g. git, and people expect it to work,
e.g.
"https://stackoverflow.com/questions/72499837/mercurial-on-macos-doesnt-read-config-hg-hgrc";.

diff -r 4a8bb136ee77 -r 8bc5a4e12666 mercurial/scmposix.py
--- a/mercurial/scmposix.py Thu Mar 07 10:57:16 2024 +0100
+++ b/mercurial/scmposix.py Tue Mar 26 01:27:27 2024 -0400
@@ -60,8 +60,6 @@
def userrcpath() -> List[bytes]:

if pycompat.sysplatform == b'plan9':
return [encoding.environ[b'home'] + b'/lib/hgrc']
- elif pycompat.isdarwin:
- return [os.path.expanduser(b'~/.hgrc')]
else:
confighome = encoding.environ.get(b'XDG_CONFIG_HOME')
if confighome is None or not os.path.isabs(confighome):
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@lists.mercurial-scm.org
https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel

--
Pierre-Yves David
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@lists.mercurial-scm.org
https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to