view tests/test-merge-types @ 7370:7bc62ebe7693

graphlog: refactor common grapher code Extracts the column and edge determination code into a separate function usable on generic DAGs with at most 2 parents per node. grapher() is very similar to graphmod.graph(). I shall look into merging them when I try visualizing patch branches in hgweb. Started using contexts and renamed a bunch of variables (fewer underscores).
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
date Fri, 14 Nov 2008 13:44:10 +0100
parents 026eb80060d8
children
line wrap: on
line source

#!/bin/sh

hg init
echo a > a
hg ci -Amadd       # 0

chmod +x a
hg ci -mexecutable # 1

hg up 0
rm a
ln -s symlink a
hg ci -msymlink    # 2
hg merge --debug

echo % symlink is local parent, executable is other

if [ -h a ]; then
    echo a is a symlink
    $TESTDIR/readlink.py a
elif [ -x a ]; then
    echo a is executable
else
    echo "a has no flags (default for conflicts)"
fi

hg update -C 1
hg merge --debug

echo % symlink is other parent, executable is local

if [ -h a ]; then
    echo a is a symlink
    $TESTDIR/readlink.py a
elif [ -x a ]; then
    echo a is executable
else
    echo "a has no flags (default for conflicts)"
fi