cat: default to working dir parent instead of tip
This introduces a defaultrev function that chooses
the working dir parent if a revision isn't specified,
and uses it in several places.
#!/bin/sh
mkdir t
cd t
hg init
echo a > a
hg add a
hg commit -m "test" -d "1000000 0"
hg verify
hg parents
hg status
hg rollback
hg verify
hg parents
hg status