Abort if earlygetopt fails to detect an option.
Otherwise it could happen that a command is used on the wrong repository,
because abbreviations of --cwd or --repository were ignored.
#!/bin/sh
# a test for issue586
hg init a
cd a
echo a > a
hg ci -Ama
hg init ../b
cd ../b
echo b > b
hg ci -Amb
hg pull -f ../a
hg merge
hg rm -f a
hg ci -Amc
hg st -A