[issue3071] util.realpath instead of os.path.realpath breaks test with python 2.7 on MacOS 10.5.8

Christian Ebert blacktrash at gmx.net
Thu Oct 27 06:50:07 CDT 2011


* Christian Ebert on Monday, October 24, 2011 at 16:25:05 +0000
> New submission from Christian Ebert <blacktrash at gmx.net>:
> 
> Very strange, because the change makes so much sense.
> 
> $ ./run-tests.py test-keyword.t
> 
> --- /Users/chris/hgworkspace/hg-crew-mq/tests/test-keyword.t
> +++ /Users/chris/hgworkspace/hg-crew-mq/tests/test-keyword.t.err
> @@ -628,8 +628,9 @@
>   $ cp symignored x
>   $ hg copy --after --verbose symignored x
>   copying symignored to x
> +  overwriting x shrinking keywords
>   $ head -n 1 x
> -  expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
> +  expand $Id$
>   $ hg forget x
>   $ rm x
> 
> 
> ERROR: /Users/chris/hgworkspace/hg-crew-mq/tests/test-keyword.t output changed
> !
> Failed test-keyword.t: output changed
> # Ran 1 tests, 0 skipped, 1 failed.
> $ python -V
> Python 2.7.2
> $ sw_vers
> ProductName:	Mac OS X
> ProductVersion:	10.5.8
> BuildVersion:	9L30

As I found out this is an issue not only with keyword, but
affects everything where util.realpath is now used and the
corresponding tests.

It turns out that on darwin util.realpath uses posix.realpath
which in turn is special-casing darwin in a workaround for
os.path.realpath. At least here on MacOS 10.5.8 the darwind
workaround actually causes the failure on darwin ;-),
os.path.realpath gives the correct results just fine both with
Apple-shipped Python 2.5 and my Python 2.7.

Could other MacOS users test latest stable to verify?

thx

c
-- 
theatre - books - texts - movies
Black Trash Productions at home: http://www.blacktrash.org
Black Trash Productions on Facebook:
http://www.facebook.com/blacktrashproductions


More information about the Mercurial-devel mailing list