view tests/test-hgignore @ 1568:1d7d0c07e8f3

make all commands be repo-wide by default - refactor code in commands.py so that: if no pattern is given, the command will be repo-wide else it will work on the working dir - update the doc - fix the tests
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Thu, 01 Dec 2005 10:51:45 -0600
parents 91c0e8d7ddcf
children 182f500805db
line wrap: on
line source

#!/bin/sh

hg init
touch a.o
touch a.c
touch syntax
mkdir dir
touch dir/a.o
touch dir/b.o
touch dir/c.o

hg add dir/a.o
hg commit -m 0
hg add dir/b.o

echo "--" ; hg status

echo "*.o" > .hgignore
echo "--" ; hg status

echo ".*\.o" > .hgignore
echo "--" ; hg status

# XXX: broken
#echo "glob:**.o" > .hgignore
#echo "--" ; hg status
#
#echo "glob:*.o" > .hgignore
#echo "--" ; hg status

echo "syntax: invalid" > .hgignore
echo "--" ; hg status

echo "syntax: glob" > .hgignore
echo "*.o" >> .hgignore
echo "--" ; hg status

echo "relglob:syntax*" > .hgignore
echo "--" ; hg status

echo "relglob:*" > .hgignore
echo "--" ; hg status

cd dir
echo "--" ; hg status .