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/shhg init aecho a > a/ahg --cwd a ci -A -m ahg clone a becho b > b/bhg --cwd b ci -A -m bchmod 100 a/.hghg --cwd b push ../achmod 700 a/.hg