view tests/test-mq-qnew @ 9021:2ccb527c7b1a

gendoc: fix localization of help topic When a topic provides a callable method for its text, most likely this text will be generated from different parts, so it does not make sense to apply gettext on the whole result, rather the method should provide translation by itself. This is the case with the extensions topic, which triggers a double gettext call, making the ASCII codec fail when it encounters 8 bit characters, and prevents the documentation from being built.
author Cédric Duval <cedricduval@free.fr>
date Sat, 04 Jul 2009 12:12:36 +0200
parents bd6deb7525f4
children f16ec85f125c
line wrap: on
line source

#!/bin/sh

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

hg init mq
cd mq

echo a > a
hg ci -Ama

echo '% qnew should refuse bad patch names'
hg qnew series
hg qnew status
hg qnew guards
hg qnew .hgignore

hg qinit -c

echo '% qnew with uncommitted changes'
echo a > somefile
hg add somefile
hg qnew uncommitted.patch
hg st
hg qseries
hg revert --no-backup somefile
rm somefile

echo '% qnew implies add'
hg qnew test.patch
hg -R .hg/patches st

echo '% qnew missing'
hg qnew missing.patch missing

echo '% qnew -m'
hg qnew -m 'foo bar' mtest.patch
cat .hg/patches/mtest.patch

echo '% qnew twice'
hg qnew first.patch
hg qnew first.patch

touch ../first.patch
hg qimport ../first.patch

echo '% qnew -f from a subdirectory'
hg qpop -a
mkdir d
cd d
echo b > b
hg ci -Am t
echo b >> b
hg st
hg qnew -g -f p
cat ../.hg/patches/p