tests/test-merge-symlinks
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
Sat, 06 Oct 2007 15:30:15 -0300
changeset 5403 477136fa6571
parent 5391 786c1206a029
child 5408 36794dbe66a3
permissions -rwxr-xr-x
Always copy the necessary files before applying a git patch This patch removes the "copymod" attribute from the gitpatch class. AFAICS, that attribute was only used to delay the copying of renamed/copied files if there are no other changes to the target, but in this case, if there are changes to the source, we'll end up copying the wrong version. This should fix issue762.

#!/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