[PATCH 1 of 2 RFC] hghave: introduce a 'linux' feature

Matt Mackall mpm at selenic.com
Mon Mar 23 15:17:15 CDT 2015


On Fri, 2015-03-20 at 18:36 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1426885885 14400
> #      Fri Mar 20 17:11:25 2015 -0400
> # Node ID 6b3aff8a06f1cf7057a9bdcdc5e301dde0801828
> # Parent  dc7588ce06b30a6ef347f7554e9646ac00e4456a
> hghave: introduce a 'linux' feature
> 
> diff --git a/tests/hghave.py b/tests/hghave.py
> --- a/tests/hghave.py
> +++ b/tests/hghave.py
> @@ -363,6 +363,10 @@ def has_aix():
>  def has_osx():
>      return sys.platform == 'darwin'
>  
> + at check("linux", "Linux")
> +def has_linux():
> +    return sys.platform.startswith('linux')

Given that we've got users on several other Unixen, and very few
Linux-specific dependencies in the code or in the test suite, this seems
odd. 

We only call out OS X in the code and the test suite because it has
special needs. And Windows, of course, because it's like a really
horrible, moist Unix that's always covered in straw.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list