view tests/test-branchmap @ 9867:81f1462ef2c7

Allow import --no-commit over an applied MQ patch. Since it only changes the working directory, it does not matter whether a patch is applied. This change makes it easier to use hg import --no-commit instead of patch.
author Brendan Cully <brendan@kublai.com>
date Mon, 16 Nov 2009 11:31:08 -0800
parents 79e749b26b2b
children 7bb004fc14ec
line wrap: on
line source

#!/bin/sh

hgserve()
{
    hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -E errors.log -v $@ \
        | sed -e 's/:[0-9][0-9]*//g' -e 's/http:\/\/[^/]*\//http:\/\/localhost\//'
    cat hg.pid >> "$DAEMON_PIDS"
}

hg init a
hg --encoding utf-8 -R a branch æ
echo foo > a/foo
hg -R a ci -Am foo

hgserve -R a --config web.push_ssl=False --config web.allow_push=* --encoding latin1
hg --encoding utf-8 clone http://localhost:$HGPORT1 b
hg --encoding utf-8 -R b log
echo bar >> b/foo
hg -R b ci -m bar
hg --encoding utf-8 -R b push | sed "s/$HGPORT1/PORT/"
hg -R a --encoding utf-8 log

kill `cat hg.pid`