view tests/test-merge-types @ 7655:cce37dab7ad6

branch closing: mark closed branches with a 'close' extra Adds a --close-branch option to commit. When --close-branch is present the commit will mark the changeset with close=1 in the changeset extras field. If a regular changeset is added on top of a closed head the branch is no longer considered closed, and thus re-opened.
author John Mulligan <phlogistonjohn@asynchrono.us>
date Wed, 14 Jan 2009 21:47:38 -0500
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