[Updated] D8524: phabricator: add .arcconfig to help messages and comments (issue6331)

sfink (Steve Fink) phabricator at mercurial-scm.org
Sat Aug 29 20:36:27 UTC 2020


sfink added inline comments.

INLINE COMMENTS

> phabricator.py:203
>  
> -    return orig(ui, wdirvfs, hgvfs, requirements) or result  # Load .hg/hgrc
> +    return orig(ui, wdirvfs, hgvfs, requirements) or bool(cfg)  # Load .hg/hgrc
>  

This is now the only code change (removing the explicit `result` variable and instead just using `cfg` to tell whether we updated any configuration.) This seems to better match the intent documented in `mercurial/localrepo.py`:

  Returns a bool indicating whether any additional configs were loaded.

The only difference with the redundant `result` variable would be if you loaded in a `.arcconfig` that did not contain either of the two settings looked at here, and in that case it seems like it would be better to return `False`.

What do you think?

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8524/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8524

To: sfink, mharbison72, marmoute
Cc: marmoute, Kwan, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200829/3db36e31/attachment-0002.html>


More information about the Mercurial-patches mailing list