view tests/test-mq-strip @ 11521:3efadce5b346 stable

extensions: add a few assertions to wrapfunction() and wrapcommand(). Specifically, assert that the given wrapper is callable in both functions, and assert that the original was also callable in wrapfunction().
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 09 Jul 2010 11:04:00 +0200
parents 2313dc4d9817
children 64f284da1278
line wrap: on
line source

#!/bin/sh

. $TESTDIR/helpers.sh

echo "[extensions]" >> $HGRCPATH
echo "mq=" >> $HGRCPATH

teststrip() {
    hg up -C $1
    echo % before update $1, strip $2
    hg parents
    hg strip $2 | hidebackup
    echo % after update $1, strip $2
    hg parents
    hg unbundle -q .hg/strip-backup/*
    rm .hg/strip-backup/*
}

hg init test
cd test

echo foo > bar
hg ci -Ama

echo more >> bar
hg ci -Amb

echo blah >> bar
hg ci -Amc

hg up 1
echo blah >> bar
hg ci -Amd

echo final >> bar
hg ci -Ame

hg log

teststrip 4 4
teststrip 4 3
teststrip 1 4
teststrip 4 2
teststrip 4 1
teststrip null 4

hg log

hg up -C 2
hg merge 4
echo % before strip of merge parent
hg parents
hg strip 4 2>&1 | hidebackup
echo % after strip of merge parent
hg parents