Mercurial > hg
view tests/test-merge-symlinks @ 5398:ecde0b7e0b3f
osutil.c: use readdir instead of readdir64
Some systems (e.g. *BSD) don't have a readdir64 function - the regular
readdir already uses 64-bit types.
On other systems (Linux, Solaris, ...), if Python was compiled with large
file support, Python.h will define _LARGEFILE_SOURCE and _FILE_OFFSET_BITS=64,
so that any call to readdir will actually be a call to readdir64. If Python
was not compiled with large file support, we probably don't want to define
these macros to avoid ABI problems.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sat, 06 Oct 2007 14:14:11 -0300 |
parents | 786c1206a029 |
children | 36794dbe66a3 |
line wrap: on
line source
#!/bin/sh "$TESTDIR/hghave" symlink || exit 80 cat > echo.py <<EOF #!/usr/bin/env python import os for k in ('HG_MY_ISLINK', 'HG_OTHER_ISLINK', 'HG_BASE_ISLINK'): print k, os.environ[k] EOF chmod +x echo.py # Create 2 heads containing the same file, once as # a file, once as a link. echo % create heads hg init t cd t echo a > a hg ci -qAm t0 echo l > l hg ci -qAm t1 hg up -C 0 ln -s a l hg ci -qAm t2 # Merge them and display *_ISLINK vars echo % merge heads HGMERGE=../echo.py hg merge